forked from nftsentry/nft-license
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts
More file actions
31 lines (15 loc) · 2.37 KB
/
scripts
File metadata and controls
31 lines (15 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
near view $NFT_CONTRACT_ID nft_tokens '{"from_index": "0", "limit": 50}'
near view $NFT_CONTRACT_ID nft_token '{"token_id": "001"}'
near view $NFT_CONTRACT_ID nft_license '{"token_id": "001"}'
near delete $NFT_CONTRACT_ID $CONTRACT_ID
near create-account $NFT_CONTRACT_ID --masterAccount $CONTRACT_ID
near deploy --wasmFile out/main.wasm --accountId $NFT_CONTRACT_ID
near call $NFT_CONTRACT_ID new_default_meta '{"owner_id":"'$NFT_CONTRACT_ID'"}' --accountId $NFT_CONTRACT_ID
near call $NFT_CONTRACT_ID nft_mint '{"token_id": "001", "metadata": {"title": "Demo Token #1", "description": "NFTSentry Demo Token #1", "media": "https://bafkreieuet5njw5flrjqwfohnoxyewqu3hrzwumadfuxuz4cyfmhv447pq.ipfs.nftstorage.link"}, "license": {}, "receiver_id": "'$NFT_CONTRACT_ID'"}' --accountId $NFT_CONTRACT_ID --amount 0.1
near call $NFT_CONTRACT_ID nft_mint '{"token_id": "002", "metadata": {"title": "Demo Token #2", "description": "NFTSentry Demo Token #2", "media": "https://bafkreieuet5njw5flrjqwfohnoxyewqu3hrzwumadfuxuz4cyfmhv447pq.ipfs.nftstorage.link"}, "license": {}, "receiver_id": "'$NFT_CONTRACT_ID'"}' --accountId $NFT_CONTRACT_ID --amount 0.1
near call $NFT_CONTRACT_ID nft_mint '{"token_id": "003", "metadata": {"title": "Demo Token #3", "description": "NFTSentry Demo Token #3", "media": "https://bafkreieuet5njw5flrjqwfohnoxyewqu3hrzwumadfuxuz4cyfmhv447pq.ipfs.nftstorage.link"}, "license": {}, "receiver_id": "'$NFT_CONTRACT_ID'"}' --accountId $NFT_CONTRACT_ID --amount 0.1
near call $NFT_CONTRACT_ID nft_license_update '{"token_id": "001", "license": {"title": "A", "description": "B"}, "receiver_id": "'$NFT_CONTRACT_ID'"}' --accountId $NFT_CONTRACT_ID --amount 0.1
near call $NFT_CONTRACT_ID nft_propose_license '{"token_id": "002", "proposed_license": {"title": "A", "description": "B"}, "receiver_id": "'$NFT_CONTRACT_ID'"}' --accountId $NFT_CONTRACT_ID --amount 0.1
near call $NFT_CONTRACT_ID nft_transfer '{"receiver_id": "'$TEST1_CONTRACT_ACCOUNT'", "token_id": "001", "memo": "You are the owner of #001"}' --accountId $NFT_CONTRACT_ID --depositYocto 1
near call $NFT_CONTRACT_ID nft_license_proposed_update '{"token_id":"001", "receiver_id": "'$TEST1_CONTRACT_ID'"}' --accountId $NFT_CONTRACT_ID --depositYocto 0.1
near call $NFT_CONTRACT_ID nft_transfer '{"receiver_id": "'$NFTSENTRY_ID'", "token_id": "001", "memo": "You are the owner of #001"}' --accountId $NFT_CONTRACT_ID --depositYocto 1