Skip to content

Update the DAO Voting Period with tribute [email protected]

Felipe Forbeck edited this page Oct 19, 2021 · 2 revisions

This tutorial will guide you to update the voting period DAO configuration using the [email protected], which is compatible with [email protected].

git clone [email protected]:openlawteam/tribute-contracts-cli.git git fetch origin/release-v0.1.1 git checkout release-v0.1.1

Add the DAO contracts to tribute-contracts-cli/contracts.js

Create the contracts.js file in the root of tribute-contracts-cli, and add the following DAO contract addresses:

const contracts = {
  // DAO Core Contracts
  DaoRegistry: "0x",

  // Extensions
  BankExtension: "0x",

  // Adapters
  ManagingContract: "0x",
  ConfigurationContract: "0x",
  OffchainVotingContract: "0x",
};

module.exports = { contracts };

Setup you environment variables

Create the .env file in the root of tribute-contracts-cli project

DAO_ADDRESS=0x
ETHEREUM_NETWORK=
TRUFFLE_MNEMONIC=0x
SNAPSHOT_HUB_SPACE=
SNAPSHOT_HUB_API_URL=
INFURA_KEY=

Create the configuration proposal

Let's change it to 3 days (259200 seconds).

trib config-proposal voting.votingPeriod 259200

::: Submitting configuration proposal...

New Snapshot Proposal Id: 0x05dfa9dc8219492ebfebb1bda9b158b82a6b9b8c687e3953a142cae7adbf7706


::: Configuration proposal submitted!

Vote YES on the proposal

trib offchain-vote 0x05dfa9dc8219492ebfebb1bda9b158b82a6b9b8c687e3953a142cae7adbf7706? Vote on proposal 0x05dfa9dc8219492ebfebb1bda9b158b82a6b9b8c687e3953a142cae7adbf7706 Yes

 ::: Submitting offchain voting...

Network:                ganache
DAO:                    0xcDbe8b52A6c60A5f101d4A0F1f049f19a9e1D35F
Space:                  museo
Snapshot Proposal Id:   0x05dfa9dc8219492ebfebb1bda9b158b82a6b9b8c687e3953a142cae7adbf7706
DAO Proposal Id:        0x44de774dde15add03bcba20fcd37edb9d2c8bd1d48c5307c5e05071e11c9f6fe
Choice:                 Yes
Data:                   n/a

Member 0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1 has voted "Yes"

Snapshot Proposal Id 0x05dfa9dc8219492ebfebb1bda9b158b82a6b9b8c687e3953a142cae7adbf7706

::: Offchain vote submitted to Snapshot Hub.

Submit the voting result

trib offchain-result 0x05dfa9dc8219492ebfebb1bda9b158b82a6b9b8c687e3953a142cae7adbf7706

 ::: Submitting offchain voting results...

Network:                ganache
DAO:                    0xcDbe8b52A6c60A5f101d4A0F1f049f19a9e1D35F
Space:                  museo
Contract:               0x47a2Db5D68751EeAdFBC44851E84AcDB4F7299Cc
Snapshot Proposal Id:   0x05dfa9dc8219492ebfebb1bda9b158b82a6b9b8c687e3953a142cae7adbf7706
DAO Proposal Id:        0x44de774dde15add03bcba20fcd37edb9d2c8bd1d48c5307c5e05071e11c9f6fe

Offchain proof submitted to Snapshot Hub
DAO Proposal Id 0x44de774dde15add03bcba20fcd37edb9d2c8bd1d48c5307c5e05071e11c9f6fe

Snapshot Proposal Id 0x05dfa9dc8219492ebfebb1bda9b158b82a6b9b8c687e3953a142cae7adbf7706

::: Offchain vote results submitted to the DAO

Waiting for the current voting + grace period to end

Process the configuration proposal

trib config-process 0x05dfa9dc8219492ebfebb1bda9b158b82a6b9b8c687e3953a142cae7adbf7706

::: Processing Configuration proposal...

Network:                ganache
DAO:                    0xcDbe8b52A6c60A5f101d4A0F1f049f19a9e1D35F
Space:                  museo
Contract:               0xD86C8F0327494034F60e25074420BcCF560D5610
Snapshot Proposal Id:   0x05dfa9dc8219492ebfebb1bda9b158b82a6b9b8c687e3953a142cae7adbf7706
DAO Proposal Id:        0x44de774dde15add03bcba20fcd37edb9d2c8bd1d48c5307c5e05071e11c9f6fe

::: Processed Configuration proposal

Check out the new voting period

trib get-config voting.votingPeriod

 ::: Get configuration value...

Network:                ganache
DAO:                    0xcDbe8b52A6c60A5f101d4A0F1f049f19a9e1D35F
Space:                  museo
Config:                 voting.votingPeriod
Value:                  259200