-
-
Save earthflower/ef13983221174a21e33c00affabb514c to your computer and use it in GitHub Desktop.
https://smartcontracts.org/docs/quickstart/1-quickstart.html | |
https://www.google.com/search?gs_ssp=eJzj4tDP1TcwSiooNGD04kgpSkzPz1OoAgA8VAYb&q=dragon+z&rlz=1C5CHFA_enIN963IN964&oq=dragon+z&aqs=chrome.1.69i57j46i512j0i512j46i512j0i512l2j0i10i512j0i512l3.2933j0j7&sourceid=chrome&ie=UTF-8#wgvs=e&wptab=s:H4sIAAAAAAAAAONgVuLQz9U3MEoqKHzEaMwt8PLHPWEprUlrTl5jVOHiCs7IL3fNK8ksqRQS42KDsnikuLjgmnh2MbGFlDlnJBYtYpVIKUpMz89TSErMyVGoUkgGCiYml6QWFQMA8u9j-GYAAAA | |
https://discord.com/invite/UFjtDNJfeV | |
https://smartcontracts.org/docs/developers-guide/computation-and-storage-costs.html | |
https://github.com/earthgohan/examples.git | |
https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/ | |
https://entrepot.app/marketplace | |
'rwlgt-iiaaa-aaaaa-aaaaa-cai': 'nns/registry', | |
'rrkah-fqaaa-aaaaa-aaaaq-cai': 'nns/governance', | |
'ryjl3-tyaaa-aaaaa-aaaba-cai': 'nns/ledger', | |
'r7inp-6aaaa-aaaaa-aaabq-cai': 'nns/root', | |
'rkp4c-7iaaa-aaaaa-aaaca-cai': 'nns/cycles-minting', | |
'rno2w-sqaaa-aaaaa-aaacq-cai': 'nns/lifeline', | |
'renrk-eyaaa-aaaaa-aaada-cai': 'nns/genesis-token', | |
'rdmx6-jaaaa-aaaaa-aaadq-cai': 'nns/identity', | |
'qoctq-giaaa-aaaaa-aaaea-cai': 'nns/nns-ui', | |
https://networknervoussystem.com/ | |
https://medium.com/dfinity/the-dfinity-blockchain-nervous-system-a5dd1783288e | |
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER | |
https://k7gat-daaaa-aaaae-qaahq-cai.ic0.app/listing/ic-management-10246/aaaaa-aa | |
https://docs.dank.ooo/xtc/canister-development/ | |
dfx canister --network=ic call aanaa-xaaaa-aaaah-aaeiq-cai wallet_call "(record { canister= principal \"aaaaa-aa\"; method_name= \"install_code | |
\"; args= blob \"DIDL\01nh\01\00\00\"; cycles= (0:nat64); })" | |
Get canister status via SDR wallet_call
dfx canister --network ic call cyiep-riaaa-aaaam-qadnq-cai wallet_call "(record { canister = principal \"aaaaa-aa\"; method_name = \"canister_status\"; args = $(didc encode '(record { "canister_id" = principal "bso2y-jqaaa-aaaai-qjbda-cai" })' -f blob); cycles = (0:nat64); } )"
Update controllers via SDR wallet_call
dfx canister --network ic call cyiep-riaaa-aaaam-qadnq-cai wallet_call "(record { canister = principal \"aaaaa-aa\"; method_name = \"update_settings\"; args = $(didc encode '(record { "canister_id" = principal "bso2y-jqaaa-aaaai-qjbda-cai"; "settings" = record { "controllers" = vec { principal "b4mxq-saaaa-aaaai-qjbca-cai";principal "cyiep-riaaa-aaaam-qadnq-cai";principal "rccv6-7j62g-j7sqe-y4hzo-mgkim-wyafm-7anwb-eqbyo-mpm2u-wsikn-xqe";principal "h3bad-mtrnv-6zzks-ih4zr-fkkiz-zuubu-g6kab-itcoq-nhvtn-tqkwd-pqe";principal "wopu3-2wttv-ac5mo-d5wr6-eoabn-qblqu-k3dhh-gthw6-6n4v7-wth3y-yqe";}; }; })' -f blob); cycles = (0:nat64); } )"
To decode blob output received
didc decode -f blob 'blob "DIDL\01k\01\ae\9d\b1\90\01h\01\00\00\01\0a\00\00\00\00\01\10HF\01\01"'
dfx canister --network ic --no-wallet call cyiep-riaaa-aaaam-qadnq-cai wallet_call "(record { canister = principal "aaaaa-aa"; method_name = "canister_status"; args = $(didc encode '(record { "canister_id" = principal "bso2y-jqaaa-aaaai-qjbda-cai" })' -f blob); cycles = (0:nat64); } )"
dfx identity --network=ic set-wallet cyiep-riaaa-aaaam-qadnq-cai --force
- wallet_call method SDR candid ui PR (candid_method) https://github.com/earthdao/SDR/blob/3bf0e7b4b8e1f9fbac78765cce0e6a30f70bf87f/sdr/src/cycles_wallet.rs#L34
- when canister is created via SDR wallet_create_canister add SDR principal as one of the controller PR
add use ic_kit::candid::candid_method;
add #[candid_method(query)] to https://github.com/earthbardock/examples/blob/d57e518c30ceb637a2c3e67390a0789d4757a8fb/rust/hello/src/hello/lib.rs#L2
fork QueryIntegration and update createCanister with controllers as current principal and principal of SDR
controller: [Principal.fromText(),Principal.fromText(],
-
install ic_kit and add candid_method macros to hello method
-
deploy hello using dfx local wallet
should see candid file here https://k7gat-daaaa-aaaae-qaahq-cai.ic0.app/canister/b3nre-7yaaa-aaaai-qjbcq-cai -
update hello contract and add version
#[query]
#[candid_method(query)]
fn version() -> &'static str {
"0.0.1"
}
using wallet_call proxy install_code using terminal ( https://qrd.at/mX8 )
- again lets do update using javascript
- Add FileUploader component to candidmanager
- Add module hash to meta of the canister(canister component)
- Try out both Array.from Uint8Array to upload wasm from here
using web3 or ethers .. sending transaction(gasLimit is always 21000) for send tx
using https://docs.polygon.technology/docs/develop/tools/polygon-gas-station/
for. mainnet and mumbai
https://gasstation-mainnet.matic.network/v2
https://gasstation-mumbai.matic.today/v2
calicultate
send tx gas gwei
- send PR for ETH transfer assets
- manage (upload canister)
- canisters management (install code, update settings, start,stop,delete,canister status)
args = record {canister_id:principal "$HELLOCAN"})
dfx canister --network=ic call cyiep-riaaa-aaaam-qadnq-cai wallet_call "(record { canister= principal "aaaaa-aa"; method_name= "canister_status"; args= blob "????"; cycles= (0:nat64); })"