Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "set-safe-wallet" Hardhat task to update TokamakDAO Gnosis Safe configuration #321

Merged
merged 10 commits into from
Feb 28, 2025

Conversation

theo-learner
Copy link
Member

@theo-learner theo-learner commented Feb 18, 2025

Description

A new Hardhat task named set-safe-wallet updates the configuration of TokamakDAO's Gnosis Safe wallet. The task performs the following actions:

  1. Add owners and get the owner list: Calls addOwnerWithThreshold twice to add two predefined DAO member addresses (retrieved via the getDAOMembers utility) as owners with a threshold of 1.
  2. Change threshold: Calls changeThreshold to update the Safe's threshold to 3 (To meet the requirement with 100% agreement of Safe's owners)
  3. Verification: It finally retrieves the new threshold using the getThreshold function.

Testing

After building SDK we can test with the following command:

npx hardhat set-safe-wallet --rpc <RPC_ENDPOINT> --chainid <CHAIN_ID> --privatekey <ADMIN_PRIVATE_KEY> --address <GNOSIS_SAFE_ADDRESS>

# Arguments
## RPC_ENDPOINT: L1 RPC Endpoint (Mainnet or Sepolia)
## CHAIN_ID: L1 chain id
## ADMIN_PRIVATE_KEY: Private key of Admin (deployer of L1 contracts)
## GNOSIS_SAFE_ADDRESS: Deployed Safe wallet address

Please note that owner deletion is not implemented. Added owners can be deleted via the Safe app (https://app.safe.global/).

@theo-learner theo-learner force-pushed the feat/set-safe-for-DAO branch 2 times, most recently from 2c21116 to a35dd32 Compare February 27, 2025 02:01
Copy link
Member

@hazardvictor hazardvictor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@0x6e616d 0x6e616d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, sorry for my late review

@theo-learner theo-learner merged commit bcae5f5 into main Feb 28, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants