ISafe

Git Source

Functions

execTransactionFromModule

Allows a Module to execute a Safe transaction without any further confirmations.

function execTransactionFromModule(address to, uint256 value, bytes memory data, uint8 operation)
    external
    returns (bool success);

Parameters

NameTypeDescription
toaddressDestination address of module transaction.
valueuint256Ether value of module transaction.
databytesData payload of module transaction.
operationuint8Operation type of module transaction.

execTransactionFromModuleReturnData

Execute operation (0: Call, 1: DelegateCall) to to with value (Native Token) and return data

function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, uint8 operation)
    external
    returns (bool success, bytes memory returnData);

Parameters

NameTypeDescription
toaddressDestination address of module transaction.
valueuint256Ether value of module transaction.
databytesData payload of module transaction.
operationuint8Operation type of module transaction.

Returns

NameTypeDescription
successboolBoolean flag indicating if the call succeeded.
returnDatabytesData returned by the call.

checkSignatures

Checks whether the signature provided is valid for the provided data, hash. Will revert otherwise.

function checkSignatures(bytes32 dataHash, bytes memory data, bytes memory signatures) external view;

Parameters

NameTypeDescription
dataHashbytes32Hash of the data (could be either a message hash or transaction hash)
databytesThat should be signed (this is passed to an external validator contract)
signaturesbytesSignature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.

domainSeparator

Returns the domain separator for this contract, as defined in the EIP-712 standard.

function domainSeparator() external view returns (bytes32);

Returns

NameTypeDescription
<none>bytes32bytes32 The domain separator hash.

getModulesPaginated

Returns array of modules.

function getModulesPaginated(address start, uint256 pageSize)
    external
    view
    returns (address[] memory array, address next);

Parameters

NameTypeDescription
startaddressStart of the page.
pageSizeuint256Maximum number of modules that should be returned.

Returns

NameTypeDescription
arrayaddress[]Array of modules.
nextaddressStart of the next page.

enableModule

Enables the module module for the Safe.

This can only be done via a Safe transaction.

function enableModule(address module) external;

Parameters

NameTypeDescription
moduleaddressModule to be enabled.

getThreshold

Returns the number of required confirmations for a Safe transaction aka the threshold.

function getThreshold() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256Threshold number.