Skip to content

Commit a46207d

Browse files
committed
update links
1 parent 2ba0849 commit a46207d

File tree

17 files changed

+28
-28
lines changed

17 files changed

+28
-28
lines changed

docs/3.tutorials/auction/4-factory.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {Github, Language} from "@site/src/components/codetabs"
88

99
Since an auction contract hosts a single auction, each time you would like to host a new auction you will need to deploy a new contract. Rather than finding the compiled WASM file, creating a new account, deploying the contract, and then initializing it each time, you can use a factory contract to do this for you.
1010

11-
Luckily for us, there is already a [factory contract example](https://github.com/near-examples/factory-rust)! We will fork this example and slightly modify it to suit our use case. If you would like to learn more about how the factory contract works, you can take a look at the [associated documentation](https://docs.near.org/tutorials/examples/factory#generic-factory).
11+
Luckily for us, there is already a [factory contract example](https://github.com/near-examples/factory-rust)! We will fork this example and slightly modify it to suit our use case. If you would like to learn more about how the factory contract works, you can take a look at the [associated documentation](/tutorials/examples/factory#generic-factory).
1212

1313
The factory example only comes in rust since, currently, the JavaScript SDK does not allow you to embed the WASM file in the contract. This is a limitation of the SDK and not the blockchain itself.
1414

docs/3.tutorials/crosswords/01-basics/00-overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import rustGood from '/docs/assets/crosswords/rust-good--ksart.near.png';
1111

1212
# Basics overview
1313

14-
This first chapter of the crossword puzzle tutorial will introduce fundamental concepts to smart contract development in a beginner-friendly way. By the end of this chapter you'll have a proof-of-concept contract that can be interacted with via [NEAR CLI](https://docs.near.org/tools/near-cli) and a simple frontend that uses the [`near-api-js` library](https://www.npmjs.com/package/near-api-js).
14+
This first chapter of the crossword puzzle tutorial will introduce fundamental concepts to smart contract development in a beginner-friendly way. By the end of this chapter you'll have a proof-of-concept contract that can be interacted with via [NEAR CLI](/tools/near-cli) and a simple frontend that uses the [`near-api-js` library](https://www.npmjs.com/package/near-api-js).
1515

1616
## It's not as bad as you think
1717

docs/3.tutorials/crosswords/01-basics/02-add-functions-call.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Before moving on, let's talk about these changes and how to think about them, be
3333
const PUZZLE_NUMBER: u8 = 1;
3434
```
3535

36-
This is an in-memory value, meaning that when the smart contract is spun up and executed in the virtual machine, the value `1` is contained in the contract code. This differs from the next change, where a field is added to the struct containing the `#[near]` macro. The field `crossword_solution` has the type of `String` and, like any other fields added to this struct, the value will live in **persistent storage**. With NEAR, storage is "paid for" via the native NEAR token (Ⓝ). It is not "state rent" but storage staking, paid once, and returned when storage is deleted. This helps incentivize users to keep their state clean, allowing for a more healthy chain. Read more about [storage staking here](https://docs.near.org/protocol/storage/storage-staking).
36+
This is an in-memory value, meaning that when the smart contract is spun up and executed in the virtual machine, the value `1` is contained in the contract code. This differs from the next change, where a field is added to the struct containing the `#[near]` macro. The field `crossword_solution` has the type of `String` and, like any other fields added to this struct, the value will live in **persistent storage**. With NEAR, storage is "paid for" via the native NEAR token (Ⓝ). It is not "state rent" but storage staking, paid once, and returned when storage is deleted. This helps incentivize users to keep their state clean, allowing for a more healthy chain. Read more about [storage staking here](/protocol/storage/storage-staking).
3737

3838
Let's now look at the three new functions:
3939

@@ -43,7 +43,7 @@ pub fn get_puzzle_number(&self) -> u8 {
4343
}
4444
```
4545

46-
As is covered in the [function section of these docs](../../../smart-contracts/anatomy/functions.md), a "view-only" function will have open parenthesis around `&self` while "change methods" or mutable functions will have `&mut self`. In the function above, the `PUZZLE_NUMBER` is returned. A user may call this method using the proper RPC endpoint without signing any transaction, since it's read-only. Think of it like a GET request, but using RPC endpoints that are [documented here](https://docs.near.org/api/rpc/contracts#call-a-contract-function).
46+
As is covered in the [function section of these docs](../../../smart-contracts/anatomy/functions.md), a "view-only" function will have open parenthesis around `&self` while "change methods" or mutable functions will have `&mut self`. In the function above, the `PUZZLE_NUMBER` is returned. A user may call this method using the proper RPC endpoint without signing any transaction, since it's read-only. Think of it like a GET request, but using RPC endpoints that are [documented here](/api/rpc/contracts#call-a-contract-function).
4747

4848
Mutable functions, on the other hand, require a signed transaction. The first example is a typical approach where the user supplies a parameter that's assigned to a field:
4949

@@ -135,7 +135,7 @@ See this visualization where two keys belonging to `mike.near` are able to creat
135135

136136
:::
137137

138-
We won't get into top-level accounts or implicit accounts, but you may read more [about that here](https://docs.near.org/docs/concepts/account).
138+
We won't get into top-level accounts or implicit accounts, but you may read more [about that here](/protocol/account-model).
139139

140140
Now that we have a key pair for our subaccount, we can deploy the contract to `testnet` and interact with it!
141141

@@ -256,7 +256,7 @@ Next, we'll add a crossword solution as a string (later we'll do this in a bette
256256
</TabItem>
257257
</Tabs>
258258

259-
Note that we used NEAR CLI's [`view` command](https://docs.near.org/docs/tools/near-cli#call), and didn't include an `--accountId` flag. As mentioned earlier, this is because we are not signing a transaction. This second method uses the NEAR CLI [`call` command](https://docs.near.org/docs/tools/near-cli#call) which does sign a transaction and requires the user to specify a NEAR account that will sign it, using the credentials files we looked at.
259+
Note that we used NEAR CLI's [`view` command](/tools/near-cli#call), and didn't include an `--accountId` flag. As mentioned earlier, this is because we are not signing a transaction. This second method uses the NEAR CLI [`call` command](/tools/near-cli#call) which does sign a transaction and requires the user to specify a NEAR account that will sign it, using the credentials files we looked at.
260260

261261
The last method we have will check the argument against what is stored in state and write a log about whether the crossword solution is correct or incorrect.
262262

@@ -358,9 +358,9 @@ You may hit an RPC endpoint corresponding to `view_state` and see for yourself.
358358

359359
![Screenshot of a terminal screen showing a curl request to an RPC endpoint that returns state of a smart contract](/docs/assets/crosswords/rpc-api-view-state.png)
360360

361-
More on this RPC endpoint in the [NEAR docs](https://docs.near.org/docs/api/rpc/contracts#view-contract-state).
361+
More on this RPC endpoint in the [NEAR docs](/api/rpc/contracts#view-contract-state).
362362
:::
363363

364-
In this section, we saved the crossword solution as plain text, which is likely not a great idea if we want to hide the solution to players of this crossword puzzle. Even though we don't have a function called `show_solution` that returns the struct's `crossword_solution` field, the value is stored transparently in state. We won't get into viewing contract state at this moment, but know it's rather easy [and documented here](https://docs.near.org/docs/api/rpc/contracts#view-contract-state).
364+
In this section, we saved the crossword solution as plain text, which is likely not a great idea if we want to hide the solution to players of this crossword puzzle. Even though we don't have a function called `show_solution` that returns the struct's `crossword_solution` field, the value is stored transparently in state. We won't get into viewing contract state at this moment, but know it's rather easy [and documented here](/api/rpc/contracts#view-contract-state).
365365

366366
The next section will explore hiding the answer from end users playing the crossword puzzle.

docs/3.tutorials/crosswords/01-basics/03-hashing-and-unit-tests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Here's a truncated snippet from a useful (though somewhat advanced) repository w
192192
We'll get into Actions later in this tutorial, but in the meantime here's a handy [reference from the spec](https://nomicon.io/RuntimeSpec/Actions.html).
193193
:::
194194

195-
As you can from the info bubble above, we can batch [Deploy](https://docs.rs/near-sdk/3.1.0/near_sdk/struct.Promise.html#method.deploy_contract) and [FunctionCall](https://docs.rs/near-sdk/3.1.0/near_sdk/struct.Promise.html#method.function_call) Actions. This is exactly what we want to do for our crossword puzzle, and luckily, NEAR CLI has a [flag especially for this](https://docs.near.org/tools/near-cli#near-deploy).
195+
As you can from the info bubble above, we can batch [Deploy](https://docs.rs/near-sdk/3.1.0/near_sdk/struct.Promise.html#method.deploy_contract) and [FunctionCall](https://docs.rs/near-sdk/3.1.0/near_sdk/struct.Promise.html#method.function_call) Actions. This is exactly what we want to do for our crossword puzzle, and luckily, NEAR CLI has a [flag especially for this](/tools/near-cli#deploy).
196196

197197
Let's run this again with the handy `--initFunction` and `--initArgs` flags:
198198

docs/3.tutorials/crosswords/02-beginner/00-overview.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ In this chapter we'll:
3636
As we implement the list above, we'll learn key concepts about NEAR:
3737

3838
- [Actions](https://nomicon.io/RuntimeSpec/Actions.html)
39-
- Full and function-call [access keys](https://docs.near.org/protocol/network/account#access-keys)
40-
- NEAR's specialized [Collections](../../../smart-contracts/anatomy/collections.md) that are generally preferable to, say, Rust's standard HashMap
39+
- Full and function-call [access keys](/protocol/access-keys)
40+
- NEAR's specialized [Collections](../../../smart-contracts/anatomy/collections.md) that are generally preferable to, say, Rust's standard HashMap
4141
- The flow of logging in to a decentralized app (dApp)
4242
- more…
4343

docs/5.api/rpc/providers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ As a user, if a dApp or wallet doesn't support RPC failover and the primary prov
5151

5252
## On NEAR.org RPC Deprecation
5353

54-
Please read the following announcement: [Future of Pagoda Services](https://docs.near.org/blog/2024-08-13-pagoda-services).
54+
Please read the following announcement: [Future of Pagoda Services](/blog/2024-08-13-pagoda-services).
5555

5656
> The Infrastructure Committee feels that Pagoda's fully-subsidized near.org RPC service is getting in the way of decentralization efforts and is preventing high-quality commercial RPC offerings from gaining traction. If a NEAR core team continues to support a free-to-use near.org RPC service, it will be required to gradually lower its rate limits over the coming months to prevent abuse. In light of this proposed change, high-traffic near.org RPC users should start making plans to switch to other RPC providers.
5757

docs/6.integrations/accounts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Please see the [documentation for accounts](/protocol/account-model) for basic i
1313

1414
- For exchanges, NEAR supports [implicit account](https://nomicon.io/DataStructures/Account.html#implicit-account-ids) creation which allows the creation of accounts without paying for transactions.
1515
- You can create an implicit account by following the steps in [this guide](/integrations/implicit-accounts).
16-
- Accounts must have enough tokens to cover its storage which currently costs `0.0001 NEAR` per byte. This equates to a minimum balance of `0.00182 NEAR` for an account with one access key. You can query the live storage price using the [`protocol-config`](https://docs.near.org/api/rpc/setup#protocol-config) RPC endpoint. For more details on storage fees see [this section of the economics paper](https://pages.near.org/papers/economics-in-sharded-blockchain/#transaction-and-storage-fees).
16+
- Accounts must have enough tokens to cover its storage which currently costs `0.0001 NEAR` per byte. This equates to a minimum balance of `0.00182 NEAR` for an account with one access key. You can query the live storage price using the [`protocol-config`](/api/rpc/protocol#protocol-config) RPC endpoint. For more details on storage fees see [this section of the economics paper](https://pages.near.org/papers/economics-in-sharded-blockchain/#transaction-and-storage-fees).
1717

1818
## Transfer from Function Call {#transfer-from-function-call}
1919

docs/6.integrations/balance.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Alternatively, you can view account balances by [querying `view_account`](/api/r
128128
}
129129
```
130130

131-
**Note:** Gas prices can change between blocks. Even for transactions with deterministic gas cost the cost in NEAR could also be different. You can query the gas price for recent blocks using the [`gas_price` RPC endpoint](https://docs.near.org/api/rpc/setup#gas-price).
131+
**Note:** Gas prices can change between blocks. Even for transactions with deterministic gas cost the cost in NEAR could also be different. You can query the gas price for recent blocks using the [`gas_price` RPC endpoint](/api/rpc/gas#gas-price).
132132

133133
---
134134

docs/6.integrations/tokens.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ https://testnet.nearblocks.io/txns/9CMrMMt3UzeU63FFrUyFb1gNGuHXxvKfHqYJzyFTAk6z
297297
298298
- with JSON RPC call:
299299
300-
At the top of this section is a link detailing how to [construct a transaction](/integrations/create-transactions#low-level----create-a-transaction) without the full abstraction of the [`near-api-js` library](https://www.npmjs.com/package/near-api-js). For this and future examples that use the [RPC method `broadcast_tx_commit`](https://docs.near.org/api/rpc/setup#send-transaction-await) we will provide a JSON-like object meant to act similar to [pseudocode](https://en.wikipedia.org/wiki/Pseudocode), only imparting high-level details of a transaction. This code block below is the first example of this, detailing what goes into the transaction discussed currently, involving the method `storage_deposit`.
300+
At the top of this section is a link detailing how to [construct a transaction](/integrations/create-transactions#low-level----create-a-transaction) without the full abstraction of the [`near-api-js` library](https://www.npmjs.com/package/near-api-js). For this and future examples that use the [RPC method `broadcast_tx_commit`](/api/rpc/transactions#send-transaction-await) we will provide a JSON-like object meant to act similar to [pseudocode](https://en.wikipedia.org/wiki/Pseudocode), only imparting high-level details of a transaction. This code block below is the first example of this, detailing what goes into the transaction discussed currently, involving the method `storage_deposit`.
301301
302302
```yaml
303303
Transaction: {

docs/chain-abstraction/chain-signatures/getting-started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ Chain Signatures can be used to build a wide range of applications that leverage
8585
## How to Get Started?
8686

8787
1. **Familiarize Yourself with Chain Signatures:**
88-
* Understand the [basics of Chain Signatures](https://docs.near.org/concepts/abstraction/chain-signatures) and how they simplify blockchain interactions.
88+
* Understand the [basics of Chain Signatures](/chain-abstraction/chain-signatures) and how they simplify blockchain interactions.
8989
* Review the technical [explainer](https://near.org/blog/unlocking-web3-usability-with-account-aggregation).
9090
2. **Explore the Use Cases:**
9191
* Review [examples of use cases for Chain Signatures](https://pages.near.org/blog/unlocking-multichain-web3-with-near-chain-signatures/), such as Multichain DAO, Multichain NFT Minter, and Bitcoin Runes Airdrop.
9292
3. **Access Resources and Documentation:**
93-
* Visit the [Chain Signatures documentation](https://docs.near.org/build/chain-abstraction/chain-signatures) for detailed technical information and code snippets.
93+
* Visit the [Chain Signatures documentation](/chain-abstraction/chain-signatures) for detailed technical information and code snippets.
9494
* Check out the [Linktree for Chain Signatures](https://linktr.ee/chainsignatures) for various resources, including demos and tutorials.
9595
4. **Try the Demos:**
9696
* Use the [command-line-based demo](https://github.com/near-examples/chainsig-script) to derive accounts and send transactions on Bitcoin, Ethereum, Doge, and Ripple.

docs/chain-abstraction/omnibridge/overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_label: Overview
44
title: Omni Bridge Overview
55
---
66

7-
The [Omni Bridge](https://github.com/Near-One/omni-bridge) is a multi-chain asset bridge that facilitates secure and efficient asset transfers between different blockchain networks. It solves key challenges in cross-chain communication by leveraging [Chain Signatures](https://docs.near.org/concepts/abstraction/chain-signatures) and its decentralized [Multi-Party Computation (MPC) service](https://docs.near.org/concepts/abstraction/chain-signatures#multi-party-computation-service) to enable trustless cross-chain asset transfers.
7+
The [Omni Bridge](https://github.com/Near-One/omni-bridge) is a multi-chain asset bridge that facilitates secure and efficient asset transfers between different blockchain networks. It solves key challenges in cross-chain communication by leveraging [Chain Signatures](/chain-abstraction/chain-signatures) and its decentralized [Multi-Party Computation (MPC) service](/chain-abstraction/chain-signatures#multi-party-computation-service) to enable trustless cross-chain asset transfers.
88

99
:::tip
1010
To learn more see [How Omni Bridge Works](./how-it-works.md).

docs/data-infrastructure/indexers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ The dApp has a helper deployed somewhere off-chain, and this helper has code tha
4242

4343
### Getting the data from a blockchain from the external world
4444

45-
NEAR blockchain implements a [JSON-RPC endpoint](https://docs.near.org/api/rpc/introduction) for everyone to interact with the blockchain. Through the JSON-RPC API users can call smart contracts triggering them to be executed with given parameters. Also, users can view the data from the blockchain.
45+
NEAR blockchain implements a [JSON-RPC endpoint](/api/rpc/introduction) for everyone to interact with the blockchain. Through the JSON-RPC API users can call smart contracts triggering them to be executed with given parameters. Also, users can view the data from the blockchain.
4646

47-
So, continuing with our example we can make our helper pull a [Block](https://docs.near.org/api/rpc/block-chunk#block) every second, then pull all the [Chunks](https://docs.near.org/api/rpc/block-chunk#chunk) and analyze the Transactions included in the Block to check if there is a transaction to our smart contract with "buy an e-book" function call. If we observe such a Transaction, we need to ensure it is successful, so we don't send the e-book to a user whose "buy e-book" Transaction failed.
47+
So, continuing with our example we can make our helper pull a [Block](/api/rpc/block-chunk#block-details) every second, then pull all the [Chunks](/api/rpc/block-chunk#chunk-details) and analyze the Transactions included in the Block to check if there is a transaction to our smart contract with "buy an e-book" function call. If we observe such a Transaction, we need to ensure it is successful, so we don't send the e-book to a user whose "buy e-book" Transaction failed.
4848

4949
After the process is complete we can trigger the helper's code to send the user an email with the e-book they bought.
5050

docs/data-infrastructure/lake-framework/running-near-lake/run-near-lake.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ $ aws s3 --no-sign-request cp --no-sign-request --recursive s3://near-protocol-p
132132

133133
It's not necessary but in order to index everything in the network it is better to do it from the genesis.
134134
`nearcore` node is running in non-archival mode by default. That means that the node keeps data only
135-
for [5 last epochs](https://docs.near.org/protocol/network/epoch). In order to index data from the genesis
135+
for [5 last epochs](/protocol/network/epoch). In order to index data from the genesis
136136
you need to turn the node in archival mode.
137137

138138
To do it you need to update `config.json` located in `--home-dir` (by default it is `~/.near`).

0 commit comments

Comments
 (0)