Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blog/2025-06-21.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ These are "call" methods (marked `&mut self` in Rust) because they modify the co
* **Tools:**
* **[NEAR CLI](/tools/near-cli):** A command-line interface for interacting with NEAR. Example:
```bash
near call twitter-app.your-account.near post_tweet '{"text": "Hello from CLI!"}' --accountId user1.near
near call twitter-app.your-account.near post_tweet '{"text": "Hello from CLI!"}' --useAccount user1.near
```
* **NEAR SDKs (JavaScript, etc.):** For web or mobile frontends, you'd use a JavaScript library (like [`near-api-js`](/tools/near-api)) to construct and send these transactions through a user's NEAR Wallet (which handles the signing).

Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ You can get the same info later by the transaction hash from the previous call:

<!--
- using NEAR CLI:
near tx-status <transaction_hash> --accountId <transaction_signer>
near tx-status <transaction_hash> --useAccount <transaction_signer>
-->

- with JSON RPC call
Expand Down
6 changes: 3 additions & 3 deletions docs/primitives/dao.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ You can create a DAO by interacting with the `sputnik-dao` contract:
export COUNCIL='["bob.near"]'
export ARGS=`echo '{"config": {"name": "Primitives", "purpose": "Building primitives on NEAR", "metadata":""}, "policy": '$COUNCIL'}' | base64`

near call sputnikv2.testnet create "{\"name\": \"primitives\", \"args\": \"$ARGS\"}" --accountId bob.near --amount 6 --gas 150000000000000
near call sputnikv2.testnet create "{\"name\": \"primitives\", \"args\": \"$ARGS\"}" --useAccount bob.near --amount 6 --gas 150000000000000
```

:::note
Expand Down Expand Up @@ -420,7 +420,7 @@ Create a proposal so other users can vote in favor or against it.
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call primitives.sputnik-dao.near add_proposal '{"proposal": {"description": "My first proposal", "kind": { "Transfer": {"token_id": "", "receiver_id": "bob.near", "amount": "10000000000000000000000000"}}}}' --deposit 0.1 --gas 300000000000000 --accountId bob.near
near call primitives.sputnik-dao.near add_proposal '{"proposal": {"description": "My first proposal", "kind": { "Transfer": {"token_id": "", "receiver_id": "bob.near", "amount": "10000000000000000000000000"}}}}' --deposit 0.1 --gas 300000000000000 --useAccount bob.near
```
</TabItem>
<TabItem value="Lantstool" label={<LantstoolLabel />}>
Expand Down Expand Up @@ -740,7 +740,7 @@ These snippet will enable your users to cast a vote for proposal of a particular
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call primitives.sputnik-dao.near act_proposal '{"id": 0, "action": "VoteApprove"}' --gas 300000000000000 --accountId bob.near
near call primitives.sputnik-dao.near act_proposal '{"id": 0, "action": "VoteApprove"}' --gas 300000000000000 --useAccount bob.near
```
:::note
Available vote options: `VoteApprove`, `VoteReject`, `VoteRemove`.
Expand Down
6 changes: 3 additions & 3 deletions docs/primitives/dex.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ In order to use the contract, make sure to register your account in the DEX by p
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call v2.ref-finance.near storage_deposit '' --accountId <account> --amount 0.1
near call v2.ref-finance.near storage_deposit '' --useAccount <account> --amount 0.1
```

</TabItem>
Expand All @@ -146,7 +146,7 @@ In order to swap tokens, one must first deposit tokens into the DEX. For this, y
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call token.v2.ref-finance.near ft_transfer_call {"receiver_id": "v2.ref-finance.near", "amount": "1000000000000", "msg": ""} --gas 300000000000000 --depositYocto 1 --accountId <account>
near call token.v2.ref-finance.near ft_transfer_call {"receiver_id": "v2.ref-finance.near", "amount": "1000000000000", "msg": ""} --gas 300000000000000 --depositYocto 1 --useAccount <account>
```

</TabItem>
Expand Down Expand Up @@ -513,7 +513,7 @@ In order to swap a token for another, you need to [have funds](#deposit-funds),

```bash
near call v2.ref-finance.near swap "{\"actions\": [{\"pool_id\": 79, \"token_in\": \"token.v2.ref-finance.near\", \"amount_in\": \"100000000000000000\", \"token_out\": \"wrap.near\", \"min_amount_out\": \"1\"}]}" --gas 300000000000000 --depositYocto 1
--accountId bob.near
--useAccount bob.near
```

<details>
Expand Down
10 changes: 5 additions & 5 deletions docs/primitives/ft/ft.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Here is how to directly interact with the factory contract through your applicat
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call token.primitives.near create_token '{"args":{"owner_id": "bob.near","total_supply": "1000000000","metadata":{"spec": "ft-1.0.0","name": "Test Token","symbol": "TTTEST","icon": "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7","decimals": 18}},"account_id": "bob.near"}' --gas 300000000000000 --depositYocto 2234830000000000000000000 --accountId bob.near
near call token.primitives.near create_token '{"args":{"owner_id": "bob.near","total_supply": "1000000000","metadata":{"spec": "ft-1.0.0","name": "Test Token","symbol": "TTTEST","icon": "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7","decimals": 18}},"account_id": "bob.near"}' --gas 300000000000000 --depositYocto 2234830000000000000000000 --useAccount bob.near
```
</TabItem>
<TabItem value="Lantstool" label={<LantstoolLabel />}>
Expand Down Expand Up @@ -332,7 +332,7 @@ By calling this `storage_deposit` the user can register themselves or **register
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call token.v2.ref-finance.near storage_deposit '{"account_id": "alice.near"}' --depositYocto 1250000000000000000000 --accountId bob.near
near call token.v2.ref-finance.near storage_deposit '{"account_id": "alice.near"}' --depositYocto 1250000000000000000000 --useAccount bob.near
```
</TabItem>
<TabItem value="Lantstool" label={<LantstoolLabel />}>
Expand Down Expand Up @@ -380,7 +380,7 @@ To send FT to another account you will use the `ft_transfer` method, indicating
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call token.v2.ref-finance.near ft_transfer '{"receiver_id": "alice.near", "amount": "100000000000000000"}' --depositYocto 1 --accountId bob.near
near call token.v2.ref-finance.near ft_transfer '{"receiver_id": "alice.near", "amount": "100000000000000000"}' --depositYocto 1 --useAccount bob.near
```
</TabItem>
<TabItem value="Lantstool" label={<LantstoolLabel />}>
Expand Down Expand Up @@ -470,7 +470,7 @@ Let's assume that you need to deposit FTs on [Ref Finance](https://rhea.finance/
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call token.v2.ref-finance.near ft_transfer_call '{"receiver_id": "v2.ref-finance.near", "amount": "100000000000000000", "msg": ""}' --gas 300000000000000 --depositYocto 1 --accountId bob.near
near call token.v2.ref-finance.near ft_transfer_call '{"receiver_id": "v2.ref-finance.near", "amount": "100000000000000000", "msg": ""}' --gas 300000000000000 --depositYocto 1 --useAccount bob.near
```

<details>
Expand Down Expand Up @@ -570,7 +570,7 @@ While the FT standard does not define a `burn` method, you can simply transfer t
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call token.v2.ref-finance.near ft_transfer '{"receiver_id": "0000000000000000000000000000000000000000000000000000000000000000", "amount": "100000000000000000"}' --depositYocto 1 --accountId bob.near
near call token.v2.ref-finance.near ft_transfer '{"receiver_id": "0000000000000000000000000000000000000000000000000000000000000000", "amount": "100000000000000000"}' --depositYocto 1 --useAccount bob.near
```
</TabItem>
</Tabs>
Expand Down
12 changes: 6 additions & 6 deletions docs/primitives/linkdrop/linkdrop.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Learn more about adding the [Wallet Selector Hooks](../../web3-apps/tutorials/we
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_per_use": "10000000000000000000000"}' --depositYocto 23000000000000000000000 --gas 100000000000000 --accountId bob.near
near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_per_use": "10000000000000000000000"}' --depositYocto 23000000000000000000000 --gas 100000000000000 --useAccount bob.near
```

</TabItem>
Expand Down Expand Up @@ -161,7 +161,7 @@ Learn more about adding the [Wallet Selector Hooks](../../web3-apps/tutorials/we
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_per_use": "10000000000000000000000", "nft": {"sender_id": "bob.near", "contract_id": "nft.primitives.near"}}' --depositYocto 23000000000000000000000 --gas 100000000000000 --accountId bob.near
near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_per_use": "10000000000000000000000", "nft": {"sender_id": "bob.near", "contract_id": "nft.primitives.near"}}' --depositYocto 23000000000000000000000 --gas 100000000000000 --useAccount bob.near
```

</TabItem>
Expand Down Expand Up @@ -206,7 +206,7 @@ Learn more about adding the [Wallet Selector Hooks](../../web3-apps/tutorials/we
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call nft.primitives.near nft_transfer_call '{"receiver_id": "v2.keypom.near", "token_id": <YOUR TOKEN ID>, "msg": <YOUR DROP ID>}' --depositYocto 1 --gas 100000000000000 --accountId bob.near
near call nft.primitives.near nft_transfer_call '{"receiver_id": "v2.keypom.near", "token_id": <YOUR TOKEN ID>, "msg": <YOUR DROP ID>}' --depositYocto 1 --gas 100000000000000 --useAccount bob.near
```

</TabItem>
Expand Down Expand Up @@ -276,7 +276,7 @@ Learn more about adding the [Wallet Selector Hooks](../../web3-apps/tutorials/we
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_per_use": "10000000000000000000000", "ftData": {"contractId": "ft.primitives.near","senderId": "bob.near", "amount": "1"}}}' --depositYocto 23000000000000000000000 --gas 100000000000000 --accountId bob.near
near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_per_use": "10000000000000000000000", "ftData": {"contractId": "ft.primitives.near","senderId": "bob.near", "amount": "1"}}}' --depositYocto 23000000000000000000000 --gas 100000000000000 --useAccount bob.near
```

</TabItem>
Expand Down Expand Up @@ -323,7 +323,7 @@ Learn more about adding the [Wallet Selector Hooks](../../web3-apps/tutorials/we
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call ft.primitives.near ft_transfer '{"receiver_id": "v2.keypom.near", "amount": "1"}' --depositYocto 1 --gas 100000000000000 --accountId bob.near
near call ft.primitives.near ft_transfer '{"receiver_id": "v2.keypom.near", "amount": "1"}' --depositYocto 1 --gas 100000000000000 --useAccount bob.near
```

</TabItem>
Expand Down Expand Up @@ -402,7 +402,7 @@ Learn more about adding the [Wallet Selector Hooks](../../web3-apps/tutorials/we
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_per_use": "10000000000000000000000", "fcData": {"methods": [[{"receiverId": "nft.primitives.near","methodName": "nft_mint","args": {"token_id": "1", "metadata": {"title": "My NFT drop","description": "","media": ""}, "accountIdField": "receiver_id", "attachedDeposit": "10000000000000000000000"}]]}}' --depositYocto 23000000000000000000000 --gas 100000000000000 --accountId bob.near
near call v2.keypom.near create_drop '{"public_keys": <PUBLIC_KEYS>, "deposit_per_use": "10000000000000000000000", "fcData": {"methods": [[{"receiverId": "nft.primitives.near","methodName": "nft_mint","args": {"token_id": "1", "metadata": {"title": "My NFT drop","description": "","media": ""}, "accountIdField": "receiver_id", "attachedDeposit": "10000000000000000000000"}]]}}' --depositYocto 23000000000000000000000 --gas 100000000000000 --useAccount bob.near
```

</TabItem>
Expand Down
10 changes: 5 additions & 5 deletions docs/primitives/nft/nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Here is how to directly interact with the factory contract through your applicat
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```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"}}' --depositYocto 10000000000000000000000, --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, --useAccount bob.near
```
</TabItem>
<TabItem value="Lantstool" label={<LantstoolLabel />}>
Expand Down Expand Up @@ -394,7 +394,7 @@ In both cases, it is necessary to invoke the `nft_transfer` method, indicating t
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call nft.primitives.near nft_transfer '{"token_id": "1", "receiver_id": "bob.near"}' --accountId bob.near --deposit 0.000000000000000000000001
near call nft.primitives.near nft_transfer '{"token_id": "1", "receiver_id": "bob.near"}' --useAccount bob.near --deposit 0.000000000000000000000001
```
</TabItem>
<TabItem value="Lantstool" label={<LantstoolLabel />}>
Expand Down Expand Up @@ -449,7 +449,7 @@ Natively, only NEAR tokens (Ⓝ) can be attached to a function calls. However, t
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call <nft-contract> nft_transfer_call '{"receiver_id": "<receiver-contract>", "token_id": "<token_id>", "msg": "<a-string-message>"}' --accountId <your-account> --depositYocto 1
near call <nft-contract> nft_transfer_call '{"receiver_id": "<receiver-contract>", "token_id": "<token_id>", "msg": "<a-string-message>"}' --useAccount <your-account> --depositYocto 1
```

</TabItem>
Expand Down Expand Up @@ -498,7 +498,7 @@ You can authorize other users to transfer an NFT you own. This is useful, for ex
"token_id": "<token-unique-id>",
"account_id": "<authorized-account>",
"msg": "<json-structure>"
}' --accountId <your-account> --depositYocto 1
}' --useAccount <your-account> --depositYocto 1
```
</TabItem>
<TabItem value="Lantstool" label={<LantstoolLabel />}>
Expand Down Expand Up @@ -544,7 +544,7 @@ While the NFT standard does not define a `burn` method, you can simply transfer
<TabItem value="🖥️ CLI" label="🖥️ CLI">

```bash
near call nft.primitives.near nft_transfer '{"token_id": "1", "receiver_id": "0000000000000000000000000000000000000000000000000000000000000000"}' --accountId bob.near --deposit 0.000000000000000000000001
near call nft.primitives.near nft_transfer '{"token_id": "1", "receiver_id": "0000000000000000000000000000000000000000000000000000000000000000"}' --useAccount bob.near --deposit 0.000000000000000000000001
```
</TabItem>
</Tabs>
Expand Down
4 changes: 2 additions & 2 deletions docs/smart-contracts/anatomy/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ If we initialize the state we can see how Borsh is used to serialize the state

```bash
# initialize with the string "hi" and 0
near call $CONTRACT init '{"string":"hi", "first_u8":0}' --accountId $CONTRACT
near call $CONTRACT init '{"string":"hi", "first_u8":0}' --useAccount $CONTRACT

# check the state
near view-state $CONTRACT --utf8 --finality optimistic
Expand Down Expand Up @@ -221,7 +221,7 @@ value: '\x00'
If we modify the stored string and add a new number, the state changes accordingly:

```bash
near call $CONTRACT change_state '{"string":"bye", "number":1}' --accountId $CONTRACT
near call $CONTRACT change_state '{"string":"bye", "number":1}' --useAccount $CONTRACT
```

<details>
Expand Down
4 changes: 2 additions & 2 deletions docs/smart-contracts/release/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ initialize the state. This is not necessary if your contract implements `default

```bash
# Call the initialization method (`init` in our examples)
near call <contractId> <initMethod> [<args>] --accountId <accountId>
near call <contractId> <initMethod> [<args>] --useAccount <accountId>
```

:::info
Expand Down Expand Up @@ -125,5 +125,5 @@ Change methods are those that perform both read and write operations. For these
since that account will expend GAS in the call.

```bash
near call <contractId> <methodName> <jsonArgs> --accountId <yourAccount> [--deposit <amount>] [--gas <GAS>]
near call <contractId> <methodName> <jsonArgs> --useAccount <yourAccount> [--deposit <amount>] [--gas <GAS>]
```
6 changes: 3 additions & 3 deletions docs/tutorials/auction/1.3-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ To deploy the contract, you need to compile the contract code into WebAssembly (

# initialize the contract, it finishes in 2 minutes
TWO_MINUTES_FROM_NOW=$(date -v+2M +%s000000000)
near call <contractId> init '{"end_time": "'$TWO_MINUTES_FROM_NOW'", "auctioneer": "<auctioneerId>"}' --accountId <contractId>
near call <contractId> init '{"end_time": "'$TWO_MINUTES_FROM_NOW'", "auctioneer": "<auctioneerId>"}' --useAccount <contractId>
```

</TabItem>
Expand All @@ -76,7 +76,7 @@ To deploy the contract, you need to compile the contract code into WebAssembly (

# initialize the contract, it finishes in 2 minutes
TWO_MINUTES_FROM_NOW=$(date -v+2M +%s000000000)
near call <contractId> init '{"end_time": "'$TWO_MINUTES_FROM_NOW'", "auctioneer": "<auctioneerId>"}' --accountId <contractId>
near call <contractId> init '{"end_time": "'$TWO_MINUTES_FROM_NOW'", "auctioneer": "<auctioneerId>"}' --useAccount <contractId>
```

</TabItem>
Expand Down Expand Up @@ -115,7 +115,7 @@ We are now ready to start bidding by calling the `bid` function on the contract.

```bash
# call the contract to bid
near call <contractId> bid --accountId <bidderId> --deposit 1
near call <contractId> bid --useAccount <bidderId> --deposit 1

# get the highest bid
near view <contractId> get_highest_bid
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/auction/3.1-nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ After `claim` is called, the test should verify that the auction winner now owns
If you would like to interact with the new contract via the CLI you can mint an NFT from a pre-deployed NFT contract

```bash
near call nft.examples.testnet nft_mint '{"token_id": "TYPE_A_UNIQUE_VALUE_HERE", "receiver_id": "<accountId>", "metadata": { "title": "GO TEAM", "description": "The Team Goes", "media": "https://bafybeidl4hjbpdr6u6xvlrizwxbrfcyqurzvcnn5xoilmcqbxfbdwrmp5m.ipfs.dweb.link/", "copies": 1}}' --accountId <accountId> --deposit 0.1
near call nft.examples.testnet nft_mint '{"token_id": "TYPE_A_UNIQUE_VALUE_HERE", "receiver_id": "<accountId>", "metadata": { "title": "GO TEAM", "description": "The Team Goes", "media": "https://bafybeidl4hjbpdr6u6xvlrizwxbrfcyqurzvcnn5xoilmcqbxfbdwrmp5m.ipfs.dweb.link/", "copies": 1}}' --useAccount <accountId> --deposit 0.1
```
---

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/auction/3.2-ft.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,13 @@ When deploying the contract make sure to specify the FT contract `dai.fakes.test
The auction contract will need to be registered as well, you could do this by sending it an arbitrary amount of $DAI from the faucet or you can just register it since it doesn't need any FTs. You should also register the auctioneer,

```bash
near call dai.fakes.testnet storage_deposit '{"account_id": "<auctionContractId>"}' --accountId <accountId> --deposit 0.1
near call dai.fakes.testnet storage_deposit '{"account_id": "<auctionContractId>"}' --useAccount <accountId> --deposit 0.1
```

Now you can go ahead and place a bid. DAI has 18 decimals meaning that 1 $DAI is made up of 10^24 smallest units. To make a bid of 2 $DAI you can use the command:

```bash
near call dai.fakes.testnet ft_transfer_call '{"receiver_id": "<auctionContractId>", "amount": "2000000000000000000", "msg": ""}' --accountId <bidderId> --depositYocto 1
near call dai.fakes.testnet ft_transfer_call '{"receiver_id": "<auctionContractId>", "amount": "2000000000000000000", "msg": ""}' --useAccount <bidderId> --depositYocto 1
```

## Auction architecture
Expand Down
Loading