Skip to content

Commit

Permalink
Update faucet.md (MystenLabs#9879)
Browse files Browse the repository at this point in the history
Modified based on
[this](https://github.com/MystenLabs/sui/tree/main/sdk/typescript)
document.

This error is located at [this](https://docs.sui.io/build/faucet) link.

The previous code will produce the error "The requested module
'@mysten/sui.js' does not provide an export named 'Network'".

---------

Co-authored-by: Liam Z <[email protected]>
  • Loading branch information
fox-222 and liamzh authored Mar 28, 2023
1 parent 9b507fc commit 6f2a776
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[default]
extend-ignore-re = [
"[a-zA-Z0-9]{44}"
]
4 changes: 2 additions & 2 deletions doc/src/build/faucet.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Replace `'https://faucet.devnet.sui.io/gas'` with `http://127.0.0.1:5003/gas` wh
You can also access the faucet through the TS-SDK.

```
import { JsonRpcProvider, Network } from '@mysten/sui.js';
import { JsonRpcProvider, devnetConnection } from '@mysten/sui.js';
// connect to Devnet
const provider = new JsonRpcProvider(Network.DEVNET);
const provider = new JsonRpcProvider(devnetConnection);
// get tokens from the Devnet faucet server
await provider.requestSuiFromFaucet(
'<YOUR SUI ADDRESS>'
Expand Down

0 comments on commit 6f2a776

Please sign in to comment.