Skip to content

A simple solution to the scaffold-eth meta-multi-sig branch challenge of adding roles

License

Notifications You must be signed in to change notification settings

clwest/simple-multi-sig-with-roles

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SIMPLE MULTI SIG WITH ROLES

This branch is based on https://github.com/scaffold-eth/scaffold-eth/tree/meta-multi-sig.
You should check it out first. When you do, you'll see that there's a proposed challenge: Add roles to the multi-sig-wallet. This is a possible solution.

GOALS

This is a very simple example. There are only two roles: OG and DEFAULT. The code is commented wherever relevant changes were written, but the intended mode of functioning was this:

  • On contract initialization, grant every initial owner the OG_ROLE. Also, give the contract the DEFAULT_ADMIN_ROLE so it can grant/revoke roles.
  • Every single transaction, in addition to having the required number of signatures, must have at least one OG as a signer.

How to run:

  • After you download, you might need to run yarn install in the project folder;
  • After that open 4 consoles in the project folder and run:
    1. yarn start
    2. yarn chain
    3. yarn backend
    4. yarn deploy

DISCLAIMER: Do your own research. I'm in no way a solidity expert and this code may be faulty!

About

A simple solution to the scaffold-eth meta-multi-sig branch challenge of adding roles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.0%
  • Shell 4.6%
  • Solidity 4.2%
  • Dockerfile 1.2%
  • HTML 0.9%
  • TypeScript 0.5%
  • Other 0.6%