Smart contracts for PureCube platform at Near Protocol.
Chubby Runners are designed to provide the ultimate play & earn experience. We believe in rewarding players for their effort, skill and loyalty.
- follow all NonFungibleToken standards
new_default_meta
initializes withowner_id
contract owner accounttreasury_id
receives funds from mint and can mint untilmax_supply
is reachedmax_supply
of tokensbase_uri
endpoint of centralized gateway which stores media, off-chain attributes and uses revealing systemmint_price
of new tokenmint_start
timestamp milliseconds when anyone can mint new token bymint_price
mint_end
timestamp milliseconds when anyone cant mintperpetual_royalties
up to 6 trade fee receivers
nft_mint
requirereceiver_id
onlyset_meta
can changename
,base_uri
,icon
byowner_id
Simple NFT marketplace contract
- near-examples NFT built on near-contract-standards :: non_fungible_token implementation and Master NFTs on NEAR nft-tutorial nft-contract, nft-series and market-contract built from scratch without it. Last option is based for our NFT contracts.
- paras.id: paras-nft-contract, integration requirements
- mintbase.io: mintbase-core, list a token
yarn build
yarn test
yarn clean
near login
MAIN_ACCOUNT=purecube.testnet
NFT_CONTRACT_ID=chubby-runners.purecube.testnet
BASE_URI=https://gateway.purecube.io/chubby-runners-testnet
echo $NFT_CONTRACT_ID
echo $MAIN_ACCOUNT
echo $BASE_URI
near create-account $NFT_CONTRACT_ID --masterAccount $MAIN_ACCOUNT --initialBalance 4
near deploy --accountId $NFT_CONTRACT_ID --wasmFile out/main.wasm
near call $NFT_CONTRACT_ID new_default_meta '{"owner_id": "'$NFT_CONTRACT_ID'","treasury_id": "'$MAIN_ACCOUNT'", "max_supply": "20",
"base_uri": "'$BASE_URI'", "mint_price": "10000000000000000000000000","mint_start": "1671660800000000000", "mint_end": "1690000000000000000", "perpetual_royalties": {"'$MAIN_ACCOUNT'": 100}}' --accountId $NFT_CONTRACT_ID
near view $NFT_CONTRACT_ID nft_metadata
near call $NFT_CONTRACT_ID nft_mint '{"receiver_id": "'$MAIN_ACCOUNT'"}' --accountId $MAIN_ACCOUNT --amount 10.1
near view $NFT_CONTRACT_ID nft_token '{"token_id": "0"}'
MAIN_ACCOUNT_2=your-second-wallet-account.testnet
echo $NFT_CONTRACT_ID
echo $MAIN_ACCOUNT
echo $MAIN_ACCOUNT_2
near call $NFT_CONTRACT_ID nft_transfer '{"receiver_id": "$MAIN_ACCOUNT_2", "token_id": "0", "memo": "Go Team :)"}' --accountId $MAIN_ACCOUNT --depositYocto 1
echo $NFT_CONTRACT_ID
echo $BASE_URI
near call $NFT_CONTRACT_ID set_meta '{"name": "Chubby Runners", "base_uri": "'$BASE_URI'", "icon": "", "max_supply": "100"}' --accountId $NFT_CONTRACT_ID --depositYocto 1
near view $NFT_CONTRACT_ID nft_metadata
echo $NFT_CONTRACT_ID
echo $MAIN_ACCOUNT
near call market-v2-beta.mintspace2.testnet deposit_storage '{}' --deposit 0.01 --accountId $MAIN_ACCOUNT
near call $NFT_CONTRACT_ID nft_approve '{"account_id": "market-v2-beta.mintspace2.testnet", "token_id": "0", "msg": "{\"price\":\"1000000000000000000000000\"}"}' --depositYocto 450000000000000000000 --accountId $MAIN_ACCOUNT