Skip to content

samlinux/motokoBootcamp-06112023

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MotokoBootcamp 06.11.2023

Motoko Booktcamp 06.11.23

Terminal 1

sudo dfx start

Terminal 2

sudo dfx deploy

Level 1

sudo dfx canister call dao getName
sudo dfx canister call dao addGoal '("Goal 1")'
sudo dfx canister call dao addGoal '("Goal 2")'
sudo dfx canister call dao getGoals 

Level 2

sudo dfx canister call dao addMember '(record {name = "Otto"; age = 22})'
sudo dfx canister call dao getMember '(principal "gyjeh-hqgck-vkesu-y32y4-zdqsy-rwycd-pmhll-5cts7-z4dec-xvac3-3ae")'
sudo dfx canister call dao getAllMembers
sudo dfx canister call dao updateMember '(record {name = "Otto"; age = 22})'
sudo dfx canister call dao removeMember '(principal "gyjeh-hqgck-vkesu-y32y4-zdqsy-rwycd-pmhll-5cts7-z4dec-xvac3-3ae")'
sudo dfx canister call dao numberOfMembers

Level 3

sudo dfx canister call dao mint '(principal "gyjeh-hqgck-vkesu-y32y4-zdqsy-rwycd-pmhll-5cts7-z4dec-xvac3-3ae", 100_000)'
sudo dfx canister call dao mint '(principal "ecdtt-q65ft-h7dkf-7p5zr-x522n-ogq67-wbcv2-6bd2j-vbqpv-udbzc-oqe", 250_000)'
sudo dfx canister call dao balanceOf '(record {owner=principal "gyjeh-hqgck-vkesu-y32y4-zdqsy-rwycd-pmhll-5cts7-z4dec-xvac3-3ae"})'
sudo dfx canister call dao totalSupply
sudo dfx canister call dao transfer '(record {owner=principal "gyjeh-hqgck-vkesu-y32y4-zdqsy-rwycd-pmhll-5cts7-z4dec-xvac3-3ae"; subaccount=null}, record {owner=principal "ecdtt-q65ft-h7dkf-7p5zr-x522n-ogq67-wbcv2-6bd2j-vbqpv-udbzc-oqe"; subaccount=null}, 5_000)'

Level 4

sudo dfx canister call dao createProposal '("This is my cool proposal")'
sudo dfx canister call dao getProposal 1
# Testsequence
sudo dfx deploy
sudo dfx canister call dao addMember '(record {name = "Otto"; age = 22})'
sudo dfx canister call dao mint '(principal "gyjeh-hqgck-vkesu-y32y4-zdqsy-rwycd-pmhll-5cts7-z4dec-xvac3-3ae", 100)'
sudo dfx canister call dao balanceOf '(record {owner=principal "gyjeh-hqgck-vkesu-y32y4-zdqsy-rwycd-pmhll-5cts7-z4dec-xvac3-3ae"})'
sudo dfx canister call dao createProposal '("This is my second proposal")'
sudo dfx canister call dao balanceOf '(record {owner=principal "gyjeh-hqgck-vkesu-y32y4-zdqsy-rwycd-pmhll-5cts7-z4dec-xvac3-3ae"})'
sudo dfx canister call dao getProposal 1
sudo dfx canister call dao get_all_proposals
sudo dfx canister call dao vote '(1, true)'


About

Motoko Bootcamp 06.11.2023

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages