Skip to content

Commit

Permalink
Add testnet faucet link (#1791)
Browse files Browse the repository at this point in the history
* Update sidebars.js

* Update cli.md

* Update unit-tests.md

* Update transactions.md

* Update protocol.md

* Update blockchain.md

* Update blockchain.md

* Update cli.md
  • Loading branch information
bucanero authored Mar 7, 2024
1 parent 9f693fc commit 57b1d80
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/1.concepts/basics/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: ⭐ What is NEAR?

NEAR is a **user-friendly** and [**carbon-neutral**](https://near.org/blog/near-climate-neutral-product/) blockchain, built from the ground up to be performant, secure, and infinitely scalable.

In technical terms, NEAR is a [layer one](https://blockchain-comparison.com/blockchain-protocols/), [sharded](https://near.org/blog/near-launches-nightshade-sharding-paving-the-way-for-mass-adoption), [proof-of-stake](https://en.wikipedia.org/wiki/Proof_of_stake) blockchain built with usability in mind.
In technical terms, NEAR is a [layer one](https://coinmarketcap.com/academy/glossary/layer-1-blockchain), [sharded](https://near.org/blog/near-launches-nightshade-sharding-paving-the-way-for-mass-adoption), [proof-of-stake](https://en.wikipedia.org/wiki/Proof_of_stake) blockchain built with usability in mind.

In simple terms, NEAR is **blockchain for everyone**.

Expand Down
2 changes: 1 addition & 1 deletion docs/1.concepts/web3/blockchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ There are a lot of blockchains out there and it might be hard to choose the most
- Scalability - whether a network is designed to support a large number of transactions. If not, transaction speed/cost may grow out of control over time.
- Development experience - most importantly, what language we’ll use to write our smart contracts. Ethereum popularized [Solidity](https://docs.soliditylang.org/en/v0.8.12/) as a programming language of choice for contracts. Several newer chains, like NEAR, chose Rust, which is a more mature general-purpose programming language.

Historically, the first blockchain to introduce smart contracts was Ethereum. However, as the number of users grew, transaction speed and cost skyrocketed, and it became apparent that it couldn't handle the demand. So, a number of [scaling solutions](https://ethereum.org/en/developers/docs/scaling/) appeared - [layer 2 chains](https://ethereum.org/en/developers/docs/scaling/#layer-2-scaling), [sidechains](https://ethereum.org/en/developers/docs/scaling/sidechains/), and [plasma chains](https://ethereum.org/en/developers/docs/scaling/plasma/). However, they all use some kind of workarounds with their own unique drawbacks. Ethereum tries to fix the core problem and redesign its network - like switching to a Proof-of-stake consensus, which is ongoing for quite a long time, but exact timeline when all of the problems will be fixed is very unclear.
Historically, the first blockchain to introduce smart contracts was Ethereum. However, as the number of users grew, transaction speed and cost skyrocketed, and it became apparent that it couldn't handle the demand. So, a number of [scaling solutions](https://ethereum.org/en/developers/docs/scaling.html) appeared - [layer 2 chains](https://ethereum.org/en/developers/docs/scaling.html#layer-2-scaling), [sidechains](https://ethereum.org/en/developers/docs/scaling/sidechains/), and [plasma chains](https://ethereum.org/en/developers/docs/scaling/plasma/). However, they all use some kind of workarounds with their own unique drawbacks. Ethereum tries to fix the core problem and redesign its network - like switching to a Proof-of-stake consensus, which is ongoing for quite a long time, but exact timeline when all of the problems will be fixed is very unclear.

Meanwhile, a new generation of blockchains started to appear. They learned from the Etherium mistakes, and designed them from ground-up to be fast, cheap and scalable.
Choosing the right one is by no means an easy task, but for us we found the [NEAR](https://near.org/) blockchain to be an ideal solution, because of the following properties:
Expand Down
29 changes: 25 additions & 4 deletions docs/4.tools/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,17 @@ near send-near ... --networkId mainnet
---

### Custom RPC server selection
You can set custom RPC server URL by setting this env variables:
You can set custom RPC server URL by setting these env variables:

```bash
NEAR_MAINNET_RPC
NEAR_TESTNET_RPC
```

Clear them in case you want to get back to the default RPC server.

Example:

```bash
export NEAR_TESTNET_RPC=<put_your_rpc_server_url_here>
```
Expand Down Expand Up @@ -187,10 +190,12 @@ near add-key example-acct.testnet Cxg2wgFYrdLTEkMu6j5D6aEZqTb3kXbmJygS48ZKbo1S
<summary><strong>Example Response</strong></summary>
<p>

```
Adding full access key = Cxg2wgFYrdLTEkMu6j5D6aEZqTb3kXbmJygS48ZKbo1S to example-acct.testnet.
Transaction Id EwU1ooEvkR42HvGoJHu5ou3xLYT3JcgQwFV3fAwevGJg
To see the transaction in the transaction explorer, please open this url in your browser
https://testnet.nearblocks.io/txns/EwU1ooEvkR42HvGoJHu5ou3xLYT3JcgQwFV3fAwevGJg
```

</p>
</details>
Expand Down Expand Up @@ -220,10 +225,12 @@ near add-key example-acct.testnet GkMNfc92fwM1AmwH1MTjF4b7UZuceamsq96XPkHsQ9vi -
<summary><strong>Example Response</strong></summary>
<p>

```
Adding function call access key = GkMNfc92fwM1AmwH1MTjF4b7UZuceamsq96XPkHsQ9vi to example-acct.testnet.
Transaction Id H2BQL9fXVmdTbwkXcMFfZ7qhZqC8fFhsA8KDHFdT9q2r
To see the transaction in the transaction explorer, please open this url in your browser
https://testnet.nearblocks.io/txns/H2BQL9fXVmdTbwkXcMFfZ7qhZqC8fFhsA8KDHFdT9q2r
```

</p>
</details>
Expand All @@ -250,9 +257,11 @@ near delete-key example-acct.testnet Cxg2wgFYrdLTEkMu6j5D6aEZqTb3kXbmJygS48ZKbo1
<summary><strong>Example Response</strong></summary>
<p>

```
Transaction Id 4PwW7vjzTCno7W433nu4ieA6FvsAjp7zNFwicNLKjQFT
To see the transaction in the transaction explorer, please open this url in your browser
https://testnet.nearblocks.io/txns/4PwW7vjzTCno7W433nu4ieA6FvsAjp7zNFwicNLKjQFT
```

</p>
</details>
Expand Down Expand Up @@ -388,16 +397,18 @@ Implicit account: 9c07afc7673ea0f9a20c8a279e8bbe1dd1e283254263bb3b07403e4b6fd7a4

#### 4a) `near generate-key --queryLedgerPK`

> Uses a connected Ledger device to display a public key and [implicit account](http://docs.near.org/docs/roles/integrator/implicit-accounts) using the default HD path (`"44'/397'/0'/0'/1'"`)
> Uses a connected Ledger device to display a public key and [implicit account](http://docs.near.org/integrator/implicit-accounts) using the default HD path (`"44'/397'/0'/0'/1'"`)
```bash
near generate-key --queryLedgerPK
```

You should then see the following prompt to confirm this request on your Ledger device:

```
Make sure to connect your Ledger and open NEAR app
Getting Public Key from Ledger...
```

After confirming the request on your Ledger device, a public key and implicit accountId will be displayed.

Expand All @@ -417,16 +428,18 @@ Implicit account: 42c320xc20739fd9a6bqf2f89z61rd14efe5d3de234199bc771235a4bb8b0e

#### 3b) `near generate-key --queryLedgerPK --ledgerPath="HD path you specify"`

> Uses a connected Ledger device to display a public key and [implicit account](http://docs.near.org/docs/roles/integrator/implicit-accounts) using a custom HD path.
> Uses a connected Ledger device to display a public key and [implicit account](http://docs.near.org/integrator/implicit-accounts) using a custom HD path.
```bash
near generate-key --queryLedgerPK --ledgerPath="44'/397'/0'/0'/2'"
```

You should then see the following prompt to confirm this request on your Ledger device:

```
Make sure to connect your Ledger and open NEAR app
Waiting for confirmation on Ledger...
```

After confirming the request on your Ledger device, a public key and implicit accountId will be displayed.

Expand Down Expand Up @@ -505,7 +518,7 @@ near login

**Custom wallet url:**

Default wallet url is `https://testnet.mynearwallet.com/`. But if you want to change to a different wallet url, you can setup the environmental variable `NEAR_MAINNET_WALLET` or `NEAR_TESTNET_WALLET`.
The default wallet URL is `https://testnet.mynearwallet.com/`. However, if you want to change to a different wallet URL, you can set the environmental variable `NEAR_MAINNET_WALLET` or `NEAR_TESTNET_WALLET`.

```bash
export NEAR_TESTNET_WALLET=https://wallet.testnet.near.org/
Expand Down Expand Up @@ -567,8 +580,10 @@ near create-account sub-acct2.example-acct.testnet --useAccount example-acct.tes
<summary><strong>Example Response</strong></summary>
<p>

```
Saving key to '/HOME_DIR/.near-credentials/default/sub-acct2.example-acct.testnet.json'
Account sub-acct2.example-acct.testnet for network "default" was created.
```

</p>
</details>
Expand All @@ -592,11 +607,13 @@ near delete-account sub-acct2.example-acct.testnet example-acct.testnet
<summary><strong>Example Response</strong></summary>
<p>

```
Deleting account. Account id: sub-acct2.example-acct.testnet, node: https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, beneficiary: example-acct.testnet
Transaction Id 4x8xohER1E3yxeYdXPfG8GvXin1ShiaroqE5GdCd5YxX
To see the transaction in the transaction explorer, please open this url in your browser
https://testnet.nearblocks.io/txns/4x8xohER1E3yxeYdXPfG8GvXin1ShiaroqE5GdCd5YxX
Account sub-acct2.example-acct.testnet for network "default" was deleted.
```

</p>
</details>
Expand All @@ -623,10 +640,12 @@ near send-near sender.testnet receiver.testnet 10
<summary><strong>Example Response</strong></summary>
<p>

```
Sending 10 NEAR to receiver.testnet from sender.testnet
Transaction Id BYTr6WNyaEy2ykAiQB9P5VvTyrJcFk6Yw95HPhXC6KfN
To see the transaction in the transaction explorer, please open this url in your browser
https://testnet.nearblocks.io/txns/BYTr6WNyaEy2ykAiQB9P5VvTyrJcFk6Yw95HPhXC6KfN
```

</p>
</details>
Expand Down Expand Up @@ -726,11 +745,13 @@ near deploy example-contract.testnet out/example.wasm --initFunction new --initA
<summary><strong>Example Response</strong></summary>
<p>

```
Starting deployment. Account id: example-contract.testnet, node: https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file: main.wasm
Transaction Id G8GhhPuujMHTRnwursPXE1Lv5iUZ8WUecwiST1PcKWMt
To see the transaction in the transaction explorer, please open this url in your browser
https://testnet.nearblocks.io/txns/G8GhhPuujMHTRnwursPXE1Lv5iUZ8WUecwiST1PcKWMt
Done deploying to example-contract.testnet
```

</p>
</details>
Expand Down
2 changes: 1 addition & 1 deletion docs/5.api/rpc/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ Example response:
```

Final transaction results can be queried using [Transaction Status](#transaction-status)
or [NEAR Explorer](https://explorer.testnet.near.org/) using the above `result` hash returning a result similar to the example below.
or [NearBlocks Explorer](https://testnet.nearblocks.io/) using the above `result` hash returning a result similar to the example below.

![NEAR-Explorer-transactionHash](/docs/assets/NEAR-Explorer-transactionHash.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/rust/testing/unit-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mod tests {
}
```

Where `VMContextBuilder` allows for modifying the context of the mocked blockchain to simulate the environment that a transaction would be run. The documentation for what can be modified with this context can be found [here](https://docs.rs/near-sdk/latest/near_sdk/struct.VMContext.html).
Where `VMContextBuilder` allows for modifying the context of the mocked blockchain to simulate the environment that a transaction would be run. The documentation for what can be modified with this context can be found [here](https://docs.rs/near-sdk/4.1.1/near_sdk/struct.VMContext.html).

The `testing_env!` macro will initialize the blockchain interface with the `VMContext` which is either initialized through `VMContextBuilder` or manually through itself.

Expand Down
7 changes: 6 additions & 1 deletion website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,11 @@ const sidebar = {
"label": "Wallets",
"href": "https://wallet.near.org"
},
{
"type": "link",
"label": "Testnet Faucet",
"href": "https://near-faucet.io/"
},
"tools/explorer",
"tools/indexing"
],
Expand Down Expand Up @@ -869,4 +874,4 @@ const sidebar = {
]
};

export default sidebar;
export default sidebar;

0 comments on commit 57b1d80

Please sign in to comment.