EIP2930Signer
Functions
encodeUnsignedTx
Encode an unsigned EIP-2930 transaction for signing
function encodeUnsignedTx(EIP2930Tx memory rawTx) internal pure returns (bytes memory);
Parameters
Name | Type | Description |
---|---|---|
rawTx | EIP2930Tx | Transaction to encode |
encodeSignedTx
Encode a signed EIP-2930 transaction
function encodeSignedTx(EIP2930Tx memory rawTx, SignatureRSV memory rsv) internal pure returns (bytes memory);
Parameters
Name | Type | Description |
---|---|---|
rawTx | EIP2930Tx | Transaction which was signed |
rsv | SignatureRSV | R, S & V parameters of signature |
signRawTx
Sign a raw transaction
function signRawTx(EIP2930Tx memory rawTx, address pubkeyAddr, bytes32 secretKey)
internal
view
returns (SignatureRSV memory ret);
Parameters
Name | Type | Description |
---|---|---|
rawTx | EIP2930Tx | Transaction to sign |
pubkeyAddr | address | Ethereum address of secret key |
secretKey | bytes32 | Secret key used to sign |
sign
Sign a transaction, returning it in EIP-2930 encoded form
function sign(address publicAddress, bytes32 secretKey, EIP2930Tx memory transaction)
internal
view
returns (bytes memory);
Parameters
Name | Type | Description |
---|---|---|
publicAddress | address | Ethereum address of secret key |
secretKey | bytes32 | Secret key used to sign |
transaction | EIP2930Tx | Transaction to sign |
Structs
EIP2930Tx
struct EIP2930Tx {
uint64 nonce;
uint256 gasPrice;
uint64 gasLimit;
address to;
uint256 value;
bytes data;
EIPTypes.AccessList accessList;
uint256 chainId;
}