go build -o wos-core-transactor ./app
env GOOS=linux GOARCH=amd64 go build -o wos-core-transactor ./app
Here are the manual steps to mint an NFT. The wasm file in the repo is build using up to step 4. To actually mint you have to have near credentials loaded and the contract must be deployed first.
- install Rust (do not use brew) https://www.rust-lang.org/tools/install
- install npm cli
npm install near-cli -g
- checkout contract repo
git clone https://github.com/near-examples/NFT
- edit NFT/nft/src/lib.rs and customize fields so doesn't say Example
- build wasm file
./scripts/build.sh
cp non_fungible_token.wasm chains/near
- login or copy near credentials (this creates ~/.near-credentials/testnet/questori.testnet.json)
near login
- deploy the contract
near deploy --wasmFile non_fungible_token.wasm --accountId questori.testnet
- initialize contract
near call questori.testnet new_default_meta '{"owner_id": "'questori.testnet'"}' --accountId questori.testnet
- view contract details
near view questori.testnet nft_tokens_for_owner '{"account_id": "'questori.testnet'"}'
- mint to someone, token_id must be unique
near call questori.testnet nft_mint '{"token_id": "1", "receiver_id": "'questori.testnet'", "token_metadata": { "title": "Questori Stori", "description": "NFT containing media and metadata for Questori Stori", "media": "https://bafkreiabag3ztnhe5pg7js4bj6sxuvkz3sdf76cjvcuqjoidvnfjz7vwrq.ipfs.dweb.link/", "copies": 1}}' --accountId questori.testnet --deposit 0.01
- optionally transfer
near call questori.testnet nft_transfer '{"owner_id": "questori.testnet" , "token_id": "1"}' --accountId questori.testnet --depositYocto 1