Transactions
Transactions is a library with utilities to encode, decode and sign Ethereum transactions.
Functionsβ
encodeRLPβ
Encode a EIP-155 transaction in RLP.
Input:
txStruct
(EIP155): Is the transaction structure.
Output:
output
(bytes
): The encoded RLP bytes.
encodeRLPβ
Encode a EIP-1559 request transaction in RLP.
Input:
txStruct
(EIP155Request): Is the transaction structure.
Output:
output
(bytes
): The encoded RLP bytes.
encodeRLPβ
Encode a EIP-1559 transaction in RLP.
Input:
txStruct
(EIP1559): Is the transaction structure.
Output:
output
(bytes
): The encoded RLP bytes.
encodeRLPβ
Encode a EIP-1559 request transaction in RLP.
Input:
txStruct
(EIP1559Request): Is the transaction structure.
Output:
output
(bytes
): The encoded RLP bytes.
decodeRLP_EIP155β
Decode a EIP-155 transaction from RLP.
Input:
rlp
(bytes
): Is the encoded RLP bytes.
Output:
txStruct
(EIP155): The transaction structure.
decodeRLP_EIP155Requestβ
Decode a EIP-155 request transaction from RLP.
Input:
rlp
(bytes
): Is the encoded RLP bytes.
Output:
txStruct
(EIP155Request): The transaction structure.
decodeRLP_EIP1559β
Decode a EIP-1559 transaction from RLP.
Input:
rlp
(bytes
): Is the encoded RLP bytes.
Output:
txStruct
(EIP1559): The transaction structure.
decodeRLP_EIP1559Requestβ
Decode a EIP-1559 request transaction from RLP.
Input:
rlp
(bytes
): Is the encoded RLP bytes.
Output:
txStruct
(EIP1559Request): The transaction structure.
signTxnβ
Sign a EIP-155 transaction request.
Input:
-
request
(EIP1559Request): Is the transaction request. -
signingKey
(string
): Is the private key to sign the transaction.
Output:
response
(EIP1559): The signed transaction.
signTxnβ
Sign a EIP-155 transaction request.
Input:
-
request
(EIP155Request): Is the transaction request. -
signingKey
(string
): Is the private key to sign the transaction.
Output:
response
(EIP155): The signed transaction.
Structsβ
EIP155β
EIP-155 transaction structure.
to
(address
): Is the target address.gas
(uint256
): Is the gas limit.gasPrice
(uint256
): Is the gas price.value
(uint256
): Is the transfer value in gwei.nonce
(uint256
): Is the latest nonce of the sender.data
(bytes
): Is the transaction data.chainId
(uint256
): Is the id of the chain where the transaction will be executed.r
(bytes32
): Is the 'r' signature value.s
(bytes32
): Is the 's' signature value.v
(uint256
): Is the 'v' signature value.
EIP155Requestβ
EIP-155 transaction request structure.
to
(address
): Is the target address.gas
(uint256
): Is the gas limit.gasPrice
(uint256
): Is the gas price.value
(uint256
): Is the transfer value in gwei.nonce
(uint256
): Is the latest nonce of the sender.data
(bytes
): Is the transaction data.chainId
(uint256
): Is the id of the chain where the transaction will be executed.
EIP1559β
EIP-1559 transaction structure.
to
(address
): Is the target address.gas
(uint256
): Is the gas limit.maxFeePerGas
(uint256
): Is the maximum fee per gas.maxPriorityFeePerGas
(uint256
): Is the maximum priority fee per gas.value
(uint256
): Is the transfer value in gwei.nonce
(uint256
): Is the latest nonce of the sender.data
(bytes
): Is the transaction data.chainId
(uint256
): Is the id of the chain where the transaction will be executed.accessList
(bytes
): Is the access list.r
(bytes32
): Is the 'r' signature value.s
(bytes32
): Is the 's' signature value.v
(uint256
): Is the 'v' signature value.
EIP1559Requestβ
EIP-1559 transaction request structure.
to
(address
): Is the target address.gas
(uint256
): Is the gas limit.maxFeePerGas
(uint256
): Is the maximum fee per gas.maxPriorityFeePerGas
(uint256
): Is the maximum priority fee per gas.value
(uint256
): Is the transfer value in gwei.nonce
(uint256
): Is the latest nonce of the sender.data
(bytes
): Is the transaction data.chainId
(uint256
): Is the id of the chain where the transaction will be executed.accessList
(bytes
): Is the access list.