cargo test -- --nocapture
cargo build --target wasm32-unknown-unknown --release
Make sure to login with near login
first from near cli
Create sub account for smart contract account.
near create-account CONTRACT_NAME.ACCOUNT_ID --masterAcount ACCOUNT_ID --initialBalance 10
Start deploy
near deploy --wasmFile target/wasm32-unknown-unknown/release/key_value_storage.wasm --accountId CONTRACT_ID
near call CONTRACT_ID create_update '{"k": "first_key", "v" : "1"}' --accountId ACCOUNT_ID
near view CONTRACT_ID read '{"k": "first_key"}' --accountId ACCOUNT_ID
Delete key contract to make it's more decentralized
near call CONTRACT_ID delete '{"k": "first_key"}' --accountId ACCOUNT_ID