EIP2930Signer

Git Source

Functions

encodeUnsignedTx

Encode an unsigned EIP-2930 transaction for signing

function encodeUnsignedTx(EIP2930Tx memory rawTx) internal pure returns (bytes memory);

Parameters

NameTypeDescription
rawTxEIP2930TxTransaction to encode

encodeSignedTx

Encode a signed EIP-2930 transaction

function encodeSignedTx(EIP2930Tx memory rawTx, SignatureRSV memory rsv) internal pure returns (bytes memory);

Parameters

NameTypeDescription
rawTxEIP2930TxTransaction which was signed
rsvSignatureRSVR, 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

NameTypeDescription
rawTxEIP2930TxTransaction to sign
pubkeyAddraddressEthereum address of secret key
secretKeybytes32Secret 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

NameTypeDescription
publicAddressaddressEthereum address of secret key
secretKeybytes32Secret key used to sign
transactionEIP2930TxTransaction to sign

Structs

EIP2930Tx

struct EIP2930Tx {
    uint64 nonce;
    uint256 gasPrice;
    uint64 gasLimit;
    address to;
    uint256 value;
    bytes data;
    EIPTypes.AccessList accessList;
    uint256 chainId;
}