Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
Multisig Wallet
copy icon
Gnosis
• version 1.0.0
Wallet
Multisig
Audited

Multisig Wallet

Audited

A multisignature wallet with support for confirmations using signed messages based on ERC191. Built by Gnosis.

*Visit desktop site to download or deploy

Version

1.0.0

Creator

Gnosis

Recent Use

🍞 0xf856 downloaded
🥐 0xE0e0 downloaded
🥖 0x0eF9 downloaded
🥨 0xC065 downloaded

Last Publish

9/26/2022
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
setup(uint256,address,address,address,uint256,address) :
This function sets up a multi-signature wallet contract. It takes in an array of addresses (_owners) and a threshold (_threshold) to determine how many signatures are required to approve a transaction. It also takes in an address (to) and data (calldata) to set up any additional modules. It also takes in a fallbackHandler address, a paymentToken address, a payment amount, and a paymentReceiver address. If the payment amount is greater than 0, the function will handle the payment. Finally, the function emits an event to signal that the setup is complete. (autogenerated documentation)
execTransaction(address,uint256,uint256,uint256,uint256,address,address) :
This function is used to execute a transaction on the Ethereum blockchain. It takes in a variety of parameters, including the address of the recipient, the amount of Ether to be sent, the data associated with the transaction, the type of operation being performed, the amount of gas to be used, the base gas, the gas price, the gas token, the refund receiver, and the signatures associated with the transaction. The function first encodes the transaction data into a bytes32 hash, which is then used to check the signatures. It then calls the guard contract to check the transaction, and requires that the gas left is greater than the safeTxGas multiplied by 64 divided by 63, or the safeTxGas plus 2500, whichever (autogenerated documentation)
handlePayment(uint256,uint256,uint256,address,address) :
This function is used to handle payments for a transaction. It takes in the gas used, base gas, gas price, gas token, and refund receiver as parameters. If the gas token is set to 0, the payment is calculated by adding the gas used and base gas, and then multiplying it by the gas price (or the transaction's gas price, whichever is lower). The payment is then sent to the refund receiver (or the transaction's origin if the refund receiver is set to 0). If the gas token is not set to 0, the payment is calculated in the same way, but the payment is sent to the refund receiver using the transferToken function. (autogenerated documentation)
checkSignatures(bytes32) :
This function checks the validity of a set of signatures against a given data hash. It takes in three parameters: a data hash, the data itself, and the signatures. It first checks that the threshold is greater than 0, and then calls the checkNSignatures function, passing in the data hash, data, signatures, and the threshold. The checkNSignatures function then verifies that the signatures are valid and that the number of valid signatures is greater than or equal to the threshold. (autogenerated documentation)
checkNSignatures(bytes32,uint256) :
This function is used to check the validity of a set of signatures for a given data hash. It takes in the data hash, the data, the signatures, and the required number of signatures as parameters. It then iterates through the signatures, verifying each one. If the signature is a 0, it checks that the signature is valid using the ISignatureValidator interface. If the signature is a 1, it checks that the sender is the current owner or that the data hash has been approved. If the signature is greater than 30, it uses the Ethereum Signed Message prefix to recover the address. Finally, it checks that the current owner is greater than the last owner, that the owner is not the zero address, and that the (autogenerated documentation)
requiredTxGas(address,uint256) :
This function is used to calculate the amount of gas required to execute a transaction. It takes in four parameters: the address of the recipient, the value of the transaction, the data associated with the transaction, and the type of operation being performed. It then stores the amount of gas left in the startGas variable, calls the execute() function to perform the transaction, and calculates the amount of gas used by subtracting the amount of gas left after the transaction from the amount of gas left before the transaction. Finally, it reverts the transaction and returns the amount of gas used. (autogenerated documentation)
approveHash(bytes32) :
This function allows a user to approve a hash. It requires that the sender is an owner, and then sets the approvedHashes mapping to 1 for the given hash and sender. It then emits an ApproveHash event with the hash and sender. (autogenerated documentation)
getChainId() :
This function returns the chain ID of the current Ethereum network. It does this by using the chainid() assembly instruction, which returns the chain ID of the current network. The function then returns the chain ID as a uint256. (autogenerated documentation)
domainSeparator() :
This function returns a bytes32 value that is the result of a keccak256 hash of the DOMAIN_SEPARATOR_TYPEHASH, the chain ID, and the address of the contract. This is used to create a unique identifier for the contract that can be used to verify the authenticity of signed messages. (autogenerated documentation)
encodeTransactionData(address,uint256,uint256,uint256,uint256,address,address,uint256) :
This function encodes a transaction data for a safe transaction. It takes in the address of the recipient, the value to be sent, the data to be sent, the operation to be performed, the safe transaction gas, the base gas, the gas price, the gas token, the refund receiver, and the nonce. It then calculates the safe transaction hash by encoding the parameters into a keccak256 hash. Finally, it returns the encoded transaction data as a packed ABI. (autogenerated documentation)
getTransactionHash(address,uint256,uint256,uint256,uint256,address,address,uint256) :
This function is used to generate a transaction hash for a given set of parameters. It takes in the address of the recipient, the value of the transaction, the data associated with the transaction, the type of operation, the safe transaction gas, the base gas, the gas price, the gas token, the refund receiver, and the nonce. It then uses the keccak256 hashing algorithm to generate a 32 byte transaction hash based on the given parameters. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i multisig-wallet
copy icon

Recent Use

🍞 0xf856 downloaded
🥐 0xE0e0 downloaded
🥖 0x0eF9 downloaded
🥨 0xC065 downloaded

Last Publish

9/26/2022

Version

1.0.0

Creator

Gnosis

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.