🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@chainlink/evm-gauntlet-safe

Package Overview
Dependencies
Maintainers
9
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainlink/evm-gauntlet-safe

EVM Gauntlet Safe

latest
npmnpm
Version
3.3.0
Version published
Maintainers
9
Created
Source

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 immediately 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 --gasLimit=... 

Similarly, the following command returns the signed transaction payload for an execTransaction call:

yarn gauntlet storage:store:safe 0xEcE2bC2C6de2e5d90Cd939a31Fd7C1159AC088c3 --value=8 --exportExecute --gasLimit=...

For both --exportApprove and --exportExecute, set gasLimit accordingly. If there is a significant time gap between now and the time to broadcast the transaction, consider using --maxFeePerGas=... and --maxPriorityFeePerGas=... and setting them to a high value, or use --gasSpeed=fast.

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

Keywords

typescript

FAQs

Package last updated on 17 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts