A sample smart contract for auction in NEAR protocol
- Download source code, install Node
- Install near-sdk-as: npm install --save near-sdk-as
- Compile contract: npx asb
- Deploy contract: near deploy --contractName=.testnet --wasmFile=./contract.wasm
- Using: near call .testnet reset '{"description":"Bag","reservePrice":"1","expectedSellPrice":"10","bidIncrement":"1","minutes":"10"}' --account_id that83.testnet --gas=200000000000000 near call .testnet explain --account_id .testnet --gas=200000000000000 near call .testnet bid --account_id .testnet --amount 1 --gas=200000000000000 near call .testnet bid --account_id .testnet --amount 2 --gas=200000000000000 near call .testnet bid --account_id .testnet --amount 9 --gas=200000000000000 near call .testnet finalize --account_id .testnet --gas=200000000000000