Last active
May 6, 2022 16:30
-
-
Save ninegua/6fa1863837556766e0bcfd8b3aeb4c30 to your computer and use it in GitHub Desktop.
Get started to call NNS from command line (using dfx)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILES=governance.did cmc.did canister_ids.json dfx.json | |
setup: $(FILES) | |
@echo You are all set! Run 'dfx canister --network=ic call nns get_monthly_node_provider_rewards' to test if it works. | |
@echo Please read the governance.did file to find the complete interface. | |
governance.did: | |
@curl -L https://github.com/dfinity/ic/raw/master/rs/nns/governance/canister/governance.did -o $@ | |
cmc.did: | |
@curl -L https://github.com/dfinity/ic/raw/master/rs/nns/cmc/cmc.did -o $@ | |
canister_ids.json: | |
@echo '{ "nns": { "ic": "rrkah-fqaaa-aaaaa-aaaaq-cai" }, "cmc": { "ic": "rkp4c-7iaaa-aaaaa-aaaca-cai" } }' > $@ | |
dfx.json: | |
@echo '{ "canisters": { "nns": { "type": "custom", "candid": "governance.did", "wasm": "" }, "cmc": { "type": "custom", "candid": "cmc.did", "wasm": "" } } }' > $@ | |
clean: | |
rm -f $(FILES) | |
.PNONY: clean setup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Before you start, you need to have a working version of dfx, curl, and GNU Make on your system.
Then you should be able to use dfx to call NNS.