private Transaction MakeTestTransaction(Random rnd) { Fixed8.TryParse((rnd.Next(1, 10000) * 0.00001).ToString(), out Fixed8 price); using (ScriptBuilder sb = new ScriptBuilder()) { sb.EmitSysCall("Zoro.NativeNEP5.Call", "Transfer", Genesis.BcpContractAddress, scriptHash, targetscripthash, new BigInteger(1)); InvocationTransaction tx = new InvocationTransaction { Nonce = Transaction.GetNonce(), Script = sb.ToArray(), GasPrice = price, GasLimit = Fixed8.FromDecimal(1000), Account = ZoroHelper.GetPublicKeyHash(keypair.PublicKey) }; tx.Attributes = new TransactionAttribute[0]; tx.Witnesses = new Witness[0]; byte[] data = ZoroHelper.GetHashData(tx); byte[] signdata = ZoroHelper.Sign(data, keypair.PrivateKey, keypair.PublicKey); ZoroHelper.AddWitness(tx, signdata, keypair.PublicKey); return(tx); } }