SafeSingletonContract class
Methods
-
addOwnerWithThreshold({required ETHAddress address, required int threshold})
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Adds the owner
owner to the Safe and updates the threshold to threshold.
override
-
approvedHashes({required EthereumProvider provider, required ETHAddress address, required List<int> messageHash})
→ Future<bool>
-
"stateMutability": "view",
Returns a non-zero value if the
messageHash is approved by the owner
override
-
approveHash(List<int> hashToApprove)
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Marks hash
hashToApprove as approved for msg.sender.
override
-
changeMasterCopy(ETHAddress masterCopy)
→ Future<SafeContractEncodedCall>
-
override
-
changeThreshold(int threshold)
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Changes the threshold of the Safe to
threshold.
override
-
checkNSignatures({required List<int> dataHash, required List<int> data, required List<int> signatures, required BigInt requiredSignatures, required EthereumProvider provider})
→ Future<bool>
-
"stateMutability": "view",
Checks whether the provided signature is valid for the given hash.
Reverts if the signature is invalid.
override
-
checkNSignatures2({required ETHAddress address, required List<int> dataHash, required List<int> signatures, required BigInt requiredSignatures, required EthereumProvider provider})
→ Future<bool>
-
"stateMutability": "view",
Checks whether the provided signature is valid for the given hash.
Reverts if the signature is invalid.
override
-
checkSignatures({required List<int> dataHash, required List<int> data, required List<int> signatures, required EthereumProvider provider})
→ Future<bool>
-
"stateMutability": "view",
Checks whether the signature provided is valid for the provided data and hash. Reverts otherwise.
override
-
checkSignatures2({required List<int> dataHash, required ETHAddress executor, required List<int> signatures, required EthereumProvider provider})
→ Future<bool>
-
"stateMutability": "view",
Checks whether the signature provided is valid for the provided data and hash and executor. Reverts otherwise.
override
-
decodeContractEvents(List<LogEntry> logs)
→ List<SafeContractEvent>
-
inherited
-
disableModule({required ETHAddress prevModule, required ETHAddress module})
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Disables the module
module for the Safe.
override
-
domainSeparator(EthereumProvider provider)
→ Future<List<int>>
-
"stateMutability": "view",
Returns the domain separator for this contract, as defined in the EIP-712 standard.
override
-
domainSeparatorTypeHash(EthereumProvider provider)
→ Future<List<int>>
-
"stateMutability": "view",
The precomputed EIP-712 domain separator hash for Safe typed data hashing and signing.
override
-
enableModule(ETHAddress module)
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Enables the module
module for the Safe.
override
-
encodeTransactionCall({required SafeContractFunction functionName, List<int>? selector, List<Object> params = const [], ONVALIDATEFUNCTION? onValidateFunction})
→ SafeContractEncodedCall
-
inherited
-
encodeTransactionData({required ETHAddress to, BigInt? value, List<int>? data, SafeContractExecutionOpration operation = SafeContractExecutionOpration.call, BigInt? safeTxGas, BigInt? baseGas, BigInt? gasPrice, ETHAddress? gasToken, ETHAddress? refundReceiver, required BigInt nonce, required EthereumProvider provider})
→ Future<List<int>>
-
"stateMutability": "view",
Returns the pre-image of the Safe transaction hash.
Parameters:
override
-
execTransaction({required ETHAddress to, BigInt? value, List<int>? data, SafeContractExecutionOpration operation = SafeContractExecutionOpration.call, BigInt? safeTxGas, BigInt? baseGas, BigInt? gasPrice, ETHAddress? gasToken, ETHAddress? refundReceiver, required List<int> signatures})
→ Future<SafeContractEncodedCall>
-
"stateMutability": "payable",
Parameters:
override
-
execTransactionFromModule({required ETHAddress to, BigInt? value, List<int>? data, SafeContractExecutionOpration operation = SafeContractExecutionOpration.call})
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Executes an
operation to to with native token value.
override
-
execTransactionFromModuleReturnData({required ETHAddress to, BigInt? value, List<int>? data, SafeContractExecutionOpration operation = SafeContractExecutionOpration.call})
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Executes an
operation on the target address to with the specified
native token value, and returns the result data.
override
-
getChainId(EthereumProvider provider)
→ Future<BigInt>
-
Returns the ID of the chain the contract is currently deployed on.
override
-
getEvents()
→ List<SafeContractEventType>
-
inherited
-
getMessageHash({required EthereumProvider provider, required List<int> message})
→ Future<List<int>>
-
"stateMutability": "view",
Returns the hash of a message to be signed by owners.
override
-
getMethods()
→ List<SafeContractFunction>
-
inherited
-
getModules(EthereumProvider provider)
→ Future<List<ETHAddress>>
-
"stateMutability": "view",
Returns array of first 10 modules.
override
-
getModulesPaginated({required EthereumProvider provider, ETHAddress? start, required int pageSize})
→ Future<(List<ETHAddress>, ETHAddress)>
-
Returns an array of modules.
override
-
getOwners(EthereumProvider provider)
→ Future<List<ETHAddress>>
-
"stateMutability": "view",
Returns a list of Safe owners.
override
-
getStorageAt({required EthereumProvider provider, required int offset, required int length})
→ Future<List<int>>
-
"stateMutability": "view",
length bytes of storage in the current contract
override
-
getThreshold(EthereumProvider provider)
→ Future<BigInt>
-
"stateMutability": "view",
Returns the number of required confirmations for a Safe transaction aka the threshold.
override
-
getTransactionHash({required ETHAddress to, BigInt? value, List<int>? data, SafeContractExecutionOpration operation = SafeContractExecutionOpration.call, BigInt? safeTxGas, BigInt? baseGas, BigInt? gasPrice, ETHAddress? gasToken, ETHAddress? refundReceiver, required BigInt nonce, required EthereumProvider provider})
→ Future<List<int>>
-
"stateMutability": "view",
Returns the transaction hash that must be signed by the Safe owners.
Parameters:
override
-
getVersion(EthereumProvider provider)
→ Future<String>
-
Returns a descriptive version of the Safe contract.
override
-
isModuleEnabled({required ETHAddress address, required EthereumProvider provider})
→ Future<bool>
-
"stateMutability": "view",
Returns whether or not a module is enabled.
override
-
isOwner({required ETHAddress owner, required EthereumProvider provider})
→ Future<bool>
-
"stateMutability": "view",
if
owner is an owner of the Safe.
override
-
isValidSignature({required List<int> data, required List<int> signature})
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
override
-
name(EthereumProvider provider)
→ Future<String>
-
"stateMutability": "view",
Returns a descriptive version of the Safe contract.
override
-
nonce(EthereumProvider provider)
→ Future<BigInt>
-
"stateMutability": "view",
Returns the nonce of the Safe contract.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
queryContract<T extends Object>({ONPARSECALLREQUEST<T>? onResponse, required SafeContractFunction functionName, required EthereumProvider provider, List<int>? selector, List<Object> params = const []})
→ Future<T>
-
inherited
-
removeOwner({required ETHAddress prevOwner, required ETHAddress owner, required BigInt threshold})
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Removes the specified
owner from the Safe and updates the signature threshold.
override
-
requiredTxGas({required ETHAddress to, BigInt? value, List<int>? data, SafeContractExecutionOpration operation = SafeContractExecutionOpration.call})
→ Future<SafeContractEncodedCall>
-
override
-
safeMsgTypeHash(EthereumProvider provider)
→ Future<List<int>>
-
"stateMutability": "view",
The precomputed EIP-712 type hash for the Safe message type.
override
-
safeTxTypeHash(EthereumProvider provider)
→ Future<List<int>>
-
"stateMutability": "view",
The precomputed EIP-712 type hash for the Safe transaction type.
override
-
sentinelModules(EthereumProvider provider)
→ Future<ETHAddress>
-
"stateMutability": "view",
The sentinel module value in the {ModuleManager.modules} linked list.
override
-
sentinelOwners(EthereumProvider provider)
→ Future<ETHAddress>
-
The sentinel owner value in the {owners} linked list.
override
-
setFallbackHandler(ETHAddress handler)
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Sets the fallback handler contract (
handler) for the Safe.
override
-
setGuard(ETHAddress guard)
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
A contract that manages transaction guards, which perform
pre- and post-execution checks on Safe transactions.
override
-
setModuleGuard(ETHAddress moduleGuard)
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Sets the module guard (
moduleGuard) for the Safe.
Make sure you trust the module guard before setting it.
override
-
setup({required List<ETHAddress> owners, required BigInt threshold, ETHAddress? to, List<int>? data, ETHAddress? fallbackHandler, ETHAddress? paymentToken, BigInt? payment, ETHAddress? paymentReceiver})
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Initializes the Safe account with its initial storage configuration.
override
-
signedMessages({required EthereumProvider provider, required List<int> messageHash})
→ Future<bool>
-
"stateMutability": "view",
Returns a non-zero value if the
messageHash is signed for the Safe.
override
-
signMessage(List<int> data)
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Can be verified using EIP-1271 validation method by passing the pre-image of the message hash and empty bytes as the signature.
override
-
simulateAndRevert({required ETHAddress targetContract, required List<int> calldataPayload})
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Executes a
DELEGATECALL to the specified targetContract
within the context of the current contract (self).
override
-
swapOwner({required ETHAddress prevOwner, required ETHAddress oldOwner, required ETHAddress newOwner})
→ Future<SafeContractEncodedCall>
-
"stateMutability": "nonpayable",
Replaces an existing owner (
oldOwner) in the Safe with a new owner (newOwner).
override
-
toString()
→ String
-
A string representation of this object.
inherited