Skip to content

Commit 11b9708

Browse files
Update develop/smart-contracts/evm-toolkit/libraries/web3-js.md
Co-authored-by: Dawn Kelly <[email protected]>
1 parent 43223e0 commit 11b9708

File tree

1 file changed

+9
-1
lines changed
  • develop/smart-contracts/evm-toolkit/libraries

1 file changed

+9
-1
lines changed

develop/smart-contracts/evm-toolkit/libraries/web3-js.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ npm install web3
2727

2828
## Set Up the Web3 Provider
2929

30-
The foundation of any Web3.js application is the provider configuration. This establishes your connection to the Asset Hub network:
30+
The provider configuration is the foundation of any Web3.js application. The following example establishes a connection to the Asset Hub network. To use the example script, replace `INSERT_RPC_URL`, `INSERT_CHAIN_ID`, and `INSERT_CHAIN_NAME` with the appropriate values. For example, for Westend Asset Hub testnet, use these specific connection parameters:
31+
32+
```js
33+
const PROVIDER_RPC = {
34+
rpc: 'https://westend-asset-hub-eth-rpc.polkadot.io',
35+
chainId: 420420421,
36+
name: 'westend-asset-hub'
37+
};
38+
```
3139

3240
```javascript title="connectToProvider.js"
3341
--8<-- 'code/develop/smart-contracts/evm-toolkit/libraries/web3-js/connectToProvider.js'

0 commit comments

Comments
 (0)