@chainlink/evm-gauntlet-safe
v3.2.1
Published
EVM Gauntlet Safe
Downloads
13,266
Readme
EVM Gauntlet Safe commands and wrapper
This package provides commands to manage a Gnosis Safe as well as a wrapper function that can be used to make an existing command able to be executed via Gnosis Safe
- @chainlink/evm-gauntlet-safe
Deploying Contracts
Deploying Master Safe Contract:
yarn gauntlet gnosis_safe:deploy --network=<NETWORK>
Deploying Safe Proxy Factory Contract:
yarn gauntlet gnosis_safe_proxy_factory:deploy --network=<NETWORK>
Deploying Multisend Contract:
yarn gauntlet gnosis_multisend:deploy --network=<NETWORK>
Deploying Confirmed Transaction Module Contract:
yarn gauntlet confirmed_transaction_module:deploy --network=<NETWORK>
Deploying Safe Instance
In order to deploy a single safe that can be used to manage contracts, deploy a safe instance via the following command:
yarn gauntlet gnosis_safe_proxy_factory:deploy_safe_instance --network=<NETWORK> --owners=<OWNERS> --threshold=<THRESHOLD> <PROXY_FACTORY_CONTRACT_ADDRESS>
For example:
yarn gauntlet gnosis_safe_proxy_factory:deploy_safe_instance --network=goerli --owners='["0xbd6A907a03882C4c4Ab3af5274e13a96d5c006EC"]' --threshold=1 <PROXY_FACTORY_CONTRACT_ADDRESS>
After this step, use the address returned from this command as the SAFE_ADDRESS
in your .env
file before attempting to execute any gauntlet commands via safe
Executing Traditional Gauntlet Commands via Safe
Gauntlet EVM commands are automatically wrapped with the safe wrapper so they can be executed through the safe easily. Commands can be executed via safe proposal flow by suffixing :safe
in the command ID when running a Gauntlet command. For example, the following command makes a contract call to an arbitrary contract:
yarn gauntlet storage:store 0xEcE2bC2C6de2e5d90Cd939a31Fd7C1159AC088c3 --value=8
This same command can be executed via the safe proposal flow by running the following command:
yarn gauntlet storage:store:safe 0xEcE2bC2C6de2e5d90Cd939a31Fd7C1159AC088c3 --value=8
Exporting Signed Transactions Payloads for later Execution
Sometimes users might want not want to imemdiately broadcast transactions. Users might want to sign transactions in advance in order to broadcast later. This can be achieved by using the --exportApprove
or --exportExecute
flag with any Safe command. For example the following command returns the signed transaction payload for an approveHash
call:
yarn gauntlet storage:store:safe 0xEcE2bC2C6de2e5d90Cd939a31Fd7C1159AC088c3 --value=8 --exportApprove
Similarly, the following command returns the signed transaction payload for an execTransaction
call:
yarn gauntlet storage:store:safe 0xEcE2bC2C6de2e5d90Cd939a31Fd7C1159AC088c3 --value=8 --exportExecute
One thing to note when using --exportExecute
flag is that the transaction is encoded with the current existing approvers for that proposal onchain. This may not always be desired, in which case, the approvers used to encode the transaction can be overridden with the --expectedApprovers
flag. This flag expects a comma-delimited string of addresses like below:
yarn gauntlet storage:store:safe 0xEcE2bC2C6de2e5d90Cd939a31Fd7C1159AC088c3 --value=8 --exportExecute --expectedApprovers=0x001,0x002,0x003