Added MultiSig test + limited support of versioned transactions. 2nd version of transfer transaction allows to put several proofs instead of single signature. This version specially activated for this test, by default 1st version (now working on MainNet) is used.
[TestMethod]
public void MultisigTest()
{
// This test works with tranfer transactions of version 2 only
TransferTransaction.Version = 2;
var node = new Node();
var script = $@"
let aliceSigned = sigVerify(tx.bodyBytes, tx.proofs[0], base58'{Accounts.Alice.PublicKey.ToBase58()}')
let bobSigned = sigVerify(tx.bodyBytes, tx.proofs[1], base58'{Accounts.Bob.PublicKey.ToBase58()}')
aliceSigned && bobSigned";
Console.WriteLine($"Scrit: {script}");
var compiledScript = node.CompileScript(script);
var multiAccount = PrivateKeyAccount.CreateFromSeed(PrivateKeyAccount.GenerateSeed(), AddressEncoding.TestNet);
Console.WriteLine("Account generated: {0}", multiAccount.Address);
node.Transfer(Accounts.Alice, multiAccount.Address, Assets.WAVES, 0.1m);
Thread.Sleep(10000);
Assert.IsTrue(node.GetBalance(multiAccount.Address) == 0.1m);
var setScriptTx = new SetScriptTransaction(multiAccount.PublicKey, compiledScript, 'T');
setScriptTx.Sign(multiAccount);
node.Broadcast(setScriptTx.GetJsonWithSignature());
Thread.Sleep(10000);
var tx = new TransferTransaction(multiAccount.PublicKey, Accounts.Alice.Address, Assets.WAVES, 0.09m, 0.005m);
tx.Sign(Accounts.Alice, 0);
tx.Sign(Accounts.Bob, 1);
node.Broadcast(tx);
Thread.Sleep(10000);
Assert.IsTrue(node.GetBalance(multiAccount.Address) < 0.02m);
}