private string MakeDummyTx(bool useNewCainId)
        {
            var tx = new Transaction
            {
                From     = "0x6bc32575acb8754886dc283c2c8ac54b1bd93195".HexToBytes().ToUInt160(),
                To       = "0x71B293C2593d4Ff9b534b2e691f56c1D18c95a17".HexToBytes().ToUInt160(),
                Value    = Money.Parse("100").ToUInt256(),
                Nonce    = 0,
                GasPrice = 5000000000,
                GasLimit = 4500000
            };

            var rlp = tx.Rlp(useNewCainId);

            var keyPair = new EcdsaKeyPair("0xd95d6db65f3e2223703c5d8e205d98e3e6b470f067b0f94f6c6bf73d4301ce48"
                                           .HexToBytes().ToPrivateKey());
            var receipt = _transactionSigner.Sign(tx, keyPair, useNewCainId);

            var s     = receipt.Signature;
            var rawTx = tx.RlpWithSignature(s, useNewCainId);

            return(rawTx.ToHex());
        }
Beispiel #2
0
 public static UInt256 FullHash(this Transaction t, Signature s, bool useNewId)
 {
     return(t.RlpWithSignature(s, useNewId).Keccak());
 }