Example #1
0
 /// <summary>
 /// Generates transaction.
 /// That transaction can be added to a produced block or broadcasted - if <see cref="GeneratedTransaction"/> is used as <see cref="T"/>.
 /// That transaction can be used in <see cref="Call(Nethermind.Core.BlockHeader,Nethermind.Core.Transaction)"/> if <see cref="SystemTransaction"/> is used as <see cref="T"/>.
 /// </summary>
 /// <param name="function">Function in contract that is called by the transaction.</param>
 /// <param name="sender">Sender of the transaction - caller of the function.</param>
 /// <param name="arguments">Arguments to the function.</param>
 /// <typeparam name="T">Type of <see cref="Transaction"/>.</typeparam>
 /// <returns>Transaction.</returns>
 protected Transaction GenerateTransaction <T>(AbiFunctionDescription function, Address sender, params object[] arguments) where T : Transaction, new()
 => GenerateTransaction <T>(AbiEncoder.Encode(function.GetCallInfo(), arguments), sender);