LibCall
Constants
CALL_TYPE
bytes constant CALL_TYPE = abi.encodePacked("Call(address target,uint256 value,bytes data)")
CALL_TYPE_HASH
bytes32 constant CALL_TYPE_HASH = keccak256(CALL_TYPE)
Functions
callContract
function callContract(Call calldata call) internal returns (bytes memory result);
tryCall
function tryCall(Call calldata call) internal returns (bool success, bool exceededMaxCopy, bytes memory result);
hash
Raw hash of Call data WITHOUT type hash — utility function
For EIP712-compliant hashing, use hashType() instead
function hash(Call calldata call) public pure returns (bytes32 callHash);
hashType
EIP712 hashStruct for Call — includes CALL_TYPE_HASH
Matches: hashStruct(Call) = keccak256(CALL_TYPE_HASH ‖ encodeData(Call))
function hashType(Call calldata call) public pure returns (bytes32 callHash);
hash
Generates a deterministic hash for a Call[]
function hash(Call[] calldata calls) public pure returns (bytes32 callsHash);
Parameters
| Name | Type | Description |
|---|---|---|
calls | Call[] | The Call[] to hash |
Returns
| Name | Type | Description |
|---|---|---|
callsHash | bytes32 | The unique hash for this Call[] |
hashType
EIP712 hashStruct for Call[]
function hashType(Call[] calldata calls) public pure returns (bytes32 callsHash);
Parameters
| Name | Type | Description |
|---|---|---|
calls | Call[] | The Call[] to hash |
Returns
| Name | Type | Description |
|---|---|---|
callsHash | bytes32 | The unique hash for this Call[] |