EIP155Signer
Functions
encodeSignedTx
Encode a signed EIP-155 transaction.
function encodeSignedTx(EthTx memory rawTx, SignatureRSV memory rsv) internal pure returns (bytes memory);
Parameters
Name | Type | Description |
---|---|---|
rawTx | EthTx | Transaction which was signed. |
rsv | SignatureRSV | R, 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
Name | Type | Description |
---|---|---|
rawTx | EthTx | 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-155 encoded form.
function sign(address publicAddress, bytes32 secretKey, EthTx 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 | EthTx | Transaction to sign. |
Structs
EthTx
struct EthTx {
uint64 nonce;
uint256 gasPrice;
uint64 gasLimit;
address to;
uint256 value;
bytes data;
uint256 chainId;
}