- Install near-cli:
npm install -g near-cli
- Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo test -- --nocapture
Or use VS Code + Rust plugin
cargo build --target wasm32-unknown-unknown --release
The wasm file will be at target/wasm32-unknown-unknown/release/swt.wasm
🎫 Specify your own accountId.
near deploy --accountId=intmainreturn0.testnet --wasmFile=target/wasm32-unknown-unknown/release/swt.wasm --initArgs '{"oracle_id":"intmainreturn0.testnet"}' --initFunction new
OR
near dev-deploy --wasmFile=target/wasm32-unknown-unknown/release/swt.wasm
- To register - https://wallet.testnet.near.org
- To check - run
near login
- About dev-deploy
near call intmainreturn0.testnet record '{"account_id":"intmainreturn0.testnet", "steps": 1000}' --accountId intmainreturn0.testnet --gas=300000000000000
Record the batch of steps:
near call <contract name> batch_record '{"steps": [["testmewell.testnet", 1000000]]}' --accountId <your oracle account>
near view intmainreturn0.testnet formula '{"account_id":"intmainreturn0.testnet", "steps": 10000}'
near view intmainreturn0.testnet get_steps_from_tge '{"account_id":"intmainreturn0.testnet"}'
near view intmainreturn0.testnet ft_balance_of '{"account_id":"intmainreturn0.testnet"}'