Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flyq/stablemap
https://github.com/flyq/stablemap
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/flyq/stablemap
- Owner: flyq
- Created: 2021-09-07T10:39:23.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-23T07:04:39.000Z (about 1 year ago)
- Last Synced: 2023-12-23T08:19:44.702Z (about 1 year ago)
- Language: Motoko
- Size: 141 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stableMap
```sh
sudo dfx canister --no-wallet install stableMap --argument='("logo", "name", "symbol", 8, 1_000_000_000, principal "yhy6j-huy54-mkzda-m26hc-yklb3-dzz4l-i2ykq-kr7tx-dhxyf-v2c2g-tae", true, true)'dfx canister --no-wallet call stableMap balanceOf '(principal "yhy6j-huy54-mkzda-m26hc-yklb3-dzz4l-i2ykq-kr7tx-dhxyf-v2c2g-tae")'
(1_000_000_000 : nat)dfx canister --no-wallet call stableMap balanceOf '(principal "ktfx3-4dj7o-f4lqf-gab56-fgkuw-aagt6-jzpkd-o7xzp-f6a3p-nm6wl-wae")'
(0 : nat)dfx canister --no-wallet call stableMap transfer '(principal "ktfx3-4dj7o-f4lqf-gab56-fgkuw-aagt6-jzpkd-o7xzp-f6a3p-nm6wl-wae", 100_000)'
(true)dfx canister --no-wallet call stableMap balanceOf '(principal "yhy6j-huy54-mkzda-m26hc-yklb3-dzz4l-i2ykq-kr7tx-dhxyf-v2c2g-tae")'
(999_900_000 : nat)dfx canister --no-wallet call stableMap balanceOf '(principal "ktfx3-4dj7o-f4lqf-gab56-fgkuw-aagt6-jzpkd-o7xzp-f6a3p-nm6wl-wae")'
(100_000 : nat)sudo dfx canister --no-wallet install stableMap --argument='("logo", "name", "symbol", 8, 1_000_000_000, principal "yhy6j-huy54-mkzda-m26hc-yklb3-dzz4l-i2ykq-kr7tx-dhxyf-v2c2g-tae", true, true)' -m=upgrade
Upgrading code for canister stableMap, with canister_id rwlgt-iiaaa-aaaaa-aaaaa-caidfx canister --no-wallet call stableMap balanceOf '(principal "yhy6j-huy54-mkzda-m26hc-yklb3-dzz4l-i2ykq-kr7tx-dhxyf-v2c2g-tae")'
(1_000_000_000 : nat)dfx canister --no-wallet call stableMap balanceOf '(principal "ktfx3-4dj7o-f4lqf-gab56-fgkuw-aagt6-jzpkd-o7xzp-f6a3p-nm6wl-wae")'
(100_000 : nat)