mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-11 21:04:11 +00:00
Add initTransaction
This commit is contained in:
parent
826206d054
commit
1f0766c5d4
@ -8,6 +8,18 @@
|
|||||||
import
|
import
|
||||||
constants, errors, eth_common, eth_keys, nimcrypto, rlp
|
constants, errors, eth_common, eth_keys, nimcrypto, rlp
|
||||||
|
|
||||||
|
proc initTransaction*(nonce: AccountNonce, gasPrice, gasLimit: GasInt, to: EthAddress,
|
||||||
|
value: UInt256, payload: Blob, V: byte, R, S: UInt256, isContractCreation = false): Transaction =
|
||||||
|
result.accountNonce = nonce
|
||||||
|
result.gasPrice = gasPrice
|
||||||
|
result.gasLimit = gasLimit
|
||||||
|
result.to = to
|
||||||
|
result.value = value
|
||||||
|
result.V = V
|
||||||
|
result.R = R
|
||||||
|
result.S = S
|
||||||
|
result.isContractCreation = isContractCreation
|
||||||
|
|
||||||
proc intrinsicGas*(t: Transaction): GasInt =
|
proc intrinsicGas*(t: Transaction): GasInt =
|
||||||
# Compute the baseline gas cost for this transaction. This is the amount
|
# Compute the baseline gas cost for this transaction. This is the amount
|
||||||
# of gas needed to send this transaction (but that is not actually used
|
# of gas needed to send this transaction (but that is not actually used
|
||||||
|
Loading…
x
Reference in New Issue
Block a user