EIP155Signer

Git Source

Functions

encodeSignedTx

Encode a signed EIP-155 transaction.

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

Parameters

NameTypeDescription
rawTxEthTxTransaction which was signed.
rsvSignatureRSVR, S & V parameters of signature.

signRawTx

Sign a raw transaction, which will then need to be encoded to include the signature.

function signRawTx(EthTx memory rawTx, address pubkeyAddr, bytes32 secretKey)
    internal
    view
    returns (SignatureRSV memory ret);

Parameters

NameTypeDescription
rawTxEthTxTransaction to sign.
pubkeyAddraddressEthereum address of secret key.
secretKeybytes32Secret key used to sign.

sign

Sign a transaction, returning it in EIP-155 encoded form.

function sign(address publicAddress, bytes32 secretKey, EthTx memory transaction)
    internal
    view
    returns (bytes memory);

Parameters

NameTypeDescription
publicAddressaddressEthereum address of secret key.
secretKeybytes32Secret key used to sign.
transactionEthTxTransaction to sign.

Structs

EthTx

struct EthTx {
    uint64 nonce;
    uint256 gasPrice;
    uint64 gasLimit;
    address to;
    uint256 value;
    bytes data;
    uint256 chainId;
}