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 treasuries pallet #375

Merged
merged 5 commits into from
Sep 10, 2024
Merged

add treasuries pallet #375

merged 5 commits into from
Sep 10, 2024

Conversation

brenzi
Copy link
Member

@brenzi brenzi commented Sep 9, 2024

  • adds treasuries pallet and bumps democracy to add SpendNative proposals
  • adds cli tooling for the above
  • adds rpc

testing

./target/release/encointer-node-notee --dev --enable-offchain-indexing true

./bootstrap_demo_community.py --signer //Bob
nctr-dev next-phase
nctr-dev next-phase
nctr-dev next-phase
### fill treasury 
nctr-dev get-treasury --cid sqm1v79dF6b
# 5CWoc3mGF9VEnuZzBbPWxhKPvY743AGwxUbvkYQHS8yWZbem
nctr-dev transfer //Alice 5CWoc3mGF9VEnuZzBbPWxhKPvY743AGwxUbvkYQHS8yWZbem 1000000000000
nctr-dev balance 5CWoc3mGF9VEnuZzBbPWxhKPvY743AGwxUbvkYQHS8yWZbem
# 1000000000000
nctr-dev submit-spend-native-proposal //Alice //Bob 123456789012 --cid sqm1v79dF6b
nctr-dev list-proposals
# verify electorate is 3
nctr-dev vote //Alice 1 aye sqm1v79dF6b_1
# await confirming 
nctr-dev update-proposal-state //Alice 1
nctr-dev list-proposals
# verify approval
nctr-dev next-phase
# verify enactment
# should see
# encointerDemocracy.ProposalEnacted
# encointerTreasuries.SpentNative
# balances.transfer to Bob
nctr-dev balance 5CWoc3mGF9VEnuZzBbPWxhKPvY743AGwxUbvkYQHS8yWZbem
# treasury balance went down

@brenzi brenzi requested a review from clangenb September 10, 2024 07:04
Copy link
Member

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

Two tiny remarks, looks good otherwise

client/src/commands/encointer_treasuries.rs Outdated Show resolved Hide resolved
runtime/src/weights/mod.rs Show resolved Hide resolved
@brenzi brenzi merged commit 1184e62 into master Sep 10, 2024
12 of 13 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.

2 participants