Skip to content

PureCube/purecube-near-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PureCube Near Contracts

Smart contracts for PureCube platform at Near Protocol.

Runner

Chubby Runners are designed to provide the ultimate play & earn experience. We believe in rewarding players for their effort, skill and loyalty.

Implementation details

  • follow all NonFungibleToken standards
  • new_default_meta initializes with
    • owner_id contract owner account
    • treasury_id receives funds from mint and can mint until max_supply is reached
    • max_supply of tokens
    • base_uri endpoint of centralized gateway which stores media, off-chain attributes and uses revealing system
    • mint_price of new token
    • mint_start timestamp milliseconds when anyone can mint new token by mint_price
    • mint_end timestamp milliseconds when anyone cant mint
    • perpetual_royalties up to 6 trade fee receivers
  • nft_mint require receiver_id only
  • set_meta can change name, base_uri, icon by owner_id

Marketplace

Simple NFT marketplace contract

Develop Quick-Start

Explore Near NFT contracts

Prerequisites

Build

yarn build
yarn test
yarn clean

Mint An NFT

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"}'

Transfering NFTs

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

Change contract metadata

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

List NFT on marketplaces

Mintbase

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

About

Smart contracts for PureCube platform at Near Protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages