diff --git a/docs/7.primitives/nft/additional-sources.md b/docs/7.primitives/nft/additional-resources.md similarity index 95% rename from docs/7.primitives/nft/additional-sources.md rename to docs/7.primitives/nft/additional-resources.md index 3785b00fb3c..0a8e60eff0a 100644 --- a/docs/7.primitives/nft/additional-sources.md +++ b/docs/7.primitives/nft/additional-resources.md @@ -1,6 +1,6 @@ --- -id: additional-sources -title: Additional Sources +id: additional-resources +title: Additional Resources hide_table_of_contents: false --- diff --git a/docs/7.primitives/nft/interacting/bos.md b/docs/7.primitives/nft/interacting/bos.md index aebc94ab947..c53ed8347fe 100644 --- a/docs/7.primitives/nft/interacting/bos.md +++ b/docs/7.primitives/nft/interacting/bos.md @@ -438,8 +438,6 @@ This snippet will enable your users to transfer NFTs in one of the NFT solutions -By calling a smart contract method - ```js const tokenData = Near.call("nft.primitives.near", "nft_transfer", { token_id: "1", @@ -451,8 +449,6 @@ const tokenData = Near.call("nft.primitives.near", "nft_transfer", { -By calling a smart contract method - ```js const tokenData = Near.call("x.paras.near", "nft_transfer", { token_id: "490641", @@ -464,8 +460,6 @@ const tokenData = Near.call("x.paras.near", "nft_transfer", { -By calling a smart contract method - ```js const tokenData = Near.call("thomasettorreiv.mintbase1.near", "nft_transfer", { token_id: "490641", diff --git a/docs/7.primitives/nft/interacting/near-cli.md b/docs/7.primitives/nft/interacting/near-cli.md index a189aeeed21..61732cd023b 100644 --- a/docs/7.primitives/nft/interacting/near-cli.md +++ b/docs/7.primitives/nft/interacting/near-cli.md @@ -16,8 +16,6 @@ This section shows how to interact with an NFT contract from your shell using [` -By calling a smart contract method - ```bash near call nft.primitives.near nft_mint, '{"token_id": "1", "receiver_id": "bob.near", "token_metadata": {"title": "NFT Primitive Token", "description": "Awesome NFT Primitive Token", "media": "string"}}' --accountId bob.near ``` @@ -26,8 +24,6 @@ near call nft.primitives.near nft_mint, '{"token_id": "1", "receiver_id": "bob.n -By calling a smart contract method - ```bash near call x.paras.near nft_mint '{"token_series_id": "490641", "receiver_id": "bob.near"}' --accountId bob.near ``` @@ -281,8 +277,6 @@ Usually, a basic NFT contract following [the NEP-171 and NEP-177 standards](http -By calling a smart contract method - In order to put a NFT for a sale on Paras you need to do two actions: cover data storage costs in `marketplace.paras.near` contract (by calling the `storage_deposit` method) and add a marketplace contract address as approved one in your NFT contract (by calling the `nft_approve` method). There is an example how to do it: @@ -299,8 +293,6 @@ Method `nft_approve` of a NFT contract also calls the `nft_on_approve` method in -By calling a smart contract method - In order to put a NFT for a sale on Mintbase you need to do two actions: cover data storage costs in `simple.market.mintbase1.near` contract (by calling the `deposit_storage` method) and add a marketplace contract address as approved one in your NFT contract (by calling the `nft_approve` method). There is an example how to do it: diff --git a/docs/7.primitives/nft/interacting/smart-contract.md b/docs/7.primitives/nft/interacting/smart-contract.md index f826363ee74..d58de873de4 100644 --- a/docs/7.primitives/nft/interacting/smart-contract.md +++ b/docs/7.primitives/nft/interacting/smart-contract.md @@ -249,6 +249,9 @@ impl Contract { } } ``` + +--- + ## List a NFT up for a sale Due to the specifics of putting a token up for sale on a NFT marketplace (more precisely, the need for the owner of the token to sign an approval transaction), you need to do this on the client side. diff --git a/docs/7.primitives/nft/interacting/web-app.md b/docs/7.primitives/nft/interacting/web-app.md index e199fddde6a..8ea11bb8d85 100644 --- a/docs/7.primitives/nft/interacting/web-app.md +++ b/docs/7.primitives/nft/interacting/web-app.md @@ -135,6 +135,8 @@ export const MintComponent = ({ media, reference, contractAddress, owner }: Mint +--- + ## Buy a NFT @@ -247,6 +249,8 @@ export const BuyComponent = ({ contractAddress, price, tokenId, affiliateAccount +--- + ## Query NFT data @@ -571,6 +575,8 @@ console.log(data.tokenData[0]) // => token metadata +--- + ## Transfer a NFT @@ -598,8 +604,6 @@ await wallet.callMethod({ -By calling a smart contract method - ```js import { Wallet } from './near-wallet'; @@ -678,6 +682,8 @@ const TransferComponent = ({ tokenId, contractAddress }: TransferArgs): JSX.Elem +--- + ## List a NFT up for a sale Usually, a basic NFT contract following [the NEP-171 and NEP-177 standards](https://nomicon.io/Standards/Tokens/NonFungibleToken) doesn't implement marketplace functionality such as listing NFT up for a sale. For this purpose, there are special marketplaces in the ecosystem, like [Paras](https://paras.id/) or [Mintbase](https://www.mintbase.xyz/). They use dedicated marketplace contracts (e.g., `marketplace.paras.near` or `simple.market.mintbase1.near`). @@ -803,5 +809,4 @@ export const ListComponent = ({ contractAddress, marketAddress , tokenId, price ``` - - + \ No newline at end of file diff --git a/website/sidebars.json b/website/sidebars.json index b04b5a8484b..6cbb82be7e4 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -378,7 +378,7 @@ "primitives/nft/interacting/near-cli" ] }, - "primitives/nft/additional-sources", + "primitives/nft/additional-resources", { "type": "html", "value": "
"