// first store the contract code, which will return its hash
$ BYTES=$(cat sputnikdao2/res/sputnikdao2.wasm | base64)
$ near call sputnik.ctindogaru10.testnet store $BYTES --base64 --accountId sputnik.ctindogaru10.testnet --gas 100000000000000 --amount 10
// the above command will return 7ujcmhfQgQHnq7o7Bzz2VRGTSY2Yd97j8UmBStm9aEe4
// now store the metadata
$ near call sputnik.ctindogaru10.testnet store_contract_metadata '{"metadata": {"code_hash": "7ujcmhfQgQHnq7o7Bzz2VRGTSY2Yd97j8UmBStm9aEe4", "version": "v3", "commit_id": "tobecompleted", "readme": "readme_ceva"}}' --accountId sputnik.ctindogaru10.testnet
Get the contract information:
$ near view sputnik.ctindogaru10.testnet get_contract_metadata
The metadata will consist of:
code_hash
: sha256 hash of the contract codeversion
: contract code version of the DAO (ex: V1, V2, V3, V4)commit_id
: snapshot of the code from https://github.com/near-daos/sputnik-dao-contract. It represents the state of the code that generated the wasm contract codereadme
: link inside https://github.com/near-daos/sputnik-dao-contract that will point to a readme describing everything about the versionTested manually via bash.
Usage:
Get the contract information:
Output example: