Skip to content

Commit

Permalink
minor editorial changes (nft primitives)
Browse files Browse the repository at this point in the history
  • Loading branch information
garikbesson committed Oct 24, 2023
1 parent d24c7fd commit 94a3a14
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 36 deletions.
23 changes: 8 additions & 15 deletions docs/7.primitives/nft/interacting/near-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ near call simple.market.mintbase1.near buy '{"nft_contract_id": "rubennnnnnnn.mi
<Tabs>
<TabItem value="NFT Primitive" label="NFT Primitive" default>

By calling smart contract method

```bash
near view nft.primitives.near nft_token '{"token_id": "1"}'
```
Expand Down Expand Up @@ -141,8 +139,6 @@ near view nft.primitives.near nft_token '{"token_id": "1"}'

<TabItem value="Paras" label="Paras">

By calling a Paras smart contract method

```bash
near view x.paras.near nft_token '{"token_id": "84686:1154"}'
```
Expand Down Expand Up @@ -180,8 +176,6 @@ near view x.paras.near nft_token '{"token_id": "84686:1154"}'

<TabItem value="Mintbase" label="Mintbase">

By calling a Mintbase smart contract method

```bash
near view anthropocene.mintbase1.near nft_token '{"token_id": "17960"}'
```
Expand Down Expand Up @@ -271,15 +265,18 @@ near call thomasettorreiv.mintbase1.near nft_transfer '{"token_id": "490641" "re

## 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`).
Basic NFT contracts following [the NEP-171 and NEP-177 standards](https://nomicon.io/Standards/Tokens/NonFungibleToken) do not implement marketplace functionality.

<Tabs>
For this purpose, there are ecosystem apps such as [Paras](https://paras.id/) or [Mintbase](https://www.mintbase.xyz/), that use dedicated marketplace contracts.

<TabItem value="Paras" label="Paras">
In order to put a NFT for a sale on a marketplace you need to do two actions:

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).
1. Cover data storage costs in the marketplace contract.
2. Approve the marketplace to sell the NFT in your NFT contract.

There is an example how to do it:
<Tabs>

<TabItem value="Paras" label="Paras">

```bash
near call marketplace.paras.near storage_deposit '{"receiver_id": "bob.near"}' --accountId bob.near --deposit 0.00939
Expand All @@ -293,10 +290,6 @@ Method `nft_approve` of a NFT contract also calls the `nft_on_approve` method in

<TabItem value="Mintbase" label="Mintbase">

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:

```bash
near call simple.market.mintbase1.near deposit_storage '{"autotransfer": "true"}' --accountId bob.near --deposit 0.00939

Expand Down
30 changes: 9 additions & 21 deletions docs/7.primitives/nft/interacting/web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ In order to interact with NFT from your Web App you can request data from variou
<Tabs>
<TabItem value="NFT Primitive" label="NFT Primitive" default>


```js
import { Wallet } from './near-wallet';

Expand All @@ -50,8 +49,6 @@ await wallet.callMethod({

<TabItem value="Paras" label="Paras">

By using [`near-api-js`](https://docs.near.org/tools/near-api-js/quick-reference)

```js
import { Wallet } from './near-wallet';

Expand Down Expand Up @@ -142,8 +139,6 @@ export const MintComponent = ({ media, reference, contractAddress, owner }: Mint
<Tabs>
<TabItem value="Paras" label="Paras" default>

By using [`near-api-js`](https://docs.near.org/tools/near-api-js/quick-reference)

```js
import { Wallet } from './near-wallet';

Expand Down Expand Up @@ -256,8 +251,6 @@ export const BuyComponent = ({ contractAddress, price, tokenId, affiliateAccount
<Tabs>
<TabItem value="NFT Primitive" label="NFT Primitive" default>

By using `near-api-js`

```js
import { Wallet } from './near-wallet';

Expand Down Expand Up @@ -304,7 +297,7 @@ const response = await wallet.viewMethod({

<TabItem value="Paras" label="Paras">

By using `near-api-js`
By using [`near-api-js`](https://docs.near.org/tools/near-api-js/quick-reference)

```js
import { Wallet } from './near-wallet';
Expand Down Expand Up @@ -429,7 +422,7 @@ When you call Paras API methods it returns data from other NFT contracts as well

<TabItem value="Mintbase" label="Mintbase">

By using `near-api-js`
By using [`near-api-js`](https://docs.near.org/tools/near-api-js/quick-reference)

```js
import { Wallet } from './near-wallet';
Expand Down Expand Up @@ -582,8 +575,6 @@ console.log(data.tokenData[0]) // => token metadata
<Tabs>
<TabItem value="NFT Primitive" label="NFT Primitive" default>

By using [`near-api-js`](https://docs.near.org/tools/near-api-js/quick-reference)

```js
import { Wallet } from './near-wallet';

Expand Down Expand Up @@ -686,17 +677,18 @@ 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`).
Basic NFT contracts following [the NEP-171 and NEP-177 standards](https://nomicon.io/Standards/Tokens/NonFungibleToken) do not implement marketplace functionality.

<Tabs>
For this purpose, there are ecosystem apps such as [Paras](https://paras.id/) or [Mintbase](https://www.mintbase.xyz/), that use dedicated marketplace contracts.

<TabItem value="Paras" label="Paras">
In order to put a NFT for a sale on a marketplace you need to do two actions:

By using [`near-api-js`](https://docs.near.org/tools/near-api-js/quick-reference)
1. Cover data storage costs in the marketplace contract.
2. Approve the marketplace to sell the NFT in your NFT contract.

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).
<Tabs>

There is an example how to do it:
<TabItem value="Paras" label="Paras">

```js
import { Wallet } from './near-wallet';
Expand Down Expand Up @@ -735,10 +727,6 @@ Method `nft_approve` of a NFT contract also calls the `nft_on_approve` method in

<TabItem value="Mintbase" label="Mintbase">

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 by using [`near-api-js`](https://docs.near.org/tools/near-api-js/quick-reference)

```js
import { Wallet } from './near-wallet';

Expand Down

0 comments on commit 94a3a14

Please sign in to comment.