Skip to content

A registry contract that contains delegates for addresses/ contracts. Allows whitelisted address, than can control delegation on token holders behalf.

License

Notifications You must be signed in to change notification settings

devenmatthews/delegate-registry-custodian

 
 

Repository files navigation

Delegate Registry

Build Status

Install

Install requirements with yarn:

yarn
// Setup env
cp .env.sample .env

Build contracts

With docker:

docker-compose up

Without docker:

yarn compile

Run all tests (requires Node version >=7 for async/await):

Running the tests with docker:

docker build -t delegate-registry .
docker run delegate-registry yarn test

If you want to run it without docker:

yarn compile
yarn test

In this case it is expected that the deployment check test fails.

Deploy

Docker is used to ensure that always the same bytecode is generated.

Preparation:

  • Set INFURA_TOKEN in .env
  • Set MNEMONIC in .env

Deploying with docker (should always result in the same registry address):

./deploy.sh <network>

If you want to run it without docker (might result in different registry address):

yarn compile
yarn deploy <network>

Verify contract

Note: To completely replicate the bytecode that has been deployed it is required that the project path is always the same. For this use the provided Dockerfile and map the the build folder into your local build folder. For this a docker-compose file is provided which can be used with:

docker-compose up

You can locally verify contract using the scripts generate_meta.js and verify_deployment.js.

With node scripts/generate_meta.js a meta folder is created in the build folder that contains all files required to verify the source code on https://verification.komputing.org/ and https://etherscan.io/

For Etherscan only the DelegateRegistryEtherscan.json file is required. For sourcify the DelegateRegistryMeta.json and all the .sol files are required.

Once the meta data has been generated you can verify that your local compiled code corresponds to the version deployed by Gnosis with yarn do <network> scripts/verify_deployment.js.

Documentation

Audits/ Formal Verification

  • TBD

Security and Liability

All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

License

All smart contracts are released under LGPL v.3.

Contributors

About

A registry contract that contains delegates for addresses/ contracts. Allows whitelisted address, than can control delegation on token holders behalf.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 83.2%
  • Solidity 15.8%
  • Other 1.0%