Skip to content

Commit

Permalink
Merge branch 'master' into bos-extintion
Browse files Browse the repository at this point in the history
  • Loading branch information
gagdiez authored Jan 2, 2024
2 parents 7267508 + d6541d4 commit 6f5d130
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docs/3.tutorials/nfts/minecraft-nfts.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It is recommended that you first complete the introductory **[minting NFTs tutor

To complete this tutorial successfully, you'll need:

- [A Minecraft account](https://account.mojang.com/)
- [A Minecraft account](https://www.minecraft.net/)
- [WorldEdit installed](https://worldedit.enginehub.org/en/latest/install/)
- [A NEAR account](#wallet)
- [NEAR command-line interface](/tools/near-cli#setup) (`near-cli`)
Expand Down
82 changes: 56 additions & 26 deletions docs/7.primitives/nft/interacting/bos.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,38 @@ This snippet will enable your users to mint NFTs in one of the NFT solutions.
<TabItem value="NFT Primitive" label="NFT Primitive" default>

```js
const tokenData = 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", // URL to associated media, preferably to decentralized, content-addressed storage
}
});
const tokenData = 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", // URL to associated media, preferably to decentralized, content-addressed storage
}
},
undefined,
10000000000000000000000, // Depends on your NFT metadata
);
```

</TabItem>

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

```js
const tokenData = Near.call("x.paras.near", "nft_mint", {
token_series_id: "490641",
receiver_id: "bob.near",
});
const tokenData = Near.call(
"x.paras.near",
"nft_mint",
{
token_series_id: "490641",
receiver_id: "bob.near",
},
undefined,
10000000000000000000000 // Depends on your NFT metadata
);
```

:::note
Expand All @@ -59,7 +71,7 @@ const tokenData = Near.call(
metadata: {},
},
undefined,
1
10000000000000000000000
);
```

Expand Down Expand Up @@ -414,32 +426,50 @@ This snippet will enable your users to transfer NFTs in one of the NFT solutions
<TabItem value="NFT Primitive" label="NFT Primitive" default>

```js
const tokenData = Near.call("nft.primitives.near", "nft_transfer", {
token_id: "1",
receiver_id: "bob.near"
});
const tokenData = Near.call(
"nft.primitives.near",
"nft_transfer",
{
token_id: "1",
receiver_id: "bob.near"
},
undefined,
1,
);
```

</TabItem>

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

```js
const tokenData = Near.call("x.paras.near", "nft_transfer", {
token_id: "490641",
receiver_id: "bob.near"
});
const tokenData = Near.call(
"x.paras.near",
"nft_transfer",
{
token_id: "490641",
receiver_id: "bob.near"
},
undefined,
1
);
```

</TabItem>

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

```js
const tokenData = Near.call("thomasettorreiv.mintbase1.near", "nft_transfer", {
token_id: "490641",
receiver_id: "bob.near"
});
const tokenData = Near.call(
"thomasettorreiv.mintbase1.near",
"nft_transfer",
{
token_id: "490641",
receiver_id: "bob.near"
},
undefined,
1
);
```

</TabItem>
Expand Down
6 changes: 3 additions & 3 deletions docs/7.primitives/nft/interacting/near-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ This section shows how to interact with an NFT contract from your shell using [`
<TabItem value="NFT Primitive" label="NFT Primitive" default>

```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
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"}}' --depositYocto 10000000000000000000000, --accountId bob.near
```

</TabItem>

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

```bash
near call x.paras.near nft_mint '{"token_series_id": "490641", "receiver_id": "bob.near"}' --accountId bob.near
near call x.paras.near nft_mint '{"token_series_id": "490641", "receiver_id": "bob.near"}' --depositYocto 10000000000000000000000 --accountId bob.near
```

:::note
Expand All @@ -37,7 +37,7 @@ In order to use `nft_mint` method of the `x.paras.near` contract you have to be
<TabItem value="Mintbase" label="Mintbase">

```bash
near call thomasettorreiv.mintbase1.near nft_batch_mint '{"num_to_mint": 1, "owner_id": "bob.near", "metadata": {}}' --accountId bob.near --deposit 0.000000000000000000000001
near call thomasettorreiv.mintbase1.near nft_batch_mint '{"num_to_mint": 1, "owner_id": "bob.near", "metadata": {}}' --accountId bob.near --depositYocto 10000000000000000000000
```

:::note
Expand Down
17 changes: 11 additions & 6 deletions docs/7.primitives/nft/interacting/web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ await wallet.callMethod({
media: "string", // URL to associated media, preferably to decentralized, content-addressed storage
}
},
contractId: CONTRACT_ADDRESS
contractId: CONTRACT_ADDRESS,
deposit: 10000000000000000000000
});
```

Expand All @@ -57,7 +58,8 @@ await wallet.callMethod({
token_series_id: "490641",
receiver_id: "bob.near",
},
contractId: CONTRACT_ADDRESS
contractId: CONTRACT_ADDRESS,
deposit: 10000000000000000000000 // Depends on your NFT metadata
});
```

Expand Down Expand Up @@ -85,7 +87,7 @@ await wallet.callMethod({
metadata: {},
},
contractId: CONTRACT_ADDRESS,
deposit: 1
deposit: 10000000000000000000000 // Depends on your NFT metadata
});
```

Expand Down Expand Up @@ -558,7 +560,8 @@ await wallet.callMethod({
token_id: "1",
receiver_id: "bob.near"
},
contractId: CONTRACT_ADDRESS
contractId: CONTRACT_ADDRESS,
deposit: 1
});
```

Expand All @@ -578,7 +581,8 @@ await wallet.callMethod({
token_id: "490641",
receiver_id: "bob.near"
},
contractId: CONTRACT_ADDRESS
contractId: CONTRACT_ADDRESS,
deposit: 1
});
```

Expand All @@ -600,7 +604,8 @@ await wallet.callMethod({
token_id: "490641",
receiver_id: "bob.near"
},
contractId: CONTRACT_ADDRESS
contractId: CONTRACT_ADDRESS,
deposit: 1
});
```

Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/js/contract-interface/public-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: "Public Methods"

# Public Method Types

Methods can be called externally by using the `view({})` or `call({})` decorators within the coontract class which will expose the method in the compiled WASM bytecode to be called by any other NEAR Account. Whenever a method is declared in your contract class without these decorators and is called by another NEAR Account, a `MethodNotFound` error will be thrown.
Methods can be called externally by using the `view({})` or `call({})` decorators within the contract class which will expose the method in the compiled WASM bytecode to be called by any other NEAR Account. Whenever a method is declared in your contract class without these decorators and is called by another NEAR Account, a `MethodNotFound` error will be thrown.

:::tip

Expand Down
4 changes: 3 additions & 1 deletion website/linkinator.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"https://t.me/cryptonear",
"https://www.npmjs.com/package/@near-lake/framework",
"https://mitsloan.mit.edu/ideas-made-to-matter/social-media-broken-a-new-report-offers-25-ways-to-fix-it",
"https://www.zeeve.io/"
"https://www.zeeve.io/",
"https://www.arweave.org/",
"https://www.minecraft.net"
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6f5d130

Please sign in to comment.