GnosisSafe

Ethereum Browse chains

0xd9db270c1b5e3bd161e8c8503c55ceabee709552

Solidity v0.7.6+commit.7338295f

🤖
Query this contract from your AI
Reference: 0xd9db270c1b5e3bd161e8c8503c55ceabee709552
Sample prompt: "Tell me the current state of eth/0xd9db270c1b5e3bd161e8c8503c55ceabee709552"
No AI wired up yet? → mcp.smarts.md · Browse chains

Admin & Risk

Who can change the rules?

No admin risk controls detected from the verified ABI.

Overview

Read Functions
16
Write Functions
15
Events
15

Read Functions

Block #25,494,013 · just now
VERSION() view → 1.3.0

Returns the Gnosis Safe contract version string.✨ AI

Returns

Name Type Description
string The version identifier string for this Gnosis Safe contract (e.g., "1.3.0").✨ AI
approvedHashes(address, bytes32) view

Return the stored approval value for a given owner and operation hash.✨ AI

Parameters

Name Type Description
address
bytes32

Returns

Name Type Description
uint256 Uint256 value stored for this owner and hash, representing approval state or related metadata.✨ AI
checkNSignatures(dataHash: bytes32, data: bytes, signatures: bytes, requiredSignatures: uint256) view

Validate that the provided signatures satisfy the required number of owner confirmations for the given data.✨ AI

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

Parameters

Name Type Description
dataHash bytes32 Hash of the data (could be either a message hash or transaction hash)
data bytes That should be signed (this is passed to an external validator contract)
signatures bytes Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.
requiredSignatures uint256 Amount of required valid signatures.
checkSignatures(dataHash: bytes32, data: bytes, signatures: bytes) view

Validate that the supplied signatures authorize the provided data hash and payload against the Safe's owners and threshold.✨ AI

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

Parameters

Name Type Description
dataHash bytes32 Hash of the data (could be either a message hash or transaction hash)
data bytes That should be signed (this is passed to an external validator contract)
signatures bytes Signature data that should be verified. Can be ECDSA signature, contract signature (EIP-1271) or approved hash.
domainSeparator() view → 0xb0d1bc5d61a96b7e642e23eb0d9f7d3d53a1e9b75f5b28b8e68b1bdb8e9faecb

Returns the EIP-712 domain separator used to sign and verify typed data for the Safe.✨ AI

Returns

Name Type Description
bytes32 The EIP-712 domain separator as a bytes32 value, used for constructing and verifying typed data signatures.✨ AI
encodeTransactionData(to: address, value: uint256, data: bytes, operation: uint8, safeTxGas: uint256, baseGas: uint256, gasPrice: uint256, gasToken: address, refundReceiver: address, _nonce: uint256) view

Encode a Safe transaction into ABI-encoded bytes for signing, hashing, or transmission.✨ AI

dev: Returns the bytes that are hashed to be signed by owners.

Parameters

Name Type Description
to address Destination address.
value uint256 Ether value.
data bytes Data payload.
operation uint8 Operation type.
safeTxGas uint256 Gas that should be used for the safe transaction.
baseGas uint256 Gas costs for that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)
gasPrice uint256 Maximum gas price that should be used for this transaction.
gasToken address Token address (or 0 if ETH) that is used for the payment.
refundReceiver address Address of receiver of gas payment (or 0 if tx.origin).
_nonce uint256 Transaction nonce.

Returns

Name Type Description
bytes Transaction hash bytes.
getChainId() view → 1

Returns the chain ID of the current blockchain network.✨ AI

dev: Returns the chain id used by this contract.

Returns

Name Type Description
uint256 The current chain ID as a uint256.✨ AI
getModulesPaginated(start: address, pageSize: uint256) view

Return a page of enabled module addresses starting from the given address.✨ AI

dev: Returns array of modules.

Parameters

Name Type Description
start address Start of the page.
pageSize uint256 Maximum number of modules that should be returned.

Returns

Name Type Description
array address[] array Array of modules.
next address next Start of the next page.
getOwners() view reverted

Returns the list of owner addresses configured for this Safe.✨ AI

dev: Returns array of owners.

Returns

Name Type Description
address[] Array of Safe owners.
getStorageAt(offset: uint256, length: uint256) view

Read raw storage bytes starting at the given byte offset for the specified length.✨ AI

dev: Reads `length` bytes of storage in the currents contract

Parameters

Name Type Description
offset uint256 - the offset in the current contract's storage in words to start reading from
length uint256 - the number of words (32 bytes) of data to read

Returns

Name Type Description
bytes the bytes that were read.
getThreshold() view → 1

Return the number of owner confirmations required to execute a transaction from this Safe.✨ AI

Returns

Name Type Description
uint256 The current threshold (uint256) specifying how many owner approvals are required to execute transactions.✨ AI
getTransactionHash(to: address, value: uint256, data: bytes, operation: uint8, safeTxGas: uint256, baseGas: uint256, gasPrice: uint256, gasToken: address, refundReceiver: address, _nonce: uint256) view

Compute the transaction hash the Safe uses for signatures and execution.✨ AI

dev: Returns hash to be signed by owners.

Parameters

Name Type Description
to address Destination address.
value uint256 Ether value.
data bytes Data payload.
operation uint8 Operation type.
safeTxGas uint256 Fas that should be used for the safe transaction.
baseGas uint256 Gas costs for data used to trigger the safe transaction.
gasPrice uint256 Maximum gas price that should be used for this transaction.
gasToken address Token address (or 0 if ETH) that is used for the payment.
refundReceiver address Address of receiver of gas payment (or 0 if tx.origin).
_nonce uint256 Transaction nonce.

Returns

Name Type Description
bytes32 Transaction hash.
isModuleEnabled(module: address) view

Check if a module address is enabled for this Safe.✨ AI

dev: Returns if an module is enabled

Parameters

Name Type Description
module address Address of the module to check.✨ AI

Returns

Name Type Description
bool True if the module is enabled
isOwner(owner: address) view

Checks whether the given address is an owner of the Gnosis Safe.✨ AI

Parameters

Name Type Description
owner address Address to check for owner status.✨ AI

Returns

Name Type Description
bool True if the address is an owner; otherwise false.✨ AI
nonce() view → 0

Return the current transaction nonce of the wallet.✨ AI

Returns

Name Type Description
uint256 Current uint256 nonce used to number and prevent replay of Safe transactions.✨ AI
signedMessages(bytes32) view

Return the uint256 value stored for the given message hash.✨ AI

Parameters

Name Type Description
bytes32

Returns

Name Type Description
uint256 The uint256 value associated with the message hash, typically used to track approvals or signatures.✨ AI

Write Functions

addOwnerWithThreshold(owner: address, _threshold: uint256) nonpayable

Adds the owner `owner` to the Safe and updates the threshold to `_threshold`.

dev: Allows to add a new owner to the Safe and update the threshold at the same time. This can only be done via a Safe transaction.

Parameters

Name Type Description
owner address New owner address.
_threshold uint256 New threshold.
approveHash(hashToApprove: bytes32) nonpayable

Mark a transaction hash as approved by the calling owner.✨ AI

dev: Marks a hash as approved. This can be used to validate a hash that is used by a signature.

Parameters

Name Type Description
hashToApprove bytes32 The hash that should be marked as approved for signatures that are verified by this contract.
changeThreshold(_threshold: uint256) nonpayable

Changes the threshold of the Safe to `_threshold`.

dev: Allows to update the number of required confirmations by Safe owners. This can only be done via a Safe transaction.

Parameters

Name Type Description
_threshold uint256 New threshold.
disableModule(prevModule: address, module: address) nonpayable

Disables the module `module` for the Safe.

dev: Allows to remove a module from the whitelist. This can only be done via a Safe transaction.

Parameters

Name Type Description
prevModule address Module that pointed to the module to be removed in the linked list
module address Module to be removed.
enableModule(module: address) nonpayable

Enables the module `module` for the Safe.

dev: Allows to add a module to the whitelist. This can only be done via a Safe transaction.

Parameters

Name Type Description
module address Module to be whitelisted.
execTransaction(to: address, value: uint256, data: bytes, operation: uint8, safeTxGas: uint256, baseGas: uint256, gasPrice: uint256, gasToken: address, refundReceiver: address, signatures: bytes) payable

Execute a Safe transaction, sending optional ETH/data and handling gas reimbursement.✨ AI

dev: Allows to execute a Safe transaction confirmed by required number of owners and then pays the account that submitted the transaction. Note: The fees are always transferred, even if the user transaction fails.

Parameters

Name Type Description
to address Destination address of Safe transaction.
value uint256 Ether value of Safe transaction.
data bytes Data payload of Safe transaction.
operation uint8 Operation type of Safe transaction.
safeTxGas uint256 Gas that should be used for the Safe transaction.
baseGas uint256 Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)
gasPrice uint256 Gas price that should be used for the payment calculation.
gasToken address Token address (or 0 if ETH) that is used for the payment.
refundReceiver address Address of receiver of gas payment (or 0 if tx.origin).
signatures bytes Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})

Returns

Name Type Description
success bool success: true if the internal call succeeded; false otherwise.✨ AI
execTransactionFromModule(to: address, value: uint256, data: bytes, operation: uint8) nonpayable

Execute a transaction from a registered module using the Safe's funds and authority.✨ AI

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

Parameters

Name Type Description
to address Destination address of module transaction.
value uint256 Ether value of module transaction.
data bytes Data payload of module transaction.
operation uint8 Operation type of module transaction.

Returns

Name Type Description
success bool success: true if the transaction was executed successfully by the Safe, false otherwise.✨ AI
execTransactionFromModuleReturnData(to: address, value: uint256, data: bytes, operation: uint8) nonpayable

Execute a transaction originating from a module, forwarding value and calldata using the chosen operation.✨ AI

dev: Allows a Module to execute a Safe transaction without any further confirmations and return data

Parameters

Name Type Description
to address Destination address of module transaction.
value uint256 Ether value of module transaction.
data bytes Data payload of module transaction.
operation uint8 Operation type of module transaction.

Returns

Name Type Description
success bool success boolean indicating whether the transaction executed successfully.✨ AI
returnData bytes returnData bytes returned by the target call; may be empty if no data was returned.✨ AI
removeOwner(prevOwner: address, owner: address, _threshold: uint256) nonpayable

Removes the owner `owner` from the Safe and updates the threshold to `_threshold`.

dev: Allows to remove an owner from the Safe and update the threshold at the same time. This can only be done via a Safe transaction.

Parameters

Name Type Description
prevOwner address Owner that pointed to the owner to be removed in the linked list
owner address Owner address to be removed.
_threshold uint256 New threshold.
requiredTxGas(to: address, value: uint256, data: bytes, operation: uint8) nonpayable

Deprecated in favor of common/StorageAccessible.sol and will be removed in next version.

dev: Allows to estimate a Safe transaction. This method is only meant for estimation purpose, therefore the call will always revert and encode the result in the revert data. Since the `estimateGas` function includes refunds, call this method to get an estimated of the costs that are deducted from the safe with `execTransaction`

Parameters

Name Type Description
to address Destination address of Safe transaction.
value uint256 Ether value of Safe transaction.
data bytes Data payload of Safe transaction.
operation uint8 Operation type of Safe transaction.

Returns

Name Type Description
uint256 Estimate without refunds and overhead fees (base transaction and payload data gas costs).
setFallbackHandler(handler: address) nonpayable

Set the fallback handler contract that receives calls for unknown function selectors.✨ AI

dev: Allows to add a contract to handle fallback calls. Only fallback calls without value and with data will be forwarded. This can only be done via a Safe transaction.

Parameters

Name Type Description
handler address contract to handle fallbacks calls.
setGuard(guard: address) nonpayable

Set the guard contract that will validate or block Safe transactions.✨ AI

dev: Set a guard that checks transactions before execution

Parameters

Name Type Description
guard address The address of the guard to be used or the 0 address to disable the guard
setup(_owners: address[], _threshold: uint256, to: address, data: bytes, fallbackHandler: address, paymentToken: address, payment: uint256, paymentReceiver: address) nonpayable

Initialize the Safe with owners, threshold, optional setup call, and payment settings.✨ AI

dev: Setup function sets initial storage of contract.

Parameters

Name Type Description
_owners address[] List of Safe owners.
_threshold uint256 Number of required confirmations for a Safe transaction.
to address Contract address for optional delegate call.
data bytes Data payload for optional delegate call.
fallbackHandler address Handler for fallback calls to this contract
paymentToken address Token that should be used for the payment (0 is ETH)
payment uint256 Value that should be paid
paymentReceiver address Adddress that should receive the payment (or 0 if tx.origin)
simulateAndRevert(targetContract: address, calldataPayload: bytes) nonpayable

Simulates a call to targetContract using calldataPayload and intentionally reverts to expose the call result without changing state.✨ AI

dev: Performs a delegetecall on a targetContract in the context of self. Internally reverts execution to avoid side effects (making it static). This method reverts with data equal to `abi.encode(bool(success), bytes(response))`. Specifically, the `returndata` after a call to this method will be: `success:bool || response.length:uint256 || response:bytes`.

Parameters

Name Type Description
targetContract address Address of the contract containing the code to execute.
calldataPayload bytes Calldata that should be sent to the target contract (encoded method name and arguments).
swapOwner(prevOwner: address, oldOwner: address, newOwner: address) nonpayable

Replaces the owner `oldOwner` in the Safe with `newOwner`.

dev: Allows to swap/replace an owner from the Safe with another address. This can only be done via a Safe transaction.

Parameters

Name Type Description
prevOwner address Owner that pointed to the owner to be replaced in the linked list
oldOwner address Owner address to be replaced.
newOwner address New owner address.

Events

AddedOwner(owner: address)
Name Type Indexed Description
owner address
ApproveHash(approvedHash: bytes32, owner: address)
Name Type Indexed Description
approvedHash bytes32
owner address
ChangedFallbackHandler(handler: address)
Name Type Indexed Description
handler address
ChangedGuard(guard: address)
Name Type Indexed Description
guard address
ChangedThreshold(threshold: uint256)
Name Type Indexed Description
threshold uint256
DisabledModule(module: address)
Name Type Indexed Description
module address
EnabledModule(module: address)
Name Type Indexed Description
module address
ExecutionFailure(txHash: bytes32, payment: uint256)
Name Type Indexed Description
txHash bytes32
payment uint256
ExecutionFromModuleFailure(module: address)
Name Type Indexed Description
module address
ExecutionFromModuleSuccess(module: address)
Name Type Indexed Description
module address
ExecutionSuccess(txHash: bytes32, payment: uint256)
Name Type Indexed Description
txHash bytes32
payment uint256
RemovedOwner(owner: address)
Name Type Indexed Description
owner address
SafeReceived(sender: address, value: uint256)
Name Type Indexed Description
sender address
value uint256
SafeSetup(initiator: address, owners: address[], threshold: uint256, initializer: address, fallbackHandler: address)
Name Type Indexed Description
initiator address
owners address[]
threshold uint256
initializer address
fallbackHandler address
SignMsg(msgHash: bytes32)
Name Type Indexed Description
msgHash bytes32