From 2271905679c6a16b21fd181331d4c0ce495330f8 Mon Sep 17 00:00:00 2001
From: Ake <10195782+akegaviar@users.noreply.github.com>
Date: Mon, 7 Jul 2025 16:14:42 +0800
Subject: [PATCH 1/6] Fix lists
---
docs/aptos-tooling.mdx | 27 +-
...o-save-and-retrieve-a-message-on-aptos.mdx | 50 +-
docs/arbitrum-tooling.mdx | 88 +-
...rial-l1-to-l2-messaging-smart-contract.mdx | 27 +-
docs/aurora-tooling.mdx | 92 +-
docs/avalanche-tooling.mdx | 102 +-
docs/base-tooling.mdx | 116 +--
...eploy-an-erc-721-contract-with-hardhat.mdx | 46 +-
docs/berachain-tooling.mdx | 57 +-
docs/bitcoin-tooling.mdx | 15 +-
docs/blast-tooling.mdx | 87 +-
docs/blob-transactions-the-hard-way.mdx | 48 +-
docs/bsc-tooling.mdx | 161 ++--
...contract-with-truffle-and-openzeppelin.mdx | 147 +--
docs/celo-tooling.mdx | 87 +-
docs/chainstack-compare-dashboard.mdx | 22 +-
docs/cronos-tooling.mdx | 98 +-
...smart-contracts-on-cronos-with-hardhat.mdx | 41 +-
docs/cryo-with-chainstack-and-python.mdx | 58 +-
docs/cryo-your-gateway-to-blockchain-data.mdx | 15 +-
docs/deploy-a-subgraph.mdx | 61 +-
docs/elastic-subgraphs.mdx | 28 +-
...ethereum-how-to-analyze-pending-blocks.mdx | 22 +-
docs/ethereum-tooling.mdx | 182 ++--
...ial-academic-certificates-with-truffle.mdx | 121 +--
...utorial-asset-tokenization-with-embark.mdx | 100 +-
...tutorial-trust-fund-account-with-remix.mdx | 71 +-
docs/fantom-tooling.mdx | 99 +-
...contract-with-truffle-and-openzeppelin.mdx | 126 +--
...ents-with-getpastevents-for-a-bayc-nft.mdx | 14 +-
docs/filecoin-tooling.mdx | 65 +-
...king-contract-on-filecoin-with-hardhat.mdx | 26 +-
docs/fuse-tooling.mdx | 249 ++---
...-simple-multisig-contract-with-hardhat.mdx | 57 +-
...ound-token-with-remix-and-openzeppelin.mdx | 208 ++--
docs/goerli-to-sepolia-transition.mdx | 18 +-
docs/harmony-tooling.mdx | 138 +--
...simple-metaverse-contract-with-foundry.mdx | 246 ++---
...-real-time-crypto-prices-from-ethereum.mdx | 14 +-
...secrets-guide-to-environment-variables.mdx | 137 +--
...for-chainstack-marketplace-integration.mdx | 103 +-
...-bun-the-future-of-javascript-runtimes.mdx | 14 +-
docs/klaytn-tooling.mdx | 144 +--
docs/linea-tooling.mdx | 97 +-
docs/manage-your-account.mdx | 103 +-
docs/manage-your-billing.mdx | 124 +--
docs/manage-your-consortium-network.mdx | 116 +--
docs/manage-your-networks.mdx | 14 +-
docs/manage-your-node.mdx | 80 +-
docs/manage-your-organization.mdx | 54 +-
docs/manage-your-project.mdx | 54 +-
docs/mantle-tooling.mdx | 97 +-
...or-web3-requests-a-comprehensive-guide.mdx | 14 +-
...itoring-the-conviction-voting-contract.mdx | 18 +-
docs/moonbeam-tooling.mdx | 168 ++--
docs/near-tooling.mdx | 80 +-
...nd-upgrading-a-simple-message-contract.mdx | 52 +-
docs/oasis-sapphire-tooling.mdx | 134 +--
...al-smart-contracts-with-oasis-sapphire.mdx | 92 +-
docs/opbnb-how-to-listen-deposits-bridge.mdx | 47 +-
docs/opbnb-tooling.mdx | 80 +-
docs/optimism-tooling.mdx | 91 +-
...m-l2-using-the-optimism-javascript-sdk.mdx | 38 +-
docs/polygon-tooling.mdx | 241 ++---
...ridging-erc20-from-ethereum-to-polygon.mdx | 346 +++----
docs/polygon-zkevm-tooling.mdx | 114 +--
...-deploy-a-smart-contract-using-hardhat.mdx | 46 +-
...n-application-backends-with-chainstack.mdx | 903 ++++++++----------
docs/ronin-tooling.mdx | 30 +-
.../ronin-tutorial-making-a-game-contract.mdx | 18 +-
docs/scroll-tooling.mdx | 155 +--
...e-uniswap-v3-smart-contracts-on-scroll.mdx | 83 +-
...ority-fees-getrecentprioritizationfees.mdx | 18 +-
...ana-getaccountinfo-getmultipleaccounts.mdx | 22 +-
...ana-gettokenlargestaccounts-rpc-method.mdx | 30 +-
...form-token-swaps-using-the-raydium-sdk.mdx | 11 +-
...pc-endpoints-optimize-dapp-performance.mdx | 18 +-
...ing-to-pumpfun-token-mint-using-geyser.mdx | 18 +-
docs/solana-tooling.mdx | 129 +--
docs/sonic-tooling.mdx | 93 +-
docs/starknet-tooling.mdx | 76 +-
...th-nile-and-l1-l2-reputation-messaging.mdx | 88 +-
...raphs-how-to-query-uniswap-v2-subgraph.mdx | 83 +-
...ebug-subgraphs-with-a-local-graph-node.mdx | 532 +++++------
...loying-a-lido-subgraph-with-chainstack.mdx | 77 +-
...bgraphs-tutorial-indexing-uniswap-data.mdx | 34 +-
docs/tezos-tooling.mdx | 116 +--
...utorial-a-simple-fund-contract-in-ligo.mdx | 88 +-
...w-to-customize-fungible-tokens-jettons.mdx | 41 +-
docs/ton-tooling.mdx | 34 +-
...-apes-the-ethereum-event-logs-tutorial.mdx | 46 +-
...y-bandwidth-with-python-and-chainstack.mdx | 16 +-
docs/tron-tooling.mdx | 79 +-
...ve-all-transactions-made-by-an-account.mdx | 25 +-
docs/unichain-tooling.mdx | 90 +-
docs/unlimited-node.mdx | 21 +-
docs/work-with-chainstack-marketplace.mdx | 63 +-
docs/work-with-ipfs-storage.mdx | 138 +--
docs/yellowstone-grpc-geyser-plugin.mdx | 16 +-
docs/zksync-era-tooling.mdx | 60 +-
...al-develop-a-custom-paymaster-contract.mdx | 46 +-
docs/zora-tooling.mdx | 60 +-
102 files changed, 3132 insertions(+), 6152 deletions(-)
diff --git a/docs/aptos-tooling.mdx b/docs/aptos-tooling.mdx
index d0c51f87..a1c5eaaa 100644
--- a/docs/aptos-tooling.mdx
+++ b/docs/aptos-tooling.mdx
@@ -5,23 +5,16 @@ title: "Aptos tooling"
## Martian wallet
You can set your [Martian wallet](https://martianwallet.xyz/) to interact through your Aptos nodes deployed with Chainstack.
-
-
- Open your Martian wallet and click the network selector.
-
-
- In the network selector, click **ADD CUSTOM NETWORK**.
-
-
- In the **Enter Node Url** field, enter the endpoint. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
- In the **Enter Faucet Url** field, enter the [Aptos testnet faucet](https://aptoslabs.com/testnet-faucet) URL.
-
-
- Click **ADD NETWORK**.
-
-
+
+1. Open your Martian wallet and click the network selector.
+
+2. In the network selector, click **ADD CUSTOM NETWORK**.
+
+3. In the **Enter Node Url** field, enter the endpoint. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+
+4. In the **Enter Faucet Url** field, enter the [Aptos testnet faucet](https://aptoslabs.com/testnet-faucet) URL.
+
+5. Click **ADD NETWORK**.
## REST API
diff --git a/docs/aptos-tutorial-publish-a-module-to-save-and-retrieve-a-message-on-aptos.mdx b/docs/aptos-tutorial-publish-a-module-to-save-and-retrieve-a-message-on-aptos.mdx
index 79a053a5..0a08f922 100644
--- a/docs/aptos-tutorial-publish-a-module-to-save-and-retrieve-a-message-on-aptos.mdx
+++ b/docs/aptos-tutorial-publish-a-module-to-save-and-retrieve-a-message-on-aptos.mdx
@@ -31,44 +31,18 @@ Specifically, in this tutorial, you will:
To get from zero to publishing your string via the module to Aptos testnet, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join Aptos testnet.
-
-
- With Chainstack, access your Aptos node credentials.
-
-
- Set up your Martian wallet to work through the Chainstack Aptos node.
-
-
- Fund your account through the [Aptos testnet faucet](https://aptoslabs.com/testnet-faucet).
-
-
- Install the [Aptos CLI](https://aptos.dev/tools/aptos-cli/install-cli/).
-
-
- Create a Move project.
-
-
- Create and configure your Aptos project.
-
-
- Create a module in the Move language.
-
-
- Compile and test the Move module.
-
-
- Publish the Move module.
-
-
- Save and retrieve a message on the Aptos chain.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join Aptos testnet.
+3. With Chainstack, access your Aptos node credentials.
+4. Set up your Martian wallet to work through the Chainstack Aptos node.
+5. Fund your account through the [Aptos testnet faucet](https://aptoslabs.com/testnet-faucet).
+6. Install the [Aptos CLI](https://aptos.dev/tools/aptos-cli/install-cli/).
+7. Create a Move project.
+8. Create and configure your Aptos project.
+9. Create a module in the Move language.
+10. Compile and test the Move module.
+11. Publish the Move module.
+12. Save and retrieve a message on the Aptos chain.
## Step-by-step
diff --git a/docs/arbitrum-tooling.mdx b/docs/arbitrum-tooling.mdx
index 77af0e43..6e2c19c0 100644
--- a/docs/arbitrum-tooling.mdx
+++ b/docs/arbitrum-tooling.mdx
@@ -10,12 +10,8 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Arbitrum nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -37,11 +33,7 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
@@ -49,14 +41,8 @@ See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstac
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](/docs/arbitrum-tooling#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](/docs/arbitrum-tooling#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
@@ -64,14 +50,8 @@ This will engage MetaMask and make Remix IDE interact with the network through a
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Arbitrum nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -109,14 +89,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Arbitrum nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -180,12 +154,8 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Arbitrum nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+2. Connect over HTTP:
```php Php
@@ -203,9 +173,7 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Arbitrum nod
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
@@ -229,8 +197,6 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Arbitrum nod
?>
```
-
-
## web3j
@@ -308,14 +274,8 @@ See also [the full code on GitHub](https://github.com/chainstack/web3j-getLatest
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Arbitrum nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -389,12 +349,8 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint:
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
+2. Use the `brownie networks add` command with the node endpoint:
```shell Shell
@@ -414,8 +370,6 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
* Mainnet: `42161`
* Testnet: `421613`
-
-
Example to run the deployment script:
@@ -427,14 +381,8 @@ Example to run the deployment script:
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/arbitrum-tutorial-l1-to-l2-messaging-smart-contract.mdx b/docs/arbitrum-tutorial-l1-to-l2-messaging-smart-contract.mdx
index b7380e04..ad2854de 100644
--- a/docs/arbitrum-tutorial-l1-to-l2-messaging-smart-contract.mdx
+++ b/docs/arbitrum-tutorial-l1-to-l2-messaging-smart-contract.mdx
@@ -23,26 +23,13 @@ In this tutorial, you will:
## Overview
To get from zero to your first L1 to L2 message, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the Ethereum Goerli testnet.
-
-
- With Chainstack, join the Arbitrum Goerli testnet.
-
-
- Set up your MetaMask to work through the Chainstack Ethereum and Arbitrum nodes.
-
-
- Fund your account through a faucet on the Ethereum Goerli testnet and on the Arbitrum Goerli testnet.
-
-
- Run the tutorial script to deploy the contracts on L1 and L2 and send the message from L1 to L2.
-
-
+
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join the Ethereum Goerli testnet.
+3. With Chainstack, join the Arbitrum Goerli testnet.
+4. Set up your MetaMask to work through the Chainstack Ethereum and Arbitrum nodes.
+5. Fund your account through a faucet on the Ethereum Goerli testnet and on the Arbitrum Goerli testnet.
+6. Run the tutorial script to deploy the contracts on L1 and L2 and send the message from L1 to L2.
## Step-by-step
diff --git a/docs/aurora-tooling.mdx b/docs/aurora-tooling.mdx
index 440691e1..0e2448a6 100644
--- a/docs/aurora-tooling.mdx
+++ b/docs/aurora-tooling.mdx
@@ -9,12 +9,9 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## Hardhat
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Aurora nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -36,38 +33,23 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Chainstack node:
-
-
-Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](/docs/aurora-tooling#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](/docs/aurora-tooling#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
## web3.js
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Aurora nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -105,14 +87,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Aurora nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -175,12 +151,9 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
## web3.php
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Aurora nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+
+1. Install [web3.php](https://github.com/web3p/web3.php).
+2. Connect over HTTP:
```php Php
@@ -198,9 +171,7 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Aurora nodes
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
@@ -224,8 +195,6 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Aurora nodes
?>
```
-
-
## web3j
Build DApps using [web3j](https://github.com/web3j/web3j) and Aurora nodes deployed with Chainstack.
@@ -300,14 +269,9 @@ See also [the full code on GitHub](https://github.com/chainstack/web3j-getLatest
## ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Aurora nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -381,12 +345,8 @@ See [node access details](/docs/manage-your-node#view-node-access-and-credential
## Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint:
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
+2. Use the `brownie networks add` command with the node endpoint:
```shell Shell
@@ -406,8 +366,6 @@ See [node access details](/docs/manage-your-node#view-node-access-and-credential
* Mainnet: `1313161554`
* Testnet: `1313161555`
-
-
Example to run the deployment script:
@@ -418,14 +376,8 @@ Example to run the deployment script:
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/avalanche-tooling.mdx b/docs/avalanche-tooling.mdx
index b2c1ac09..603e0f13 100644
--- a/docs/avalanche-tooling.mdx
+++ b/docs/avalanche-tooling.mdx
@@ -12,12 +12,8 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Avalanche nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -39,11 +35,7 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
@@ -51,14 +43,8 @@ See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstac
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](/docs/avalanche-tooling#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](/docs/avalanche-tooling#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
@@ -66,14 +52,8 @@ This will engage MetaMask and make Remix IDE interact with the network through a
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Avalanche nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
#### HTTP
@@ -111,14 +91,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Avalanche nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
#### HTTP
@@ -182,12 +156,8 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Avalanche nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+2. Connect over HTTP:
```php Php
@@ -205,9 +175,7 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Avalanche no
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
@@ -231,8 +199,6 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Avalanche no
?>
```
-
-
### web3j
Build DApps using [web3j](https://github.com/web3j/web3j) and Avalanche nodes deployed with Chainstack.
@@ -308,14 +274,8 @@ See also [the full code on GitHub](https://github.com/chainstack/web3j-getLatest
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Avalanche nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -389,12 +349,8 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
### Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint:
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
+2. Use the `brownie networks add` command with the node endpoint:
```bash Shell
@@ -414,8 +370,6 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
* Mainnet: `43114`
* Testnet: `43113`
-
-
Example to run the deployment script:
@@ -427,14 +381,8 @@ Example to run the deployment script:
### Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
#### Forge
@@ -497,15 +445,9 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either wi
### AvalancheJS
-
-
- Install [AvalancheJS](https://github.com/ava-labs/avalanchejs).
-
-
- Use [AvalancheJS examples](https://github.com/ava-labs/avalanchejs/tree/master/examples) to interact with the X-Chain through your Avalanche node with the following settings:
-
-
-
+1. Install [AvalancheJS](https://github.com/ava-labs/avalanchejs).
+2. Use [AvalancheJS examples](https://github.com/ava-labs/avalanchejs/tree/master/examples) to interact with the X-Chain through your Avalanche node with the following settings:
+3.
```javascript Javascript
const ip: string = "BASE_ENDPOINT"
// const port: number = 9650
@@ -525,8 +467,6 @@ where
* Fuji testnet: `5`
Make sure you remove `const port` and change `port` to `null` in the default example.
-
-
Example to get AVAX balance of an address through your Avalanche node HTTPS endpoint on the X-Chain mainnet:
diff --git a/docs/base-tooling.mdx b/docs/base-tooling.mdx
index 9a185cdc..4762db68 100644
--- a/docs/base-tooling.mdx
+++ b/docs/base-tooling.mdx
@@ -6,12 +6,8 @@ title: "Base tooling"
Interact with your Base node using [Geth](https://geth.ethereum.org/docs/getting-started).
-
-
- Install [Geth](https://github.com/ethereum/go-ethereum).
-
-
- Use `geth attach` command with the node endpoint.
+1. Install [Geth](https://github.com/ethereum/go-ethereum).
+2. Use `geth attach` command with the node endpoint.
```shell Shell
@@ -20,11 +16,7 @@ Interact with your Base node using [Geth](https://geth.ethereum.org/docs/getting
where YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
- Invoke any methods from [Web3 JavaScript API](https://web3js.readthedocs.io/).
-
-
+3. Invoke any methods from [Web3 JavaScript API](https://web3js.readthedocs.io/).
Example below demonstrates how to get the balance of an address in wei value and convert it to ether value:
@@ -43,17 +35,9 @@ You can use GraphQL on a dedicated node on the [paid plans](https://chainstack.c
You can query data using the graphical interface.
-
-
- On Chainstack, navigate to your dedicated Base node. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
- Hover over **GraphQL IDE URL** and click **Open**.
-
-
- In the graphical interface that opens, run a GraphQL query.
-
-
+1. On Chainstack, navigate to your dedicated Base node. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+2. Hover over **GraphQL IDE URL** and click **Open**.
+3. In the graphical interface that opens, run a GraphQL query.
Example to get the latest block number:
@@ -105,12 +89,8 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Base nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -132,11 +112,7 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
@@ -144,14 +120,8 @@ See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstac
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
@@ -161,14 +131,8 @@ For a detailed tutorial with Remix IDE, see [Trust fund account with Remix](/doc
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Base nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -210,14 +174,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Base nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -287,12 +245,8 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Base nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+2. Connect over HTTP:
```php Php
@@ -310,9 +264,7 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Base nodes d
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
@@ -336,8 +288,6 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Base nodes d
?>
```
-
-
## web3j
@@ -414,14 +364,8 @@ See also [the full code on GitHub](https://github.com/chainstack/web3j-getLatest
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Base nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -500,12 +444,8 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint. For example, Base mainnet:
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
+2. Use the `brownie networks add` command with the node endpoint. For example, Base mainnet:
```shell Shell
@@ -525,8 +465,6 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
* Mainnet: `8453`
* Goerli Testnet: `84531`
-
-
Example to run the deployment script:
@@ -538,14 +476,8 @@ Example to run the deployment script:
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/base-tutorial-deploy-an-erc-721-contract-with-hardhat.mdx b/docs/base-tutorial-deploy-an-erc-721-contract-with-hardhat.mdx
index b0df072e..eaae339c 100644
--- a/docs/base-tutorial-deploy-an-erc-721-contract-with-hardhat.mdx
+++ b/docs/base-tutorial-deploy-an-erc-721-contract-with-hardhat.mdx
@@ -33,41 +33,17 @@ As a product scaled by Coinbase, Base facilitates the integration of decentraliz
In this tutorial, we will go over how to bridge funds between Ethereum Sepolia and the Base Sepolia testnets and deploy a smart contract to the Base Sepolia Testnet using Hardhat. Here is a brief overview of the tutorial:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the Base Testnet.
-
-
- With Chainstack, access your nodes' credentials.
-
-
- Bridge funds between the Sepolia Testnet and the Base Testnet.
-
-
- Create a Hardhat project using node.js.
-
-
- Install the required dependencies.
-
-
- Create a `.env` file to store the secrets.
-
-
- Edit the Hardhat config file.
-
-
- Write the smart contract.
-
-
- Write and run the deployment script.
-
-
- Deploy smart contracts to the Base Testnet.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join the Base Testnet.
+3. With Chainstack, access your nodes' credentials.
+4. Bridge funds between the Sepolia Testnet and the Base Testnet.
+5. Create a Hardhat project using node.js.
+6. Install the required dependencies.
+7. Create a `.env` file to store the secrets.
+8. Edit the Hardhat config file.
+9. Write the smart contract.
+10. Write and run the deployment script.
+11. Deploy smart contracts to the Base Testnet.
## Step-by-step
diff --git a/docs/berachain-tooling.mdx b/docs/berachain-tooling.mdx
index 04725d4d..8232ef4d 100644
--- a/docs/berachain-tooling.mdx
+++ b/docs/berachain-tooling.mdx
@@ -9,14 +9,9 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Berachain nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -47,14 +42,9 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Berachain nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -88,12 +78,8 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Berachain nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -115,38 +101,23 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/bitcoin-tooling.mdx b/docs/bitcoin-tooling.mdx
index ea174754..a624e924 100644
--- a/docs/bitcoin-tooling.mdx
+++ b/docs/bitcoin-tooling.mdx
@@ -21,12 +21,9 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either wi
## Python
Work with Bitcoin from your Python application.
-
-
- Install [bitcoincli](https://github.com/chainstack/bitcoincli).
-
-
- Configure the client to use `host` and `port` of the node HTTPS endpoint, the corresponding node `username`, and `password`:
+
+1. Install [bitcoincli](https://github.com/chainstack/bitcoincli).
+2. Configure the client to use `host` and `port` of the node HTTPS endpoint, the corresponding node `username`, and `password`:
```python Python
@@ -40,9 +37,7 @@ Work with Bitcoin from your Python application.
bitcoin = Bitcoin(username, password, host, port)
```
-
-
- Invoke any methods from the [Bitcoin API specification](https://bitcoin.org/en/developer-reference#bitcoin-core-apis):
+3. Invoke any methods from the [Bitcoin API specification](https://bitcoin.org/en/developer-reference#bitcoin-core-apis):
```python Python
@@ -50,8 +45,6 @@ Work with Bitcoin from your Python application.
print(info)
```
-
-
The example code above should output basic network information:
diff --git a/docs/blast-tooling.mdx b/docs/blast-tooling.mdx
index e01c6bc3..479e8b9c 100644
--- a/docs/blast-tooling.mdx
+++ b/docs/blast-tooling.mdx
@@ -9,12 +9,9 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## Hardhat
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Blast nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -36,25 +33,16 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
@@ -64,14 +52,8 @@ For a detailed tutorial with Remix IDE, see [Trust fund account with Remix](/doc
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Blast nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -112,14 +94,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Blast nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -189,12 +165,8 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Blast nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+2. Connect over HTTP:
```php Php
@@ -212,7 +184,6 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Blast nodes
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
@@ -237,8 +208,6 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Blast nodes
?>
```
-
-
## web3j
Build DApps using [web3j](https://github.com/web3j/web3j) and Blast nodes deployed with Chainstack.
@@ -314,14 +283,8 @@ See also [the full code on GitHub](https://github.com/chainstack/web3j-getLatest
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Blast nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -367,12 +330,8 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint. For example, Base mainnet:
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
+2. Use the `brownie networks add` command with the node endpoint. For example, Base mainnet:
```shell Shell
@@ -392,8 +351,6 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
* Mainnet: `8453`
* Goerli Testnet: `84531`
-
-
Example to run the deployment script:
@@ -405,14 +362,8 @@ Example to run the deployment script:
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/blob-transactions-the-hard-way.mdx b/docs/blob-transactions-the-hard-way.mdx
index e25e8a51..51e030cb 100644
--- a/docs/blob-transactions-the-hard-way.mdx
+++ b/docs/blob-transactions-the-hard-way.mdx
@@ -115,35 +115,25 @@ Here's what we are going to do:
### Prerequisites
-
-
- Log in to your [Chainstack account](https://console.chainstack.com/) and get an Ethereum Sepolia node. You can get by with a full node for this exercise.
-
-
- Install [eth-abi](https://pypi.org/project/eth-abi/).
-
-
- Install or update [web3.py](https://pypi.org/project/web3/). Note that it's important you have the latest version as it includes support for the type-3 transactions.
-
-
- Install or update [eth-account](https://pypi.org/project/eth-account/). Same here — it's important you have the latest version as it includes support for the type-3 transactions.
-
-
- Install [ckzg](https://pypi.org/project/ckzg/) — this computes the KZG commitments.
-
-
- Fund your account with SepoliaETH. You can do this through the [Chainstack faucet](https://faucet.chainstack.com/).
-
-
- Create a `.env` file with the following variables:
-
- ```
- EXECUTION_LAYER_URL=
- CONSENSUS_LAYER_URL=
- PRIVATE_KEY=
- ```
-
-
+1. Log in to your [Chainstack account](https://console.chainstack.com/) and get an Ethereum Sepolia node. You can get by with a full node for this exercise.
+
+2. Install [eth-abi](https://pypi.org/project/eth-abi/).
+
+3. Install or update [web3.py](https://pypi.org/project/web3/). Note that it's important you have the latest version as it includes support for the type-3 transactions.
+
+4. Install or update [eth-account](https://pypi.org/project/eth-account/). Same here — it's important you have the latest version as it includes support for the type-3 transactions.
+
+5. Install [ckzg](https://pypi.org/project/ckzg/) — this computes the KZG commitments.
+
+6. Fund your account with SepoliaETH. You can do this through the [Chainstack faucet](https://faucet.chainstack.com/).
+
+7. Create a `.env` file with the following variables:
+
+ ```
+ EXECUTION_LAYER_URL=
+ CONSENSUS_LAYER_URL=
+ PRIVATE_KEY=
+ ```
[GithHub repository](https://github.com/chainstacklabs/blob-transactions-the-hard-way) for the all the scripts.
diff --git a/docs/bsc-tooling.mdx b/docs/bsc-tooling.mdx
index 67b91aa6..8fbcdfa4 100644
--- a/docs/bsc-tooling.mdx
+++ b/docs/bsc-tooling.mdx
@@ -5,12 +5,10 @@ title: "BNB Smart Chain tooling"
## BNB Smart Chain client
Interact with your BNB Smart Chain node using [BNB Smart Chain client](https://docs.bnbchain.org/docs/validator/fullnode).
-
-
- Install [BNB Smart Chain client](https://docs.bnbchain.org/docs/validator/fullnode).
-
-
- Use `geth attach` command with the node endpoint.
+
+1. Install [BNB Smart Chain client](https://docs.bnbchain.org/docs/validator/fullnode).
+
+2. Use `geth attach` command with the node endpoint.
```bash Shell
@@ -18,21 +16,18 @@ Interact with your BNB Smart Chain node using [BNB Smart Chain client](https://d
```
-where YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
- Invoke any methods from [Web3 JavaScript API](https://web3js.readthedocs.io/).
-
- Example below demonstrates how to get the balance of an address in wei value and convert it to ether value:
-
-
- ```javascript Javascript
- > web3.fromWei(web3.eth.getBalance("0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae"))
- 642538.078574759898951277
- ```
-
-
-
+ where YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+
+3. Invoke any methods from [Web3 JavaScript API](https://web3js.readthedocs.io/).
+
+ Example below demonstrates how to get the balance of an address in wei value and convert it to ether value:
+
+
+ ```javascript Javascript
+ > web3.fromWei(web3.eth.getBalance("0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae"))
+ 642538.078574759898951277
+ ```
+
## GraphQL
You can use GraphQL on a dedicated node on the [paid plans](https://chainstack.com/pricing/).
@@ -40,17 +35,12 @@ You can use GraphQL on a public chain project.
-
-
- With Chainstack, join the BNB Smart Chain testnet.
-
-
- With Chainstack, access your BNB Smart Chain node credentials.
-
-
- With OpenZeppelin, create a BEP-1155 contract.
-
-
- With Truffle, compile and deploy the contract through your BNB Smart Chain node.
-
-
+
+1. With Chainstack, create a public chain project.
+
+2. With Chainstack, join the BNB Smart Chain testnet.
+
+3. With Chainstack, access your BNB Smart Chain node credentials.
+
+4. With OpenZeppelin, create a BEP-1155 contract.
+
+5. With Truffle, compile and deploy the contract through your BNB Smart Chain node.
## Step-by-step
@@ -72,9 +65,7 @@ See [Truffle Suite: Installation](https://trufflesuite.com/docs/truffle/how-to/i
### Create the contract
-
-
- In your contract directory, initialize Truffle:
+1. In your contract directory, initialize Truffle:
```bash Shell
@@ -96,9 +87,8 @@ See [Truffle Suite: Installation](https://trufflesuite.com/docs/truffle/how-to/i
└── truffle-config.js
```
-
-
- Go to the `contracts` directory. In the directory, create your BEP-1155 contract: `BNBSmartChain1155.sol`.
+
+2. Go to the `contracts` directory. In the directory, create your BEP-1155 contract: `BNBSmartChain1155.sol`.
```solidity solidity
@@ -124,9 +114,8 @@ See [Truffle Suite: Installation](https://trufflesuite.com/docs/truffle/how-to/i
* The contract uses OpenZeppelin audited [ERC-1155 contract templates](https://docs.openzeppelin.com/contracts/4.x/erc1155).
* The contract creates two tokens: 100 fungible units of the currency called `FUNGIBLE` and 1 non-fungible unit called `NON-FUNGIBLE`. In the BEP-1155 standard, setting a token issuance to `1` makes it non-fungible.
* The contract also has `JSON_URI` which is a locator for the metadata of your tokens hosted externally. For example, ``. See [EIP-1155](https://github.com/ethereum/eips/issues/1155) for details.
-
-
- Create `2_deploy_contracts.js` in the `migrations` directory.
+
+3. Create `2_deploy_contracts.js` in the `migrations` directory.
```js JavaScript
@@ -138,13 +127,9 @@ See [Truffle Suite: Installation](https://trufflesuite.com/docs/truffle/how-to/i
This will create the contract deployment instructions for Truffle.
-
-
### Compile and deploy the contract
-
-
- Install `HDWalletProvider`.
+1. Install `HDWalletProvider`.
[HDWalletProvider](https://github.com/trufflesuite/truffle/tree/develop/packages/hdwallet-provider) is Truffle's separate npm package used to sign transactions.
@@ -155,9 +140,8 @@ See [Truffle Suite: Installation](https://trufflesuite.com/docs/truffle/how-to/i
npm install @truffle/hdwallet-provider
```
-
-
- Edit `truffle-config.js` to add:
+
+2. Edit `truffle-config.js` to add:
* `HDWalletProvider`
@@ -198,9 +182,8 @@ See [Truffle Suite: Installation](https://trufflesuite.com/docs/truffle/how-to/i
* YOUR\_CHAINSTACK\_ENDPOINT — your Chainstack node HTTPS endpoint. See also [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials) and [BNB Smart Chain tooling](/docs/bsc-tooling).
* `network_id` — the network ID of the BNB Smart Chain network: mainnet is `56`, testnet is `97`.
* `solc` — the Solidity compiler version that Truffle must use. OpenZeppelin contracts have a higher version Solidity compiler requirement than the default Truffle installation, hence you must provide a specific compiler version.
-
-
- Run:
+
+3. Run:
```bash Shell
@@ -209,8 +192,6 @@ See [Truffle Suite: Installation](https://trufflesuite.com/docs/truffle/how-to/i
This will engage `2_deploy_contracts.js` and deploy the contract to the BNB Smart Chain testnet as specified in `truffle-config.js`.
-
-
### Interact with the contract
Once your contract is deployed, you can view it online at [BscScan testnet](https://testnet.bscscan.com/).
@@ -221,9 +202,7 @@ Network explorers, including BscScan, do not display the NFT standards by defaul
Since your BEP-1155 contract uses imported OpenZeppelin libraries, you must put all the imports into one `.sol` file to make BscScan be able to verify it.
-
-
- Install [Truffle Flattener](https://www.npmjs.com/package/truffle-flattener).
+1. Install [Truffle Flattener](https://www.npmjs.com/package/truffle-flattener).
Run:
@@ -232,9 +211,8 @@ Since your BEP-1155 contract uses imported OpenZeppelin libraries, you must put
npm install truffle-flattener
```
-
-
- Flatten the contract.
+
+2. Flatten the contract.
In the `contracts` directory, run:
@@ -243,48 +221,33 @@ Since your BEP-1155 contract uses imported OpenZeppelin libraries, you must put
npx truffle-flattener BNBSmartChain1155.sol > FlatBNBSmartChain1155.sol
```
-
-
- Clean up the licensing information.
+
+3. Clean up the licensing information.
The flattened contract will have the same licensing note imported from each of the files. Multiple licensing notes in one file break the BscScan verification, so you have to leave one licensing note for the entirety of the flattened contract.
The easiest way to clean up is to search for the `SPDX` mentions in the file and remove all of them except for the very first one.
-
-
### Verify the deployed contract on BscScan
At this point, you have your flattened and cleaned-up contract ready for the BscScan verification.
-
-
- Go to [BscScan testnet](https://testnet.bscscan.com/).
-
-
- Find your deployed contract. The address of your contract should have been printed by Truffle at the end of the deployment in the `contract address` field.
-
-
- On the contract page on BscScan, click **Contract** > **Verify and Publish**.
-
-
- In **Compiler Type**, select **Solidity (Single file)**.
-
-
- In **Compiler Version**, select **v0.8.2**. This is the version this tutorial used to compile the contract.
-
-
- Click **Continue**.
-
-
- Keep the **Optimization** option set to **No** as Truffle does not use optimization by default.
-
-
- Paste the entirety of your flattened `.sol` contract in the **Enter the Solidity Contract Code below** field.
-
-
- Click **Verify and Publish**.
-
-
+1. Go to [BscScan testnet](https://testnet.bscscan.com/).
+
+2. Find your deployed contract. The address of your contract should have been printed by Truffle at the end of the deployment in the `contract address` field.
+
+3. On the contract page on BscScan, click **Contract** > **Verify and Publish**.
+
+4. In **Compiler Type**, select **Solidity (Single file)**.
+
+5. In **Compiler Version**, select **v0.8.2**. This is the version this tutorial used to compile the contract.
+
+6. Click **Continue**.
+
+7. Keep the **Optimization** option set to **No** as Truffle does not use optimization by default.
+
+8. Paste the entirety of your flattened `.sol` contract in the **Enter the Solidity Contract Code below** field.
+
+9. Click **Verify and Publish**.
BscScan will take a few seconds to compile your contract, verify, and publish it.
@@ -292,23 +255,15 @@ BscScan will take a few seconds to compile your contract, verify, and publish it
Now that your BEP-1155 contract is verified, you can check your balance of the issued tokens on BscScan.
-
-
- On BscScan, on your contract, click **Contract**.
-
-
- Click **Read Contract**.
-
-
- Scroll to the **balanceOf** field.
-
-
- In the **account** field, provide the address of the account you used to deploy the contract.
-
-
- In the **id** field, put `0` to check your fungible balance and put `1` to check your non-fungible balance.
-
-
+1. On BscScan, on your contract, click **Contract**.
+
+2. Click **Read Contract**.
+
+3. Scroll to the **balanceOf** field.
+
+4. In the **account** field, provide the address of the account you used to deploy the contract.
+
+5. In the **id** field, put `0` to check your fungible balance and put `1` to check your non-fungible balance.
## Conclusion
diff --git a/docs/celo-tooling.mdx b/docs/celo-tooling.mdx
index 220bce49..7c693281 100644
--- a/docs/celo-tooling.mdx
+++ b/docs/celo-tooling.mdx
@@ -11,14 +11,9 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
Build DApps using [web3.js](https://github.com/web3/web3.js) and Celo nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+
+2. Connect over HTTP.
### HTTP
@@ -40,14 +35,9 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either wi
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Celo nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -82,14 +72,9 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Celo nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -122,12 +107,9 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Celo nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -149,11 +131,8 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
@@ -161,14 +140,9 @@ See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstac
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
@@ -176,12 +150,9 @@ This will engage MetaMask and make Remix IDE interact with the network through a
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Celo nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+
+2. Connect over HTTP:
```php Php
@@ -199,9 +170,8 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Celo nodes d
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
@@ -225,19 +195,12 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Celo nodes d
?>
```
-
-
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/chainstack-compare-dashboard.mdx b/docs/chainstack-compare-dashboard.mdx
index a3ff1635..553f24a6 100644
--- a/docs/chainstack-compare-dashboard.mdx
+++ b/docs/chainstack-compare-dashboard.mdx
@@ -29,20 +29,14 @@ The solution consists of the two main components: data collection services and d
The data collection service only records response times and marks requests based on whether they were successful or not. All calculations, including averages and other aggregated values, are performed by the dashboard.
### Quick start
-
-
- Visit the [dashboard](https://chainstack.grafana.net/public-dashboards/65c0fcb02f994faf845d4ec095771bd0?orgId=1)
-
-
- Select your blockchain network
-
-
- Choose your region of interest
-
-
- Review performance metrics
-
-
+
+1. Visit the [dashboard](https://chainstack.grafana.net/public-dashboards/65c0fcb02f994faf845d4ec095771bd0?orgId=1)
+
+2. Select your blockchain network
+
+3. Choose your region of interest
+
+4. Review performance metrics
### What you can do
With Chainstack Compare Dashboard, you can:
diff --git a/docs/cronos-tooling.mdx b/docs/cronos-tooling.mdx
index a2ebcac1..769d1f0a 100644
--- a/docs/cronos-tooling.mdx
+++ b/docs/cronos-tooling.mdx
@@ -10,12 +10,9 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Cronos nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -37,11 +34,8 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
@@ -49,14 +43,9 @@ See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstac
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
@@ -64,14 +53,9 @@ This will engage MetaMask and make Remix IDE interact with the network through a
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Cronos nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -109,14 +93,9 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Cronos nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -180,12 +159,9 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Cronos nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+
+2. Connect over HTTP:
```php Php
@@ -203,9 +179,8 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Cronos nodes
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
@@ -229,8 +204,6 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Cronos nodes
?>
```
-
-
## web3j
@@ -307,14 +280,9 @@ See also [the full code on GitHub](https://github.com/chainstack/web3j-getLatest
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Cronos nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -386,12 +354,9 @@ where
## Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint:
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
+
+2. Use the `brownie networks add` command with the node endpoint:
```shell Shell
@@ -411,8 +376,6 @@ where
* Mainnet: `25`
* Testnet: `338`
-
-
Example to run the deployment script:
@@ -424,14 +387,9 @@ Example to run the deployment script:
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/cronos-tutorial-dutch-auction-smart-contracts-on-cronos-with-hardhat.mdx b/docs/cronos-tutorial-dutch-auction-smart-contracts-on-cronos-with-hardhat.mdx
index 11a56dd0..ebaef055 100644
--- a/docs/cronos-tutorial-dutch-auction-smart-contracts-on-cronos-with-hardhat.mdx
+++ b/docs/cronos-tutorial-dutch-auction-smart-contracts-on-cronos-with-hardhat.mdx
@@ -30,32 +30,21 @@ Specifically, in this tutorial, you will:
To get from zero to deploying your own Dutch auction smart contract on the Cronos testnet, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the Cronos testnet.
-
-
- With Chainstack, access your Cronos node endpoint.
-
-
- With Hardhat, set up your development environment.
-
-
- With Hardhat, create and compile your Dutch auction contract.
-
-
- With MetaMask, fund your wallet with Cronos test tokens (CRO) from the [Cronos official faucet](https://cronos.org/faucet).
-
-
- With Hardhat, deploy your Dutch auction contract.
-
-
- With [Cronos testnet explorer](https://testnet.cronoscan.com/), interact with your Dutch auction contract.
-
-
+1. With Chainstack, create a public chain project.
+
+2. With Chainstack, join the Cronos testnet.
+
+3. With Chainstack, access your Cronos node endpoint.
+
+4. With Hardhat, set up your development environment.
+
+5. With Hardhat, create and compile your Dutch auction contract.
+
+6. With MetaMask, fund your wallet with Cronos test tokens (CRO) from the [Cronos official faucet](https://cronos.org/faucet).
+
+7. With Hardhat, deploy your Dutch auction contract.
+
+8. With [Cronos testnet explorer](https://testnet.cronoscan.com/), interact with your Dutch auction contract.
## Step-by-step
diff --git a/docs/cryo-with-chainstack-and-python.mdx b/docs/cryo-with-chainstack-and-python.mdx
index 8bef5292..c79a76f1 100644
--- a/docs/cryo-with-chainstack-and-python.mdx
+++ b/docs/cryo-with-chainstack-and-python.mdx
@@ -5,7 +5,7 @@ title: "cryo + Chainstack: Developer's guide to blockchain data mastery with Pyt
**TLDR**
* Integrate **cryo** (a Rust-based CLI for blockchain data extraction) with Python via **cryo\_python** for streamlined data collection and analysis.
* **cryo.collect()** fetches data into Python-friendly objects (Pandas, Polars, etc.) for real-time analysis, while **cryo.freeze()** saves data to files in JSON/Parquet/CSV.
-* Combine Chainstack’s high-performance Global Nodes with Python’s libraries (pandas, matplotlib, etc.) to query, process, and visualize blockchain data with speed and precision.
+* Combine Chainstack's high-performance Global Nodes with Python's libraries (pandas, matplotlib, etc.) to query, process, and visualize blockchain data with speed and precision.
## Main article
@@ -19,7 +19,7 @@ Now, we embark on a sequel, bridging `cryo` with the world of Python. This guide
## Python and cryo for blockchain data manipulation
-Python is known for its simplicity and data manipulation and analysis capability. The Python wrapper allows you to couple `cryo`'s Rust-based efficiency for data extraction with Python’s data manipulation capabilities. This integration enhances the analytical power at your fingertips, allowing you to leverage Python's rich library ecosystem for in-depth data analysis, visualization, and machine learning.
+Python is known for its simplicity and data manipulation and analysis capability. The Python wrapper allows you to couple `cryo`'s Rust-based efficiency for data extraction with Python's data manipulation capabilities. This integration enhances the analytical power at your fingertips, allowing you to leverage Python's rich library ecosystem for in-depth data analysis, visualization, and machine learning.
## Prerequisites and setup
@@ -32,17 +32,12 @@ Before diving into the installation process, ensure your environment is primed f
* **Chainstack Global Node RPC**: Get a high-performance Chainstack [Global Node](/docs/global-elastic-node) RPC before starting.
Follow these steps to deploy an Ethereum node:
-
-
- [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
-
-
- [Deploy a node](/docs/manage-your-networks#join-a-public-network).
-
-
- [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+
+1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
+
+2. [Deploy a node](/docs/manage-your-networks#join-a-public-network).
+
+3. [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
To follow this guide, deploy a **Standard** Ethereum node, which will default to a Global Node.
@@ -60,13 +55,13 @@ Create a `.env` file in your root directory and place the endpoint in it.
```
-* **Rust**: Rust must be installed in your system for `cryo` to work, the Python integration is a lightweight wrapper for the `cryo` CLI, so you’ll still need to meet the app’s requirements.
+* **Rust**: Rust must be installed in your system for `cryo` to work, the Python integration is a lightweight wrapper for the `cryo` CLI, so you'll still need to meet the app's requirements.
Install Rust following the [rustup](https://rustup.rs/) instructions.
-* **Python Environment**: Ensure that you have Python installed on your system and create a new virtual environment in your project’s directory; you can run the following:
+* **Python Environment**: Ensure that you have Python installed on your system and create a new virtual environment in your project's directory; you can run the following:
```bash Bash
@@ -90,33 +85,29 @@ Create a `.env` file in your root directory and place the endpoint in it.
```
- Note that the `python-dotenv web3 matplotlib` libraries are not strictly required to run `cryo_python`, but we’ll use them along the guide.
+ Note that the `python-dotenv web3 matplotlib` libraries are not strictly required to run `cryo_python`, but we'll use them along the guide.
### Installation and Setup
-With the prerequisites in place, let’s move on to the installation steps:
+With the prerequisites in place, let's move on to the installation steps:
-
-
- **Clone the cryo Repository**: Use git to clone the `cryo` repository from GitHub. If you don’t have git installed, you can download it from [git](https://git-scm.com/downloads).
+1. **Clone the cryo Repository**: Use git to clone the `cryo` repository from GitHub. If you don't have git installed, you can download it from [git](https://git-scm.com/downloads).
```bash Bash
git clone https://github.com/paradigmxyz/cryo
```
-
-
- **Navigate to the Python Directory**:
+
+2. **Navigate to the Python Directory**:
```bash Bash
cd cryo/crates/python
```
-
-
- **Build** `cryo_python`:
+
+3. **Build** `cryo_python`:
* Run the `maturin` build command:
@@ -125,9 +116,8 @@ With the prerequisites in place, let’s move on to the installation steps:
```
* This command will compile the Rust code and create a wheel file (.whl) for the Python package.
-
-
- **Install the Python Wrapper**:
+
+4. **Install the Python Wrapper**:
* Find the `.whl` file generated by maturin. It will be located in the `target/wheels` directory.
* Install the wheel file using pip:
@@ -142,8 +132,6 @@ With the prerequisites in place, let’s move on to the installation steps:
/YOUR_PATH/cryo/target/wheels/cryo_python-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
```
-
-
Your current draft provides a solid foundation. To enhance it, we can add more context and details based on the source files, particularly focusing on the functionality and technical nuances of `cryo.collect()` and `cryo.freeze()`. Here's an improved version:
@@ -334,11 +322,11 @@ The principle of **`cryo.freeze`** is quite similar to **`cryo.collect`**. In a
This script uses **`cryo.freeze`** to fetch and save the same block data as a JSON file in the specified directory. The logic and syntax closely follow the **`cryo`** CLI. The result is a JSON file containing data for the blocks in the `root/blocks_data/` directory.
-Since both **`cryo.freeze`** and **`cryo.collect`** are just wrappers around the CLI; you can use the same commands. Let’s explore a few more examples.
+Since both **`cryo.freeze`** and **`cryo.collect`** are just wrappers around the CLI; you can use the same commands. Let's explore a few more examples.
### Fetching ERC-20 balances with `cryo`
-This section will guide you in using `cryo_python` to retrieve ERC-20 token balances from specified addresses and contracts. We’ll get the balance of the [APECoin](https://etherscan.io/address/0x4d224452801ACEd8B2F0aebE155379bb5D594381) token in the [Binance](https://etherscan.io/token/0x4d224452801ACEd8B2F0aebE155379bb5D594381?a=0xf977814e90da44bfa03b6295a0616a897441acec) address in a range of 10,000 blocks.
+This section will guide you in using `cryo_python` to retrieve ERC-20 token balances from specified addresses and contracts. We'll get the balance of the [APECoin](https://etherscan.io/address/0x4d224452801ACEd8B2F0aebE155379bb5D594381) token in the [Binance](https://etherscan.io/token/0x4d224452801ACEd8B2F0aebE155379bb5D594381?a=0xf977814e90da44bfa03b6295a0616a897441acec) address in a range of 10,000 blocks.
Start by creating a new Python file and paste the following code:
@@ -521,7 +509,7 @@ And the chart will look like this:
### Visualise ERC-20 balance changes over time
-The next example we’ll work on will use the same `erc20_balances` dataset used in one of the previous examples. This time, we’ll fetch and visualize how much [WETH](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) is in the[`WETH-USDT` pool](https://etherscan.io/address/0x0d4a11d5EEaaC28EC3F61d100daF4d40471f185) from Uniswap V2.
+The next example we'll work on will use the same `erc20_balances` dataset used in one of the previous examples. This time, we'll fetch and visualize how much [WETH](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) is in the[`WETH-USDT` pool](https://etherscan.io/address/0x0d4a11d5EEaaC28EC3F61d100daF4d40471f185) from Uniswap V2.
In a new file, paste the following code:
@@ -640,7 +628,7 @@ In a new file, paste the following code:
```
-Here's a step-by-step explanation of what’s going on:
+Here's a step-by-step explanation of what's going on:
1. **Fetch Block Range**:
* It calculates the range of blocks to query by finding the latest block number and subtracting the lookback period to determine the start block; in the example, we analyze about a day's worth of blocks.
diff --git a/docs/cryo-your-gateway-to-blockchain-data.mdx b/docs/cryo-your-gateway-to-blockchain-data.mdx
index 344d12bf..ed4caeed 100644
--- a/docs/cryo-your-gateway-to-blockchain-data.mdx
+++ b/docs/cryo-your-gateway-to-blockchain-data.mdx
@@ -138,17 +138,10 @@ Cryo is a high-performing tool that can send many requests per second, and the C
### Get a global node
Follow these steps to deploy an Ethereum node:
-
-
-[Sign up with Chainstack](https://console.chainstack.com/user/account/create).
-
-
-[Deploy a node](/docs/manage-your-networks#join-a-public-network).
-
-
-[View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+
+1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
+2. [Deploy a node](/docs/manage-your-networks#join-a-public-network).
+3. [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
To follow this guide, deploy a global Ethereum node.
Once you deploy the node, you'll have access to an RPC endpoint, which will look like this:
diff --git a/docs/deploy-a-subgraph.mdx b/docs/deploy-a-subgraph.mdx
index 8b824255..2ee1cbce 100644
--- a/docs/deploy-a-subgraph.mdx
+++ b/docs/deploy-a-subgraph.mdx
@@ -7,7 +7,7 @@ title: "Deploy a subgraph"
* Set up your subgraph by adding it to the Chainstack console, configuring it via Graph CLI (install, init, build), and deploying it with the provided deployment command.
* Configure `schema.graphql` and `subgraph.yaml` carefully to define the desired indexing entities and starting block.
* Track deployment status in the console (sync in progress, up to date, or failed) and use logs for troubleshooting.
-* Query your subgraph using either the CLI’s **Query URL** or the **GraphQL UI URL** to seamlessly fetch on-chain data.
+* Query your subgraph using either the CLI's **Query URL** or the **GraphQL UI URL** to seamlessly fetch on-chain data.
## Set up a subgraph
@@ -23,29 +23,22 @@ To set up a subgraph, complete the following steps:
In [Subgraphs](https://console.chainstack.com/subgraphs), you can view a list of all existing subgraphs and can filter the view using the **Protocol** drop-down list. You can create a new subgraph using the **Add subgraph** button and view the details of a subgraph by clicking on the subgraph name.
-Subgraphs must be associated with a project; if you don’t already have a project to add the subgraph to, see [create a project](/docs/manage-your-project#create-a-project).
+Subgraphs must be associated with a project; if you don't already have a project to add the subgraph to, see [create a project](/docs/manage-your-project#create-a-project).
To add a subgraph:
-
-
- Click **Add subgraph**. The Add subgraph page is displayed.
-
-
- In the **Choose network** section:
+
+1. Click **Add subgraph**. The Add subgraph page is displayed.
+2. In the **Choose network** section:
* Choose a **Blockchain protocol**.
* Choose the **Network**. Currently, **Mainnnet** is supported.
* Choose the **Type**.
* Click **Next**. The Create subgraph section is displayed.
-
-
- In the **Create subgraph** section:
+3. In the **Create subgraph** section:
* Enter a **Name** for the subgraph.
* Select the **Project** that you want to assign your subgraph to.
* Click **Add subgraph**. The details page of the new subgraph is displayed.
-
-
The subgraph details page includes information such as the **Owner**, **Creation date**, **Region**, and **Protocol**. You can view the **Metrics** about the requests made in the subgraph, view the **Subgraph Query URLs**, and the **Subgraph Deployment command**, which you require to deploy the subgraph.
@@ -68,65 +61,47 @@ To check if the Graph CLI was installed correctly, run:
To create and configure a subgraph:
-
-
- Open a new directory in your terminal and run:
+
+1. Open a new directory in your terminal and run:
```bash Shell
graph init
```
-
-
- Configure all the required parameters that are displayed in the CLI. The Graph will download your smart contract’s ABI and install all the dependencies by running `npm install` automatically.
-
-
- Set up your `schema.graphql` file to define all the entities and key-value pairs that you want to query.
-
-
- Go to your manifest file (`subgraph.yaml`) and make sure all the deployment parameters are correctly defined. We recommend that you only start indexing data from the block number of the first transaction that you want to track as this can save a lot of indexing time.
-
-
- To generate AssemblyScript types for the entities defined in your schema file, in your root directory, run:
+2. Configure all the required parameters that are displayed in the CLI. The Graph will download your smart contract's ABI and install all the dependencies by running `npm install` automatically.
+3. Set up your `schema.graphql` file to define all the entities and key-value pairs that you want to query.
+4. Go to your manifest file (`subgraph.yaml`) and make sure all the deployment parameters are correctly defined. We recommend that you only start indexing data from the block number of the first transaction that you want to track as this can save a lot of indexing time.
+5. To generate AssemblyScript types for the entities defined in your schema file, in your root directory, run:
```bash Shell
graph codegen
```
-
-
- When your mappings file is configured, run:
+6. When your mappings file is configured, run:
```bash Shell
graph build
```
-
-
When your subgraph compiles successfully, you are now ready to deploy your subgraph.
## Deploy a subgraph
To deploy your new subgraph:
-
-
- In **Subgraphs**, open the details page of your new subgraph and copy the **Deployment command**, which will have the following format:
+
+1. In **Subgraphs**, open the details page of your new subgraph and copy the **Deployment command**, which will have the following format:
```bash Shell
graph deploy --node https://api.graph-eu.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d/deploy --ipfs https://api.graph-eu.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d/ipfs my_subgraph_v1_0
```
-
-
- Paste and run the command in your CLI.
-
-
- Enter a version label for your subgraph (you can use any number/letter character combination). If the subgraph is successfully deployed, you will receive a response like the following example:
+2. Paste and run the command in your CLI.
+3. Enter a version label for your subgraph (you can use any number/letter character combination). If the subgraph is successfully deployed, you will receive a response like the following example:
```bash Shell
@@ -136,8 +111,6 @@ To deploy your new subgraph:
Queries (HTTP): https://ethereum-mainnet.graph-eu.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d/my_subgraph_v1_0
```
-
-
In the subgraph details page, the status of the subgraph will change to **Deployed. Initial sync in progress** and will continuously provide feedback on the progress of the synchronization process. When it completes, the status will change to **Up to date**.
diff --git a/docs/elastic-subgraphs.mdx b/docs/elastic-subgraphs.mdx
index ba1f1966..c905e671 100644
--- a/docs/elastic-subgraphs.mdx
+++ b/docs/elastic-subgraphs.mdx
@@ -19,17 +19,9 @@ Access to DeFi protocols is facilitated through a GraphQL API based on The Graph
When accessing Elastic Subgraphs for an exact protocol, you use a preset subgraph created specifically for that purpose. To use one of the protocols, you do the following:
-
-
- Using the left navigation menu, go to **Elastic Subgraphs**.
-
-
- From the list, open the protocol you are interested in querying.
-
-
- Copy either the protocol's **Query URL** or **GraphQL UI URL**. They are means that you will use to query the protocol.
-
-
+1. Using the left navigation menu, go to **Elastic Subgraphs**.
+2. From the list, open the protocol you are interested in querying.
+3. Copy either the protocol's **Query URL** or **GraphQL UI URL**. They are means that you will use to query the protocol.
To interact with the protocol, you can choose from either of the following **Access** options:
* **Query URL** — use this URL to query in the CLI or incorporate it into your code.
@@ -41,14 +33,6 @@ For examples of using both of these endpoints, see [Query a subgraph](/docs/depl
Each of the protocols available in Elastic Subgraphs has a preset subgraph schema which you can use to create effective queries and use them within your DApps. To learn the schema of the protocol, do the following:
-
-
- Copy the **GraphQL UI URL** from the protocol details page and paste it into your browser.
-
-
- In the page opened, select **Explorer**.
-
-
- In the left pane that opened, explore the interactive schema and use it to create a custom query.
-
-
+1. Copy the **GraphQL UI URL** from the protocol details page and paste it into your browser.
+2. In the page opened, select **Explorer**.
+3. In the left pane that opened, explore the interactive schema and use it to create a custom query.
diff --git a/docs/ethereum-how-to-analyze-pending-blocks.mdx b/docs/ethereum-how-to-analyze-pending-blocks.mdx
index 6069bdd9..990d6c6d 100644
--- a/docs/ethereum-how-to-analyze-pending-blocks.mdx
+++ b/docs/ethereum-how-to-analyze-pending-blocks.mdx
@@ -111,12 +111,8 @@ Now let's have a hands-on walkthrough in Python. Here's what we are going to do:
### Prerequisites
-
-
- Log in to your [Chainstack account](https://console.chainstack.com/) and get an Ethereum mainnet node. You can get by with a full node for this exercise.
-
-
- Open your terminal (Command Prompt for Windows or Terminal for macOS/Linux) and run the following command to clone the GitHub repository.
+1. Log in to your [Chainstack account](https://console.chainstack.com/) and get an Ethereum mainnet node. You can get by with a full node for this exercise.
+2. Open your terminal (Command Prompt for Windows or Terminal for macOS/Linux) and run the following command to clone the GitHub repository.
```bash Bash
@@ -124,9 +120,7 @@ Now let's have a hands-on walkthrough in Python. Here's what we are going to do:
cd your-repository
```
-
-
- Set up your Python virtual environment.
+3. Set up your Python virtual environment.
```bash macOS/Linux
@@ -139,26 +133,20 @@ Now let's have a hands-on walkthrough in Python. Here's what we are going to do:
venv\Scripts\activate
```
-
-
- With the virtual environment activated, run the following command to install the required dependencies.
+4. With the virtual environment activated, run the following command to install the required dependencies.
```bash Bash
pip install -r requirements.txt
```
-
-
- Create the environment variable file (.env) and paste your Chainstack endpoint URL there.
+5. Create the environment variable file (.env) and paste your Chainstack endpoint URL there.
```python Python
ETH_NODE_URL=
```
-
-
[GitHub repository](https://github.com/smypmsa/geth-pending-latest-block) for all the scripts.
diff --git a/docs/ethereum-tooling.mdx b/docs/ethereum-tooling.mdx
index 466f60e4..3af72528 100644
--- a/docs/ethereum-tooling.mdx
+++ b/docs/ethereum-tooling.mdx
@@ -83,15 +83,14 @@ WebSockets and HTTP are essential communication protocols in web applications. W
### web3.js
Build DApps using [web3.js](https://github.com/web3/web3.js) and Ethereum nodes deployed with Chainstack.
-
-
+
+1. Install web3.js
```Text Bash
npm install web3
```
-
-
+2. Initialize HTTP or WebSocket provider
```javascript Javascript
import { Web3, HttpProvider, WebSocketProvider } from 'web3';
@@ -108,22 +107,18 @@ Build DApps using [web3.js](https://github.com/web3/web3.js) and Ethereum nodes
});
```
-
-
### ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js) and Ethereum nodes deployed with Chainstack.
-
-
+1. Install ethers.js
```Text Bash
npm install ethers
```
-
-
+2. Initialize HTTP or WebSocket provider
```javascript Javascript
@@ -141,42 +136,36 @@ Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js) and Ethere
});
```
-
-
### web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Ethereum nodes deployed with Chainstack.
-
-
+
+1. Install web3.py
```Text Bash
pip install web3
```
-
-
+2. Initialize HTTP or WebSocket provider
```python Python
from web3 import Web3
- # Using HTTP provider
+ // Using HTTP provider
http_web3 = Web3(Web3.HTTPProvider("/*YOUR_HTTP_CHAINSTACK_ENDPOINT*/"))
print(http_web3.eth.block_number)
- # Using WebSocket provider
+ // Using WebSocket provider
with Web3(Web3.WebsocketProvider("/*YOUR_WS_CHAINSTACK_ENDPOINT*/")) as ws_web3:
print(ws_web3.eth.block_number)
```
-
-
### Nethereum (.NET)
Build DApps using [Nethereum](https://github.com/Nethereum/Nethereum) and Ethereum nodes deployed with Chainstack.
-
-
-
+1. Install Nethereum
+2. Initialize HTTP or WebSocket provider
```csharp csharp
@@ -206,14 +195,12 @@ Build DApps using [Nethereum](https://github.com/Nethereum/Nethereum) and Ethere
}
```
-
-
### viem
Build DApps using [viem](https://github.com/wevm/viem) and Ethereum nodes deployed with Chainstack.
-
-
-
+
+1. Install viem
+2. Initialize HTTP or WebSocket provider
```typescript TypeScript
@@ -242,8 +229,6 @@ Build DApps using [viem](https://github.com/wevm/viem) and Ethereum nodes deploy
});
```
-
-
## Querying and indexing tools
### Chainstack subgraphs (GraphQL)
@@ -255,16 +240,15 @@ GraphQL can be utilized on [Chainstack Subgraphs](/docs/chainstack-subgraphs-tut
### Foundry
Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts using Chainstack Ethereum nodes.
-
-
+
+1. Install Foundry
```Text Bash
curl -L https://foundry.paradigm.xyz | bash
foundryup
```
-
-
+2. Configure environment in Foundry
Create a new Foundry project:
@@ -275,7 +259,7 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
```
- Create a `.env` file in your project root and add your Chainstack endpoint and private key:
+ Create a `.env` file in your project root and add your Chainstack endpoint and private key:
```
CHAINSTACK_MAINNET_ENDPOINT=https://your-chainstack-mainnet-url
@@ -295,7 +279,7 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
```
- Update your `foundry.toml` file to include the Chainstack network:
+ Update your `foundry.toml` file to include the Chainstack network:
```toml TOML
@@ -309,22 +293,20 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
devnet = "${CHAINSTACK_DEVNET_URL}"
```
-
-
+3. Before deploying, ensure that your contracts are compiled. This step is crucial to avoid deployment issues.
```bash Bash
forge build
```
-
-
+4. To use the Chainstack endpoint for deployment, you can use the following command:
```bash Bash
forge create --rpc-url ${CHAINSTACK_DEVNET_URL} --private-key ${PRIVATE_KEY_DEVNET} src/YourContract.sol:YourContract
```
- Alternatively, you can create a deployment script in the `script` folder, for example `Deploy.s.sol`:
+ Alternatively, you can create a deployment script in the `script` folder, for example `Deploy.s.sol`:
```solidity solidity
@@ -367,8 +349,7 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
forge script script/Deploy.s.sol:DeployScript --rpc-url devnet--broadcast
```
-
-
+5. Interact with the blockchain using Cast. Use the following command to query the balance of an Ethereum address:
```bash Bash
cast balance --rpc-url $CHAINSTACK_RPC_URL
@@ -376,22 +357,20 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
Replace \ with the actual Ethereum address you want to query.
-
-
+
### Hardhat
Configure [Hardhat](https://github.com/NomicFoundation/hardhat) to deploy contracts using Chainstack Ethereum nodes.
-
-
+
+1. Install Hardhat and other dependencies
```Text Bash
npm init -y
npm install --save-dev hardhat @nomiclabs/hardhat-ethers ethers dotenv
```
-
-
- Create a `.env` file in your project root and add your Chainstack endpoint and private key:
+2. Configure environment in Hardhat
+ Create a `.env` file in your project root and add your Chainstack endpoint and private key:
```Text Bash
@@ -411,7 +390,7 @@ Configure [Hardhat](https://github.com/NomicFoundation/hardhat) to deploy contra
```
- Update your `hardhat.config.js` file to use the Chainstack endpoint:
+ Update your `hardhat.config.js` file to use the Chainstack endpoint:
```javascript Javascript
@@ -433,8 +412,7 @@ Configure [Hardhat](https://github.com/NomicFoundation/hardhat) to deploy contra
};
```
-
-
+3. To deploy your contracts using the Chainstack endpoint, you can create a deployment script in the `scripts` folder, for example deploy.js:
```javascript Javascript
const hre = require("hardhat");
@@ -468,49 +446,42 @@ Configure [Hardhat](https://github.com/NomicFoundation/hardhat) to deploy contra
});
```
-
-
+4. Compile the contracts
```tsx Bash
npx hardhat compile
```
-
-
+5. Use the appropriate network flag (mainnet or devnet) to deploy to the respective network
```bash Bash
npx hardhat run scripts/deploy.js --network devnet
```
-
-
### Scaffold-ETH 2
Configure [Scaffold-ETH 2](https://github.com/scaffold-eth/scaffold-eth-2) to deploy contracts using Chainstack Ethereum nodes.
-
-
+
+1. Clone the Scaffold-ETH 2 repository
```bash Bash
git clone https://github.com/scaffold-eth/scaffold-eth-2.git
cd scaffold-eth-2
```
-
-
+2. Install dependencies
```bash Bash
yarn install
```
-
-
+3. Create a .env.local file in the root directory of your project
```bash Bash
touch .env.local
```
-
-
+4. Add your Chainstack endpoint and private key to the .env.local file
```
CHAINSTACK_MAINNET_ENDPOINT=https://your-chainstack-mainnet-url
CHAINSTACK_DEVNET_ENDPOINT=https://your-chainstack-devnet-url
@@ -519,8 +490,7 @@ Configure [Scaffold-ETH 2](https://github.com/scaffold-eth/scaffold-eth-2) to de
```
Note: by default, Scaffold-ETH 2 uses Alchemy RPC nodes and it assumes the config contains an Alchemy API key. We can override this setting Chainstack RPC nodes and updating some other configs.
-
-
+5. Modify the packages/hardhat/hardhat.config.ts file to configure the Chainstack endpoint. Locate the networks section and add or modify the configuration for the Chainstack networks
```javascript Bash
const config: HardhatUserConfig = {
@@ -539,36 +509,30 @@ Configure [Scaffold-ETH 2](https://github.com/scaffold-eth/scaffold-eth-2) to de
};
```
-
-
+6. Compile contracts using Hardhat
```bash Bash
cd packages/hardhat
yarn hardhat compile
```
-
-
+7. To deploy your contracts using the Chainstack endpoint, run
```Text Bash
yarn deploy --network sepolia
```
-
-
+8. To start the NextJS app with the Chainstack configuration
```Text Bash
yarn start
```
-
-
### Truffle (no longer maintained)
Configure [Truffle](https://github.com/trufflesuite/truffle) to deploy contracts using Chainstack Ethereum nodes.
-
-
+1. Install Truffle and other dependencies
```Text Bash
# Initialize a new npm project
@@ -578,8 +542,7 @@ Configure [Truffle](https://github.com/trufflesuite/truffle) to deploy contracts
npm install --save-dev truffle @truffle/hdwallet-provider dotenv
```
-
-
+2. Configure environment in Truffle
Initialize a new Truffle project:
@@ -588,7 +551,7 @@ Configure [Truffle](https://github.com/trufflesuite/truffle) to deploy contracts
```
- Create a `.env` file in your project root and add your Chainstack endpoint and private key:
+ Create a `.env` file in your project root and add your Chainstack endpoint and private key:
```bash
CHAINSTACK_MAINNET_ENDPOINT=https://your-chainstack-mainnet-url
@@ -598,7 +561,7 @@ Configure [Truffle](https://github.com/trufflesuite/truffle) to deploy contracts
PRIVATE_KEY_DEVNET=your-devnet-private-key
```
- Update your `truffle-config.js` file to use the Chainstack endpoint:
+ Update your `truffle-config.js` file to use the Chainstack endpoint:
```javascript Javascript
@@ -626,8 +589,7 @@ Configure [Truffle](https://github.com/trufflesuite/truffle) to deploy contracts
};
```
-
-
+3. Create a migration script in the migrations folder to deploy your contract (migrations/1_deploy_contract_name.js)
```javascript Javascript
// Import your contract artifact
@@ -638,34 +600,29 @@ Configure [Truffle](https://github.com/trufflesuite/truffle) to deploy contracts
};
```
-
-
+4. Compile the contracts
```jsx Bash
npx truffle compile
```
-
-
+5. To deploy your contract using the Chainstack endpoint, run
```bash Bash
truffle migrate --network devnet
```
-
-
### Ape
Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts using Chainstack Ethereum nodes. Before performing the following steps, you can set up and activate a virtual environment.
-
-
+
+1. Install Ape and dependencies
```Text Bash
pip install eth-ape
```
-
-
+2. Configure environment in Ape
Initialize a project:
@@ -674,7 +631,7 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
```
- Create or update your `ape-config.yaml` file in your project root:
+ Create or update your `ape-config.yaml` file in your project root:
```yaml yaml
@@ -697,15 +654,13 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
version: 4.4.2
```
-
-
+3. Import an account. You'll be prompted to enter a private key and pass phrase to encrypt it.
```bash Bash
ape accounts import devnet_deployer
```
-
-
+4. To deploy your contracts using the Chainstack endpoint, you can create a deployment script, for example scripts/deploy.py
```python Python
from ape import accounts, project
@@ -728,37 +683,31 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
main()
```
-
-
+5. Compile contracts. Before deploying, ensure your contracts are compiled. Ape automatically compiles contracts when deploying, but you can manually compile them if needed
```bash Bash
ape compile
```
-
-
+6. Run the deployment script using
```Text Bash
ape run scripts/deploy.py --network ethereum:sepolia
```
-
-
### Brownie
Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts using Chainstack Ethereum nodes.
-
-
+1. Create a Python virtual environment and install Brownie
```bash
python -m venv venv
source venv/bin/activate # On Windows, use venv\Scripts\activate
pip install eth-brownie
```
-
-
- Create a new Brownie project (add `--force` if a folder is not empty):
+2. Configure environment in Brownie
+ Create a new Brownie project (add `--force` if a folder is not empty):
```Text Bash
@@ -766,7 +715,7 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
```
- In your project directory, create a `.env` file and add your Chainstack endpoint and private key:
+ In your project directory, create a `.env` file and add your Chainstack endpoint and private key:
```
CHAINSTACK_MAINNET_ENDPOINT=https://your-chainstack-mainnet-url
@@ -784,7 +733,7 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
```
- Update the `brownie-config.yaml` file in your project root:
+ Update the `brownie-config.yaml` file in your project root:
```yaml yaml
@@ -813,7 +762,7 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
```
- To use your private key for deployments, you can create a `scripts/deploy.py` file:
+ To use your private key for deployments, you can create a `scripts/deploy.py` file:
```python Python
@@ -832,12 +781,9 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
print(f"Transaction hash: {contract.tx.txid}")
```
-
-
+3. To deploy your contracts using the Chainstack endpoint, run
```Text Bash
brownie run scripts/deploy.py --network chainstack-devnet
```
-
-
diff --git a/docs/ethereum-tutorial-academic-certificates-with-truffle.mdx b/docs/ethereum-tutorial-academic-certificates-with-truffle.mdx
index 76661464..cea26abe 100644
--- a/docs/ethereum-tutorial-academic-certificates-with-truffle.mdx
+++ b/docs/ethereum-tutorial-academic-certificates-with-truffle.mdx
@@ -26,32 +26,14 @@ The contract and the Truffle configuration are in the [GitHub repository](https:
To get from zero to a deployed DApp on the Ethereum Sepolia testnet, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the Ethereum Sepolia testnet.
-
-
- With Chainstack, access your Ethereum node credentials.
-
-
- With Truffle, create and compile the DApp contract.
-
-
- With Truffle, deploy the contract to your local development network.
-
-
- With Truffle, interact with the contract on your local development network.
-
-
- With Truffle, create and run the contract test.
-
-
- With Truffle, deploy the contract to your Ethereum node running with Chainstack.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join the Ethereum Sepolia testnet.
+3. With Chainstack, access your Ethereum node credentials.
+4. With Truffle, create and compile the DApp contract.
+5. With Truffle, deploy the contract to your local development network.
+6. With Truffle, interact with the contract on your local development network.
+7. With Truffle, create and run the contract test.
+8. With Truffle, deploy the contract to your Ethereum node running with Chainstack.
## Step-by-step
@@ -73,9 +55,7 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
### Create and compile the contracts
-
-
- On your machine, create a directory for the contract. Initialize Truffle in the directory:
+1. On your machine, create a directory for the contract. Initialize Truffle in the directory:
```shell Shell
@@ -97,9 +77,8 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
└── truffle-config.js
```
-
-
- Go to the `contracts` directory. In the directory, create two files: `Ownable.sol` and `DocStamp.sol`.
+
+2. Go to the `contracts` directory. In the directory, create two files: `Ownable.sol` and `DocStamp.sol`.
```sol Ownable.sol
@@ -189,9 +168,8 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
* `verifyCertificate()` — calculates a hash of the student name and details, and checks if the contract is on the blockchain.
* Can be called by anyone.
-
-
- Create `2_deploy_contracts.js` in the `migrations` directory.
+
+3. Create `2_deploy_contracts.js` in the `migrations` directory.
```javascript Javascript
@@ -208,9 +186,8 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
Since DocStamp inherits from Ownable, Ownable will be deployed together with DocStamp.
-
-
- Compile the contracts:
+
+4. Compile the contracts:
```shell Shell
@@ -219,23 +196,18 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
This will compile the contracts and put them in your `build/contracts` directory in the `.json` format. If the contract does not compile, check the compiler version in your `truffle-config.js` file and ensure that your compiler version matches the pragma solidity version of the contract.
-
-
### Deploy the contract to your local development network
-
-
- Start the development network on your machine:
+1. Start the development network on your machine:
```shell Shell
truffle develop
```
-
-
- Without exiting the Truffle console, deploy the contract to the local development network:
+
+2. Without exiting the Truffle console, deploy the contract to the local development network:
```shell Shell
@@ -244,14 +216,10 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
This will deploy the contract to the development network as specified in the`truffle-config.js`.
-
-
### Interact with the contract on your local development network
-
-
- In your Truffle console, create an instance of the deployed contract:
+1. In your Truffle console, create an instance of the deployed contract:
```javascript Javascript
@@ -260,9 +228,8 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
You can run `instance` to see the contract object ABI, bytecode, and methods.
-
-
- Declare the contract owner:
+
+2. Declare the contract owner:
```javascript Javascript
@@ -271,9 +238,8 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
You can run `owner` to see the account that deployed the contract and owns the contract.
-
-
- Issue the certificate:
+
+3. Issue the certificate:
```javascript Javascript
@@ -318,9 +284,8 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
Note the `record` value in the output. This is the hash of the certificate values: name and details. You will need this hash to create the contract test later in this tutorial.
-
-
- Run the certificate verification:
+
+4. Run the certificate verification:
```javascript Javascript
@@ -344,17 +309,12 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
Running `verify` will now print `true` if there is a match, and `false` if there is no match.
-
-
### Test the contract
-
-
- Navigate to the `test` directory.
-
-
- Create a `test.js` file:
+1. Navigate to the `test` directory.
+
+2. Create a `test.js` file:
```javascript Javascript
@@ -434,9 +394,8 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
})
```
-
-
- Run the test:
+
+3. Run the test:
```shell Shell
@@ -445,8 +404,6 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
The test run output should be `Passing`.
-
-
### See also
@@ -456,11 +413,9 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
### Deploy the contract to your Ethereum node
-
-
- Install `HDWalletProvider`.
+1. Install `HDWalletProvider`.
- [HDWalletProvider](https://github.com/trufflesuite/truffle/tree/develop/packages/hdwallet-provider) is Truffle's separate npm package used to sign transactions.
+ [HDWalletProvider](https://github.com/trufflesuite/truffle/tree/develop/packages/hdwallet-provider) is Truffle's separate npm package used to sign transactions.
Run:
@@ -469,9 +424,8 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
npm install @truffle/hdwallet-provider
```
-
-
- Edit `truffle-config.js` to add:
+
+2. Edit `truffle-config.js` to add:
* HDWalletProvider
@@ -507,9 +461,8 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
* `mnemonic` — your mnemonic that generates your accounts. You can also generate a mnemonic online with [Mnemonic Code Converter](https://iancoleman.io/bip39/). Make sure you generate a 15-word mnemonic.
* YOUR\_CHAINSTACK\_ENDPOINT — your Chainstack node endpoint. See [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials) and [Ethereum tooling](/docs/ethereum-tooling).
* `network_id` — the Ethereum Sepolia testnet network ID: `5`.
-
-
- Run:
+
+3. Run:
```shell Shell
@@ -518,8 +471,6 @@ In your MetaMask, fund each account with Sepolia ether from our [Sepolia Ethereu
This will engage `2_deploy_contracts.js` and deploy the contract to the Ethereum Sepolia testnet as specified in `truffle-config.js`.
-
-
### Get testnet ether
diff --git a/docs/ethereum-tutorial-asset-tokenization-with-embark.mdx b/docs/ethereum-tutorial-asset-tokenization-with-embark.mdx
index ff2de9b2..93f32bf2 100644
--- a/docs/ethereum-tutorial-asset-tokenization-with-embark.mdx
+++ b/docs/ethereum-tutorial-asset-tokenization-with-embark.mdx
@@ -3,10 +3,10 @@ title: "Ethereum: Asset tokenization with Embark"
---
**TLDR:**
-* You’ll build a simple contract in Embark that tokenizes assets with a fixed supply of 1,000 tokens.
-* You’ll set a price of 0.1 ether per token and let anyone exchange ether for asset tokens on Sepolia.
-* You’ll use Chainstack to deploy and run your own Sepolia node, and Geth to manage your accounts.
-* You’ll confirm everything works by testing the contract with Embark’s Cockpit and by sending ether from MetaMask.
+* You'll build a simple contract in Embark that tokenizes assets with a fixed supply of 1,000 tokens.
+* You'll set a price of 0.1 ether per token and let anyone exchange ether for asset tokens on Sepolia.
+* You'll use Chainstack to deploy and run your own Sepolia node, and Geth to manage your accounts.
+* You'll confirm everything works by testing the contract with Embark's Cockpit and by sending ether from MetaMask.
## Main article
@@ -28,32 +28,15 @@ For illustration purposes, this contract does the following:
## Overview
To get from zero to an asset tokenization contract running on Sepolia, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, deploy a Sepolia testnet node.
-
-
- With Embark, create a project and the contract.
-
-
- With Geth, create a new account.
-
-
- Import the account in MetaMask and fund the account with Sepolia ether.
-
-
- With Embark, deploy the contract through the Sepolia node.
-
-
- With Embark, check the contract with Cockpit.
-
-
- Interact with the contract through MetaMask.
-
-
+
+1. With Chainstack, create a public chain project.
+2. With Chainstack, deploy a Sepolia testnet node.
+3. With Embark, create a project and the contract.
+4. With Geth, create a new account.
+5. Import the account in MetaMask and fund the account with Sepolia ether.
+6. With Embark, deploy the contract through the Sepolia node.
+7. With Embark, check the contract with Cockpit.
+8. Interact with the contract through MetaMask.
## Step-by-step
@@ -71,9 +54,7 @@ In your MetaMask, fund each account with Sepolia ether [Chainstack's Sepolia fau
### Create an Embark project and the contract
-
-
- Create a new Embark project:
+1. Create a new Embark project:
```bash Shell
@@ -82,12 +63,10 @@ In your MetaMask, fund each account with Sepolia ether [Chainstack's Sepolia fau
This will create an Embark directory called `asset`.
-
-
- Change to the `contracts` directory of the Embark project.
-
-
- Create an `AssetTokenized.sol` file in the `contracts` directory:
+
+2. Change to the `contracts` directory of the Embark project.
+
+3. Create an `AssetTokenized.sol` file in the `contracts` directory:
```solidity solidity
@@ -114,56 +93,38 @@ In your MetaMask, fund each account with Sepolia ether [Chainstack's Sepolia fau
}
```
-
-
### Create an Ethereum account
You will use this account to deploy the contract.
-
-
- Create the account:
+1. Create the account:
```bash Shell
geth account new
```
-
-
- Check the path to the keystore file created for the new account:
+
+2. Check the path to the keystore file created for the new account:
```bash Shell
geth account list
```
-
-
### Import the account in MetaMask and fund the account
-
-
- In MetaMask, click **Import Account** > **JSON File.**
-
-
- Select the keystore file that you created earlier.
-
-
- Fund the account with [Sepolia ether](https://faucet.paradigm.xyz/).
-
-
+1. In MetaMask, click **Import Account** > **JSON File.**
+2. Select the keystore file that you created earlier.
+3. Fund the account with [Sepolia ether](https://faucet.paradigm.xyz/).
### Deploy the contract
-
-
- In your Embark project directory, change to `config`.
-
-
- Append `contracts.js` with the following configuration:
+1. In your Embark project directory, change to `config`.
+
+2. Append `contracts.js` with the following configuration:
```js JavaScript
@@ -195,9 +156,8 @@ You will use this account to deploy the contract.
* `//root/.ethereum/keystore/...` — the location of the keystore file
* PASSWORD — the password you provided when creating the Ethereum account with Geth
* YOUR\_CHAINSTACK\_ENDPOINT — your Chainstack node endpoint. See also [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
-
-
- Deploy the contract with Embark:
+
+3. Deploy the contract with Embark:
```bash Shell
@@ -208,8 +168,6 @@ You will use this account to deploy the contract.
where `chainstack` — the argument from the configuration file `contracts.js`
This will deploy the contract on Sepolia.
-
-
### Check the contract with Cockpit
diff --git a/docs/ethereum-tutorial-trust-fund-account-with-remix.mdx b/docs/ethereum-tutorial-trust-fund-account-with-remix.mdx
index 6d589bd5..6370e63d 100644
--- a/docs/ethereum-tutorial-trust-fund-account-with-remix.mdx
+++ b/docs/ethereum-tutorial-trust-fund-account-with-remix.mdx
@@ -3,10 +3,10 @@ title: "Ethereum: Trust fund account with Remix"
---
**TLDR:**
-* You’ll build a trust fund contract that can accept deposits from anyone, but only the owner can withdraw.
+* You'll build a trust fund contract that can accept deposits from anyone, but only the owner can withdraw.
* Ownership can be transferred to another address, making it useful for simple DeFi scenarios.
-* You’ll rely on Chainstack for an Ethereum Sepolia node, and Remix + MetaMask for contract compilation and deployment.
-* By the end, you’ll have a fully functional trust fund contract deployed to Sepolia and ready to receive or withdraw Ether.
+* You'll rely on Chainstack for an Ethereum Sepolia node, and Remix + MetaMask for contract compilation and deployment.
+* By the end, you'll have a fully functional trust fund contract deployed to Sepolia and ready to receive or withdraw Ether.
## Main article
@@ -47,32 +47,14 @@ In this tutorial, you will:
To get from zero to a deployed Trust Fund account on the Ethereum Sepolia testnet, do the following:
-
-
- With Chainstack, create a public chain project .
-
-
- With Chainstack, join the Ethereum Sepolia testnet.
-
-
- With Chainstack, access your Ethereum node credentials.
-
-
- Set up your MetaMask to work through a Chainstack node.
-
-
- With Remix IDE, create and compile the Trust Fund smart contract.
-
-
- Set up your Remix IDE to work through a Chainstack node.
-
-
- With Remix IDE, deploy the contract to the Ethereum Sepolia testnet.
-
-
- With Remix IDE, interact with the contract on the Ethereum Sepolia testnet.
-
-
+1. With Chainstack, create a public chain project .
+2. With Chainstack, join the Ethereum Sepolia testnet.
+3. With Chainstack, access your Ethereum node credentials.
+4. Set up your MetaMask to work through a Chainstack node.
+5. With Remix IDE, create and compile the Trust Fund smart contract.
+6. Set up your Remix IDE to work through a Chainstack node.
+7. With Remix IDE, deploy the contract to the Ethereum Sepolia testnet.
+8. With Remix IDE, interact with the contract on the Ethereum Sepolia testnet.
## Step-by-step
@@ -100,21 +82,15 @@ In your MetaMask, fund each account with Sepolia ether [Chainstack's Sepolia fau
### Create and compile the Trust Fund smart contract
-
-
- Open [Remix IDE](https://remix.ethereum.org/).
-
-
- On the home page, click **Environments** > **Solidity**.
-
-
- On the left pane, click **File explorers** > **+**.
-
-
- In the modal, give any name to your contract. For example, `transferableTrustFund.sol`.
-
-
- Put in the contract code:
+1. Open [Remix IDE](https://remix.ethereum.org/).
+
+2. On the home page, click **Environments** > **Solidity**.
+
+3. On the left pane, click **File explorers** > **+**.
+
+4. In the modal, give any name to your contract. For example, `transferableTrustFund.sol`.
+
+5. Put in the contract code:
```sol transferableTrustFund.sol
@@ -275,11 +251,8 @@ In your MetaMask, fund each account with Sepolia ether [Chainstack's Sepolia fau
}
```
-
-
- Compile the contract. On the left pane, click **Solidity compiler** > **Compile**:
-
-
+
+6. Compile the contract. On the left pane, click **Solidity compiler** > **Compile**:
### Compilation failed?
diff --git a/docs/fantom-tooling.mdx b/docs/fantom-tooling.mdx
index f7a3cb17..f83e8ec7 100644
--- a/docs/fantom-tooling.mdx
+++ b/docs/fantom-tooling.mdx
@@ -45,12 +45,9 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Fantom nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -72,11 +69,8 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
@@ -84,14 +78,9 @@ See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstac
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
@@ -99,14 +88,9 @@ This will engage MetaMask and make Remix IDE interact with the network through a
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Fantom nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -144,14 +128,9 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Fantom nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -215,12 +194,9 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Fantom nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+
+2. Connect over HTTP:
```php Php
@@ -238,9 +214,8 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Fantom nodes
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
@@ -264,8 +239,6 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Fantom nodes
?>
```
-
-
## web3j
@@ -342,14 +315,9 @@ See also [the full code on GitHub](https://github.com/chainstack/web3j-getLatest
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Fantom nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -423,12 +391,9 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint:
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
+
+2. Use the `brownie networks add` command with the node endpoint:
```shell Shell
@@ -448,8 +413,7 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
* Mainnet: `250`
* Testnet: `4002`
-
-
+
Example to run the deployment script:
@@ -460,14 +424,9 @@ Example to run the deployment script:
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh).
+
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/fantom-tutorial-erc-721-collection-contract-with-truffle-and-openzeppelin.mdx b/docs/fantom-tutorial-erc-721-collection-contract-with-truffle-and-openzeppelin.mdx
index 33896d3c..131a94bd 100644
--- a/docs/fantom-tutorial-erc-721-collection-contract-with-truffle-and-openzeppelin.mdx
+++ b/docs/fantom-tutorial-erc-721-collection-contract-with-truffle-and-openzeppelin.mdx
@@ -29,26 +29,12 @@ In this tutorial, you will:
To get from zero to a deployed ERC-721 contract on the Fantom testnet, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the Fantom testnet.
-
-
- With Chainstack, access your Fantom node credentials.
-
-
- With OpenZeppelin, create an ERC-721 contract.
-
-
- With Truffle, compile and deploy the contract through your Fantom node.
-
-
- With FTMScan, verify the deployed contract.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join the Fantom testnet.
+3. With Chainstack, access your Fantom node credentials.
+4. With OpenZeppelin, create an ERC-721 contract.
+5. With Truffle, compile and deploy the contract through your Fantom node.
+6. With FTMScan, verify the deployed contract.
## Step-by-step
### Create a public chain project
@@ -243,38 +229,16 @@ Since your ERC-721 contract uses imported OpenZeppelin libraries, you must put a
### Verify the deployed contract on FTMScan
At this point, you have your flattened and cleaned-up contract ready for the FTMScan verification.
-
-
- Go to [FTMScan testnet](https://testnet.ftmscan.com/).
-
-
- Find your deployed contract. The address of your contract should have been printed by Truffle at the end of the deployment in the `contract address` field.
-
-
- On the contract page on FTMScan, click **Contract** > **Verify and Publish**.
-
-
- In **Compiler Type**, select **Solidity (Single file)**.
-
-
- In **Compiler Version**, select **v0.8.9**. This is the version this tutorial used to compile the contract.
-
-
- In **Open Source License Type**, select **MIT License (MIT)**.
-
-
- Click **Continue**.
-
-
- Keep the **Optimization** option set to **No** as Truffle does not use optimization by default.
-
-
- Paste the entirety of your flattened `.sol` contract in the **Enter the Solidity Contract Code below** field.
-
-
- Click **Verify and Publish**.
-
-
+1. Go to [FTMScan testnet](https://testnet.ftmscan.com/).
+2. Find your deployed contract. The address of your contract should have been printed by Truffle at the end of the deployment in the `contract address` field.
+3. On the contract page on FTMScan, click **Contract** > **Verify and Publish**.
+4. In **Compiler Type**, select **Solidity (Single file)**.
+5. In **Compiler Version**, select **v0.8.9**. This is the version this tutorial used to compile the contract.
+6. In **Open Source License Type**, select **MIT License (MIT)**.
+7. Click **Continue**.
+8. Keep the **Optimization** option set to **No** as Truffle does not use optimization by default.
+9. Paste the entirety of your flattened `.sol` contract in the **Enter the Solidity Contract Code below** field.
+10. Click **Verify and Publish**.
FTMScan will take a few seconds to compile your contract, verify, and publish it.
@@ -291,23 +255,11 @@ Make sure you have:
* MetaMask installed and unlocked as you will need it to call the contract. See [Fantom tooling: MetaMask](/docs/fantom-tooling#metamask).
* Testnet FTM on the account to pay for the transaction. See [Fantom testnet faucet](https://faucet.fantom.network/).
-
-
- On FTMScan, on your contract, click **Contract**.
-
-
- Click **Write Contract**.
-
-
- Click **Connect to Web3**.
-
-
- Under **createCollectible**, in the **tokenURI** field, provide any string to serve as metadata for this specific NFT. See also [OpenZeppelin ERC-721](https://docs.openzeppelin.com/contracts/4.x/erc721) for a metadata example.
-
-
- Click **Write**.
-
-
+1. On FTMScan, on your contract, click **Contract**.
+2. Click **Write Contract**.
+3. Click **Connect to Web3**.
+4. Under **createCollectible**, in the **tokenURI** field, provide any string to serve as metadata for this specific NFT. See also [OpenZeppelin ERC-721](https://docs.openzeppelin.com/contracts/4.x/erc721) for a metadata example.
+5. Click **Write**.
This will send a transaction to mint in NFT in your contract collection and distribute the token to the account called `createCollectible`.
@@ -315,37 +267,17 @@ This will send a transaction to mint in NFT in your contract collection and dist
Check the NFT balance of an address:
-
-
- On FTMScan, on your contract, click **Contract**.
-
-
- Click **Read Contract**.
-
-
- Scroll to the **balanceOf** field.
-
-
- In the **owner (address)** field, provide the address of the account you used to deploy the contract.
-
-
- Click **Query**.
-
-
+1. On FTMScan, on your contract, click **Contract**.
+2. Click **Read Contract**.
+3. Scroll to the **balanceOf** field.
+4. In the **owner (address)** field, provide the address of the account you used to deploy the contract.
+5. Click **Query**.
Check the number of minted NFTs
-
-
- On FTMScan, on your contract, click **Contract**.
-
-
- Click **Read Contract**.
-
-
- Check the **tokenCounter** field.
-
-
+1. On FTMScan, on your contract, click **Contract**.
+2. Click **Read Contract**.
+3. Check the **tokenCounter** field.
### Listing on an NFT market
diff --git a/docs/fetching-transfer-events-with-getpastevents-for-a-bayc-nft.mdx b/docs/fetching-transfer-events-with-getpastevents-for-a-bayc-nft.mdx
index eca25231..3823f441 100644
--- a/docs/fetching-transfer-events-with-getpastevents-for-a-bayc-nft.mdx
+++ b/docs/fetching-transfer-events-with-getpastevents-for-a-bayc-nft.mdx
@@ -55,17 +55,9 @@ Bored Ape Yacht Club (BAYC) is a well-known collection of NFTs on the Ethereum b
Follow these steps to deploy an Ethereum node:
-
-
-[Sign up with Chainstack](https://console.chainstack.com/user/account/create).
-
-
-[Deploy a node](/docs/manage-your-networks#join-a-public-network).
-
-
-[View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
+2. [Deploy a node](/docs/manage-your-networks#join-a-public-network).
+3. [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
## Setup
diff --git a/docs/filecoin-tooling.mdx b/docs/filecoin-tooling.mdx
index c1ed63d8..e6d99d02 100644
--- a/docs/filecoin-tooling.mdx
+++ b/docs/filecoin-tooling.mdx
@@ -12,38 +12,19 @@ title: "Filecoin tooling"
You can set your [MetaMask](https://metamask.io/) to interact through your Filecoin nodes..
-
-
- Open your MetaMask and click the network selector.
-
-
- In the network selector, click **Custom RPC**.
-
-
- In the **New RPC URL** field, enter the node endpoint endpoint.
-
-
- In the **Chain ID** field, enter the ID of the network:
-
- * Calibration Testnet: `314159`
-
-
- Click **Save**.
-
-
+1. Open your MetaMask and click the network selector.
+2. In the network selector, click **Custom RPC**.
+3. In the **New RPC URL** field, enter the node endpoint.
+4. In the **Chain ID** field, enter the ID of the network:
+ * Calibration Testnet: `314159`
+5. Click **Save**.
## Remix IDE
To make Remix IDE interact with the network through a Filecoin node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Filecoin node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Deploy & run transactions**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Filecoin node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Deploy & run transactions**.
This will engage MetaMask and make Remix IDE interact with the network through a Filecoin node.
@@ -51,14 +32,8 @@ This will engage MetaMask and make Remix IDE interact with the network through a
Build DApps using [web3.js](https://github.com/web3/web3.js) and Filecoin nodes.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -96,14 +71,8 @@ where FILECOIN\_ENDPOINT is your node WSS endpoint protected either with the key
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Filecoin nodes.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -161,14 +130,8 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Filecoin nodes.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
diff --git a/docs/filecoin-tutorial-deploy-a-deal-making-contract-on-filecoin-with-hardhat.mdx b/docs/filecoin-tutorial-deploy-a-deal-making-contract-on-filecoin-with-hardhat.mdx
index f58c5c71..93fd8f87 100644
--- a/docs/filecoin-tutorial-deploy-a-deal-making-contract-on-filecoin-with-hardhat.mdx
+++ b/docs/filecoin-tutorial-deploy-a-deal-making-contract-on-filecoin-with-hardhat.mdx
@@ -49,26 +49,12 @@ Actors in the Filecoin network fall into two categories:
To get from zero to an emitted deal proposal on the Calibration Testnet, do the following:
-
-
- Get a Filecoin node endoint.
-
-
- Clone the FEVM deal-making kit from Filecoin’s GitHub.
-
-
- Fund your wallet from the Filecoin faucet.
-
-
- Prepare files for storage on the Filecoin network, converting them in `.car`.
-
-
- Deploy the deal-making contract on the Filecoin Calibration Testnet through a node.
-
-
- Make a deal proposal for the Boost storage providers to pick up.
-
-
+1. Get a Filecoin node endpoint.
+2. Clone the FEVM deal-making kit from Filecoin's GitHub.
+3. Fund your wallet from the Filecoin faucet.
+4. Prepare files for storage on the Filecoin network, converting them to `.car` format.
+5. Deploy the deal-making contract on the Filecoin Calibration Testnet through a node.
+6. Make a deal proposal for the Boost storage providers to pick up.
Add your [Filecoin endpoint to MetaMask](/docs/filecoin-tooling#metamask).
diff --git a/docs/fuse-tooling.mdx b/docs/fuse-tooling.mdx
index b6b912ab..68ddb80f 100644
--- a/docs/fuse-tooling.mdx
+++ b/docs/fuse-tooling.mdx
@@ -15,66 +15,45 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## Hardhat
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Fuse nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- fuse: {
- url: "YOUR_NODE_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
+
+ ```javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ fuse: {
+ url: "YOUR_NODE_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
where
- * YOUR\_NODE\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
- * YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network fuse` and Hardhat will deploy using your node.
-
-
+ * YOUR_NODE_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+ * YOUR_PRIVATE_KEY — the private key of the account that you use to deploy the contract
+
+3. Run `npx hardhat run scripts/deploy.js --network fuse` and Hardhat will deploy using your node.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Fuse node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Fuse node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Fuse node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Fuse node.
## web3.js
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Fuse nodes.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -111,14 +90,8 @@ where YOUR\_FUSE\_ENDPOINT is your node WSS endpoint protected either with the k
## web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Fuse nodes.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -181,57 +154,44 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
## web3.php
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Fuse nodes.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
-
-
- ```php Php
-
+ ```
- $web3 = new Web3(new HttpProvider(new HttpRequestManager("YOUR_FUSE_ENDPOINT", 5)));
- ?>
- ```
-
+ where YOUR_FUSE_ENDPOINT is your node HTTPS endpoint protected either with the key or password
- where YOUR\_FUSE\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
-
- ```php Php
- eth;
-
- $eth->blockNumber(function ($err, $data) {
- print "$data \n";
- });
- ?>
- ```
-
-
-
+ ```php
+ eth;
+
+ $eth->blockNumber(function ($err, $data) {
+ print "$data \n";
+ });
+ ?>
+ ```
## web3j
@@ -307,14 +267,8 @@ See also [the full code on GitHub](https://github.com/chainstack/web3j-getLatest
## ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Fuse nodes.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -388,81 +342,62 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint:
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
+2. Use the `brownie networks add` command with the node endpoint:
-
- ```shell Shell
- brownie networks add Fuse ID name="NETWORK_NAME" host= YOUR_NODE_ENDPOINT chainid=NETWORK_ID
- ```
-
+ ```shell
+ brownie networks add Fuse ID name="NETWORK_NAME" host=YOUR_NODE_ENDPOINT chainid=NETWORK_ID
+ ```
where
* ID — any name that you will use as the network tag to run a deployment. For example, `fuse-mainnet`.
-
- * NETWORK\_NAME — any name that you want to identify the network by in the list of networks. For example, **Mainnet (Fuse)**.
-
- * YOUR\_NODE\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password
-
- * NETWORK\_ID — Fuse network ID:
-
+ * NETWORK_NAME — any name that you want to identify the network by in the list of networks. For example, **Mainnet (Fuse)**.
+ * YOUR_NODE_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password
+ * NETWORK_ID — Fuse network ID:
* Mainnet: `122`
* Testnet: `123`
-
-
-Example to run the deployment script:
-
- ```shell Shell
- brownie run deploy.py --network fuse-mainnet
- ```
-
+3. Run the deployment script:
+
+ ```shell
+ brownie run deploy.py --network fuse-mainnet
+ ```
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Fuse node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Create a new project:
-### Forge
+ ```shell
+ forge init PROJECT_NAME
+ cd PROJECT_NAME
+ ```
-Use [forge](https://github.com/foundry-rs/foundry/tree/master/crates/forge) to develop, test, and deploy your smart contracts.
+3. Create a `.env` file with your node endpoint:
-To deploy a contract:
+ ```shell
+ echo "RPC_URL=YOUR_NODE_ENDPOINT" > .env
+ ```
-
- ```shell Shell
- forge create CONTRACT_NAME --contracts CONTRACT_PATH --private-key YOUR_PRIVATE_KEY --rpc-url YOUR_NODE_ENDPOINT
- ```
-
+4. Deploy a contract:
-where
+ ```shell
+ forge create --rpc-url $RPC_URL --private-key $PRIVATE_KEY src/Contract.sol:Contract
+ ```
* CONTRACT\_NAME — name of the contract in the Solidity source code
* CONTRACT\_PATH — path to your smart contract
* YOUR\_PRIVATE\_KEY — the private key to your funded account that you will use to deploy the contract
* YOUR\_FUSE\_ENDPOINT — your node HTTPS endpoint protected either with the key or password
-
### Cast
Use [cast](https://github.com/foundry-rs/foundry/tree/master/crates/cast) to interact with the network and the deployed contracts.
-To get the latest block number:
+1. Get the latest block number:
-
- ```shell Shell
- cast block-number --rpc-url YOUR_NODE_ENDPOINT
- ```
-
+ ```shell
+ cast block-number --rpc-url YOUR_NODE_ENDPOINT
+ ```
-where YOUR\_FUSE\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
+ where `YOUR_NODE_ENDPOINT` is your node HTTPS endpoint protected either with the key or password
diff --git a/docs/fuse-tutorial-simple-multisig-contract-with-hardhat.mdx b/docs/fuse-tutorial-simple-multisig-contract-with-hardhat.mdx
index ec0fc092..37b7c9f4 100644
--- a/docs/fuse-tutorial-simple-multisig-contract-with-hardhat.mdx
+++ b/docs/fuse-tutorial-simple-multisig-contract-with-hardhat.mdx
@@ -342,52 +342,29 @@ Once your contract is deployed, you can view it online at [Fuse Spark testnet ex
You are now going to verify the contract in the explorer to be able to use the explorer as a web app and easily interact with the contract online.
### Verify the deployed contract on the explorer
-
-
- Go to [Fuse Spark testnet explorer](https://explorer.fusespark.io/).
-
-
- Find your deployed contract. The address of your contract is printed in the terminal by Hardhat at the end of the deployment.
-
-
- On the contract page in the explorer, click **Code** > **Verify & Publish**.
-
-
- In **Contract Name**, provide the name of your contract. In our example, the name is `multiSigWallet`.
-
-
- In **Compiler**, select the same compiler version that was used in the Hardhat configuration file. In our example, it is `v0.8.10`.
-
-
- In **EVM Version**, select **default**.
-
-
- In **Optimization**, select **No**.
-
-
- In **Enter the Solidity Contract Code**, paste the contract code.
-
-
- In ABI-encoded Constructor Arguments, provide constructor values:
-
- * Copy the ugly ABI version from your project directory. For this example, it is `abi/ugly/contracts/multiSig.sol/multiSigWallet.json`.
-
- * Go to [Online ABI Encoding Service](https://abi.hashex.org/).
-
- * Enter your ABI and click **Parse**.
+
+1. Go to [Fuse Spark testnet explorer](https://explorer.fusespark.io/).
+2. Find your deployed contract. The address of your contract is printed in the terminal by Hardhat at the end of the deployment.
+3. On the contract page in the explorer, click **Code** > **Verify & Publish**.
+4. In **Contract Name**, provide the name of your contract. In our example, the name is `multiSigWallet`.
+5. In **Compiler**, select the same compiler version that was used in the Hardhat configuration file. In our example, it is `v0.8.10`.
+6. In **EVM Version**, select **default**.
+7. In **Optimization**, select **No**.
+8. In **Enter the Solidity Contract Code**, paste the contract code.
+9. In **ABI-encoded Constructor Arguments**, provide constructor values:
+
+ - Copy the ugly ABI version from your project directory. For this example, it is `abi/ugly/contracts/multiSig.sol/multiSigWallet.json`.
+ - Go to [Online ABI Encoding Service](https://abi.hashex.org/).
+ - Enter your ABI and click **Parse**.
Remove the first and last `{}` and `"abi":`.
- * Enter the contructor parameters that you provided in your deployment script in `deploy.js`.
+ - Enter the constructor parameters that you provided in your deployment script in `deploy.js`.
+ - Copy the resulting value and put it in the **ABI-encoded Constructor Arguments** field in the explorer.
- * Copy the resulting value and put it in the **ABI-encoded Constructor Arguments** field in the explorer.
-
-
- Click **Verify & publish**.
-
-
+10. Click **Verify & publish**.
The explorer will take a few seconds to compile your contract, verify, and publish it.
diff --git a/docs/gnosis-tutorial-simple-soulbound-token-with-remix-and-openzeppelin.mdx b/docs/gnosis-tutorial-simple-soulbound-token-with-remix-and-openzeppelin.mdx
index 53d55c19..3154ccdb 100644
--- a/docs/gnosis-tutorial-simple-soulbound-token-with-remix-and-openzeppelin.mdx
+++ b/docs/gnosis-tutorial-simple-soulbound-token-with-remix-and-openzeppelin.mdx
@@ -28,29 +28,13 @@ In this tutorial, you will:
To get from zero to a deployed soulbound token contract on the Gnosis Chain Chiado testnet, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join Gnosis Chain Chiado testnet.
-
-
- With Chainstack, access your Gnosis Chain node credentials.
-
-
- Set up your MetaMask to work through a Chainstack node.
-
-
- With Remix IDE, create and compile the soulbound contract.
-
-
- With Remix IDE, deploy the contract on the Gnosis Chain Chiado testnet.
-
-
- Issue a soulbound token and burn it.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join Gnosis Chain Chiado testnet.
+3. With Chainstack, access your Gnosis Chain node credentials.
+4. Set up your MetaMask to work through a Chainstack node.
+5. With Remix IDE, create and compile the soulbound contract.
+6. With Remix IDE, deploy the contract on the Gnosis Chain Chiado testnet.
+7. Issue a soulbound token and burn it.
## Step-by-step
@@ -71,71 +55,55 @@ See [View node access and credentials](/docs/manage-your-node#view-node-access-a
See [Gnosis Chain tooling: MetaMask](/docs/gnosis-tooling#metamask).
### Create and compile the soulbound contract
-
-
- Open [Remix IDE](https://remix.ethereum.org/).
-
-
- On the home page, click **Environments** > **Solidity**.
-
-
- On the left pane, click **File explorers** > **contracts** > **New File**.
-
-
- In the modal, give any name to your contract. For example, `soulbound.sol`.
-
-
- Put in the contract code:
-
-
- ```solidity solidity
- // SPDX-License-Identifier: MIT
- pragma solidity ^0.8.7;
-
- import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
- import "@openzeppelin/contracts/utils/Counters.sol";
- import "@openzeppelin/contracts/access/Ownable.sol";
-
- contract SoulBoundToken is ERC721, Ownable {
- using Counters for Counters.Counter;
-
- Counters.Counter private _tokenIdCounter;
-
- constructor() ERC721("SoulBoundToken", "SBT") {}
-
- function safeMint(address to) public onlyOwner {
- uint256 tokenId = _tokenIdCounter.current();
- _tokenIdCounter.increment();
- _safeMint(to, tokenId);
- }
-
- function burn(uint256 tokenId) external {
- require(ownerOf(tokenId) == msg.sender, "Only the owner of the token can burn it.");
- _burn(tokenId);
- }
-
- function _beforeTokenTransfer(address from, address to, uint256) pure override internal {
- require(from == address(0) || to == address(0), "This a Soulbound token. It cannot be transferred. It
- can only be burned by the token owner.");
- }
-
- function _burn(uint256 tokenId) internal override(ERC721) {
- super._burn(tokenId);
- }
- }
- ```
-
+1. Open [Remix IDE](https://remix.ethereum.org/).
+2. On the home page, click **Environments** > **Solidity**.
+3. On the left pane, click **File explorers** > **contracts** > **New File**.
+4. In the modal, give any name to your contract. For example, `soulbound.sol`.
+5. Put in the contract code:
+
+ ```solidity
+ // SPDX-License-Identifier: MIT
+ pragma solidity ^0.8.7;
+
+ import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
+ import "@openzeppelin/contracts/utils/Counters.sol";
+ import "@openzeppelin/contracts/access/Ownable.sol";
+
+ contract SoulBoundToken is ERC721, Ownable {
+ using Counters for Counters.Counter;
+
+ Counters.Counter private _tokenIdCounter;
+
+ constructor() ERC721("SoulBoundToken", "SBT") {}
+
+ function safeMint(address to) public onlyOwner {
+ uint256 tokenId = _tokenIdCounter.current();
+ _tokenIdCounter.increment();
+ _safeMint(to, tokenId);
+ }
+
+ function burn(uint256 tokenId) external {
+ require(ownerOf(tokenId) == msg.sender, "Only the owner of the token can burn it.");
+ _burn(tokenId);
+ }
+
+ function _beforeTokenTransfer(address from, address to, uint256) pure override internal {
+ require(from == address(0) || to == address(0), "This a Soulbound token. It cannot be transferred. It can only be burned by the token owner.");
+ }
+
+ function _burn(uint256 tokenId) internal override(ERC721) {
+ super._burn(tokenId);
+ }
+ }
+ ```
This is your soulbound token contract:
* It uses the audited OpenZeppelin libraries to make the contract of the ERC-721 standard, belonging to the deployer, and increments each issued token ID by 1.
* The contract has a modification to prohibit the token transfer, which makes the issued tokens soulbound.
* The contract also implements a burn function to allow the owner of the issued token to be able to burn it.
-
-
- Compile the contract. On the left pane, click **Solidity compiler** > **Compile**.
-
-
+
+6. Compile the contract. On the left pane, click **Solidity compiler** > **Compile**.
### Fund your account
@@ -148,17 +116,10 @@ On the left pane, click **Deploy** and switch to **Injected Provider - MetaMask*
### Deploy the soulbound contract
On the left pane:
-
-
- Click **Deploy & run transactions**.
-
-
- In contract, select **contracts/soulbound.sol**.
-
-
- Click **Deploy**.
-
-
+
+1. Click **Deploy & run transactions**.
+2. In contract, select **contracts/soulbound.sol**.
+3. Click **Deploy**.
This will engage your MetaMask to deploy the contract to the Gnosis Chain Chiado testnet through your currently selected MetaMask account. Click **Confirm** in the MetaMask modal.
@@ -178,58 +139,27 @@ Since your soulbound contract uses imported OpenZeppelin libraries, you must put
The flattened contract is now in your clipboard.
### Verify the deployed contract on Blockscout explorer
-
-
- Go to [Blockscout explorer](https://blockscout.com/gnosis/chiado).
-
-
- Find your deployed contract. The address of your contract on the left pane of Remix IDE under Deployed Contracts.
-
-
- On the contract page on Blockscout, click **Code** > **Verify & Publish**.
-
-
- Select **Via flattened source code**.
-
-
- In **Contract Name**, provide the name of your contract. In our example, the name is `SoulBoundToken`.
-
-
- In **Compiler**, select the same compiler version that was used in Remix IDE.
-
-
- In **Optimization**, select **No**.
-
-
- In **Enter the Solidity Contract Code**, paste the flattened contract code.
-
-
- Click **Verify & publish**.
-
-
+
+1. Go to [Blockscout explorer](https://blockscout.com/gnosis/chiado).
+2. Find your deployed contract. The address of your contract is on the left pane of Remix IDE under Deployed Contracts.
+3. On the contract page on Blockscout, click **Code** > **Verify & Publish**.
+4. Select **Via flattened source code**.
+5. In **Contract Name**, provide the name of your contract. In our example, the name is `SoulBoundToken`.
+6. In **Compiler**, select the same compiler version that was used in Remix IDE.
+7. In **Optimization**, select **No**.
+8. In **Enter the Solidity Contract Code**, paste the flattened contract code.
+9. Click **Verify & publish**.
Blockscout will take a few seconds to compile your contract, verify, and publish it.
### Issue a soulbound token
Now that your soulbound contract is verified, you can check Blockscout to interact with it.
-
-
- On Blockscout, on your contract, click **Write Contract**.
-
-
- In your MetaMask, make sure you have the same address selected as the one that deployed the contract.
-
-
- Click **Connect wallet**. This will connect your MetaMask instance with the contract owner as the active address.
-
-
- In **safeMint**, provide an address that you own and to which you will issue a soulbound token.
-
-
- Click **Write**.
-
-
+1. On Blockscout, on your contract, click **Write Contract**.
+2. In your MetaMask, make sure you have the same address selected as the one that deployed the contract.
+3. Click **Connect wallet**. This will connect your MetaMask instance with the contract owner as the active address.
+4. In **safeMint**, provide an address that you own and to which you will issue a soulbound token.
+5. Click **Write**.
This will issue a soulbound token to the provided address.
diff --git a/docs/goerli-to-sepolia-transition.mdx b/docs/goerli-to-sepolia-transition.mdx
index 06de41c1..62e1b00f 100644
--- a/docs/goerli-to-sepolia-transition.mdx
+++ b/docs/goerli-to-sepolia-transition.mdx
@@ -26,20 +26,10 @@ With Chainstack, your process of migration to Sepolia will be entirely seamless.
### Create a Sepolia endpoint with Chainstack
-
-
- Go to the [Chainstack console](https://console.chainstack.com/).
-
-
- Navigate to your project, or create a new one.
-
-
- Click **Join network**.
-
-
- Click **Ethereum** and create an endpoint for Sepolia.
-
-
+1. Go to the [Chainstack console](https://console.chainstack.com/).
+2. Navigate to your project, or create a new one.
+3. Click **Join network**.
+4. Click **Ethereum** and create an endpoint for Sepolia.
That’s it. You now have an HTTPS and a WSS endpoint in your Chainstack console that will allow you to connect to a fully synced Sepolia testnet node.
diff --git a/docs/harmony-tooling.mdx b/docs/harmony-tooling.mdx
index ed73077e..762afa37 100644
--- a/docs/harmony-tooling.mdx
+++ b/docs/harmony-tooling.mdx
@@ -10,52 +10,38 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Harmony nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- chainstack: {
- url: "YOUR_CHAINSTACK_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+
+2. Create a new environment in `hardhat.config.js`:
+
+ ```javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ chainstack: {
+ url: "YOUR_CHAINSTACK_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
where
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
@@ -63,14 +49,8 @@ This will engage MetaMask and make Remix IDE interact with the network through a
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Harmony nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -108,14 +88,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Harmony nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -179,57 +153,45 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Harmony nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
-
- ```php Php
-
- ```
-
+ use Web3\Web3;
+ use Web3\Providers\HttpProvider;
+ use Web3\RequestManagers\HttpRequestManager;
+
+ $web3 = new Web3(new HttpProvider(new HttpRequestManager("YOUR_CHAINSTACK_ENDPOINT", 5)));
+ ?>
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
-
- ```php Php
- eth;
+ $eth = $web3->eth;
- $eth->blockNumber(function ($err, $data) {
- print "$data \n";
- });
- ?>
- ```
-
-
-
+ $eth->blockNumber(function ($err, $data) {
+ print "$data \n";
+ });
+ ?>
## web3j
Build DApps using [web3j](https://github.com/web3j/web3j) and Harmony nodes deployed with Chainstack.
diff --git a/docs/harmony-tutorial-a-simple-metaverse-contract-with-foundry.mdx b/docs/harmony-tutorial-a-simple-metaverse-contract-with-foundry.mdx
index 52ecd959..ece391f9 100644
--- a/docs/harmony-tutorial-a-simple-metaverse-contract-with-foundry.mdx
+++ b/docs/harmony-tutorial-a-simple-metaverse-contract-with-foundry.mdx
@@ -31,29 +31,13 @@ In this tutorial, you will:
## Overview
To get from zero to a deployed metaverse contract and patches of land distributed on the Harmony devnet, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the Harmony devnet.
-
-
- With Chainstack, access your Harmony node credentials.
-
-
- With OpenZeppelin, create an HRC-721 contract.
-
-
- With Foundry, flatten, compile, and deploy the contract through your Harmony node.
-
-
- Verify the contract on the Harmony explorer.
-
-
- Using the Harmony explorer as a web app, distribute the patches of land to accounts.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join the Harmony devnet.
+3. With Chainstack, access your Harmony node credentials.
+4. With OpenZeppelin, create an HRC-721 contract.
+5. With Foundry, flatten, compile, and deploy the contract through your Harmony node.
+6. Verify the contract on the Harmony explorer.
+7. Using the Harmony explorer as a web app, distribute the patches of land to accounts.
## Step-by-step
### Create a public chain project
@@ -73,83 +57,76 @@ See [View node access and credentials](/docs/manage-your-node#view-node-access-a
See [Foundry](https://getfoundry.sh/).
### Create the contract
-
-
- Initialize your project with Foundry:
-
-
- ```bash Shell
- forge init polyland
- ```
-
-
- This will create the project directory `polyland` an initialize it.
-
-
- Go to the `polyland/src/` directory. In the directory, create your metaverse contract: `polyland.sol`.
-
-
- ```solidity solidity
- // SPDX-License-Identifier: MIT
- pragma solidity ^0.8;
-
- import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
- import "@openzeppelin/contracts/utils/Counters.sol";
- import "@openzeppelin/contracts/access/Ownable.sol";
-
- contract Polyland is ERC721, Ownable {
- using Counters for Counters.Counter;
-
- Counters.Counter private supply;
-
- uint256 public maxSupply = 4;
-
- struct Triangle {
- string name;
- int8 edge1;
- int8 edge2;
- int8 edge3;
- }
-
- Triangle[] public triangles;
-
- constructor() ERC721("Polyland", "PLLND") {
- triangles.push(Triangle("Triangle0", 0,0,0));
- triangles.push(Triangle("Triangle1", 1,1,1));
- triangles.push(Triangle("Triangle2", 2,2,2));
- triangles.push(Triangle("Triangle3", 3,3,3));
- triangles.push(Triangle("Triangle4", 4,4,4));
- }
-
- modifier supplyCap {
+1. Initialize your project with Foundry:
+
+ ```bash
+ forge init polyland
+ ```
+
+ This will create the project directory `polyland` and initialize it.
+
+2. Go to the `polyland/src/` directory. In the directory, create your metaverse contract: `polyland.sol`.
+
+ ```solidity
+ // SPDX-License-Identifier: MIT
+ pragma solidity ^0.8;
+
+ import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
+ import "@openzeppelin/contracts/utils/Counters.sol";
+ import "@openzeppelin/contracts/access/Ownable.sol";
+
+ contract Polyland is ERC721, Ownable {
+ using Counters for Counters.Counter;
+
+ Counters.Counter private supply;
+
+ uint256 public maxSupply = 4;
+
+ struct Triangle {
+ string name;
+ int8 edge1;
+ int8 edge2;
+ int8 edge3;
+ }
+
+ Triangle[] public triangles;
+
+ constructor() ERC721("Polyland", "PLLND") {
+ triangles.push(Triangle("Triangle0", 0,0,0));
+ triangles.push(Triangle("Triangle1", 1,1,1));
+ triangles.push(Triangle("Triangle2", 2,2,2));
+ triangles.push(Triangle("Triangle3", 3,3,3));
+ triangles.push(Triangle("Triangle4", 4,4,4));
+ }
+
+ modifier supplyCap {
require(supply.current() <= maxSupply, "All patches minted.");
_;
- }
+ }
- function totalSupply() public view returns (uint256) {
+ function totalSupply() public view returns (uint256) {
return supply.current();
- }
+ }
- function getTriangles() public view returns (Triangle[] memory) {
+ function getTriangles() public view returns (Triangle[] memory) {
return triangles;
- }
+ }
- function mintTriangle(address account)
- public
- onlyOwner
- supplyCap
- returns (uint256)
- {
- supply.increment();
+ function mintTriangle(address account)
+ public
+ onlyOwner
+ supplyCap
+ returns (uint256)
+ {
+ supply.increment();
- uint256 newPatchId = supply.current();
- _mint(account, newPatchId);
+ uint256 newPatchId = supply.current();
+ _mint(account, newPatchId);
- return newPatchId;
- }
- }
- ```
-
+ return newPatchId;
+ }
+ }
+ ```
The contract implementation is the following:
@@ -160,48 +137,36 @@ See [Foundry](https://getfoundry.sh/).
* Only the address that deploys the contract can mint the patches of land.
Thus, the contract represents a plot of land called Polyland that consists of four triangular patches of land.
-
-
- Set up OpenZeppelin with Foundry
+
+3. Set up OpenZeppelin with Foundry
Install OpenZeppelin with Foundry:
-
- ```bash Shell
- forge install openzeppelin/openzeppelin-contracts
- ```
-
+ ```bash
+ forge install openzeppelin/openzeppelin-contracts
+ ```
In the project directory, create a `remappings.txt` file with the following contents:
-
- ```js JavaScript
- @openzeppelin/=lib/openzeppelin-contracts/
- ```
-
-
-
- Flatten the contract.
+ ```
+ @openzeppelin/=lib/openzeppelin-contracts/
+ ```
+
+4. Flatten the contract.
Flatten the contract to make it easier to verify on the [Harmony Testnet explorer](https://explorer.testnet.harmony.one).
Run:
-
- ```bash Shell
- forge flatten polyland.sol > polylandFlat.sol
- ```
-
-
-
- Deploy the contract:
-
-
- ```bash Shell
- forge create Polyland --contracts /root/polyland/src/polylandFlat.sol --private-key YOUR_PRIVATE_KEY --rpc-url YOUR_CHAINSTACK_ENDPOINT --
- legacy
- ```
-
+ ```bash
+ forge flatten polyland.sol > polylandFlat.sol
+ ```
+
+5. Deploy the contract:
+
+ ```bash
+ forge create Polyland --contracts /root/polyland/src/polylandFlat.sol --private-key YOUR_PRIVATE_KEY --rpc-url YOUR_CHAINSTACK_ENDPOINT --legacy
+ ```
where
@@ -212,35 +177,16 @@ See [Foundry](https://getfoundry.sh/).
* `--legacy` — the Foundry flag to work with the EVM-based networks that are not [EIP-1559](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md) activated.
Once the contract deploys, note the `solc` and the `Deployed` to values in the output.
-
-
### Verify the contract
-
-
- Open the [Harmony Testnet explorer](https://explorer.testnet.harmony.one).
-
-
- Put in the contract address. Click the **Contract** tab.
-
-
- Click **Verify and Publish**.
-
-
- In the `Contract Name` field, put `Polyland`.
-
-
- Set `Chain Type` to `devnet`.
-
-
- In `Compiler`, provide the `solc` version that the contract compiled with.
-
-
- In `Optimizer`, set `Yes`, `200`. Contract bytecode optimization with 200 runs is the default Foundry setting.
-
-
- Paste the entirety of the flattened contract in the contract field and hit **Submit**.
-
-
+
+1. Open the [Harmony Testnet explorer](https://explorer.testnet.harmony.one).
+2. Put in the contract address. Click the **Contract** tab.
+3. Click **Verify and Publish**.
+4. In the `Contract Name` field, put `Polyland`.
+5. Set `Chain Type` to `devnet`.
+6. In `Compiler`, provide the `solc` version that the contract compiled with.
+7. In `Optimizer`, set `Yes`, `200`. Contract bytecode optimization with 200 runs is the default Foundry setting.
+8. Paste the entirety of the flattened contract in the contract field and hit **Submit**.
This will verify the contract. You can now use the explorer as a web app to interact with the contract.
diff --git a/docs/harnessing-chainlink-oracles-with-chainstack-fetching-real-time-crypto-prices-from-ethereum.mdx b/docs/harnessing-chainlink-oracles-with-chainstack-fetching-real-time-crypto-prices-from-ethereum.mdx
index 5545631c..19ec0263 100644
--- a/docs/harnessing-chainlink-oracles-with-chainstack-fetching-real-time-crypto-prices-from-ethereum.mdx
+++ b/docs/harnessing-chainlink-oracles-with-chainstack-fetching-real-time-crypto-prices-from-ethereum.mdx
@@ -35,17 +35,9 @@ For our purpose, we'll use node.js alongside the web3.js library, allowing us to
Follow these steps to deploy an Ethereum node:
-
-
-[Sign up with Chainstack](https://console.chainstack.com/user/account/create).
-
-
-[Deploy a node](/docs/manage-your-networks#join-a-public-network).
-
-
-[View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
+2. [Deploy a node](/docs/manage-your-networks#join-a-public-network).
+3. [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
### Install web3.js
diff --git a/docs/how-to-store-your-web3-dapp-secrets-guide-to-environment-variables.mdx b/docs/how-to-store-your-web3-dapp-secrets-guide-to-environment-variables.mdx
index c3b3c139..744d285f 100644
--- a/docs/how-to-store-your-web3-dapp-secrets-guide-to-environment-variables.mdx
+++ b/docs/how-to-store-your-web3-dapp-secrets-guide-to-environment-variables.mdx
@@ -94,75 +94,52 @@ All you have to do is add a `require` reference for its config method as early a
### How to use the dotenv package
Here’s what you need to do to replicate this for your environment:
-
-
- [Download and install node.js](https://nodejs.org/) if you don’t have it already
-
-
- Navigate to your project’s root folder using the CLI
-
-
- Install the dotenv package from your CLI via npm:
-
-
- ```sh CLI
- npm install dotenv
- ```
-
-
-
- Create a `.env` file and enter your secrets in the appropriate format:
-
-
- ```sh .env
- CHAINSTACK_NODE_URL="https://nd-123-456-789.p2pify.com/API_KEY"
- ```
-
-
-
- Enter this as early as possible in your DApp’s JavaScript file to load the package once it runs:
-
-
- ```js index.js
- require('dotenv').config();
- ```
-
-
-
- Fetch your DApp secret like so:
-
-
- ```js index.js
- const secret = process.env.CHAINSTACK_NODE_URL;
- ```
-
-
-
- Confirm your secret is loading correctly in your script by logging the result in the console:
-
-
- ```js index.js
- // If secret is declared
- console.log(secret);
-
- // If the secret is not declared
- console.log(process.env.YOUR_KEY);
- ```
-
-
-
- Run your script and check if the result is correct:
-
-
- ```sh CLI
- $ node index.js
-
- // Script response
- YOUR_VALUE
- ```
-
-
-
+1. [Download and install node.js](https://nodejs.org/) if you don't have it already
+
+2. Navigate to your project's root folder using the CLI
+
+3. Install the dotenv package from your CLI via npm:
+
+ ```bash
+ npm install dotenv
+ ```
+
+4. Create a `.env` file and enter your secrets in the appropriate format:
+
+ ```sh
+ CHAINSTACK_NODE_URL="https://nd-123-456-789.p2pify.com/API_KEY"
+ ```
+
+5. Enter this as early as possible in your DApp's JavaScript file to load the package once it runs:
+
+ ```js
+ require('dotenv').config();
+ ```
+
+6. Fetch your DApp secret like so:
+
+ ```js
+ const secret = process.env.CHAINSTACK_NODE_URL;
+ ```
+
+7. Confirm your secret is loading correctly in your script by logging the result in the console:
+
+ ```js
+ // If secret is declared
+ console.log(secret);
+
+ // If the secret is not declared
+ console.log(process.env.YOUR_KEY);
+ ```
+
+8. Run your script and check if the result is correct:
+
+ ```bash
+ $ node index.js
+
+ // Script response
+ YOUR_VALUE
+ ```
### Full script example
@@ -500,23 +477,11 @@ This is because the server was initially tested in a local environment.
To make this work on the internet, follow these steps:
-
-
- Create a separate repository for the server.
-
-
- Add the server files to the new repository.
-
-
- Deploy the server using a platform like Digital Ocean.
-
-
- Set the environment variables in the deployment platform.
-
-
- Replace `http://localhost:4000/` in the front-end files with the URL of your deployed server.
-
-
+1. Create a separate repository for the server.
+2. Add the server files to the new repository.
+3. Deploy the server using a platform like Digital Ocean.
+4. Set the environment variables in the deployment platform.
+5. Replace `http://localhost:4000/` in the front-end files with the URL of your deployed server.
By completing these steps, you'll successfully connect the front end to the back end, allowing your application to work online.
diff --git a/docs/implementing-jwt-validation-in-golang-for-chainstack-marketplace-integration.mdx b/docs/implementing-jwt-validation-in-golang-for-chainstack-marketplace-integration.mdx
index 59766e46..9f931eaa 100644
--- a/docs/implementing-jwt-validation-in-golang-for-chainstack-marketplace-integration.mdx
+++ b/docs/implementing-jwt-validation-in-golang-for-chainstack-marketplace-integration.mdx
@@ -46,52 +46,41 @@ You should also have a basic understanding of:
## Setting up the project
-
-
- Initialize a new Go project. Open your terminal and run the following command to create a new directory for your project and navigate into it:
+1. Initialize a new Go project
+ Open your terminal and run the following command to create a new directory for your project and navigate into it:
-
- ```shell Shell
- mkdir go-jwt-validation && cd go-jwt-validation
- ```
-
-
-
- Initialize Go module. Initialize a new Go module by running:
+ ```bash
+ mkdir go-jwt-validation && cd go-jwt-validation
+ ```
-
- ```shell Shell
- go mod init jwt-validation
- ```
-
-
-
- Install required libraries. Install the necessary Go libraries by running:
+2. Initialize Go module
+ Initialize a new Go module by running:
-
- ```shell Shell
- go get github.com/golang-jwt/jwt
- go get golang.org/x/crypto/ed25519
- go get github.com/joho/godotenv
- ```
-
-
-
- Create a `.env` file. Create a `.env` file in the root directory of your project and add the public key you received from Chainstack and other environment variables if needed.
+ ```bash
+ go mod init jwt-validation
+ ```
+
+3. Install required libraries
+ Install the necessary Go libraries by running:
+
+ ```bash
+ go get github.com/golang-jwt/jwt
+ go get golang.org/x/crypto/ed25519
+ go get github.com/joho/godotenv
+ ```
+
+4. Create a `.env` file
+ Create a `.env` file in the root directory of your project and add the public key you received from Chainstack and other environment variables if needed.
- ### Ensure the public key is in the privacy-enhanced mail (PEM) format
+ ### Ensure the public key is in the privacy-enhanced mail (PEM) format
- PEM is a widely used encoding format for cryptographic objects such as keys and certificates. It is a base64 encoding of the binary distinguished encoding rules (DER) format with additional header and footer lines. In the code, the public key is stored in PEM format between the lines `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`.
+ PEM is a widely used encoding format for cryptographic objects such as keys and certificates. It is a base64 encoding of the binary distinguished encoding rules (DER) format with additional header and footer lines. In the code, the public key is stored in PEM format between the lines `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`.
-
- ```shell Shell
- JWT_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----PUBLIC_KEY_HERE-----END PUBLIC KEY-----"
- ```
-
-
-
+ ```bash
+ JWT_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----PUBLIC_KEY_HERE-----END PUBLIC KEY-----"
+ ```
### Why use a `.env` file?
@@ -280,23 +269,11 @@ This function loads environment variables from a `.env` file into the program. I
This function retrieves the public key stored in the `.env` file as an environment variable. It performs several steps:
-
-
- Reads the `JWT_PUBLIC_KEY` environment variable.
-
-
- Checks if the variable is empty and returns an error if it is.
-
-
- Converts the single-line PEM to multi-line PEM format if needed.
-
-
- Decodes the PEM block to get the public key bytes.
-
-
- Parses the public key bytes to get an `ed25519.PublicKey` object.
-
-
+1. Reads the `JWT_PUBLIC_KEY` environment variable.
+2. Checks if the variable is empty and returns an error if it is.
+3. Converts the single-line PEM to multi-line PEM format if needed.
+4. Decodes the PEM block to get the public key bytes.
+5. Parses the public key bytes to get an `ed25519.PublicKey` object.
When validating the JWT, we are using the Ed25519 public key to validate a signature that was generated using the EdDSA algorithm with the Ed25519 parameters.
@@ -306,23 +283,17 @@ This function retrieves the public key stored in the `.env` file as an environme
This function validates the JWT token. It takes the Ed25519 public key, the JWT token string, and the expected audience as parameters. It performs the following steps:
-
-
- Parse the JWT. Utilizes the `jwt.Parse` function from the `github.com/golang-jwt/jwt` library to parse the JWT. This function not only decodes the token but also validates it against a series of standard claims:
+1. Parse the JWT. Utilizes the `jwt.Parse` function from the `github.com/golang-jwt/jwt` library to parse the JWT. This function not only decodes the token but also validates it against a series of standard claims:
* `exp` — expiration time of the token. If the token is expired, the function will return an error.
* `nbf` — not-before time, indicating the earliest time the token is valid.
* `iat` — issued-at time, indicating when the token was created.
The function uses the provided Ed25519 public key for cryptographic validation of the token's signature.
-
-
- Check audience. Explicitly checks the `aud` claim in the token to ensure it matches the expected audience. This is an additional validation layer on top of the default checks performed by `jwt.Parse`. This claim ensures the user is allowed to call your app specifically.
-
-
- Output. If the token is valid, it prints the decoded payload and a validation success message. If the token is invalid for any reason (e.g., expired, wrong audience, etc.), an error message is returned.
-
-
+
+2. Check audience. Explicitly checks the `aud` claim in the token to ensure it matches the expected audience. This is an additional validation layer on top of the default checks performed by `jwt.Parse`. This claim ensures the user is allowed to call your app specifically.
+
+3. Output. If the token is valid, it prints the decoded payload and a validation success message. If the token is invalid for any reason (e.g., expired, wrong audience, etc.), an error message is returned.
#### `main()`
diff --git a/docs/introducing-bun-the-future-of-javascript-runtimes.mdx b/docs/introducing-bun-the-future-of-javascript-runtimes.mdx
index 32f1265a..01fadce9 100644
--- a/docs/introducing-bun-the-future-of-javascript-runtimes.mdx
+++ b/docs/introducing-bun-the-future-of-javascript-runtimes.mdx
@@ -63,17 +63,9 @@ In this guide, we'll walk you through creating a DApp designed to fetch the bala
* A Chainstack account to deploy an Ethereum node.
-
-
- [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
-
-
- [Deploy a node](/docs/manage-your-networks#join-a-public-network).
-
-
- [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
+2. [Deploy a node](/docs/manage-your-networks#join-a-public-network).
+3. [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
## Getting started with the project
Once you've installed Bun and secured an Ethereum endpoint from Chainstack, it's time to set up your project. Create a new directory and initiate it with the following:
diff --git a/docs/klaytn-tooling.mdx b/docs/klaytn-tooling.mdx
index 12f1580c..42a1b782 100644
--- a/docs/klaytn-tooling.mdx
+++ b/docs/klaytn-tooling.mdx
@@ -10,13 +10,8 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
[caver-js](https://docs.klaytn.foundation/docs/references/sdk/caver-js/) is a JavaScript library enabling developers to interact with a Klaytn node via HTTP connection. It supports all [Klaytn APIs](https://docs.klaytn.foundation/docs/references/sdk/caver-js/api/).
-
-
- Install [caver-js](https://docs.klaytn.foundation/docs/references/sdk/caver-js/get-started/#installation-).
-
-
- Connect over HTTP.
-
+1. Install [caver-js](https://docs.klaytn.foundation/docs/references/sdk/caver-js/get-started/#installation-).
+2. Connect over HTTP:
```javascript Javascript
@@ -31,21 +26,13 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
getData();
```
-
-
## web3.js
Build DApps using [web3.js](https://github.com/web3/web3.js) and Klaytn nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP.
### HTTP
@@ -67,14 +54,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either wi
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Klaytn nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -113,39 +94,31 @@ See [Ethers.js Extension for Kaia](https://docs.kaia.io/references/sdk/ethers-ex
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Klaytn nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- chainstack: {
- url: "YOUR_CHAINSTACK_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
- where
+
+ ```javascript Javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ chainstack: {
+ url: "YOUR_CHAINSTACK_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
+
+
+where
- * YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
- * YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
+* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
@@ -162,42 +135,37 @@ This will engage MetaMask and make Remix IDE interact with the network through a
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Klaytn nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+2. Connect over HTTP:
-
- ```php Php
-
+ ```php Php
+
- ```
-
+ $web3 = new Web3(new HttpProvider(new HttpRequestManager("YOUR_CHAINSTACK_ENDPOINT", 5)));
+ ?>
+ ```
+
- where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
- Example to get the latest block number:
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
-
- ```php Php
-
+ ```php Php
+
```
-
-
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/linea-tooling.mdx b/docs/linea-tooling.mdx
index 3a43c6df..1954be69 100644
--- a/docs/linea-tooling.mdx
+++ b/docs/linea-tooling.mdx
@@ -9,14 +9,8 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Linea nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -47,14 +41,8 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Linea nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -88,65 +76,46 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Linea nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- chainstack: {
- url: "YOUR_CHAINSTACK_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
-
- where
-
- * YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
- * YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
+
+
+ ```javascript Javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ chainstack: {
+ url: "YOUR_CHAINSTACK_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
+
+
+where
+
+* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/manage-your-account.mdx b/docs/manage-your-account.mdx
index b26e13b6..b4d9af0d 100644
--- a/docs/manage-your-account.mdx
+++ b/docs/manage-your-account.mdx
@@ -15,28 +15,16 @@ title: "Manage your account"
For subscription plan details, see [Pricing](https://chainstack.com/pricing/).
## Change your password
-
-
- Go to **Settings** > **Personal** in your account.
-
-
- Under **Security**, select **Change password**.
-
+1. Go to **Settings** > **Personal** in your account.
-
- Enter your current password.
-
+2. Under **Security**, select **Change password**.
-
- Enter your new password twice to confirm.
-
+3. Enter your current password.
-
- Click **Save** to apply the change.
-
-
+4. Enter your new password twice to confirm.
+5. Click **Save** to apply the change.
## Enable two-factor authentication
@@ -45,26 +33,30 @@ Two-factor authentication (2FA) adds an extra layer of security to your Chainsta
You can use apps like Authy, Google Authenticator, or Microsoft Authenticator.
To enable 2FA:
-
-
- Go to the personal settings page.
-
-
- In **Security**, click **Enable two-factor authentication**.
-
-
- Provide your current password. Click **Next**.
-
-
- Download, print, or copy your 2FA recovery codes. These are the backup codes that you will need to restore your 2FA access if you lose it.
-
-
- Scan the QR code with your authenticator app or enter the code manually.
-
-
- Enter the code provided by the authenticator app in the 2FA wizard. Click **Enable 2FA**.
-
-
+
+1. Go to **Settings** > **Personal** in your account.
+
+2. Under **Security**, select **Enable two-factor authentication**.
+
+3. Provide your current password.
+
+4. Enter your new password twice to confirm.
+
+5. Click **Save** to apply the change.
+
+## Download your 2FA recovery codes
+
+1. Go to **Settings** > **Personal** in your account.
+
+2. Under **Security**, click **Download 2FA recovery codes**.
+
+3. Download, print, or copy your 2FA recovery codes. These are the backup codes that you will need to restore your 2FA access if you lose it.
+
+4. Scan the QR code with your authenticator app or enter the code manually.
+
+5. Enter the code provided by the authenticator app in the 2FA wizard. Click **Enable 2FA**.
+
+
The 2FA recovery codes are shown once and cannot be retrieved.
@@ -76,17 +68,13 @@ To enable 2FA:
Two-factor authentication (2FA) adds an extra layer of security to your Chainstack account. Disabling 2FA will keep your account protected only with your password.
To disable 2FA:
-
-
- Go to the personal settings page.
-
-
- In **Security**, click **Disable two-factor authentication**.
-
-
- Provide your current password. Click **Disable 2FA**.
-
-
+
+1. Go to **Settings** > **Personal** in your account.
+
+2. Under **Security**, click **Disable two-factor authentication**.
+
+3. Provide your current password. Click **Disable 2FA**.
+
## Recover your account protected with two-factor authentication
When you enable two-factor authentication (2FA) for your Chainstack account, you are provided with a list of recovery codes.
@@ -96,17 +84,14 @@ These are the backup codes that you must use to restore your 2FA access if you l
The default name of the file that you might have downloaded with the recovery codes is `recoveryCodes.txt`.
To recover your account:
-
-
- Provide your username and password at the [log in](https://console.chainstack.com/) page.
-
-
- Click **Having problems? Enter your recovery code**.
-
-
- Provide your recovery code. Click **Verify**.
-
-
+
+1. Provide your username and password at the [log in](https://console.chainstack.com/) page.
+
+2. Click **Having problems? Enter your recovery code**.
+
+3. Provide your recovery code. Click **Verify**.
+
+4. Click **Verify**.
Each recovery code can only be used once.
diff --git a/docs/manage-your-billing.mdx b/docs/manage-your-billing.mdx
index 6887cd9d..c76e4298 100644
--- a/docs/manage-your-billing.mdx
+++ b/docs/manage-your-billing.mdx
@@ -38,48 +38,22 @@ description: "Chainstack natively supports crypto payments."
To top up the balance with your Coinbase account:
-
-
- Go to [Billing](https://console.chainstack.com/user/settings/billing).
-
-
- Click **Top up**.
-
-
- Click **Crypto**.
-
-
- Pick an amount to top up with
-
-
- Click **Coinbase Commerce**.
-
-
+ 1. Go to [Billing](https://console.chainstack.com/user/settings/billing).
+2. Click **Top up**.
+3. Click **Crypto**.
+4. Pick an amount to top up with
+5. Click **Coinbase Commerce**.
Proceed to pay with a Coinbase account or any of your non-custodial wallets.
### Top up with NOWPayments
-
-
- Go to [Billing](https://console.chainstack.com/user/settings/billing).
-
-
- Click **Top up**.
-
-
- Click **Crypto**.
-
-
- Click **NOWPayments**.
-
-
- Pick an amount to top up with.
-
-
- Pick a token to pay with. Proceed to pay
-
-
+1. Go to [Billing](https://console.chainstack.com/user/settings/billing).
+2. Click **Top up**.
+3. Click **Crypto**.
+4. Click **NOWPayments**.
+5. Pick an amount to top up with.
+6. Pick a token to pay with. Proceed to pay
### Top up with a non-custodial wallet
@@ -87,42 +61,20 @@ description: "Chainstack natively supports crypto payments."
To top up the balance with a non-custodial wallet:
-
-
- Go to [Billing](https://console.chainstack.com/user/settings/billing).
-
-
- Click **Top up with crypto**.
-
-
- Select a predefined amount or type in your amount. Click **Next**.
-
-
- Select the cryptocurrency.
-
-
- Send the cryptocurrency to the respective generated address.
-
-
+1. Go to [Billing](https://console.chainstack.com/user/settings/billing).
+2. Click **Top up with crypto**.
+3. Select a predefined amount or type in your amount. Click **Next**.
+4. Select the cryptocurrency.
+5. Send the cryptocurrency to the respective generated address.
## Edit your credit card details
If you need to edit your credit card details, do the following:
-
-
- Go to [Billing](https://console.chainstack.com/user/settings/billing).
-
-
- Next to **Credit card**, click **Edit**.
-
-
- Enter new details.
-
-
- Click **Update**.
-
-
+1. Go to [Billing](https://console.chainstack.com/user/settings/billing).
+2. Next to **Credit card**, click **Edit**.
+3. Enter new details.
+4. Click **Update**.
The billing page will reload automatically and show your new credit card details.
@@ -165,20 +117,10 @@ description: "Chainstack natively supports crypto payments."
To change your subscription plan:
-
-
- In the left navigation bar, click **Billing**.
-
-
- Next to **Plan**, click **Change**.
-
-
- Select a new subscription plan and click **Next**.
-
-
- Check the details of your new subscription plan and click **Confirm**.
-
-
+1. In the left navigation bar, click **Billing**.
+2. Next to **Plan**, click **Change**.
+3. Select a new subscription plan and click **Next**.
+4. Check the details of your new subscription plan and click **Confirm**.
Your subscription plan changes immediately. Funds for the unused period of your previous subscription will be automatically returned to your balance. You will also be billed for any uninvoiced metered usage during the used period of your previous subscription.
@@ -192,20 +134,10 @@ description: "Chainstack natively supports crypto payments."
To change your support level:
-
-
- In the left navigation bar, click **Billing**.
-
-
- Next to **Support level**, click **Change**.
-
-
- Select a new support level and click **Next**.
-
-
- Check the details of your new support level and click **Confirm**.
-
-
+1. In the left navigation bar, click **Billing**.
+2. Next to **Support level**, click **Change**.
+3. Select a new support level and click **Next**.
+4. Check the details of your new support level and click **Confirm**.
Your support level changes immediately. Funds that you haven’t spent during your previous upgrade option will be automatically used as a part of your new support level charge if it’s Professional or returned to your balance if you have switched to Standard.
diff --git a/docs/manage-your-consortium-network.mdx b/docs/manage-your-consortium-network.mdx
index 913fa6fc..b3b4465e 100644
--- a/docs/manage-your-consortium-network.mdx
+++ b/docs/manage-your-consortium-network.mdx
@@ -13,20 +13,10 @@ If you are an
To delete a network:
-
-
- Click your project.
-
-
- Click a network in the project.
-
-
- Click **Edit** > **Delete**.
-
-
+ 1. Click your project.
+2. Click a network in the project.
+3. Click **Edit** > **Delete**.
diff --git a/docs/manage-your-node.mdx b/docs/manage-your-node.mdx
index 957f3f0c..6081c2e7 100644
--- a/docs/manage-your-node.mdx
+++ b/docs/manage-your-node.mdx
@@ -11,17 +11,9 @@ The status will change from **Pending** to **Running** once deployed.
## View node access and credentials
To view the access information:
-
-
- Click your project.
-
-
- Click your network.
-
-
- Click the node name.
-
-
+1. Click your project.
+2. Click your network.
+3. Click the node name.
This will give you the access and credentials to your nodes.
@@ -54,17 +46,9 @@ Examples of your WSS node connection endpoints:
You can view the data on requests made to your public chain project node.
To view the requests data:
-
-
- Click your project.
-
-
- Click your network.
-
-
- Click the node name.
-
-
+1. Click your project.
+2. Click your network.
+3. Click the node name.
This will show you the data on the requests made to your node:
* Requests made — a chart of the total requests over HTTP and WebSocket for the selected period.
@@ -80,46 +64,24 @@ You can also see your total organization's [statistics](/docs/see-statistics).
## Switch the period
To switch the period of the displayed requests data:
-
-
- Navigate to the **Metrics** section.
-
-
- On your right, select the period.
-
-
+1. Navigate to the **Metrics** section.
+2. On your right, select the period.
## Download the aggregate data
To download the aggregate requests data:
-
-
- In the **Requests made** section, click the hamburger button.
-
-
- Click the format to download the aggregate data.
-
-
+1. In the **Requests made** section, click the hamburger button.
+2. Click the format to download the aggregate data.
## Check dedicated nodes resources allocation
You can view the resources dynamically allocated to each of your dedicated nodes.
To view the resources allocated to your nodes:
-
-
- Click your project.
-
-
- Click your network.
-
-
- Click the node name.
-
-
- Under **Resources**, hover over **Dynamic**.
-
-
+1. Click your project.
+2. Click your network.
+3. Click the node name.
+4. Under **Resources**, hover over **Dynamic**.
## Delete a node
@@ -128,14 +90,6 @@ To view the resources allocated to your nodes:
To delete a node:
-
-
- Click your project.
-
-
- Click a network in the project.
-
-
- Select a peer node to delete. Click **Edit** > **Delete**.
-
-
+1. Click your project.
+2. Click a network in the project.
+3. Select a peer node to delete. Click **Edit** > **Delete**.
diff --git a/docs/manage-your-organization.mdx b/docs/manage-your-organization.mdx
index 2fdd9f80..e2a23681 100644
--- a/docs/manage-your-organization.mdx
+++ b/docs/manage-your-organization.mdx
@@ -41,23 +41,11 @@ A member cannot:
## Invite a user to the organization
To invite a user to your organization:
-
-
- Click **Settings** > **Organization**.
-
-
- Click **Invite user**.
-
-
- Provide the user email address.
-
-
- Select the role **Admin**, **Editor**, or **Viewer**.
-
-
- Click **Invite**.
-
-
+1. Click **Settings** > **Organization**.
+2. Click **Invite user**.
+3. Provide the user email address.
+4. Select the role **Admin**, **Editor**, or **Viewer**.
+5. Click **Invite**.
This will send an email invitation to join the organization.
@@ -66,20 +54,10 @@ This will send an email invitation to join the organization.
Once the invited user joins the organization, you can change the user's role.
To change the role:
-
-
- Click **Settings** > **Organization**.
-
-
- Next to the user, click the edit icon.
-
-
- Select the new role **Admin**, **Editor**, or **Viewer**.
-
-
- Click **Update**.
-
-
+1. Click **Settings** > **Organization**.
+2. Next to the user, click the edit icon.
+3. Select the new role **Admin**, **Editor**, or **Viewer**.
+4. Click **Update**.
This will change the role of the user.
@@ -88,15 +66,7 @@ The user whose role is changed will need to relogin for the changes to take effe
## Delete a user from the organization
To delete a user from the organization:
-
-
- Click **Settings** > **Organization**.
-
-
- Next to the user, click the trash bin icon.
-
-
- Click **Yes, I'm sure** to confirm the action.
-
-
+1. Click **Settings** > **Organization**.
+2. Next to the user, click the trash bin icon.
+3. Click **Yes, I'm sure** to confirm the action.
The user will be instantly deleted from your organization.
diff --git a/docs/manage-your-project.mdx b/docs/manage-your-project.mdx
index 059da763..18fbab93 100644
--- a/docs/manage-your-project.mdx
+++ b/docs/manage-your-project.mdx
@@ -7,23 +7,11 @@
You must create a project to be able to deploy a node or a network, or to join a network.
To create a project:
-
-
- Log in to your [Chainstack account](https://console.chainstack.com/).
-
-
- Click **Create project**.
-
-
- Provide **Project name**
-
-
- Provide **Description** (optional).
-
-
- Click **Create**.
-
-
+ 1. Log in to your [Chainstack account](https://console.chainstack.com/).
+2. Click **Create project**.
+3. Provide **Project name**
+4. Provide **Description** (optional).
+5. Click **Create**.
## Add a network to a project
@@ -34,20 +22,10 @@
## Edit a project
To edit a project:
-
-
- Click your project.
-
-
- Click **Edit**.
-
-
- Edit your **Project name** and/or **Description**.
-
-
- Click **Save** to apply changes.
-
-
+ 1. Click your project.
+2. Click **Edit**.
+3. Edit your **Project name** and/or **Description**.
+4. Click **Save** to apply changes.
## Delete a project
@@ -56,14 +34,6 @@
To delete a project:
-
-
- Click your project.
-
-
- Click **Edit** > **Delete**.
-
-
- Click **Yes, I'm sure** to confirm the action.
-
-
+ 1. Click your project.
+2. Click **Edit** > **Delete**.
+3. Click **Yes, I'm sure** to confirm the action.
diff --git a/docs/mantle-tooling.mdx b/docs/mantle-tooling.mdx
index 189d8dfa..3b63de2d 100644
--- a/docs/mantle-tooling.mdx
+++ b/docs/mantle-tooling.mdx
@@ -9,14 +9,8 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Mantle nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -47,14 +41,8 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Mantle nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -88,65 +76,46 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Mantle nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- chainstack: {
- url: "YOUR_CHAINSTACK_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
-
- where
-
- * YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
- * YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
+
+
+ ```javascript Javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ chainstack: {
+ url: "YOUR_CHAINSTACK_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
+
+
+where
+
+* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/mastering-multithreading-in-python-for-web3-requests-a-comprehensive-guide.mdx b/docs/mastering-multithreading-in-python-for-web3-requests-a-comprehensive-guide.mdx
index 1226d00e..60fba8ea 100644
--- a/docs/mastering-multithreading-in-python-for-web3-requests-a-comprehensive-guide.mdx
+++ b/docs/mastering-multithreading-in-python-for-web3-requests-a-comprehensive-guide.mdx
@@ -60,17 +60,9 @@ Here's what you'll need:
* **An Ethereum archive node**. We'll interact with the Ethereum network for this guide. We'll need access to an Ethereum archive node since we’ll query older states. To get an RPC endpoint, follow these steps:
-
-
- [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
-
-
- [Deploy a node](/docs/manage-your-networks#join-a-public-network).
-
-
- [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
+2. [Deploy a node](/docs/manage-your-networks#join-a-public-network).
+3. [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
## Creating a simple Web3 script without multithreading
diff --git a/docs/moonbeam-monitoring-the-conviction-voting-contract.mdx b/docs/moonbeam-monitoring-the-conviction-voting-contract.mdx
index dcb0a9e0..1797fb3e 100644
--- a/docs/moonbeam-monitoring-the-conviction-voting-contract.mdx
+++ b/docs/moonbeam-monitoring-the-conviction-voting-contract.mdx
@@ -55,20 +55,10 @@ To interact with the contract, you need the contract ABI.
Since it's a precompile, it's not readily available on the [Moonbeam explorer](https://moonscan.io/address/0x0000000000000000000000000000000000000812). Let's generate one:
-
-
- Go to [Remix IDE](https://remix.ethereum.org/).
-
-
- Create the `ConvictionVoting.sol` file and paste the actual Solidity code from the Moonbeam GitHub repository: [ConvictionVoting.sol](https://github.com/moonbeam-foundation/moonbeam/blob/master/precompiles/conviction-voting/ConvictionVoting.sol).
-
-
- In Remix IDE, click **Solidity Compiler** > **Compile**.
-
-
- When compiled, hit **ABI**. This will copy the ABI of the contract.
-
-
+1. Go to [Remix IDE](https://remix.ethereum.org/).
+2. Create the `ConvictionVoting.sol` file and paste the actual Solidity code from the Moonbeam GitHub repository: [ConvictionVoting.sol](https://github.com/moonbeam-foundation/moonbeam/blob/master/precompiles/conviction-voting/ConvictionVoting.sol).
+3. In Remix IDE, click **Solidity Compiler** > **Compile**.
+4. When compiled, hit **ABI**. This will copy the ABI of the contract.
Save the ABI as a `ConvictionVoting.abi` file in the same directory where you are going to have the Python script.
diff --git a/docs/moonbeam-tooling.mdx b/docs/moonbeam-tooling.mdx
index 2b954cf5..7e51910a 100644
--- a/docs/moonbeam-tooling.mdx
+++ b/docs/moonbeam-tooling.mdx
@@ -17,14 +17,8 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
Build DApps using [web3.js](https://github.com/web3/web3.js) and Moonbeam nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP.
### HTTP
@@ -46,14 +40,8 @@ where `YOUR_CHAINSTACK_ENDPOINT` is your node HTTPS endpoint protected either wi
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Moonbeam nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -88,14 +76,8 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Moonbeam nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -128,38 +110,31 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Moonbeam nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- chainstack: {
- url: "YOUR_CHAINSTACK_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
-
- where
-
- * YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
- * YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
+
+
+ ```javascript Javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ chainstack: {
+ url: "YOUR_CHAINSTACK_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
+
+
+where
+
+* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
@@ -176,68 +151,55 @@ This will engage MetaMask and make Remix IDE interact with the network through a
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Moonbeam nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+2. Connect over HTTP:
+
+
+ ```php Php
+
- ```php Php
-
+ ```
+
- $web3 = new Web3(new HttpProvider(new HttpRequestManager("YOUR_CHAINSTACK_ENDPOINT", 5)));
- ?>
- ```
-
+where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
- where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
- Example to get the latest block number:
+Example to get the latest block number:
-
- ```php Php
-
+ ```php Php
+ eth;
+ $eth = $web3->eth;
- $eth->blockNumber(function ($err, $data) {
- print "$data \n";
- });
- ?>
- ```
-
-
-
+ $eth->blockNumber(function ($err, $data) {
+ print "$data \n";
+ });
+ ?>
+ ```
+
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/near-tooling.mdx b/docs/near-tooling.mdx
index 66206faa..7dbe76a8 100644
--- a/docs/near-tooling.mdx
+++ b/docs/near-tooling.mdx
@@ -11,25 +11,19 @@ Note that Aurora nodes are available for deployment.
## NEAR CLI
-
-
- Install the [NEAR CLI](https://docs.near.org/tools/near-cli).
-
-
- Use the `--node_url` flag to operate through your NEAR node:
-
-
- ```bash Shell
- near COMMAND --node_url YOUR_CHAINSTACK_ENDPOINT
- ```
-
-
- where
-
- * COMMAND — a supported [NEAR CLI](https://docs.near.org/tools/near-cli) command
- * NEAR\_ENDPOINT — your node HTTPS or WSS endpoint.
-
-
+1. Install the [NEAR CLI](https://docs.near.org/tools/near-cli).
+2. Use the `--node_url` flag to operate through your NEAR node:
+
+
+ ```bash Shell
+ near COMMAND --node_url YOUR_CHAINSTACK_ENDPOINT
+ ```
+
+
+where
+
+* COMMAND — a supported [NEAR CLI](https://docs.near.org/tools/near-cli) command
+* NEAR\_ENDPOINT — your node HTTPS or WSS endpoint.
## JSON-RPC API
@@ -53,30 +47,24 @@ NEAR\_ENDPOINT is your node HTTPS or WSS endpoint.
## near-api-js
-
-
- Install [near-api-js](https://docs.near.org/tools/near-api-js/quick-reference).
-
-
- Use `JsonRpcProvider` to connect to your NEAR node.
-
-
- ```javascript Javascript
- const nearAPI = require("near-api-js");
- const connectionInfo = {
- url: "NEAR_ENDPOINT"
- };
- const provider = new nearAPI.providers.JsonRpcProvider(connectionInfo);
- async function main() {
- const response = await provider.block({
- finality: "final",
- });
- console.log(response)
- }
- main();
- ```
-
-
- where NEAR\_ENDPOINT is your node HTTPS or WSS endpoint.
-
-
+1. Install [near-api-js](https://docs.near.org/tools/near-api-js/quick-reference).
+2. Use `JsonRpcProvider` to connect to your NEAR node.
+
+
+ ```javascript Javascript
+ const nearAPI = require("near-api-js");
+ const connectionInfo = {
+ url: "NEAR_ENDPOINT"
+ };
+ const provider = new nearAPI.providers.JsonRpcProvider(connectionInfo);
+ async function main() {
+ const response = await provider.block({
+ finality: "final",
+ });
+ console.log(response)
+ }
+ main();
+ ```
+
+
+where NEAR\_ENDPOINT is your node HTTPS or WSS endpoint.
diff --git a/docs/near-tutorial-creating-and-upgrading-a-simple-message-contract.mdx b/docs/near-tutorial-creating-and-upgrading-a-simple-message-contract.mdx
index 8f49df0d..11793de6 100644
--- a/docs/near-tutorial-creating-and-upgrading-a-simple-message-contract.mdx
+++ b/docs/near-tutorial-creating-and-upgrading-a-simple-message-contract.mdx
@@ -30,49 +30,21 @@ In the process, you will gain first-hand knowledge of how to create metamorphic
To get from zero to an upgraded contract on the NEAR testnet, do the following:
-
-
- Get a testnet NEAR node endpoint.
-
-
- Set up the [NEAR CLI](https://docs.near.org/tools/near-cli).
-
-
- Create an account on the NEAR testnet using the [NEAR wallet](https://wallet.testnet.near.org/).
-
-
- Set up the project.
-
-
- Deploy an initial version of the contract.
-
-
- Change the contract state by interacting with it.
-
-
- Deploy an upgraded version of the contract and migrate the contract state.
-
-
- Retrieve the old contract state and set the new state.
-
-
+1. Get a testnet NEAR node endpoint.
+2. Set up the [NEAR CLI](https://docs.near.org/tools/near-cli).
+3. Create an account on the NEAR testnet using the [NEAR wallet](https://wallet.testnet.near.org/).
+4. Set up the project.
+5. Deploy an initial version of the contract.
+6. Change the contract state by interacting with it.
+7. Deploy an upgraded version of the contract and migrate the contract state.
+8. Retrieve the old contract state and set the new state.
### Create an account on the NEAR testnet
-
-
- Go to the [NEAR testnet wallet](https://wallet.testnet.near.org/).
-
-
- Click **Create Account**.
-
-
- Provide any account name that is not taken. Example: `upgradablecontract.testnet`.
-
-
- Click **Reserve My Account ID** and secure your account as prompted.
-
-
+1. Go to the [NEAR testnet wallet](https://wallet.testnet.near.org/).
+2. Click **Create Account**.
+3. Provide any account name that is not taken. Example: `upgradablecontract.testnet`.
+4. Click **Reserve My Account ID** and secure your account as prompted.
This will initiate your account on the NEAR testnet with testnet NEAR.
diff --git a/docs/oasis-sapphire-tooling.mdx b/docs/oasis-sapphire-tooling.mdx
index d7f2fb34..0659155f 100644
--- a/docs/oasis-sapphire-tooling.mdx
+++ b/docs/oasis-sapphire-tooling.mdx
@@ -7,25 +7,17 @@ title: "Oasis Sapphire tooling"
### Geth
Interact with your Oasis Sapphire node using [Geth](https://geth.ethereum.org/docs/getting-started).
-
-
- Install [Geth](https://github.com/ethereum/go-ethereum).
-
-
- Use `geth attach` command with the node endpoint.
-
-
- Invoke any methods from [Web3 JavaScript API (opens new window)](https://web3js.readthedocs.io/).
-
-
- ```bash Shell
- geth attach YOUR_CHAINSTACK_ENDPOINT
- ```
-
-
- where YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+1. Install [Geth](https://github.com/ethereum/go-ethereum).
+2. Use `geth attach` command with the node endpoint.
+3. Invoke any methods from [Web3 JavaScript API](https://web3js.readthedocs.io/).
+
+
+ ```bash Shell
+ geth attach YOUR_CHAINSTACK_ENDPOINT
+ ```
+
+
+where YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
Example below demonstrates how to get the balance of an address in wei value and convert it to ether value:
@@ -44,61 +36,43 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
### Hardhat
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Oasis Sapphire nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Install the [sapphire-hardhat](https://www.npmjs.com/package/@oasisprotocol/sapphire-hardhat) plugin.
-
-
- Install the [dotenv](https://www.npmjs.com/package/dotenv) package to securely load your sensitive variables from a `.env` file.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```js hardhat.config.js
- require("@nomicfoundation/hardhat-toolbox");
- require('@oasisprotocol/sapphire-hardhat');
- require('dotenv').config();
-
- module.exports = {
- solidity: "0.8.18",
- defaultNetwork: "sapphire_testnet",
- networks: {
- sapphire_testnet: {
- url: `${process.env.YOUR_CHAINSTACK_ENDPOINT}`,
- accounts: [process.env.YOUR_PRIVATE_KEY],
- chainId: 0x5aff,
- },
- },
-
- };
- ```
-
-
- where
-
- * YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
- * YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run --network sapphire_testnet scripts/deploy.js`, and Hardhat will deploy using Chainstack.
-
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Install the [sapphire-hardhat](https://www.npmjs.com/package/@oasisprotocol/sapphire-hardhat) plugin.
+3. Install the [dotenv](https://www.npmjs.com/package/dotenv) package to securely load your sensitive variables from a `.env` file.
+4. Create a new environment in `hardhat.config.js`:
+
+
+ ```js hardhat.config.js
+ require("@nomicfoundation/hardhat-toolbox");
+ require('@oasisprotocol/sapphire-hardhat');
+ require('dotenv').config();
+
+ module.exports = {
+ solidity: "0.8.18",
+ defaultNetwork: "sapphire_testnet",
+ networks: {
+ sapphire_testnet: {
+ url: `${process.env.YOUR_CHAINSTACK_ENDPOINT}`,
+ accounts: [process.env.YOUR_PRIVATE_KEY],
+ chainId: 0x5aff,
+ },
+ },
+ };
+ ```
+
+
+where
+
+* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
+
+5. Run `npx hardhat run --network sapphire_testnet scripts/deploy.js`, and Hardhat will deploy using Chainstack.
### web3.js
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Oasis Sapphire nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
#### HTTPS
@@ -163,14 +137,8 @@ where
### ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Oasis Sapphire nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTPS or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTPS or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
#### HTTPS
@@ -232,13 +200,7 @@ where
To make Remix IDE interact with the network through a zkEVM node deployed with Chainstack:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Oasis Sapphire tooling: MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Oasis Sapphire tooling: MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
diff --git a/docs/oasis-sapphire-tutorial-understanding-confidential-smart-contracts-with-oasis-sapphire.mdx b/docs/oasis-sapphire-tutorial-understanding-confidential-smart-contracts-with-oasis-sapphire.mdx
index 627b626e..50096230 100644
--- a/docs/oasis-sapphire-tutorial-understanding-confidential-smart-contracts-with-oasis-sapphire.mdx
+++ b/docs/oasis-sapphire-tutorial-understanding-confidential-smart-contracts-with-oasis-sapphire.mdx
@@ -47,47 +47,19 @@ This tutorial demonstrates the difference between confidential and non-confident
## Overview
-
-
- Log in to your Chainstack account and create a public chain project.
-
-
- With Chainstack, join the Ethereum Sepolia Testnet and the Oasis Sapphire Testnet.
-
-
- With Chainstack, access your nodes' credentials.
-
-
- Add the details of the Oasis Sapphire node to your MetaMask wallet.
-
-
- Fund your accounts with test tokens.
-
-
- Set up a Hardhat project.
-
-
- Install the required dependencies.
-
-
- Create a `.env` file to store the private key of your MetaMask account and node endpoints.
-
-
- Create a Solidity contract in your Hardhat project.
-
-
- Write the Hardhat scripts for deploying and interacting with the contract.
-
-
- Deploy the contract onto the Ethereum Sepolia Testnet.
-
-
- Deploy the contract onto the Oasis Sapphire Testnet.
-
-
- Analyze the difference in the functioning of the contract.
-
-
+1. Log in to your Chainstack account and create a public chain project.
+2. With Chainstack, join the Ethereum Sepolia Testnet and the Oasis Sapphire Testnet.
+3. With Chainstack, access your nodes' credentials.
+4. Add the details of the Oasis Sapphire node to your MetaMask wallet.
+5. Fund your accounts with test tokens.
+6. Set up a Hardhat project.
+7. Install the required dependencies.
+8. Create a `.env` file to store the private key of your MetaMask account and node endpoints.
+9. Create a Solidity contract in your Hardhat project.
+10. Write the Hardhat scripts for deploying and interacting with the contract.
+11. Deploy the contract onto the Ethereum Sepolia Testnet.
+12. Deploy the contract onto the Oasis Sapphire Testnet.
+13. Analyze the difference in the functioning of the contract.
## Step-by-Step
@@ -122,12 +94,8 @@ To get test tokens for your Ethereum Sepolia account, use the [Ethereum Sepolia
### Set up a Hardhat project
-
-
- Create a new directory for your project.
-
-
- In your project directory, initialize the npm project:
+1. Create a new directory for your project.
+2. In your project directory, initialize the npm project:
```bash Shell
@@ -136,9 +104,8 @@ To get test tokens for your Ethereum Sepolia account, use the [Ethereum Sepolia
This command creates a `package.json` file with default settings.
-
-
- Install Hardhat locally:
+
+3. Install Hardhat locally:
```bash Shell
@@ -146,9 +113,7 @@ To get test tokens for your Ethereum Sepolia account, use the [Ethereum Sepolia
```
-
-
- Initialize the Hardhat project:
+4. Initialize the Hardhat project:
```bash Shell
@@ -157,11 +122,8 @@ To get test tokens for your Ethereum Sepolia account, use the [Ethereum Sepolia
This command will prompt you to choose a template for your project. Select `Create an empty hardhat.config.js` if you want to start from scratch.
-
-
- In your project root directory, create two directories: `/contracts` and `/scripts`. This is where you will store the contracts and deployment scripts respectively.
-
-
+
+5. In your project root directory, create two directories: `/contracts` and `/scripts`. This is where you will store the contracts and deployment scripts respectively.
By now, your Hardhat project directory will have the following structure:
@@ -201,23 +163,15 @@ In this project, you also require the `dotenv` package for handling the environm
In order to deploy and interact with the smart contract on various networks, you need to provide access to the network accounts via the account private key. Since Ethereum accounts are compatible with the Oasis Sapphire, you can use a single MetaMask account to interact with both Ethereum and Oasis testnets. Do the following:
-
-
- Get the private key of your MetaMask account.
-
-
- In the root directory of your project, create a new `.env` file.
-
-
- Save the private key by pasting the following into the `.env` file:
+1. Get the private key of your MetaMask account.
+2. In the root directory of your project, create a new `.env` file.
+3. Save the private key by pasting the following into the `.env` file:
```sh .env
PRIVATE_KEY="YOUR_PRIVATE_KEY"
```
-
-
Once the account private key is added, you may also add the endpoints of your Ethereum and Oasis testnets nodes deployed with Chainstack to the `.env` file:
diff --git a/docs/opbnb-how-to-listen-deposits-bridge.mdx b/docs/opbnb-how-to-listen-deposits-bridge.mdx
index 62941382..702419a4 100644
--- a/docs/opbnb-how-to-listen-deposits-bridge.mdx
+++ b/docs/opbnb-how-to-listen-deposits-bridge.mdx
@@ -121,12 +121,11 @@ where
Here's a brief breakdown explaining the code step-by-step:
-
-
- The code starts by importing the Ethers.js library, which is essential for interacting with the Ethereum network and its derivatives like opBNB.
-
-
- Using a JSON-RPC provider, it connects to an opBNB node. Replace `"YOUR_CHAINSTACK_NODE"` with your actual Chainstack node URL.
+### 1. Importing Ethers.js Library
+The code starts by importing the Ethers.js library, which is essential for interacting with the Ethereum network and its derivatives like opBNB.
+
+### 2. Connecting to the opBNB Node
+Using a JSON-RPC provider, it connects to an opBNB node. Replace `"YOUR_CHAINSTACK_NODE"` with your actual Chainstack node URL.
```javascript Javascript
@@ -138,9 +137,9 @@ Here's a brief breakdown explaining the code step-by-step:
);
```
-
-
- The ABI (Application Binary Interface) is defined for the `DepositFinalized` event. This ABI tells Ethers.js how to interpret the event data.
+
+### 3. Defining the Contract ABI
+The ABI (Application Binary Interface) is defined for the `DepositFinalized` event. This ABI tells Ethers.js how to interpret the event data.
```javascript Javascript
@@ -150,9 +149,9 @@ Here's a brief breakdown explaining the code step-by-step:
];
```
-
-
- The address of the opBNB Bridge contract is specified. This address points to the smart contract on the opBNB network that emits the `DepositFinalized` events.
+
+### 4. Specifying the Contract Address
+The address of the opBNB Bridge contract is specified. This address points to the smart contract on the opBNB network that emits the `DepositFinalized` events.
```javascript Javascript
@@ -160,9 +159,9 @@ Here's a brief breakdown explaining the code step-by-step:
const contractAddress = "0x4200000000000000000000000000000000000010";
```
-
-
- The contract address, ABI, and provider are used to create an instance of the contract. This instance allows interaction with the contract and listening for events.
+
+### 5. Creating a Contract Instance
+The contract address, ABI, and provider are used to create an instance of the contract. This instance allows interaction with the contract and listening for events.
```javascript Javascript
@@ -170,9 +169,9 @@ Here's a brief breakdown explaining the code step-by-step:
const contract = new ethers.Contract(contractAddress, abi, provider);
```
-
-
- A filter for the `DepositFinalized` event is defined. If needed, this filter can be customized to listen for specific events based on additional parameters.
+
+### 6. Defining the Event Filter
+A filter for the `DepositFinalized` event is defined. If needed, this filter can be customized to listen for specific events based on additional parameters.
```javascript Javascript
@@ -180,12 +179,12 @@ Here's a brief breakdown explaining the code step-by-step:
const filter = contract.filters.DepositFinalized();
```
-
-
- The script sets up an event listener that triggers when a `DepositFinalized` event is detected.
- * **Logging Event Details**: It logs the event details, such as the transaction hash, which can be used to view the transaction on the opBNB block explorer.
- * **Extracting Event Data**: The `from` address and the `amount` of BNB deposited are extracted from the event arguments and logged. The amount is formatted to be readable in BNB units.
+### 7. Handling the Event
+The script sets up an event listener that triggers when a `DepositFinalized` event is detected.
+
+- **Logging Event Details**: It logs the event details, such as the transaction hash, which can be used to view the transaction on the opBNB block explorer.
+- **Extracting Event Data**: The `from` address and the `amount` of BNB deposited are extracted from the event arguments and logged. The amount is formatted to be readable in BNB units.
```javascript Javascript
@@ -205,8 +204,6 @@ Here's a brief breakdown explaining the code step-by-step:
});
```
-
-
The script listens for `DepositFinalized` events on the opBNB Bridge and prints relevant details to the console whenever such an event is emitted by the smart contract.
diff --git a/docs/opbnb-tooling.mdx b/docs/opbnb-tooling.mdx
index dff4234c..70fa9d85 100644
--- a/docs/opbnb-tooling.mdx
+++ b/docs/opbnb-tooling.mdx
@@ -10,14 +10,8 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## web3.js
Build DApps using [web3.js](https://github.com/web3/web3.js) and opBNB nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP.
### HTTP
@@ -38,14 +32,8 @@ where `YOUR_CHAINSTACK_ENDPOINT` is your node HTTPS endpoint protected either wi
## web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and opBNB nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -79,14 +67,8 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and opBNB nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -118,12 +100,8 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## Hardhat
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your opBNB nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -145,37 +123,24 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
## web3.php
Build DApps using [web3.php](https://github.com/web3p/web3.php) and opBNB nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+2. Connect over HTTP:
```php Php
@@ -193,9 +158,8 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and opBNB nodes
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
@@ -219,19 +183,11 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and opBNB nodes
?>
```
-
-
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/optimism-tooling.mdx b/docs/optimism-tooling.mdx
index 5a3a05db..fc4a132a 100644
--- a/docs/optimism-tooling.mdx
+++ b/docs/optimism-tooling.mdx
@@ -9,12 +9,8 @@ On the [node access page](/docs/manage-your-node#view-node-access-and-credential
## Hardhat
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Optimism nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -36,11 +32,8 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
@@ -48,14 +41,8 @@ See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstac
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
@@ -63,14 +50,8 @@ This will engage MetaMask and make Remix IDE interact with the network through a
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Polygon nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -108,14 +89,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Optimism nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -179,12 +154,8 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Optimism nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+2. Connect over HTTP:
```php Php
@@ -202,9 +173,8 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Optimism nod
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
@@ -228,8 +198,6 @@ Build DApps using [web3.php](https://github.com/web3p/web3.php) and Optimism nod
?>
```
-
-
## web3j
@@ -306,14 +274,8 @@ See also [the full code on GitHub](https://github.com/chainstack/web3j-getLatest
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Optimism nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -391,12 +353,8 @@ See [node access details](/docs/manage-your-node#view-node-access-and-credential
## Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint:
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
+2. Use the `brownie networks add` command with the node endpoint:
```shell Shell
@@ -417,8 +375,7 @@ where
* Mainnet: `10`
* Testnet: `420`
-
-
+
Example to run the deployment script:
@@ -429,14 +386,8 @@ Example to run the deployment script:
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/optimism-tutorial-bridge-ether-from-ethereum-l1-to-optimism-l2-using-the-optimism-javascript-sdk.mdx b/docs/optimism-tutorial-bridge-ether-from-ethereum-l1-to-optimism-l2-using-the-optimism-javascript-sdk.mdx
index 9652c4c2..b26a0250 100644
--- a/docs/optimism-tutorial-bridge-ether-from-ethereum-l1-to-optimism-l2-using-the-optimism-javascript-sdk.mdx
+++ b/docs/optimism-tutorial-bridge-ether-from-ethereum-l1-to-optimism-l2-using-the-optimism-javascript-sdk.mdx
@@ -43,35 +43,15 @@ Learn more about the Optimism network in [Optimism blockchain – Ethereum Layer
To get from zero to a functioning bridge between Ethereum L1 and Optimism L2, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the Ethereum Sepolia testnet and Optimism Sepolia testnet.
-
-
- With Chainstack, access your nodes' credentials.
-
-
- Create an npm project.
-
-
- Install the required dependencies.
-
-
- Create a `.env` file to store the secrets.
-
-
- With the Ethers library, create provider and wallet instances.
-
-
- With Optimism JavaScript SDK, bridge ether between L1 and L2.
-
-
- Run the script.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join the Ethereum Sepolia testnet and Optimism Sepolia testnet.
+3. With Chainstack, access your nodes' credentials.
+4. Create an npm project.
+5. Install the required dependencies.
+6. Create a `.env` file to store the secrets.
+7. With the Ethers library, create provider and wallet instances.
+8. With Optimism JavaScript SDK, bridge ether between L1 and L2.
+9. Run the script.
## Step-by-step
diff --git a/docs/polygon-tooling.mdx b/docs/polygon-tooling.mdx
index 16a8c82e..a0561d98 100644
--- a/docs/polygon-tooling.mdx
+++ b/docs/polygon-tooling.mdx
@@ -5,36 +5,26 @@ title: "Polygon tooling"
## Bor
Interact with your Polygon node using [Bor](https://github.com/maticnetwork/bor).
-
-
- Install [Bor](https://github.com/maticnetwork/bor).
-
-
- Use `geth attach` command with the node endpoint.
+1. Install [Bor](https://github.com/maticnetwork/bor).
-
- ```shell Shell
- bor attach YOUR_CHAINSTACK_ENDPOINT
- ```
-
+2. Use `geth attach` command with the node endpoint:
-where YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
- Invoke any methods from [Web3 JavaScript API](https://web3js.readthedocs.io/).
+ ```shell
+ bor attach YOUR_CHAINSTACK_ENDPOINT
+ ```
-Example below demonstrates how to get the balance of an address in wei value and convert it to ether value:
+ where YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
- ```js JavaScript
- > web3.fromWei(web3.eth.getBalance("0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae"))
- 642538.078574759898951277
- ```
-
+3. Invoke any methods from [Web3 JavaScript API](https://web3js.readthedocs.io/).
+
+ Example below demonstrates how to get the balance of an address in wei value and convert it to ether value:
+
+ ```js
+ > web3.fromWei(web3.eth.getBalance("0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae"))
+ 642538.078574759898951277
+ ```
-You can also use the [Bor client Docker container](https://hub.docker.com/r/maticnetwork/bor).
-
-
+ You can also use the [Bor client Docker container](https://hub.docker.com/r/maticnetwork/bor).
## GraphQL
You can use GraphQL on a dedicated node on the [paid plans](https://chainstack.com/pricing/).
@@ -42,17 +32,9 @@ You can use GraphQL on a dedicated node on the [paid plans](https://chainstack.c
### UI
You can query data using the graphical interface.
-
-
- On Chainstack, navigate to your dedicated Polygon node. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
- Hover over **GraphQL IDE URL** and click **Open**.
-
-
- In the graphical interface that opens, run a GraphQL query.
-
-
+1. On Chainstack, navigate to your dedicated Polygon node. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+2. Hover over **GraphQL IDE URL** and click **Open**.
+3. In the graphical interface that opens, run a GraphQL query.
Example to get the latest block number:
@@ -99,64 +81,44 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## Hardhat
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Polygon nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- chainstack: {
- url: "YOUR_CHAINSTACK_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+
+2. Create a new environment in `hardhat.config.js`:
+
+ ```javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ chainstack: {
+ url: "YOUR_CHAINSTACK_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
where
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
-
-
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
+
+ See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
## web3.js
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Polygon nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -193,14 +155,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
## web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Polygon nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
Use the `HTTPProvider` to connect to your node endpoint and get the latest block number.
@@ -262,57 +218,47 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
## web3.php
Build DApps using [web3.php](https://github.com/web3p/web3.php) and Polygon nodes deployed with Chainstack.
-
-
- Install [web3.php](https://github.com/web3p/web3.php).
-
-
- Connect over HTTP:
+1. Install [web3.php](https://github.com/web3p/web3.php).
+
+2. Connect over HTTP:
-
- ```php Php
-
- ```
-
+ $web3 = new Web3(new HttpProvider(new HttpRequestManager("YOUR_CHAINSTACK_ENDPOINT", 5)));
+ ?>
+ ```
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password
-
-
- Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
+
+3. Use [JSON-RPC methods](https://eth.wiki/json-rpc/API) to interact with the node.
Example to get the latest block number:
-
- ```php Php
- eth;
+ $eth = $web3->eth;
- $eth->blockNumber(function ($err, $data) {
- print "$data \n";
- });
- ?>
- ```
-
-
-
+ $eth->blockNumber(function ($err, $data) {
+ print "$data \n";
+ });
+ ?>
+ ```
## web3j
Build DApps using [web3j](https://github.com/web3j/web3j) and Polygon nodes deployed with Chainstack.
@@ -387,14 +333,8 @@ See also [the full code on GitHub](https://github.com/chainstack/web3j-getLatest
## ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Polygon nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -467,33 +407,22 @@ where
See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
## Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint:
-
-
- ```shell Shell
- brownie networks add Polygon ID name="NETWORK_NAME" host= YOUR_CHAINSTACK_ENDPOINT chainid=NETWORK_ID
- ```
-
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
+
+2. Use the `brownie networks add` command with the node endpoint:
+
+ ```shell
+ brownie networks add Polygon ID name="NETWORK_NAME" host=YOUR_CHAINSTACK_ENDPOINT chainid=NETWORK_ID
+ ```
where
* ID — any name that you will use as the network tag to run a deployment. For example, `chainstack-mainnet`.
-
* NETWORK\_NAME — any name that you want to identify the network by in the list of networks. For example, **Mainnet (Chainstack)**.
-
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password
-
* NETWORK\_ID — Polygon network ID:
-
* Mainnet: `137`
* Mumbai testnet: `80001`
-
-
Example to run the deployment script:
@@ -503,14 +432,8 @@ Example to run the deployment script:
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/polygon-tutorial-bridging-erc20-from-ethereum-to-polygon.mdx b/docs/polygon-tutorial-bridging-erc20-from-ethereum-to-polygon.mdx
index 9f3550d5..39a0a6a2 100644
--- a/docs/polygon-tutorial-bridging-erc20-from-ethereum-to-polygon.mdx
+++ b/docs/polygon-tutorial-bridging-erc20-from-ethereum-to-polygon.mdx
@@ -28,32 +28,14 @@ In this tutorial, you will:
To get from zero to a deployed ERC-20 contract on the Ethereum Goerli testnet and bridge it to the Polygon Mumbai testnet, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the Ethereum Goerli testnet.
-
-
- In the same project, join the Polygon Mumbai testnet.
-
-
- With Chainstack, access your Ethereum node and Polygon node endpoints.
-
-
- With OpenZeppelin, create an ERC-20 contract.
-
-
- With Truffle, compile and deploy the contract through your Ethereum node.
-
-
- With Truffle, compile and deploy a Polygon contract through your Polygon node.
-
-
- Submit a mapping request to bridge the deployed Ethereum contract to the deployed Polygon contract.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join the Ethereum Goerli testnet.
+3. In the same project, join the Polygon Mumbai testnet.
+4. With Chainstack, access your Ethereum node and Polygon node endpoints.
+5. With OpenZeppelin, create an ERC-20 contract.
+6. With Truffle, compile and deploy the contract through your Ethereum node.
+7. With Truffle, compile and deploy a Polygon contract through your Polygon node.
+8. Submit a mapping request to bridge the deployed Ethereum contract to the deployed Polygon contract.
## Step-by-step
@@ -78,112 +60,89 @@ See [OpenZeppelin Contracts](https://docs.openzeppelin.com/contracts/4.x/).
See [Truffle Suite: Installation](https://trufflesuite.com/docs/truffle/how-to/install/).
### Create the root Ethereum ERC-20 contract
-
-
- On your machine, in the contract directory, initialize Truffle:
+1. On your machine, in the contract directory, initialize Truffle:
-
- ```bash Shell
- truffle init
- ```
-
+ ```bash
+ truffle init
+ ```
This will generate the Truffle boilerplate structure:
-
- ```bash Shell
- .
- ├── contracts
- │ └── .gitkeep
- ├── migrations
- │ └── .gitkeep
- ├── test
- │ └── .gitkeep
- └── truffle-config.js
- ```
-
-
-
- Go to the `contracts` directory. In the directory, create your ERC-20 contract: `myL2token.sol`.
+ ```
+ .
+ ├── contracts
+ │ └── .gitkeep
+ ├── migrations
+ │ └── .gitkeep
+ ├── test
+ │ └── .gitkeep
+ └── truffle-config.js
+ ```
-
- ```solidity solidity
- //SPDX-License-Identifier: MIT
- pragma solidity ^0.8.0;
+2. Go to the `contracts` directory. In the directory, create your ERC-20 contract: `myL2token.sol`.
- import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
+ ```solidity
+ //SPDX-License-Identifier: MIT
+ pragma solidity ^0.8.0;
- contract myL2token is ERC20 {
- constructor(uint256 initialSupply) ERC20("myL2token", "ML2T") {
- \_mint(msg.sender, initialSupply);
- }
+ import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
+
+ contract myL2token is ERC20 {
+ constructor(uint256 initialSupply) ERC20("myL2token", "ML2T") {
+ _mint(msg.sender, initialSupply);
}
- ```
-
+ }
+ ```
This is a standard [OpenZeppelin ERC-20 preset contract](https://docs.openzeppelin.com/contracts/4.x/erc20).
-
-
- Create `2_deploy_contracts.js` in the `migrations` directory.
-
- ```js JavaScript
- var myL2token = artifacts.require("./myL2token.sol");
+3. Create `2_deploy_contracts.js` in the `migrations` directory.
- module.exports = function(deployer) {
- deployer.deploy(myL2token, 100);
- };
- ```
-
+ ```javascript
+ var myL2token = artifacts.require("./myL2token.sol");
+
+ module.exports = function(deployer) {
+ deployer.deploy(myL2token, 100);
+ };
+ ```
This will create the instructions for Truffle to deploy the contract with the supply of `100 ML2T` tokens.
-
-
### Compile and deploy the root Ethereum ERC-20 contract
-
-
- Install `HDWalletProvider`.
+1. Install `HDWalletProvider`.
[HDWalletProvider](https://github.com/trufflesuite/truffle/tree/develop/packages/hdwallet-provider) is Truffle's separate npm package used to sign transactions.
Run:
-
- ```bash Shell
- npm install @truffle/hdwallet-provider
- ```
-
-
-
- Edit `truffle-config.js` to add:
+ ```bash
+ npm install @truffle/hdwallet-provider
+ ```
- * `HDWalletProvider`
+2. Edit `truffle-config.js` to add:
+ * `HDWalletProvider`
* Your Ethereum node access and credentials
-
* Your Ethereum account that you will use to deploy the contract
-
- ```js JavaScript
- const HDWalletProvider = require("@truffle/hdwallet-provider");
- const private_key = 'PRIVATE_KEY';
+ ```javascript
+ const HDWalletProvider = require("@truffle/hdwallet-provider");
+ const private_key = 'PRIVATE_KEY';
- module.exports = {
- networks: {
- goerli: {
- provider: () => new HDWalletProvider(private_key, "YOUR_CHAINSTACK_ENDPOINT"),
- network_id: 5
- }
- },
+ module.exports = {
+ networks: {
+ goerli: {
+ provider: () => new HDWalletProvider(private_key, "YOUR_CHAINSTACK_ENDPOINT"),
+ network_id: 5
+ }
+ },
- compilers: {
- solc: {
- version: "0.8.1",
- }
- }
- };
- ```
-
+ compilers: {
+ solc: {
+ version: "0.8.1",
+ }
+ }
+ };
+ ```
where
@@ -194,27 +153,19 @@ See [Truffle Suite: Installation](https://trufflesuite.com/docs/truffle/how-to/i
* `network_id` — the network ID of the Ethereum Goerli testnet: `5`.
* `solc` — the Solidity compiler version that Truffle must use.
-
-
- Run:
+3. Run:
-
- ```bash Shell
- truffle migrate --network goerli
- ```
-
+ ```bash
+ truffle migrate --network goerli
+ ```
This will engage `2_deploy_contracts.js` and deploy the contract to the Ethereum Goerli testnet as specified in `truffle-config.js`.
-
-
### Verify your root Ethereum ERC-20 contract on Etherscan
Once your contract is deployed, you can view it online at [Etherscan](https://goerli.etherscan.io/).
Before you submit a mapping request to bridge your root Ethereum ERC-20 contract to the Polygon commit chain, you must verify the contract on Etherscan.
-
-
- Flatten your contract code
+1. Flatten your contract code
Since your ERC-20 contract uses imported OpenZeppelin libraries, you must put all the imports into one `.sol` file to make Etherscan be able to verify it.
@@ -222,74 +173,53 @@ Before you submit a mapping request to bridge your root Ethereum ERC-20 contract
In the `contracts` directory, run:
-
- ```bash Shell
- npx truffle-flattener myL2token.sol > flatmyL2token.sol
- ```
-
-
-
- Clean up the licensing information.
+ ```bash
+ npx truffle-flattener myL2token.sol > flatmyL2token.sol
+ ```
+
+2. Clean up the licensing information.
The flattened contract will have the same licensing note imported from each of the files. Multiple licensing notes in one file break the Etherscan verification, so you have to leave one licensing note for the entirety of the flattened contract.
The easiest way to clean up is to search for the `SPDX` mentions in the file and remove all of them except for the very first one.
-
-
- Verify the deployed contract on Etherscan.
+
+3. Verify the deployed contract on Etherscan.
At this point, you have your flattened and cleaned-up contract ready for the Etherscan verification.
-
-
- Go to [Etherscan](https://goerli.etherscan.io/).
-
-
- Find your deployed contract. The address of your contract should have been printed by Truffle at the end of the deployment in the contract address field.
-
-
- On the contract page on Etherscan, click **Contract** > **Verify and Publish**.
-
-
- In **Compiler Type**, select **Solidity (Single file)**.
-
-
- In **Compiler Version**, select **v0.8.1**. This is the version this tutorial used to compile the contract.
-
-
- In **Open Source License Type**, select **MIT License (MIT)**.
-
-
- Click **Continue**.
-
-
- Keep the **Optimization** option set to **No** as Truffle does not use optimization by default.
-
-
- Paste the entirety of your flattened `.sol` contract in the **Enter the Solidity Contract Code below** field.
-
-
- Click **Verify and Publish**.
+
+4. Go to [Etherscan](https://goerli.etherscan.io/).
+
+5. Find your deployed contract. The address of your contract should have been printed by Truffle at the end of the deployment in the contract address field.
+
+6. On the contract page on Etherscan, click **Contract** > **Verify and Publish**.
+
+7. In **Compiler Type**, select **Solidity (Single file)**.
+
+8. In **Compiler Version**, select **v0.8.1**. This is the version this tutorial used to compile the contract.
+
+9. In **Open Source License Type**, select **MIT License (MIT)**.
+
+10. Click **Continue**.
+
+11. Keep the **Optimization** option set to **No** as Truffle does not use optimization by default.
+
+12. Paste the entirety of your flattened `.sol` contract in the **Enter the Solidity Contract Code below** field.
+
+13. Click **Verify and Publish**.
Etherscan will take a few seconds to compile your contract, verify, and publish it.
-
-
### Create the child Polygon ERC-20 contract
-
-
- Go to the `contracts` directory. In the directory, put the default [child ERC-20 contract](https://github.com/maticnetwork/pos-portal/blob/master/flat/ChildERC20.sol) provided by Polygon.
-
-
- Create `2_deploy_contracts.js` in the `migrations` directory.
+1. Go to the `contracts` directory. In the directory, put the default [child ERC-20 contract](https://github.com/maticnetwork/pos-portal/blob/master/flat/ChildERC20.sol) provided by Polygon.
-
- ```js JavaScript
- var ChildERC20 = artifacts.require("./ChildERC20.sol");
+2. Create `2_deploy_contracts.js` in the `migrations` directory.
- module.exports = function(deployer) {
- deployer.deploy(ChildERC20, 'myL2tokenChild', 'ML2T', 18, '0x2e5e27d50EFa501D90Ad3638ff8441a0C0C0d75e');
- };
- ```
-
+ ```javascript
+ var ChildERC20 = artifacts.require("./ChildERC20.sol");
+
+ module.exports = function(deployer) {
+ deployer.deploy(ChildERC20, 'myL2tokenChild', 'ML2T', 18, '0x2e5e27d50EFa501D90Ad3638ff8441a0C0C0d75e');
+ };
+ ```
where
@@ -298,8 +228,6 @@ Before you submit a mapping request to bridge your root Ethereum ERC-20 contract
* `18` — the default decimals number as used by the [OpenZeppelin ERC-20 preset contract](https://docs.openzeppelin.com/contracts/4.x/erc20)
* `0x2e5e27d50EFa501D90Ad3638ff8441a0C0C0d75e` — the [ChildChainmanager](https://wiki.polygon.technology/docs/develop/ethereum-polygon/pos/getting-started/#steps-to-use-the-pos-bridge) address on the Polygon Mumbai testnet. For the ChildChainManager contract addresses, look online for the addresses provided by Polygon:
* [Mainnet addresses](https://github.com/maticnetwork/static/blob/master/network/mainnet/v1/index.json)
-
-
### Compile and deploy the child Polygon ERC-20 contract
Clean up the environment by moving `myL2token.sol` and `flatmyL2token.sol` to a backup directory so that Truffle does not pick them up for deployment.
@@ -355,38 +283,16 @@ Clean up the environment by moving `myL2token.sol` and `flatmyL2token.sol` to a
Once your contract is deployed, you can view it online at the [Polygon Mumbai explorer](https://mumbai.polygonscan.com/).
-
-
- Go to the [Polygon Mumbai explorer](https://mumbai.polygonscan.com/).
-
-
- Find your deployed contract. The address of your contract should have been printed by Truffle at the end of the deployment in the `contract address` field.
-
-
- On the contract page on the explorer, click **Contract** > **Verify and Publish**.
-
-
- In **Compiler Type**, select **Solidity (Single file)**.
-
-
- In **Compiler Version**, select **v0.6.6**. This is the compiler version the default child contract uses as provided by Polygon.
-
-
- In **Open Source License Type**, select **MIT License (MIT)**.
-
-
- Click **Continue**.
-
-
- Keep the **Optimization** option set to **No** as Truffle does not use optimization by default.
-
-
- Paste the entirety of your `ChildERC20.sol` contract in the **Enter the Solidity Contract Code below** field.
-
-
- Click **Verify and Publish**.
-
-
+1. Go to the [Polygon Mumbai explorer](https://mumbai.polygonscan.com/).
+2. Find your deployed contract. The address of your contract should have been printed by Truffle at the end of the deployment in the `contract address` field.
+3. On the contract page on the explorer, click **Contract** > **Verify and Publish**.
+4. In **Compiler Type**, select **Solidity (Single file)**.
+5. In **Compiler Version**, select **v0.6.6**. This is the compiler version the default child contract uses as provided by Polygon.
+6. In **Open Source License Type**, select **MIT License (MIT)**.
+7. Click **Continue**.
+8. Keep the **Optimization** option set to **No** as Truffle does not use optimization by default.
+9. Paste the entirety of your `ChildERC20.sol` contract in the **Enter the Solidity Contract Code below** field.
+10. Click **Verify and Publish**.
### ABI data
@@ -414,23 +320,11 @@ The explorer will take a few seconds to compile your contract, verify, and publi
### Map your Ethereum ERC-20 contract to the Polygon contract
-
-
- Go to the [token mapper](https://mapper.polygon.technology/map).
-
-
- Select **ERC20** and **Goerli Testnet - Mumbai Testnet**.
-
-
- Provide the address of your contract on the Ethereum Goerli testnet and on the Polygon Mumbai testnet.
-
-
- Provide an email address to be notified of when the mapping is done.
-
-
- Click **Submit**.
-
-
+1. Go to the [token mapper](https://mapper.polygon.technology/map).
+2. Select **ERC20** and **Goerli Testnet - Mumbai Testnet**.
+3. Provide the address of your contract on the Ethereum Goerli testnet and on the Polygon Mumbai testnet.
+4. Provide an email address to be notified of when the mapping is done.
+5. Click **Submit**.
### Bridge the mapped tokens
diff --git a/docs/polygon-zkevm-tooling.mdx b/docs/polygon-zkevm-tooling.mdx
index b05e419a..ce499b81 100644
--- a/docs/polygon-zkevm-tooling.mdx
+++ b/docs/polygon-zkevm-tooling.mdx
@@ -23,47 +23,32 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
### Hardhat
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Polygon zkEVM nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Install the [dotenv](https://www.npmjs.com/package/dotenv) package to securely load your sensitive variables from a `.env` file
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```js JavaScript
- require("@nomicfoundation/hardhat-toolbox");
- require('dotenv').config();
-
- module.exports = {
- solidity: "0.8.18",
- defaultNetwork: "zkEVM_testnet",
- networks: {
- zkEVM_testnet: {
- url: `${process.env.YOUR_CHAINSTACK_ENDPOINT}`,
- accounts: [process.env.YOUR_PRIVATE_KEY]
- },
- },
-
- };
- ```
-
-
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+
+2. Install the [dotenv](https://www.npmjs.com/package/dotenv) package to securely load your sensitive variables from a `.env` file
+
+3. Create a new environment in `hardhat.config.js`:
+
+ ```js
+ require("@nomicfoundation/hardhat-toolbox");
+ require('dotenv').config();
+
+ module.exports = {
+ solidity: "0.8.18",
+ defaultNetwork: "zkEVM_testnet",
+ networks: {
+ zkEVM_testnet: {
+ url: `${process.env.YOUR_CHAINSTACK_ENDPOINT}`,
+ accounts: [process.env.YOUR_PRIVATE_KEY]
+ },
+ },
+ };
+ ```
### web3.js
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Polygon zkEVM nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
#### HTTPS
@@ -84,14 +69,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either wi
### web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Polygon zkEVM nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
#### HTTPS
@@ -149,14 +128,8 @@ You can build a web app to query data using node.js and [axios](https://www.npmj
### ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Polygon zkEVM nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTPS or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTPS or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
#### HTTPS
@@ -186,33 +159,22 @@ where
### Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint:
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
- ```bash Shell
- brownie networks add zkEVM ID name="NETWORK_NAME" host=YOUR_CHAINSTACK_ENDPOINT chainid=NETWORK_ID
- ```
-
+2. Use the `brownie networks add` command with the node endpoint:
+
+ ```bash
+ brownie networks add zkEVM ID name="NETWORK_NAME" host=YOUR_CHAINSTACK_ENDPOINT chainid=NETWORK_ID
+ ```
where
* ID — any name that you will use as the network tag to run a deployment. For example, `chainstack-testnet`.
-
* NETWORK\_NAME — any name that you want to identify the network by in the list of networks. For example, `zkEVM`.
-
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password
-
* NETWORK\_ID — Polygon zkEVM network ID:
-
* Mainnet: `1101`
* Testnet: `1442`
-
-
Example to run the deployment script:
@@ -226,13 +188,7 @@ Example to run the deployment script:
To make Remix IDE interact with the network through a zkEVM node deployed with Chainstack:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
diff --git a/docs/polygon-zkevm-tutorial-deploy-a-smart-contract-using-hardhat.mdx b/docs/polygon-zkevm-tutorial-deploy-a-smart-contract-using-hardhat.mdx
index c36376af..fd96ebbd 100644
--- a/docs/polygon-zkevm-tutorial-deploy-a-smart-contract-using-hardhat.mdx
+++ b/docs/polygon-zkevm-tutorial-deploy-a-smart-contract-using-hardhat.mdx
@@ -31,41 +31,17 @@ ZK-rollups execute smart contracts transparently by sharing zero-knowledge proof
In this tutorial, we will go over how to bridge funds between Sepolia and zkEVM testnets, as well as how to deploy a smart contract to the testnet using Hardhat. Here is a brief overview of the tutorial:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the Polygon zkEVM testnet.
-
-
- With Chainstack, access your nodes' credentials.
-
-
- Bridge funds between the Sepolia testnet and the zkEVM testnet.
-
-
- Create a Hardhat project using node.js.
-
-
- Install the required dependencies.
-
-
- Create a `.env` file to store the secrets.
-
-
- Edit the Hardhat config file.
-
-
- Write the smart contract.
-
-
- Write and run the deployment script.
-
-
- Deploy smart contracts to the zkEVM testnet.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join the Polygon zkEVM testnet.
+3. With Chainstack, access your nodes' credentials.
+4. Bridge funds between the Sepolia testnet and the zkEVM testnet.
+5. Create a Hardhat project using node.js.
+6. Install the required dependencies.
+7. Create a `.env` file to store the secrets.
+8. Edit the Hardhat config file.
+9. Write the smart contract.
+10. Write and run the deployment script.
+11. Deploy smart contracts to the zkEVM testnet.
## Step-by-step
diff --git a/docs/ponder-tutorial-building-blockchain-application-backends-with-chainstack.mdx b/docs/ponder-tutorial-building-blockchain-application-backends-with-chainstack.mdx
index 47ac15e3..1698fb3a 100644
--- a/docs/ponder-tutorial-building-blockchain-application-backends-with-chainstack.mdx
+++ b/docs/ponder-tutorial-building-blockchain-application-backends-with-chainstack.mdx
@@ -56,460 +56,426 @@ You'll need the RPC endpoints for each network you joined.
### Create a new Ponder project
-
-
- Create a new Ponder project using the CLI:
+1. Create a new Ponder project using the CLI:
-
- ```shell Shell
- pnpm create ponder@latest my-ponder-indexer
- ```
-
+ ```bash
+ pnpm create ponder@latest my-ponder-indexer
+ ```
This will prompt you to choose a template. For this tutorial, select **"ERC-20"** as it provides a good starting point for token indexing.
-
-
- Navigate to your project directory:
-
-
- ```shell Shell
- cd my-ponder-indexer
- ```
-
-
-
- Install dependencies:
-
-
- ```shell Shell
- pnpm install
- ```
-
-
-
+
+2. Navigate to your project directory:
+
+ ```bash
+ cd my-ponder-indexer
+ ```
+
+3. Install dependencies:
+
+ ```bash
+ pnpm install
+ ```
### Configure environment variables
-
-
- Create a `.env.local` file in your project root:
+1. Create a `.env.local` file in your project root:
-
- ```sh .env.local
- # Chainstack RPC endpoints
- PONDER_RPC_URL_1="YOUR_ETHEREUM_CHAINSTACK_ENDPOINT"
- PONDER_RPC_URL_137="YOUR_POLYGON_CHAINSTACK_ENDPOINT"
- PONDER_RPC_URL_8453="YOUR_BASE_CHAINSTACK_ENDPOINT"
-
- # Optional: Database URL for production
- # DATABASE_URL="postgresql://user:password@localhost:5432/ponder"
- ```
-
+ ```sh
+ # Chainstack RPC endpoints
+ PONDER_RPC_URL_1="YOUR_ETHEREUM_CHAINSTACK_ENDPOINT"
+ PONDER_RPC_URL_137="YOUR_POLYGON_CHAINSTACK_ENDPOINT"
+ PONDER_RPC_URL_8453="YOUR_BASE_CHAINSTACK_ENDPOINT"
+
+ # Optional: Database URL for production
+ # DATABASE_URL="postgresql://user:password@localhost:5432/ponder"
+ ```
Replace the placeholder values with your actual Chainstack endpoints.
- ### Environment variable naming
+ ### Environment variable naming
- Ponder uses the pattern `PONDER_RPC_URL_{CHAIN_ID}` for RPC endpoints. The chain IDs are:
- - Ethereum: 1
- - Polygon: 137
- - Base: 8453
+ Ponder uses the pattern `PONDER_RPC_URL_{CHAIN_ID}` for RPC endpoints. The chain IDs are:
+ - Ethereum: 1
+ - Polygon: 137
+ - Base: 8453
-
-
### Configure Ponder for multiple chains
-
-
- Edit `ponder.config.ts` to configure your chains and contracts:
-
-
- ```ts ponder.config.ts
- import { createConfig } from "ponder";
- import { http } from "viem";
-
- // Import ABIs for the contracts you want to index
- import { erc20Abi } from "viem";
-
- export default createConfig({
- chains: {
- ethereum: {
- id: 1,
- rpc: http(process.env.PONDER_RPC_URL_1!),
- },
- polygon: {
- id: 137,
- rpc: http(process.env.PONDER_RPC_URL_137!),
- },
- base: {
- id: 8453,
- rpc: http(process.env.PONDER_RPC_URL_8453!),
- },
+1. Edit `ponder.config.ts` to configure your chains and contracts:
+
+ ```ts
+ import { createConfig } from "ponder";
+ import { http } from "viem";
+
+ // Import ABIs for the contracts you want to index
+ import { erc20Abi } from "viem";
+
+ export default createConfig({
+ chains: {
+ ethereum: {
+ id: 1,
+ rpc: http(process.env.PONDER_RPC_URL_1!),
},
- contracts: {
- // USDC on multiple chains
- UsdcMainnet: {
- chain: "ethereum",
- abi: erc20Abi,
- address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
- startBlock: 22842789,
- },
- UsdcPolygon: {
- chain: "polygon",
- abi: erc20Abi,
- address: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
- startBlock: 73549831,
- },
- UsdcBase: {
- chain: "base",
- abi: erc20Abi,
- address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
- startBlock: 32402921,
- },
+ polygon: {
+ id: 137,
+ rpc: http(process.env.PONDER_RPC_URL_137!),
},
- });
- ```
-
+ base: {
+ id: 8453,
+ rpc: http(process.env.PONDER_RPC_URL_8453!),
+ },
+ },
+ contracts: {
+ // USDC on multiple chains
+ UsdcMainnet: {
+ chain: "ethereum",
+ abi: erc20Abi,
+ address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
+ startBlock: 22842789,
+ },
+ UsdcPolygon: {
+ chain: "polygon",
+ abi: erc20Abi,
+ address: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
+ startBlock: 73549831,
+ },
+ UsdcBase: {
+ chain: "base",
+ abi: erc20Abi,
+ address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
+ startBlock: 32402921,
+ },
+ },
+ });
+ ```
This configuration sets up Ponder to index USDC transfers across three different chains using your Chainstack nodes.
- ### Start block optimization
+ ### Start block optimization
- Setting appropriate start blocks is crucial for performance. Choose blocks close to when your contracts were deployed or when interesting activity began.
+ Setting appropriate start blocks is crucial for performance. Choose blocks close to when your contracts were deployed or when interesting activity began.
-
-
### Define your database schema
-
-
- Edit `ponder.schema.ts` to define the data structure you want to track:
-
-
- ```ts ponder.schema.ts
- import { onchainTable } from "ponder";
-
- // Track individual token transfers
- export const transfer = onchainTable("transfer", (t) => ({
- id: t.text().primaryKey(), // tx_hash:log_index
- from: t.text().notNull(),
- to: t.text().notNull(),
- amount: t.bigint().notNull(),
- contract: t.text().notNull(),
- chain: t.text().notNull(),
- blockNumber: t.bigint().notNull(),
- timestamp: t.integer().notNull(),
- }));
-
- // Track account balances per contract
- export const balance = onchainTable("balance", (t) => ({
- id: t.text().primaryKey(), // account:contract:chain
- account: t.text().notNull(),
- contract: t.text().notNull(),
- chain: t.text().notNull(),
- balance: t.bigint().notNull(),
- lastUpdated: t.integer().notNull(),
- }));
-
- // Track holder statistics per contract
- export const tokenStats = onchainTable("token_stats", (t) => ({
- id: t.text().primaryKey(), // contract:chain
- contract: t.text().notNull(),
- chain: t.text().notNull(),
- totalHolders: t.integer().notNull().default(0),
- totalTransfers: t.bigint().notNull().default(0n),
- totalVolume: t.bigint().notNull().default(0n),
- lastUpdated: t.integer().notNull(),
- }));
- ```
-
+1. Edit `ponder.schema.ts` to define the data structure you want to track:
+
+ ```ts
+ import { onchainTable } from "ponder";
+
+ // Track individual token transfers
+ export const transfer = onchainTable("transfer", (t) => ({
+ id: t.text().primaryKey(), // tx_hash:log_index
+ from: t.text().notNull(),
+ to: t.text().notNull(),
+ amount: t.bigint().notNull(),
+ contract: t.text().notNull(),
+ chain: t.text().notNull(),
+ blockNumber: t.bigint().notNull(),
+ timestamp: t.integer().notNull(),
+ }));
+
+ // Track account balances per contract
+ export const balance = onchainTable("balance", (t) => ({
+ id: t.text().primaryKey(), // account:contract:chain
+ account: t.text().notNull(),
+ contract: t.text().notNull(),
+ chain: t.text().notNull(),
+ balance: t.bigint().notNull(),
+ lastUpdated: t.integer().notNull(),
+ }));
+
+ // Track holder statistics per contract
+ export const tokenStats = onchainTable("token_stats", (t) => ({
+ id: t.text().primaryKey(), // contract:chain
+ contract: t.text().notNull(),
+ chain: t.text().notNull(),
+ totalHolders: t.integer().notNull().default(0),
+ totalTransfers: t.bigint().notNull().default(0n),
+ totalVolume: t.bigint().notNull().default(0n),
+ lastUpdated: t.integer().notNull(),
+ }));
+ ```
This schema defines three tables:
- **transfers**: Individual transfer events
- **balances**: Current token balances per account
- **tokenStats**: Aggregate statistics per token contract
-
-
### Write indexing functions
-
-
- Create indexing functions to process Transfer events. Replace the contents of `src/index.ts`:
+1. Create indexing functions to process Transfer events. Replace the contents of `src/index.ts`:
-
- ```ts src/index.ts
- import { ponder } from "ponder:registry";
- import schema from "ponder:schema";
+ ```ts
+ import { ponder } from "ponder:registry";
+ import schema from "ponder:schema";
- // Helper function to create unique IDs
- function createTransferId(event: any) {
- return `${event.transaction.hash}:${event.log.logIndex}`;
- }
+ // Helper function to create unique IDs
+ function createTransferId(event: any) {
+ return `${event.transaction.hash}:${event.log.logIndex}`;
+ }
- function createBalanceId(account: string, contract: string, chain: string) {
- return `${account}:${contract}:${chain}`;
- }
+ function createBalanceId(account: string, contract: string, chain: string) {
+ return `${account}:${contract}:${chain}`;
+ }
- function createStatsId(contract: string, chain: string) {
- return `${contract}:${chain}`;
- }
+ function createStatsId(contract: string, chain: string) {
+ return `${contract}:${chain}`;
+ }
- // Index USDC transfers on Ethereum
- ponder.on("UsdcMainnet:Transfer", async ({ event, context }) => {
- const { from, to, value } = event.args;
- const transferId = createTransferId(event);
-
- // Insert transfer record
- await context.db.insert(schema.transfer).values({
- id: transferId,
- from,
- to,
- amount: value,
- contract: event.log.address,
- chain: "ethereum",
- blockNumber: event.block.number,
- timestamp: Number(event.block.timestamp),
- });
+ // Index USDC transfers on Ethereum
+ ponder.on("UsdcMainnet:Transfer", async ({ event, context }) => {
+ const { from, to, value } = event.args;
+ const transferId = createTransferId(event);
+
+ // Insert transfer record
+ await context.db.insert(schema.transfer).values({
+ id: transferId,
+ from,
+ to,
+ amount: value,
+ contract: event.log.address,
+ chain: "ethereum",
+ blockNumber: event.block.number,
+ timestamp: Number(event.block.timestamp),
+ });
- // Update balances for both accounts (if not mint/burn)
- const zeroAddress = "0x0000000000000000000000000000000000000000";
-
- if (from !== zeroAddress) {
- await updateBalance(context, from, event.log.address, "ethereum", -value, event.block.timestamp);
- }
-
- if (to !== zeroAddress) {
- await updateBalance(context, to, event.log.address, "ethereum", value, event.block.timestamp);
- }
+ // Update balances for both accounts (if not mint/burn)
+ const zeroAddress = "0x0000000000000000000000000000000000000000";
+
+ if (from !== zeroAddress) {
+ await updateBalance(context, from, event.log.address, "ethereum", -value, event.block.timestamp);
+ }
+
+ if (to !== zeroAddress) {
+ await updateBalance(context, to, event.log.address, "ethereum", value, event.block.timestamp);
+ }
+
+ // Update token statistics
+ await updateTokenStats(context, event.log.address, "ethereum", value, event.block.timestamp);
+ });
- // Update token statistics
- await updateTokenStats(context, event.log.address, "ethereum", value, event.block.timestamp);
+ // Index USDC transfers on Polygon
+ ponder.on("UsdcPolygon:Transfer", async ({ event, context }) => {
+ const { from, to, value } = event.args;
+ const transferId = createTransferId(event);
+
+ await context.db.insert(schema.transfer).values({
+ id: transferId,
+ from,
+ to,
+ amount: value,
+ contract: event.log.address,
+ chain: "polygon",
+ blockNumber: event.block.number,
+ timestamp: Number(event.block.timestamp),
});
- // Index USDC transfers on Polygon
- ponder.on("UsdcPolygon:Transfer", async ({ event, context }) => {
- const { from, to, value } = event.args;
- const transferId = createTransferId(event);
-
- await context.db.insert(schema.transfer).values({
- id: transferId,
- from,
- to,
- amount: value,
- contract: event.log.address,
- chain: "polygon",
- blockNumber: event.block.number,
- timestamp: Number(event.block.timestamp),
- });
+ const zeroAddress = "0x0000000000000000000000000000000000000000";
+
+ if (from !== zeroAddress) {
+ await updateBalance(context, from, event.log.address, "polygon", -value, event.block.timestamp);
+ }
+
+ if (to !== zeroAddress) {
+ await updateBalance(context, to, event.log.address, "polygon", value, event.block.timestamp);
+ }
- const zeroAddress = "0x0000000000000000000000000000000000000000";
-
- if (from !== zeroAddress) {
- await updateBalance(context, from, event.log.address, "polygon", -value, event.block.timestamp);
- }
-
- if (to !== zeroAddress) {
- await updateBalance(context, to, event.log.address, "polygon", value, event.block.timestamp);
- }
+ await updateTokenStats(context, event.log.address, "polygon", value, event.block.timestamp);
+ });
- await updateTokenStats(context, event.log.address, "polygon", value, event.block.timestamp);
+ // Index USDC transfers on Base
+ ponder.on("UsdcBase:Transfer", async ({ event, context }) => {
+ const { from, to, value } = event.args;
+ const transferId = createTransferId(event);
+
+ await context.db.insert(schema.transfer).values({
+ id: transferId,
+ from,
+ to,
+ amount: value,
+ contract: event.log.address,
+ chain: "base",
+ blockNumber: event.block.number,
+ timestamp: Number(event.block.timestamp),
});
- // Index USDC transfers on Base
- ponder.on("UsdcBase:Transfer", async ({ event, context }) => {
- const { from, to, value } = event.args;
- const transferId = createTransferId(event);
-
- await context.db.insert(schema.transfer).values({
- id: transferId,
- from,
- to,
- amount: value,
- contract: event.log.address,
- chain: "base",
- blockNumber: event.block.number,
- timestamp: Number(event.block.timestamp),
- });
-
- const zeroAddress = "0x0000000000000000000000000000000000000000";
-
- if (from !== zeroAddress) {
- await updateBalance(context, from, event.log.address, "base", -value, event.block.timestamp);
- }
-
- if (to !== zeroAddress) {
- await updateBalance(context, to, event.log.address, "base", value, event.block.timestamp);
- }
+ const zeroAddress = "0x0000000000000000000000000000000000000000";
+
+ if (from !== zeroAddress) {
+ await updateBalance(context, from, event.log.address, "base", -value, event.block.timestamp);
+ }
+
+ if (to !== zeroAddress) {
+ await updateBalance(context, to, event.log.address, "base", value, event.block.timestamp);
+ }
- await updateTokenStats(context, event.log.address, "base", value, event.block.timestamp);
+ await updateTokenStats(context, event.log.address, "base", value, event.block.timestamp);
+ });
+
+ // Helper function to update account balances
+ async function updateBalance(
+ context: any,
+ account: string,
+ contract: string,
+ chain: string,
+ change: bigint,
+ blockTimestamp: bigint
+ ) {
+ const balanceId = createBalanceId(account, contract, chain);
+
+ // Try to get existing balance
+ const existingBalance = await context.db.find(schema.balance, {
+ id: balanceId
});
- // Helper function to update account balances
- async function updateBalance(
- context: any,
- account: string,
- contract: string,
- chain: string,
- change: bigint,
- blockTimestamp: bigint
- ) {
- const balanceId = createBalanceId(account, contract, chain);
+ if (existingBalance) {
+ // Update existing balance
+ const oldBalance = existingBalance.balance;
+ const newBalance = oldBalance + change;
- // Try to get existing balance
- const existingBalance = await context.db.find(schema.balance, {
- id: balanceId
- });
-
- if (existingBalance) {
- // Update existing balance
- const oldBalance = existingBalance.balance;
- const newBalance = oldBalance + change;
-
- // Handle cases where we're processing historical data from a start block
- // and don't have the complete balance history
- if (newBalance < 0n && change < 0n) {
- // This suggests the account had a balance before our start block
- // Initialize with the absolute value of the change (minimum needed balance)
- const initializedBalance = -change;
- await context.db.update(schema.balance, {
- id: balanceId
- }).set({
- balance: initializedBalance + change, // This will equal initializedBalance - abs(change) = 0
- lastUpdated: Number(blockTimestamp),
- });
- return; // Exit early after handling this case
- } else if (newBalance < 0n) {
- throw new Error(`Balance would become negative for account ${account}. Old: ${oldBalance}, Change: ${change}`);
- }
-
+ // Handle cases where we're processing historical data from a start block
+ // and don't have the complete balance history
+ if (newBalance < 0n && change < 0n) {
+ // This suggests the account had a balance before our start block
+ // Initialize with the absolute value of the change (minimum needed balance)
+ const initializedBalance = -change;
await context.db.update(schema.balance, {
id: balanceId
}).set({
- balance: newBalance,
+ balance: initializedBalance + change, // This will equal initializedBalance - abs(change) = 0
lastUpdated: Number(blockTimestamp),
});
-
- // Update holder count based on balance changes
- if (oldBalance === 0n && newBalance > 0n) {
- // New holder (balance went from 0 to positive)
- await updateHolderCount(context, contract, chain, 1, blockTimestamp);
- } else if (oldBalance > 0n && newBalance === 0n) {
- // Holder exit (balance went from positive to 0)
- await updateHolderCount(context, contract, chain, -1, blockTimestamp);
- }
- } else {
- // Create new balance record
- if (change < 0n) {
- // Account is sending tokens but has no balance record
- // This means they had tokens before our start block
- // Initialize with the absolute value of the change, then subtract it
- const initializedBalance = -change;
- await context.db.insert(schema.balance).values({
- id: balanceId,
- account,
- contract,
- chain,
- balance: 0n, // After the transfer, balance will be 0
- lastUpdated: Number(blockTimestamp),
- });
-
- // Account just exited its position – adjust holder count
- await updateHolderCount(context, contract, chain, -1, blockTimestamp);
- } else {
- // Normal case: receiving tokens to a new account
- await context.db.insert(schema.balance).values({
- id: balanceId,
- account,
- contract,
- chain,
- balance: change,
- lastUpdated: Number(blockTimestamp),
- });
-
- // If this is a new holder with positive balance, increment holder count
- if (change > 0n) {
- await updateHolderCount(context, contract, chain, 1, blockTimestamp);
- }
- }
+ return; // Exit early after handling this case
+ } else if (newBalance < 0n) {
+ throw new Error(`Balance would become negative for account ${account}. Old: ${oldBalance}, Change: ${change}`);
}
- }
-
- // Helper function to update holder count
- async function updateHolderCount(
- context: any,
- contract: string,
- chain: string,
- change: number,
- blockTimestamp: bigint
- ) {
- const statsId = createStatsId(contract, chain);
- const existingStats = await context.db.find(schema.tokenStats, {
- id: statsId
+ await context.db.update(schema.balance, {
+ id: balanceId
+ }).set({
+ balance: newBalance,
+ lastUpdated: Number(blockTimestamp),
});
- if (existingStats) {
- await context.db.update(schema.tokenStats, {
- id: statsId
- }).set({
- totalHolders: Math.max(0, existingStats.totalHolders + change),
+ // Update holder count based on balance changes
+ if (oldBalance === 0n && newBalance > 0n) {
+ // New holder (balance went from 0 to positive)
+ await updateHolderCount(context, contract, chain, 1, blockTimestamp);
+ } else if (oldBalance > 0n && newBalance === 0n) {
+ // Holder exit (balance went from positive to 0)
+ await updateHolderCount(context, contract, chain, -1, blockTimestamp);
+ }
+ } else {
+ // Create new balance record
+ if (change < 0n) {
+ // Account is sending tokens but has no balance record
+ // This means they had tokens before our start block
+ // Initialize with the absolute value of the change, then subtract it
+ const initializedBalance = -change;
+ await context.db.insert(schema.balance).values({
+ id: balanceId,
+ account,
+ contract,
+ chain,
+ balance: 0n, // After the transfer, balance will be 0
lastUpdated: Number(blockTimestamp),
});
+
+ // Account just exited its position – adjust holder count
+ await updateHolderCount(context, contract, chain, -1, blockTimestamp);
} else {
- // Create new token stats record for the first holder event
- await context.db.insert(schema.tokenStats).values({
- id: statsId,
+ // Normal case: receiving tokens to a new account
+ await context.db.insert(schema.balance).values({
+ id: balanceId,
+ account,
contract,
chain,
- totalHolders: Math.max(0, change),
- totalTransfers: 0n,
- totalVolume: 0n,
+ balance: change,
lastUpdated: Number(blockTimestamp),
});
+
+ // If this is a new holder with positive balance, increment holder count
+ if (change > 0n) {
+ await updateHolderCount(context, contract, chain, 1, blockTimestamp);
+ }
}
}
+ }
+
+ // Helper function to update holder count
+ async function updateHolderCount(
+ context: any,
+ contract: string,
+ chain: string,
+ change: number,
+ blockTimestamp: bigint
+ ) {
+ const statsId = createStatsId(contract, chain);
+
+ const existingStats = await context.db.find(schema.tokenStats, {
+ id: statsId
+ });
- // Helper function to update token statistics
- async function updateTokenStats(
- context: any,
- contract: string,
- chain: string,
- volume: bigint,
- blockTimestamp: bigint
- ) {
- const statsId = createStatsId(contract, chain);
-
- const existingStats = await context.db.find(schema.tokenStats, {
+ if (existingStats) {
+ await context.db.update(schema.tokenStats, {
id: statsId
+ }).set({
+ totalHolders: Math.max(0, existingStats.totalHolders + change),
+ lastUpdated: Number(blockTimestamp),
+ });
+ } else {
+ // Create new token stats record for the first holder event
+ await context.db.insert(schema.tokenStats).values({
+ id: statsId,
+ contract,
+ chain,
+ totalHolders: Math.max(0, change),
+ totalTransfers: 0n,
+ totalVolume: 0n,
+ lastUpdated: Number(blockTimestamp),
});
+ }
+ }
+
+ // Helper function to update token statistics
+ async function updateTokenStats(
+ context: any,
+ contract: string,
+ chain: string,
+ volume: bigint,
+ blockTimestamp: bigint
+ ) {
+ const statsId = createStatsId(contract, chain);
+
+ const existingStats = await context.db.find(schema.tokenStats, {
+ id: statsId
+ });
- if (existingStats) {
- await context.db.update(schema.tokenStats, {
- id: statsId
- }).set({
- totalTransfers: existingStats.totalTransfers + 1n,
- totalVolume: existingStats.totalVolume + volume,
- lastUpdated: Number(blockTimestamp),
- });
- } else {
- await context.db.insert(schema.tokenStats).values({
- id: statsId,
- contract,
- chain,
- totalHolders: 0,
- totalTransfers: 1n,
- totalVolume: volume,
- lastUpdated: Number(blockTimestamp),
- });
- }
+ if (existingStats) {
+ await context.db.update(schema.tokenStats, {
+ id: statsId
+ }).set({
+ totalTransfers: existingStats.totalTransfers + 1n,
+ totalVolume: existingStats.totalVolume + volume,
+ lastUpdated: Number(blockTimestamp),
+ });
+ } else {
+ await context.db.insert(schema.tokenStats).values({
+ id: statsId,
+ contract,
+ chain,
+ totalHolders: 0,
+ totalTransfers: 1n,
+ totalVolume: volume,
+ lastUpdated: Number(blockTimestamp),
+ });
}
- ```
-
+ }
+ ```
This indexing logic:
- Records every transfer event across all three chains
@@ -517,138 +483,109 @@ You'll need the RPC endpoints for each network you joined.
- Handles historical data gaps when starting from an arbitrary block (accounts may have balances from before the start block)
- Tracks holder counts by detecting when balances go from zero to positive (new holder) or positive to zero (holder exit)
- Calculates aggregate statistics including transfer volume and holder statistics per token contract
-
-
### Start the development server
-
-
- Start the Ponder development server:
+1. Start the Ponder development server:
-
- ```shell Shell
- pnpm dev
- ```
-
+ ```bash
+ pnpm dev
+ ```
You should see output similar to:
-
- ```shell Shell
- 09:14:25.156 INFO server Started listening on port 42069
- 09:14:25.341 INFO build Hot reloaded config for update
- 09:14:25.445 INFO indexing Started indexing from blocks ethereum: 22842789, polygon: 73549831, base: 32402921
- 09:14:26.123 INFO indexing Processed 100 UsdcMainnet:Transfer events (mainnet)
- ```
-
+ ```
+ 09:14:25.156 INFO server Started listening on port 42069
+ 09:14:25.341 INFO build Hot reloaded config for update
+ 09:14:25.445 INFO indexing Started indexing from blocks ethereum: 22842789, polygon: 73549831, base: 32402921
+ 09:14:26.123 INFO indexing Processed 100 UsdcMainnet:Transfer events (mainnet)
+ ```
- ### Development features
+ ### Development features
- Ponder's development server includes:
- - Hot reloading when you change config, schema, or indexing functions
- - Real-time progress monitoring and error reporting
- - Built-in GraphQL playground at http://localhost:42069
+ Ponder's development server includes:
+ - Hot reloading when you change config, schema, or indexing functions
+ - Real-time progress monitoring and error reporting
+ - Built-in GraphQL playground at http://localhost:42069
-
-
- Open your browser to [http://localhost:42069](http://localhost:42069) to access the GraphQL playground.
-
-
+
+2. Open your browser to [http://localhost:42069](http://localhost:42069) to access the GraphQL playground.
### Query your indexed data
-
-
- In the GraphQL playground, try these example queries:
+1. In the GraphQL playground, try these example queries:
**Get recent transfers across all chains:**
-
- ```graphql GraphQL
- {
- transfers(
- limit: 10
- orderBy: "timestamp"
- orderDirection: "desc"
- ) {
- items {
- id
- from
- to
- amount
- contract
- chain
- timestamp
- }
+
+ ```graphql
+ {
+ transfers(
+ limit: 10
+ orderBy: "timestamp"
+ orderDirection: "desc"
+ ) {
+ items {
+ id
+ from
+ to
+ amount
+ contract
+ chain
+ timestamp
}
}
- ```
-
+ }
+ ```
**Get top holders for a specific token:**
-
- ```graphql GraphQL
- {
- balances(
- where: { chain: "ethereum" }
- limit: 10
- orderBy: "balance"
- orderDirection: "desc"
- ) {
- items {
- account
- balance
- contract
- chain
- lastUpdated
- }
+
+ ```graphql
+ {
+ balances(
+ where: { chain: "ethereum" }
+ limit: 10
+ orderBy: "balance"
+ orderDirection: "desc"
+ ) {
+ items {
+ account
+ balance
+ contract
+ chain
+ lastUpdated
}
}
- ```
-
-
-
+ }
+ ```
### Deploy to production
-
-
- For production deployment, you'll need a PostgreSQL database. Update your `.env.local`:
+1. For production deployment, you'll need a PostgreSQL database. Update your `.env.local`:
-
- ```sh .env.local
- # Add your production database URL
- DATABASE_URL="postgresql://user:password@localhost:5432/ponder"
-
- # Keep your Chainstack endpoints
- PONDER_RPC_URL_1="YOUR_ETHEREUM_CHAINSTACK_ENDPOINT"
- PONDER_RPC_URL_137="YOUR_POLYGON_CHAINSTACK_ENDPOINT"
- PONDER_RPC_URL_8453="YOUR_BASE_CHAINSTACK_ENDPOINT"
- ```
-
-
-
- Build your Ponder application:
-
-
- ```shell Shell
- pnpm build
- ```
-
-
-
- Start the production server:
-
-
- ```shell Shell
- pnpm start
- ```
-
+ ```sh
+ # Add your production database URL
+ DATABASE_URL="postgresql://user:password@localhost:5432/ponder"
+
+ # Keep your Chainstack endpoints
+ PONDER_RPC_URL_1="YOUR_ETHEREUM_CHAINSTACK_ENDPOINT"
+ PONDER_RPC_URL_137="YOUR_POLYGON_CHAINSTACK_ENDPOINT"
+ PONDER_RPC_URL_8453="YOUR_BASE_CHAINSTACK_ENDPOINT"
+ ```
+
+2. Build your Ponder application:
+
+ ```bash
+ pnpm build
+ ```
+
+3. Start the production server:
+
+ ```bash
+ pnpm start
+ ```
Your Ponder application will be available at the configured port with a production-ready GraphQL API.
-
-
## Conclusion
diff --git a/docs/ronin-tooling.mdx b/docs/ronin-tooling.mdx
index 7fdd03b5..e699aa80 100644
--- a/docs/ronin-tooling.mdx
+++ b/docs/ronin-tooling.mdx
@@ -6,14 +6,8 @@ title: "Ronin tooling"
Build DApps using [web3.js](https://github.com/web3/web3.js) and Ronin nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -51,14 +45,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Ronin nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -122,14 +110,8 @@ See also [WebSocket connection to an EVM node](https://support.chainstack.com/hc
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Ronin nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
diff --git a/docs/ronin-tutorial-making-a-game-contract.mdx b/docs/ronin-tutorial-making-a-game-contract.mdx
index 68576fbc..c12c6066 100644
--- a/docs/ronin-tutorial-making-a-game-contract.mdx
+++ b/docs/ronin-tutorial-making-a-game-contract.mdx
@@ -50,20 +50,10 @@ The game itself is designed to be played on the client side, typically within a
To get from zero to a working game, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the Ronin Saigon Testnet.
-
-
- With Chainstack, access your Ronin node endpoint.
-
-
- With Hardhat, create and set up the project.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join the Ronin Saigon Testnet.
+3. With Chainstack, access your Ronin node endpoint.
+4. With Hardhat, create and set up the project.
## Step-by-step
### Create a public chain project
diff --git a/docs/scroll-tooling.mdx b/docs/scroll-tooling.mdx
index d46668bb..d6a518b8 100644
--- a/docs/scroll-tooling.mdx
+++ b/docs/scroll-tooling.mdx
@@ -6,25 +6,17 @@ title: "Scroll tooling"
Interact with your Scroll node using [Geth](https://geth.ethereum.org/docs/getting-started).
-
-
- Install [Geth](https://github.com/ethereum/go-ethereum).
-
-
- Use `geth attach` command with the node endpoint.
-
-
- ```shell Shell
- geth attach YOUR_CHAINSTACK_ENDPOINT
- ```
-
+1. Install [Geth](https://github.com/ethereum/go-ethereum).
+
+2. Use `geth attach` command with the node endpoint:
+
+ ```bash
+ geth attach YOUR_CHAINSTACK_ENDPOINT
+ ```
where YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
- Invoke any methods from [Web3 JavaScript API](https://web3js.readthedocs.io/).
-
-
+
+3. Invoke any methods from [Web3 JavaScript API](https://web3js.readthedocs.io/).
Example below demonstrates how to get the balance of an address in wei value and convert it to ether value:
@@ -42,17 +34,9 @@ You can use GraphQL on a dedicated node on the [paid plans](https://chainstack.c
You can query data using the graphical interface.
-
-
- On Chainstack, navigate to your dedicated Scroll node. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
- Hover over **GraphQL IDE URL** and click **Open**.
-
-
- In the graphical interface that opens, run a GraphQL query.
-
-
+1. On Chainstack, navigate to your dedicated Scroll node. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+2. Hover over **GraphQL IDE URL** and click **Open**.
+3. In the graphical interface that opens, run a GraphQL query.
Example to get the latest block number:
@@ -103,38 +87,30 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Scroll nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- chainstack: {
- url: "YOUR_CHAINSTACK_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+
+2. Create a new environment in `hardhat.config.js`:
+
+ ```javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ chainstack: {
+ url: "YOUR_CHAINSTACK_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
where
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
@@ -142,14 +118,8 @@ See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstac
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
@@ -159,14 +129,8 @@ For a detailed tutorial with Remix IDE, see [Trust fund account with Remix](/doc
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and Scroll nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+2. Connect over HTTP or WebSocket.
### HTTP
@@ -204,14 +168,8 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Scroll nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -348,14 +306,8 @@ See also [the full code on GitHub](https://github.com/chainstack/web3j-getLatest
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Scroll nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -421,18 +373,13 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## Brownie
-
-
- Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
-
-
- Use the `brownie networks add` command with the node endpoint. For example, Scroll mainnet:
+1. Install [Brownie](https://eth-brownie.readthedocs.io/en/stable/install.html).
+
+2. Use the `brownie networks add` command with the node endpoint. For example, Scroll mainnet:
-
- ```shell Shell
- brownie networks add Scroll ID name="NETWORK_NAME" host= YOUR_CHAINSTACK_ENDPOINT chainid=NETWORK_ID
- ```
-
+ ```bash
+ brownie networks add Scroll ID name="NETWORK_NAME" host=YOUR_CHAINSTACK_ENDPOINT chainid=NETWORK_ID
+ ```
where
@@ -441,8 +388,6 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password
* NETWORK\_ID — Scroll network ID:
* Testnet: `534351`
-
-
Example to run the deployment script:
@@ -454,14 +399,8 @@ Example to run the deployment script:
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/scroll-tutorial-deploy-the-uniswap-v3-smart-contracts-on-scroll.mdx b/docs/scroll-tutorial-deploy-the-uniswap-v3-smart-contracts-on-scroll.mdx
index 77b73652..ba963f25 100644
--- a/docs/scroll-tutorial-deploy-the-uniswap-v3-smart-contracts-on-scroll.mdx
+++ b/docs/scroll-tutorial-deploy-the-uniswap-v3-smart-contracts-on-scroll.mdx
@@ -35,23 +35,11 @@ As a result of its hierarchical ZKP system, Scroll is able to achieve much faste
This tutorial shows you how to deploy the Uniswap V3 smart contracts on the Scroll Sepolia Testnet. To get from zero to a deployed instance of Uniswap V3, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the Scroll Sepolia Testnet.
-
-
- With Chainstack, access your Scroll Sepolia node endpoint.
-
-
- Fund your account through the Chainstack Faucet.
-
-
- Deploy the Uniswap v3 suite.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, join the Scroll Sepolia Testnet.
+3. With Chainstack, access your Scroll Sepolia node endpoint.
+4. Fund your account through the Chainstack Faucet.
+5. Deploy the Uniswap v3 suite.
## Step-by-step
@@ -90,44 +78,29 @@ Uniswap is one of the most popular decentralized finance (DeFi) solutions in the
#### Set up the CLI
-
-
- Clone the repository:
-
-
- ```shell Shell
- git clone https://github.com/Uniswap/deploy-v3.git
- ```
-
-
-
- Make sure you install TypeScript V4.2.3:
-
-
- ```shell Shell
- yarn add typescript@4.2.3 --dev
- ```
-
-
-
- Move into the repository's directory:
-
-
- ```shell Shell
- cd deploy-v3
- ```
-
-
-
- Install the dependencies and build:
-
-
- ```shell Shell
- yarn && yarn build
- ```
-
-
-
+1. Clone the repository:
+
+ ```bash
+ git clone https://github.com/Uniswap/deploy-v3.git
+ ```
+
+2. Make sure you install TypeScript V4.2.3:
+
+ ```bash
+ yarn add typescript@4.2.3 --dev
+ ```
+
+3. Move into the repository's directory:
+
+ ```bash
+ cd deploy-v3
+ ```
+
+4. Install the dependencies and build:
+
+ ```bash
+ yarn && yarn build
+ ```
The console should have a similar output:
diff --git a/docs/solana-estimate-priority-fees-getrecentprioritizationfees.mdx b/docs/solana-estimate-priority-fees-getrecentprioritizationfees.mdx
index 38f7a486..db7f9976 100644
--- a/docs/solana-estimate-priority-fees-getrecentprioritizationfees.mdx
+++ b/docs/solana-estimate-priority-fees-getrecentprioritizationfees.mdx
@@ -26,17 +26,9 @@ This system effectively allows users to bid for transaction processing priority,
Before getting started, deploy a Solana node on Chainstack so you are ready to play with the code and examples. This will provide direct blockchain access, which is essential for effectively exploring features like the getRecentPrioritizationFees method.
-
-
- [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
-
-
- [Deploy a node](/docs/manage-your-networks#join-a-public-network).
-
-
- [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
+2. [Deploy a node](/docs/manage-your-networks#join-a-public-network).
+3. [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
## Understand the \`getRecentPrioritizationFees method
The `getRecentPrioritizationFees` method offers real-time insights into the network's current trends of prioritization fees. These fees are calculated per compute unit and are paid by transactions seeking to secure a higher priority in the block processing queue. By leveraging these prioritization fees, transactions can gain precedence over others in the same block, thus ensuring quicker inclusion and execution on the blockchain.
@@ -203,8 +195,8 @@ This tutorial will use sensitive information such as private keys and RPC node U
Follow these steps to set up your environment variables:
-1. **Create a `.env` file**: In the root directory of your project, create a new file called `.env`. This file will store your environment variables.
-2. **Add your environment variables**: Open the `.env` file and add the following variables, replacing the placeholders with your actual values:
+1. Create a `.env` file: In the root directory of your project, create a new file called `.env`. This file will store your environment variables.
+2. Add your environment variables: Open the `.env` file and add the following variables, replacing the placeholders with your actual values:
```
SOLANA_RPC="YOUR_HTTPS_CHAINSTACK_URL"
diff --git a/docs/solana-getaccountinfo-getmultipleaccounts.mdx b/docs/solana-getaccountinfo-getmultipleaccounts.mdx
index 14326e95..bf63f7d3 100644
--- a/docs/solana-getaccountinfo-getmultipleaccounts.mdx
+++ b/docs/solana-getaccountinfo-getmultipleaccounts.mdx
@@ -21,17 +21,9 @@ Understanding these two methods' nuanced differences and optimal applications is
## Get a Solana RPC endpoint
Before getting started, it's essential to have access to a Solana node. Chainstack offers a convenient and efficient way to deploy and manage Solana nodes. Follow these detailed steps to sign up on Chainstack, deploy your node, and access your endpoint credentials:
-
-
- [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
-
-
- [Deploy a node](/docs/manage-your-networks#join-a-public-network).
-
-
- [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
+2. [Deploy a node](/docs/manage-your-networks#join-a-public-network).
+3. [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
## Using `getAccountInfo`
@@ -257,10 +249,10 @@ Ensure you have Node.js installed for JavaScript and Python 3 for Python; you wi
In the dynamic environment of blockchain technology, particularly on the Solana network, efficiently managing data retrieval is crucial. The `getMultipleAccounts` method offers significant advantages over the traditional `getAccountInfo` method, especially in scenarios requiring bulk data processing.
-1. **Reduced Network Overhead**: By allowing the retrieval of information from multiple accounts in a single network request, `getMultipleAccounts` substantially reduces the network overhead. This is particularly advantageous in decentralized applications (DApps) where frequent data synchronization is essential, such as real-time asset tracking systems or decentralized finance (DeFi) platforms.
-2. **Optimized Batch Processing**: Developers managing applications that require concurrent monitoring or updating of numerous accounts find `getMultipleAccounts` invaluable. For instance, fetching the states of multiple player accounts at once for leaderboard updates in a blockchain-based gaming platform becomes far more efficient.
-3. **Enhanced Scalability**: As applications grow to handle hundreds or thousands of accounts, `getMultipleAccounts` facilitates scalability. This is evident in large-scale wallet services or exchange platforms, where bulk account data retrieval is routine.
-4. **Improved Developer Experience**: This method simplifies implementing code that interacts with multiple accounts, streamlining the development process. This benefit shines in complex applications like analytics tools or portfolio trackers, where developers must regularly aggregate and process data from many accounts.
+1. Reduced Network Overhead: By allowing the retrieval of information from multiple accounts in a single network request, `getMultipleAccounts` substantially reduces the network overhead. This is particularly advantageous in decentralized applications (DApps) where frequent data synchronization is essential, such as real-time asset tracking systems or decentralized finance (DeFi) platforms.
+2. Optimized Batch Processing: Developers managing applications that require concurrent monitoring or updating of numerous accounts find `getMultipleAccounts` invaluable. For instance, fetching the states of multiple player accounts at once for leaderboard updates in a blockchain-based gaming platform becomes far more efficient.
+3. Enhanced Scalability: As applications grow to handle hundreds or thousands of accounts, `getMultipleAccounts` facilitates scalability. This is evident in large-scale wallet services or exchange platforms, where bulk account data retrieval is routine.
+4. Improved Developer Experience: This method simplifies implementing code that interacts with multiple accounts, streamlining the development process. This benefit shines in complex applications like analytics tools or portfolio trackers, where developers must regularly aggregate and process data from many accounts.
## Conclusion
diff --git a/docs/solana-gettokenlargestaccounts-rpc-method.mdx b/docs/solana-gettokenlargestaccounts-rpc-method.mdx
index 6fd76600..7e259f44 100644
--- a/docs/solana-gettokenlargestaccounts-rpc-method.mdx
+++ b/docs/solana-gettokenlargestaccounts-rpc-method.mdx
@@ -20,17 +20,9 @@ This guide is designed to walk you through the essentials of the `getTokenLarges
Before diving into the practical applications of the `getTokenLargestAccounts` method, you must ensure access to a Solana node. Chainstack provides a seamless and effective platform to deploy and manage Solana nodes. Here's how you get started:
-
-
- [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
-
-
- [Deploy a node](/docs/manage-your-networks#join-a-public-network).
-
-
- [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
+2. [Deploy a node](/docs/manage-your-networks#join-a-public-network).
+3. [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
## `getTokenLargestAccounts` RPC method
@@ -132,7 +124,7 @@ Before proceeding, ensure you have Node.js installed for JavaScript development
### JavaScript setup and usage
-1. **Install the Solana Web3.js library**:
+1. Install the Solana Web3.js library:
Interacting with the Solana blockchain requires the Solana Web3.js library. Install it using `npm`:
@@ -142,7 +134,7 @@ Before proceeding, ensure you have Node.js installed for JavaScript development
```
-2. **JavaScript example**:
+2. JavaScript example:
```javascript Javascript
@@ -164,7 +156,7 @@ Before proceeding, ensure you have Node.js installed for JavaScript development
### Python setup and usage
-1. **Install the Solana.py library**:
+1. Install the Solana.py library:
To interact with Solana's JSON RPC API in Python, install the necessary library using `pip`:
@@ -178,7 +170,7 @@ Before proceeding, ensure you have Node.js installed for JavaScript development
```
-1. **Python example**:
+2. Python example:
```python Python
@@ -230,13 +222,13 @@ This project aims to visually represent the token balances held by the top 20 la
The provided Python script is structured into several key functions, each designed to fulfill a specific role in the process of data fetching and visualization:
-1. **Configuration**:
+1. Configuration:
* Sets up the Solana RPC endpoint and the public key of the SPL Token, whose largest accounts we wish to analyze. This project uses the Raydium token as an example.
-2. **`fetch_largest_accounts` function**:
+2. `fetch_largest_accounts` function:
* This function communicates with the Solana blockchain via the `get_token_largest_accounts` method of the Solana Python client. It retrieves data on the 20 largest accounts holding the specified SPL Token, focusing on the finalized state for reliability.
-3. **`plot_token_balances` function**:
+3. `plot_token_balances` function:
* Utilizes the `matplotlib` library to plot the token balances of the largest accounts. It creates a bar chart where each bar represents the token balance of an account, providing a visual comparison across the top holders. Account addresses are used as labels on the x-axis, with their corresponding token balances displayed on the y-axis. The y-axis labels are formatted for readability, showing large numbers in a concise format.
-4. **`main` function**:
+4. `main` function:
* Orchestrates the process by initializing the Solana client with the specified RPC endpoint, converting the token mint public key string into a usable object, and then calling the `fetch_largest_accounts` function. It extracts the necessary information from the response (addresses and UI amounts) and passes it to the `plot_token_balances` function for visualization.
### Script code
diff --git a/docs/solana-how-to-perform-token-swaps-using-the-raydium-sdk.mdx b/docs/solana-how-to-perform-token-swaps-using-the-raydium-sdk.mdx
index b2eb6a54..b86c94ad 100644
--- a/docs/solana-how-to-perform-token-swaps-using-the-raydium-sdk.mdx
+++ b/docs/solana-how-to-perform-token-swaps-using-the-raydium-sdk.mdx
@@ -77,12 +77,9 @@ The heart of this project lies within the `src` directory, which holds all the e
To set up your environment variables, you'll need to create a `.env` file at the root of your project. This file should include your Solana RPC URL and your wallet's private key. These variables are essential for connecting to the Solana network and executing transactions. Follow these steps:
-
-
- Create a new file named `.env` in the root directory of the project.
-
-
- Open the `.env` file in a text editor and add the following lines, replacing `YOUR_CHAINSTACK_SOLANA_NODE` and `YOUR_PRIVATE_KEY` with your actual Solana RPC URL and wallet's private key:
+1. Create a new file named `.env` in the root directory of the project.
+
+2. Open the `.env` file in a text editor and add the following lines, replacing `YOUR_CHAINSTACK_SOLANA_NODE` and `YOUR_PRIVATE_KEY` with your actual Solana RPC URL and wallet's private key:
```shell Shell
@@ -90,8 +87,6 @@ To set up your environment variables, you'll need to create a `.env` file at the
WALLET_PRIVATE_KEY=YOUR_PRIVATE_KEY
```
-
-
Alternatively, the project has a `.env.example` file, which you can rename to `.env` , and update with your details accordingly.
### Trim Raydium's mainnet.json
diff --git a/docs/solana-how-to-use-multiple-rpc-endpoints-optimize-dapp-performance.mdx b/docs/solana-how-to-use-multiple-rpc-endpoints-optimize-dapp-performance.mdx
index 607604b7..1aba16c3 100644
--- a/docs/solana-how-to-use-multiple-rpc-endpoints-optimize-dapp-performance.mdx
+++ b/docs/solana-how-to-use-multiple-rpc-endpoints-optimize-dapp-performance.mdx
@@ -47,17 +47,9 @@ To interact with the Solana blockchain and execute the scripts you'll write, cer
Note that you need to be on a [paid plan](https://chainstack.com/pricing/) to deploy multiple nodes.
-
-
- [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
-
-
- [Deploy a node](/docs/manage-your-networks#join-a-public-network).
-
-
- [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).
+2. [Deploy a node](/docs/manage-your-networks#join-a-public-network).
+3. [View node access and credentials](/docs/manage-your-node#view-node-access-and-credentials).
### Installing required packages
@@ -86,8 +78,8 @@ Then add this line to your `package.json` file:
We'll use environment variables to manage our RPC endpoints and other sensitive information. This method keeps our credentials secure and makes our application easily configurable without hardcoding sensitive data:
-1. **Create a `.env` file** in the root of your project directory.
-2. **Add your Solana RPC URLs and sensitive information** to the `.env` file. For instance:
+1. Create a `.env` file in the root of your project directory.
+2. Add your Solana RPC URLs and sensitive information to the `.env` file. For instance:
```
# HTTPS endpoints
diff --git a/docs/solana-listening-to-pumpfun-token-mint-using-geyser.mdx b/docs/solana-listening-to-pumpfun-token-mint-using-geyser.mdx
index cd5f6749..bf210837 100644
--- a/docs/solana-listening-to-pumpfun-token-mint-using-geyser.mdx
+++ b/docs/solana-listening-to-pumpfun-token-mint-using-geyser.mdx
@@ -15,20 +15,10 @@ The listener in this repo subscribes to successful transactions that include the
### How the pump.fun bot uses Geyser
-
-
- **Subscription** — a single `SubscribeRequest` is sent with a transaction filter that contains the pump.fun program ID, commitment level, transaction status.
-
-
- **Parsing** — every incoming `SubscribeUpdate.transaction` is checked for the 8‑byte discriminator of the Create instruction.
-
-
- **TokenInfo emission** — when found, `GeyserEventProcessor` constructs a `TokenInfo` dataclass (name, symbol, mint, curves, user) and hands it to the existing buyer / seller pipeline.
-
-
- **Trading flow** — buy, hold, sell, and optional account cleanup happen exactly as with the WebSocket listeners. No other files need modification.
-
-
+1. Subscription — a single `SubscribeRequest` is sent with a transaction filter that contains the pump.fun program ID, commitment level, transaction status.
+2. Parsing — every incoming `SubscribeUpdate.transaction` is checked for the 8‑byte discriminator of the Create instruction.
+3. TokenInfo emission — when found, `GeyserEventProcessor` constructs a `TokenInfo` dataclass (name, symbol, mint, curves, user) and hands it to the existing buyer / seller pipeline.
+4. Trading flow — buy, hold, sell, and optional account cleanup happen exactly as with the WebSocket listeners. No other files need modification.
The only operational difference is that tokens enter the queue earlier, giving the bot a cheaper entry price.
diff --git a/docs/solana-tooling.mdx b/docs/solana-tooling.mdx
index bdbaa3e3..567d1020 100644
--- a/docs/solana-tooling.mdx
+++ b/docs/solana-tooling.mdx
@@ -3,34 +3,24 @@ title: "Solana tooling"
---
## Solana tool suite
-
-
- Install the Solana tool suite. See [Install the Solana Tool Suite](https://docs.solana.com/cli/install-solana-cli-tools).
-
-
- Connect the Solana tool suite to the Chainstack-deployed Solana node:
-
-
- ```shell Shell
- solana config set --url YOUR_CHAINSTACK_ENDPOINT
- ```
-
-
- where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
- Run the Solana [client commands](https://docs.solana.com/cli).
+1. Install the Solana tool suite. See [Install the Solana Tool Suite](https://docs.solana.com/cli/install-solana-cli-tools).
+
+2. Connect the Solana tool suite to the Chainstack-deployed Solana node:
+
+ ```shell
+ solana config set --url YOUR_CHAINSTACK_ENDPOINT
+ ```
+
+ where YOUR_CHAINSTACK_ENDPOINT is your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+
+3. Run the Solana [client commands](https://docs.solana.com/cli).
Example to get the block height:
-
- ```shell Shell
- $ solana block-height
- 106318062
- ```
-
-
-
+ ```shell
+ $ solana block-height
+ 106318062
+ ```
### WebSocket endpoint
@@ -66,50 +56,37 @@ Example to get account balance:
where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
## Solana web3.js
-
-
- Install Solana web3.js. See [Solana web3.js guide](https://docs.solana.com/developing/clients/javascript-api).
-
-
- Use `Connection` to connect to your Solana node and get account balance:
-
-
- ```javascript Javascript
- const web3 = require("@solana/web3.js");
- (async () => {
- const publicKey = new web3.PublicKey(
- '23dQfKhhsZ9RA5AAn12KGk21MB784PmTB3gfKRwdBNHr'
- );
- const connect = new web3.Connection('YOUR_CHAINSTACK_ENDPOINT');
- console.log(await connect.getBalance(publicKey));
- })();
- ```
-
-
- where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+
+1. Install Solana web3.js. See [Solana web3.js guide](https://docs.solana.com/developing/clients/javascript-api).
+
+2. Use `Connection` to connect to your Solana node and get account balance:
+
+ ```javascript
+ const web3 = require("@solana/web3.js");
+ (async () => {
+ const publicKey = new web3.PublicKey(
+ '23dQfKhhsZ9RA5AAn12KGk21MB784PmTB3gfKRwdBNHr'
+ );
+ const connect = new web3.Connection('YOUR_CHAINSTACK_ENDPOINT');
+ console.log(await connect.getBalance(publicKey));
+ })();
+ ```
+
+ where YOUR_CHAINSTACK_ENDPOINT is your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
## Solana.py
-
-
- Install [Solana.py](https://github.com/michaelhly/solana-py).
-
-
- Use `Client` to connect to your Solana node and get account balance:
-
-
- ```python Python
- from solana.rpc.api import Client
- from solana.publickey import PublicKey
- client = Client('YOUR_CHAINSTACK_ENDPOINT')
- print(client.get_balance(PublicKey('23dQfKhhsZ9RA5AAn12KGk21MB784PmTB3gfKRwdBNHr')))
- ```
-
-
- where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+1. Install [Solana.py](https://github.com/michaelhly/solana-py).
+
+2. Use `Client` to connect to your Solana node and get account balance:
+
+ ```python
+ from solana.rpc.api import Client
+ from solana.publickey import PublicKey
+ client = Client('YOUR_CHAINSTACK_ENDPOINT')
+ print(client.get_balance(PublicKey('23dQfKhhsZ9RA5AAn12KGk21MB784PmTB3gfKRwdBNHr')))
+ ```
+
+ where YOUR_CHAINSTACK_ENDPOINT is your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
## Backpack wallet
[Backpack](https://backpack.app/) is one of the few (if not the only) Solana wallets allowing to add a custom RPC node endpoint.
@@ -118,19 +95,9 @@ You should use your own Solana RPC node for enterprise-grade reliability, not to
To add your own Solana RPC node endpoint to your Backpack wallet:
-
-
- Open your Backpack wallet.
-
-
- Click the account icon > **Settings**.
-
-
- Click **Solana** > **RPC connection** > **Custom**.
-
-
- Enter your Chainstack Solana node endpoint and hit **Update**.
-
-
+1. Open your Backpack wallet.
+2. Click the account icon > **Settings**.
+3. Click **Solana** > **RPC connection** > **Custom**.
+4. Enter your Chainstack Solana node endpoint and hit **Update**.
Congrats, now you are safe with reliable network access.
diff --git a/docs/sonic-tooling.mdx b/docs/sonic-tooling.mdx
index c22ac78c..dbf5b844 100644
--- a/docs/sonic-tooling.mdx
+++ b/docs/sonic-tooling.mdx
@@ -9,14 +9,9 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Sonic nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+
+1. Install [web3.py](https://web3py.readthedocs.io/).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -47,14 +42,9 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Sonic nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -88,65 +78,46 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Sonic nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- chainstack: {
- url: "YOUR_CHAINSTACK_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+
+2. Create a new environment in `hardhat.config.js`:
+
+ ```javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ chainstack: {
+ url: "YOUR_CHAINSTACK_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
where
- * YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
- * YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+ * YOUR_CHAINSTACK_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+ * YOUR_PRIVATE_KEY — the private key of the account that you use to deploy the contract
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/starknet-tooling.mdx b/docs/starknet-tooling.mdx
index a5b624dd..bba9fa35 100644
--- a/docs/starknet-tooling.mdx
+++ b/docs/starknet-tooling.mdx
@@ -25,72 +25,50 @@ where
## Starknet.js
-
-
- Install Starknet.js. See [Starknet.js guide](https://www.starknetjs.com).
-
-
- Use `RpcProvider` to connect to your Starknet node and get the latest block:
-
-
- ```javascript Javascript
- import { RpcProvider } from 'starknet';
- const provider = new RpcProvider({
- nodeUrl: 'YOUR_CHAINSTACK_ENDPOINT',
- })
- provider.getBlockNumber().then(console.log);
- ```
-
-
- where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+1. Install Starknet.js. See [Starknet.js guide](https://www.starknetjs.com).
-## Starknet.py
+2. Use `RpcProvider` to connect to your Starknet node and get the latest block:
+
+ ```javascript
+ import { RpcProvider } from 'starknet';
+ const provider = new RpcProvider({
+ nodeUrl: 'YOUR_CHAINSTACK_ENDPOINT',
+ })
+ provider.getBlockNumber().then(console.log);
+ ```
-
-
- Install Starknet.py. See [Starknet.py guide](https://Starknetpy.readthedocs.io/en/latest/installation.html).
-
-
- Use `FullNodeClient` to connect to your Starknet node and retrieve a transaction by hash:
+ where YOUR_CHAINSTACK_ENDPOINT is your node HTTPS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
- ```python Python
- from starknet_py.net.full_node_client import FullNodeClient
+## Starknet.py
- from starknet_py.net.networks import MAINNET
+1. Install Starknet.py. See [Starknet.py guide](https://Starknetpy.readthedocs.io/en/latest/installation.html).
- node_url = "YOUR_CHAINSTACK_ENDPOINT"
- full_node_client = FullNodeClient(node_url=node_url, net=MAINNET)
+2. Use `FullNodeClient` to connect to your Starknet node and retrieve a transaction by hash:
- call_result = full_node_client.get_transaction_sync(tx_hash="0x50c1941ab13ccc5d9785ceda1d0d7a47be01865eecb795a62f4e589ddca0258")
+ ```python
+ from starknet_py.net.full_node_client import FullNodeClient
+ from starknet_py.net.networks import MAINNET
- print(call_result)
- ```
-
+ node_url = "YOUR_CHAINSTACK_ENDPOINT"
+ full_node_client = FullNodeClient(node_url=node_url, net=MAINNET)
+ call_result = full_node_client.get_transaction_sync(tx_hash="0x50c1941ab13ccc5d9785ceda1d0d7a47be01865eecb795a62f4e589ddca0258")
+ print(call_result)
+ ```
- where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+ where YOUR_CHAINSTACK_ENDPOINT is your node HTTPS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
## Starkli
Rust-based CLI tool to interact with the Starknet blockchain.
-
-
- Install Starkli. See [Starkli Book](https://book.starkli.rs/installation).
-
-
- In a terminal run commands with the `--rpc` flag:
+1. Install Starkli. See [Starkli Book](https://book.starkli.rs/installation).
+
+2. In a terminal run commands with the `--rpc` flag:
```bash
starkli block-number --rpc YOUR_CHAINSTACK_ENDPOINT
```
- where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+ where YOUR_CHAINSTACK_ENDPOINT is your node HTTPS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
Find more JSON-RPC methods on the [Starkli](https://book.starkli.rs/providers) documentation.
diff --git a/docs/starknet-tutorial-an-nft-contract-with-nile-and-l1-l2-reputation-messaging.mdx b/docs/starknet-tutorial-an-nft-contract-with-nile-and-l1-l2-reputation-messaging.mdx
index 334e210d..bfc20442 100644
--- a/docs/starknet-tutorial-an-nft-contract-with-nile-and-l1-l2-reputation-messaging.mdx
+++ b/docs/starknet-tutorial-an-nft-contract-with-nile-and-l1-l2-reputation-messaging.mdx
@@ -30,44 +30,18 @@ For the tutorial, you will implement an NFT contract with a simple reputation po
To get from zero to a deployed NFT contract with a reputation system on L2 and its counterpart on L1, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, deploy an Ethereum Sepolia testnet node.
-
-
- With Chainstack, deploy a Starknet testnet node.
-
-
- With Chainstack, access your Ethereum Sepolia testnet node credentials and your Starknet testnet node credentials.
-
-
- Set up your MetaMask with the Ethereum Sepolia testnet node.
-
-
- Deploy the L1 contract on the Ethereum Sepolia testnet and verify the contract.
-
-
- With the Starknet CLI, deploy an account on the Starknet testnet.
-
-
- With Nile, deploy the L2 NFT contract on the Starknet network.
-
-
- Mint an NFT on L2.
-
-
- Increase and decrease the reputation of the minted NFT on L2.
-
-
- On L1, withdraw the reputation points of the minted L2 NFT.
-
-
- On L1, increase the reputation of the minted L2 NFT.
-
-
+1. With Chainstack, create a public chain project.
+2. With Chainstack, deploy an Ethereum Sepolia testnet node.
+3. With Chainstack, deploy a Starknet testnet node.
+4. With Chainstack, access your Ethereum Sepolia testnet node credentials and your Starknet testnet node credentials.
+5. Set up your MetaMask with the Ethereum Sepolia testnet node.
+6. Deploy the L1 contract on the Ethereum Sepolia testnet and verify the contract.
+7. With the Starknet CLI, deploy an account on the Starknet testnet.
+8. With Nile, deploy the L2 NFT contract on the Starknet network.
+9. Mint an NFT on L2.
+10. Increase and decrease the reputation of the minted NFT on L2.
+11. On L1, withdraw the reputation points of the minted L2 NFT.
+12. On L1, increase the reputation of the minted L2 NFT.
## Step-by-step
### Create a public chain project
@@ -516,24 +490,13 @@ The Starknet network will receive the L1 -> L2 message after a few block confirm
First, consume the message on L1:
-
-
- Use [Etherscan](https://goerli.etherscan.io/) to open your contract.
-
-
- Click **Write Contract** > **Connect to Web3**.
-
-
- In `withdrawToIdle`, provide:
-
+1. Use [Etherscan](https://goerli.etherscan.io/) to open your contract.
+2. Click **Write Contract** > **Connect to Web3**.
+3. In `withdrawToIdle`, provide:
* `l2ContractAddress` — the address of your NFT contract deployed on L2
* `nftId` — the ID of the minted NFT. For this tutorial, it is `1`.
* `points` — the number of reputation points you removed from the NFT contract on L2. For this tutorial, it is `700`.
-
-
- Click **Write**.
-
-
+4. Click **Write**.
This will withdraw the reputation points to the idle state—not assigned to the NFT on L2. This constitutes consuming the L2 message on L1.
@@ -542,24 +505,13 @@ Now send the L1 -> L2 message—for this tutorial, it is putting the idle reputa
First, check the current reputation points of the NFT on L2 by calling `get_rep` on the L2 contract. If you are following the example numbers in this tutorial, you should get the reputation of `800` for `nftId`: `1` on L2.
Now up the reputation by `300` points by sending a message from L1 to L2:
-
-
- Use [Etherscan](https://goerli.etherscan.io/) to open your contract.
-
-
- Click **Write Contract** > **Connect to Web3**.
-
-
- In `repUp`, provide:
-
+1. Use [Etherscan](https://goerli.etherscan.io/) to open your contract.
+2. Click **Write Contract** > **Connect to Web3**.
+3. In `repUp`, provide:
* `l2ContractAddress` — the address of your NFT contract deployed on L2
* `nftId` — the ID of the minted NFT. For this tutorial, it is `1`.
* `points` — the number of reputation points you want to put back in the NFT reputation on the L2 contract. For this tutorial, it is `300`.
-
-
- Click **Write**.
-
-
+4. Click **Write**.
After a few blocks on L1, call `get_rep` on the L2 contract. You should get the reputation of `1100` for `nftId`: `1` on L2.
diff --git a/docs/subgraphs-how-to-query-uniswap-v2-subgraph.mdx b/docs/subgraphs-how-to-query-uniswap-v2-subgraph.mdx
index 259857f7..38f10fbc 100644
--- a/docs/subgraphs-how-to-query-uniswap-v2-subgraph.mdx
+++ b/docs/subgraphs-how-to-query-uniswap-v2-subgraph.mdx
@@ -70,56 +70,39 @@ We will write a Python function to query the subgraph. GraphQL queries are store
### Prerequisites
-
-
- Log in to your [Chainstack account](https://console.chainstack.com/) and add an elastic Uniswap V2 subgraph in the Ethereum Mainnet.
-
-
-
- Open your terminal (Command Prompt for Windows or Terminal for macOS/Linux) and run the following command to clone the GitHub repository to your current directory.
-
-
- ```bash Bash
- git clone https://github.com/chainstacklabs/uniswap-v2-subgraph-queries .
- ```
-
-
-
-
- Set up your Python virtual environment.
-
-
- ```bash macOS/Linux
- python3 -m venv venv
- source venv/bin/activate
- ```
-
- ```Text Windows
- python -m venv venv
- venv\Scripts\activate
- ```
-
-
-
-
- With the virtual environment activated, run the following command to install the required dependencies.
-
-
- ```bash Bash
- pip install -r requirements.txt
- ```
-
-
-
- Create the environment variable file (.env) and paste your Chainstack endpoint URL there.
-
-
- ```python Python
- SUBGRAPH_URL=
- ```
-
-
-
+1. Log in to your [Chainstack account](https://console.chainstack.com/) and add an elastic Uniswap V2 subgraph in the Ethereum Mainnet.
+
+2. Open your terminal (Command Prompt for Windows or Terminal for macOS/Linux) and run the following command to clone the GitHub repository to your current directory.
+
+ ```bash
+ git clone https://github.com/chainstacklabs/uniswap-v2-subgraph-queries .
+ ```
+
+3. Set up your Python virtual environment.
+
+ **macOS/Linux:**
+ ```bash
+ python3 -m venv venv
+ source venv/bin/activate
+ ```
+
+ **Windows:**
+ ```bash
+ python -m venv venv
+ venv\Scripts\activate
+ ```
+
+4. With the virtual environment activated, run the following command to install the required dependencies.
+
+ ```bash
+ pip install -r requirements.txt
+ ```
+
+5. Create the environment variable file (`.env`) and paste your Chainstack endpoint URL there.
+
+ ```bash
+ SUBGRAPH_URL=
+ ```
### Python main.py
diff --git a/docs/subgraphs-tutorial-debug-subgraphs-with-a-local-graph-node.mdx b/docs/subgraphs-tutorial-debug-subgraphs-with-a-local-graph-node.mdx
index 29870a13..0697a196 100644
--- a/docs/subgraphs-tutorial-debug-subgraphs-with-a-local-graph-node.mdx
+++ b/docs/subgraphs-tutorial-debug-subgraphs-with-a-local-graph-node.mdx
@@ -46,233 +46,216 @@ In this tutorial, we will:
This tutorial won’t dive deep into the details of this subgraph. I recommend you check out the beginner’s guide for that, linked above. I will, however, try to incorporate brief explanations.
-
-
- Install [graph-cli](https://www.npmjs.com/package/@graphprotocol/graph-cli) on your machine.
-
-
- Create a new directory and initialize a project in it by running:
-
- ```bash Shell
- graph init
- ```
-
-
-
- Set up a subgraph with the following parameters:
-
-
- ```yaml yaml
- Protocol: Ethereum
- Product for which to initialize: subgraph-studio
- Subgraph Slug: BAYC
- Directory to create the subgraph in: ChainstackSubgraph
- Ethereum network: mainnet
- Contract address: 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
- Contract Name: BAYC
- Index contract events as entities: true
- ```
-
-
-
- Paste the following code in `schema.graphql`:
-
-
- ```graphql schema.graphql
- type Transfer @entity(immutable: true) {
- id: Bytes!
- from: Bytes!
- to: Bytes!
- tokenId: BigInt!
- blockNumber: BigInt!
- transactionHash: Bytes!
- }
-
- type BoredApe @entity {
- id: ID!
- creator: Bytes!
- newOwner: Bytes!
- tokenURI: String!
- blockNumber: BigInt!
- }
+1. Install [graph-cli](https://www.npmjs.com/package/@graphprotocol/graph-cli) on your machine.
+
+2. Create a new directory and initialize a project in it by running:
+
+ ```bash
+ graph init
+ ```
+
+3. Set up a subgraph with the following parameters:
+
+ ```yaml
+ Protocol: Ethereum
+ Product for which to initialize: subgraph-studio
+ Subgraph Slug: BAYC
+ Directory to create the subgraph in: ChainstackSubgraph
+ Ethereum network: mainnet
+ Contract address: 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
+ Contract Name: BAYC
+ Index contract events as entities: true
+ ```
+
+4. Paste the following code in `schema.graphql`:
+
+ ```graphql
+ type Transfer @entity(immutable: true) {
+ id: Bytes!
+ from: Bytes!
+ to: Bytes!
+ tokenId: BigInt!
+ blockNumber: BigInt!
+ transactionHash: Bytes!
+ }
+
+ type BoredApe @entity {
+ id: ID!
+ creator: Bytes!
+ newOwner: Bytes!
+ tokenURI: String!
+ blockNumber: BigInt!
+ }
+
+ type Property @entity {
+ id: ID!
+ image: String!
+ background: String!
+ clothes: String!
+ earring: String!
+ eyes: String!
+ fur: String!
+ hat: String!
+ mouth: String!
+ }
+ ```
- type Property @entity {
- id: ID!
- image: String!
- background: String!
- clothes: String!
- earring: String!
- eyes: String!
- fur: String!
- hat: String!
- mouth: String!
- }
- ```
-
Explaining `schema.graphql`:
* The `Transfer` entity will index data every time a Bored Ape NFT is transferred. It will log the transaction data, as well as the recipient and receiver addresses.
* The `BoredApe` entity will index all the major information about an ape, including the original creator and the current owner.
* The `Property` entity will index the IPFS metadata for all the apes. Each instance of this entity can be identified using the `id` field, which is nothing but the `tokenID` of the ape.
-
-
- Delete everything inside `subgraph.yaml`, and paste the following code:
-
-
- ```yaml subgraph.yaml
- specVersion: 0.0.5
- description: A subgraph to index data on the Bored Apes contract
- features:
- - ipfsOnEthereumContracts
- schema:
- file: ./schema.graphql
- dataSources:
- - kind: ethereum
- name: BAYC
- network: mainnet
- source:
- address: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"
- abi: BAYC
- startBlock: 12287507
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.7
- language: wasm/assemblyscript
- entities:
- - Transfer
- - BoredApe
- - Property
- abis:
- - name: BAYC
- file: ./abis/BAYC.json
- eventHandlers:
- - event: Transfer(indexed address,indexed address,indexed uint256)
- handler: handleTransfer
- file: ./src/bayc.ts
- ```
-
+
+5. Delete everything inside `subgraph.yaml`, and paste the following code:
+
+ ```yaml
+ specVersion: 0.0.5
+ description: A subgraph to index data on the Bored Apes contract
+ features:
+ - ipfsOnEthereumContracts
+ schema:
+ file: ./schema.graphql
+ dataSources:
+ - kind: ethereum
+ name: BAYC
+ network: mainnet
+ source:
+ address: "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"
+ abi: BAYC
+ startBlock: 12287507
+ mapping:
+ kind: ethereum/events
+ apiVersion: 0.0.7
+ language: wasm/assemblyscript
+ entities:
+ - Transfer
+ - BoredApe
+ - Property
+ abis:
+ - name: BAYC
+ file: ./abis/BAYC.json
+ eventHandlers:
+ - event: Transfer(indexed address,indexed address,indexed uint256)
+ handler: handleTransfer
+ file: ./src/bayc.ts
+ ```
Explaining `subgraph.yaml`:
* In here, we declared the data source (address of the BAYC smart contract), the entities we want to index, and the events we want to look out for. For our use case, tracking the `Transfer` event from the smart contract will suffice.
* For subgraphs that want to index IPFS data, `ipfsOnEthereumContracts` must be declared under features.
-
-
- Run `graph codegen` in your terminal. You must run this command every time you edit the schema or YAML file.
-
-
- Go to `src/bayc.ts` and delete everything inside it. Paste the following code:
-
-
- ```js src/bayc.ts
- import {
- Transfer as TransferEvent,
- BAYC,
- } from "../generated/BAYC/BAYC"
- import {
- BoredApe,
- Transfer,
- Property
- } from "../generated/schema"
-
- import { ipfs, json, JSONValue, log } from '@graphprotocol/graph-ts'
-
- export function handleTransfer(event: TransferEvent): void {
-
- let transfer = new Transfer(event.transaction.hash.concatI32(event.logIndex.toI32()))
- transfer.from = event.params.from
- transfer.to = event.params.to
- transfer.tokenId = event.params.tokenId
- transfer.blockNumber = event.block.number
- transfer.transactionHash = event.transaction.hash
- transfer.save()
-
- let contractAddress = BAYC.bind(event.address);
- let boredApe = BoredApe.load(event.params.tokenId.toString());
- if(boredApe==null){
- boredApe = new BoredApe(event.params.tokenId.toString());
- boredApe.creator=event.params.to;
- boredApe.tokenURI=contractAddress.tokenURI(event.params.tokenId);
- }
+6. Run `graph codegen` in your terminal. You must run this command every time you edit the schema or YAML file.
- boredApe.newOwner=event.params.to;
- boredApe.blockNumber=event.block.number;
- boredApe.save();
+7. Go to `src/bayc.ts` and delete everything inside it. Paste the following code:
- const ipfshash = "QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq"
- let tokenURI = "/" + event.params.tokenId.toString();
+ ```javascript
+ import {
+ Transfer as TransferEvent,
+ BAYC,
+ } from "../generated/BAYC/BAYC"
+ import {
+ BoredApe,
+ Transfer,
+ Property
+ } from "../generated/schema"
- let property = Property.load(event.params.tokenId.toString());
+ import { ipfs, json, JSONValue, log } from '@graphprotocol/graph-ts'
- if (property == null) {
- property = new Property(event.params.tokenId.toString());
+ export function handleTransfer(event: TransferEvent): void {
- let fullURI = ipfshash + tokenURI;
+ let transfer = new Transfer(event.transaction.hash.concatI32(event.logIndex.toI32()))
+ transfer.from = event.params.from
+ transfer.to = event.params.to
+ transfer.tokenId = event.params.tokenId
+ transfer.blockNumber = event.block.number
+ transfer.transactionHash = event.transaction.hash
+ transfer.save()
- let ipfsData = ipfs.cat(fullURI);
+ let contractAddress = BAYC.bind(event.address);
+ let boredApe = BoredApe.load(event.params.tokenId.toString());
- if (ipfsData) {
- let ipfsValues = json.fromBytes(ipfsData);
- let ipfsValuesObject = ipfsValues.toObject();
+ if(boredApe==null){
+ boredApe = new BoredApe(event.params.tokenId.toString());
+ boredApe.creator=event.params.to;
+ boredApe.tokenURI=contractAddress.tokenURI(event.params.tokenId);
+ }
- if (ipfsValuesObject) {
- let image = ipfsValuesObject.get('image');
- let attributes = ipfsValuesObject.get('attributes');
+ boredApe.newOwner=event.params.to;
+ boredApe.blockNumber=event.block.number;
+ boredApe.save();
- let attributeArray: JSONValue[];
- if (image) {
- property.image = image.toString();
- }
- if (attributes) {
+ const ipfshash = "QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq"
+ let tokenURI = "/" + event.params.tokenId.toString();
- attributeArray = attributes.toArray();
+ let property = Property.load(event.params.tokenId.toString());
- for (let i = 0; i < attributeArray.length; i++) {
+ if (property == null) {
+ property = new Property(event.params.tokenId.toString());
- let attributeObject = attributeArray[i].toObject();
+ let fullURI = ipfshash + tokenURI;
- let trait_type = attributeObject.get('trait_type');
- let value_type = attributeObject.get('value');
+ let ipfsData = ipfs.cat(fullURI);
- let trait: string;
- let value: string;
+ if (ipfsData) {
+ let ipfsValues = json.fromBytes(ipfsData);
+ let ipfsValuesObject = ipfsValues.toObject();
- if (trait_type && value_type) {
+ if (ipfsValuesObject) {
+ let image = ipfsValuesObject.get('image');
+ let attributes = ipfsValuesObject.get('attributes');
- trait = trait_type.toString();
- value = value_type.toString();
+ let attributeArray: JSONValue[];
+ if (image) {
+ property.image = image.toString();
+ }
+ if (attributes) {
+
+ attributeArray = attributes.toArray();
+
+ for (let i = 0; i < attributeArray.length; i++) {
+
+ let attributeObject = attributeArray[i].toObject();
+
+ let trait_type = attributeObject.get('trait_type');
+ let value_type = attributeObject.get('value');
- if (trait && value) {
+ let trait: string;
+ let value: string;
- if (trait == "Background") {
- property.background = value;
- }
+ if (trait_type && value_type) {
- if (trait == "Clothes") {
- property.clothes = value;
- }
+ trait = trait_type.toString();
+ value = value_type.toString();
- if (trait == "Earring") {
- property.earring = value;
- }
+ if (trait && value) {
+
+ if (trait == "Background") {
+ property.background = value;
+ }
+
+ if (trait == "Clothes") {
+ property.clothes = value;
+ }
- if (trait == "Eyes") {
- property.eyes = value;
- }
+ if (trait == "Earring") {
+ property.earring = value;
+ }
- if (trait == "Fur") {
- property.fur = value;
- }
+ if (trait == "Eyes") {
+ property.eyes = value;
+ }
- if (trait == "Hat") {
- property.hat = value;
- }
+ if (trait == "Fur") {
+ property.fur = value;
+ }
- if (trait == "Mouth") {
- property.mouth = value;
- }
+ if (trait == "Hat") {
+ property.hat = value;
+ }
+ if (trait == "Mouth") {
+ property.mouth = value;
}
}
@@ -282,13 +265,14 @@ This tutorial won’t dive deep into the details of this subgraph. I recommend y
}
}
- }
+ }
}
}
- ```
-
+
+ }
+ ```
Explaining `src/bayc.ts`:
@@ -297,9 +281,6 @@ This tutorial won’t dive deep into the details of this subgraph. I recommend y
* To index IPFS metadata, however, we use the `[ipfs.cat](http://ipfs.cat)` method from the [graph-ts library](https://github.com/graphprotocol/graph-ts) by passing it the IPFS hash and the token URI for a specific ape.
* We need to include a null check at every step while parsing the IPFS metadata, since an IPFS node may be unavailable at a given time, or the data we are querying may not exist at all.
-
-
-
And that’s it. Run `graph build` to compile your subgraph. Technically, you can even deploy this code to Chainstack, and it will index data without failing explicitly.
When I tried querying this subgraph, however, I realized I could only query data for the `Transfer` and `BoredApe` entities. The `Property` entity didn’t return any data at all.
@@ -312,47 +293,37 @@ Let us recreate this entire scenario on our machine.
1. If you have Docker and Docker Compose installed on your machine, the easiest way to set up a Graph Node locally:
-
- ```bash Shell
- git clone https://github.com/pranavdaa/Graph-Node-Local.git
- ```
-
+ ```bash
+ git clone https://github.com/pranavdaa/Graph-Node-Local.git
+ ```
This will clone a repo onto your machine that just contains the YAML configuration file we need. Make sure that Docker Desktop is running on your machine.
2. Open the cloned directory, and then the `docker-compose.yaml` file in a code editor. Even the old and rusty Notepad++ will do. Docker will download the required dependencies using official images uploaded to it. Go to the image under IPFS, and change the line to the following:
-
- ```yaml docker-compose.yaml
- image: ipfs/go-ipfs:v0.17.0
- ```
-
+ ```yaml
+ image: ipfs/go-ipfs:v0.17.0
+ ```
This will result in Docker fetching a relatively recent version of IPFS. You can always check [Docker hub](https://hub.docker.com/) for the latest available versions of an image. You can also skip specifying a particular version if you wish to work with the latest available versions.
3. To index subgraphs that index IPFS data using the `.cat` method, we need to configure an extra environment variable. Inside the `environment` object, add an environment variable like this:
-
- ```yaml docker-compose.yaml
- GRAPH_ALLOW_NON_DETERMINISTIC_IPFS: 1
- ```
-
+ ```yaml
+ GRAPH_ALLOW_NON_DETERMINISTIC_IPFS: 1
+ ```
4. Lastly, we need to pass an RPC URL for an Ethereum archive mainnet node to the YAML file. You can set up an archive node using [Chainstack](https://chainstack.com/). If you don’t know how to set up a node with Chainstack, refer to our [blog](https://chainstack.com/creating-a-public-chain-node-with-chainstack/). Edit the `ethereum` environment variable like this:
-
- ```yaml docker-compose.yaml
- ethereum: 'mainnet:YOUR_CHAINSTACK_ENDPOINT'
- ```
-
+ ```yaml
+ ethereum: 'mainnet:YOUR_CHAINSTACK_ENDPOINT'
+ ```
5. Save the YAML file. Open a new terminal inside the cloned repo, and run:
-
- ```bash Shell
- docker-compose up
- ```
-
+ ```bash
+ docker-compose up
+ ```
This command is all you need. Open Docker Desktop and you should see a container named `graph-node-local` running. This step might take a while to execute the first time.
@@ -366,19 +337,15 @@ If you set up a subgraph project using `graph init`, the graph-cli creates a few
1. Open a new terminal at the root of the subgraph project. To compile your subgraph, run:
-
- ```bash Shell
- graph codegen && graph build
- ```
-
+ ```bash
+ graph codegen && graph build
+ ```
2. To deploy your subgraph to the local Graph Node, run the following command by passing any random version number to the terminal:
-
- ```bash Shell
- npm run create-local && npm run deploy-local
- ```
-
+ ```bash
+ npm run create-local && npm run deploy-local
+ ```
Your subgraph is now deployed on a Graph Node running locally on your machine. Open the previous terminal where you ran the `docker-compose up` command. It should now be indexing data by requesting data from the Ethereum archive node we passed to it.
@@ -392,37 +359,35 @@ In the next section, we will start debugging our subgraph.
2. Run the following query in the interface:
-
- ```graphql GraphQL
- {
- transfers(first:3) {
- id
- tokenId
- from
- to
- blockNumber
- }
- boredApes(first:3) {
- id
- creator
- newOwner
- tokenURI
- blockNumber
- }
- properties(first:3) {
- id
- image
- background
- clothes
- eyes
- fur
- mouth
- earring
- hat
- }
+ ```graphql
+ {
+ transfers(first:3) {
+ id
+ tokenId
+ from
+ to
+ blockNumber
+ }
+ boredApes(first:3) {
+ id
+ creator
+ newOwner
+ tokenURI
+ blockNumber
+ }
+ properties(first:3) {
+ id
+ image
+ background
+ clothes
+ eyes
+ fur
+ mouth
+ earring
+ hat
}
- ```
-
+ }
+ ```
This query will return the first three instances of each entity from our subgraph’s data store. This is what I get back:
@@ -434,37 +399,26 @@ Clearly, there’s something wrong. When I saw that the `Property` entity had in
This is where the fun starts. Let us do this!
-
-
- Go to the terminal in your subgraph’s directory, and run:
+1. Go to the terminal in your subgraph’s directory, and run:
-
- ```graphql GraphQL
- npm run remove-local
- ```
-
+ ```bash
+ npm run remove-local
+ ```
This command will remove the buggy subgraph from your node’s data store.
-
-
- Go to the terminal running the local node, and stop the terminal (ctrl+c on my system, may be different on yours).
-
-
- Go to `src/bayc.ts` in your subgraph code, and add this line to the file right before we invoke the `ipfs.cat()` method:
-
-
- ```graphql src/bayc.ts
- log.info('The fullURI is: {} ', [fullURI]);
- ```
-
-
-
- Save the file.
-
-
- Restart the Docker container using `docker-compose up` and re-deploy to the local node from the subgraph’s directory.
-
-
+
+2. Go to the terminal running the local node, and stop the terminal (ctrl+c on my system, may be different on yours).
+
+3. Go to `src/bayc.ts` in your subgraph code, and add this line to the file right before we invoke the `ipfs.cat()` method:
+
+ ```typescript
+ log.info('The fullURI is: {} ', [fullURI]);
+ ```
+
+4. Save the file.
+
+5. Restart the Docker container using `docker-compose up` and re-deploy to the local node from the subgraph’s directory.
+
With this change, you will notice that the Graph Node logs out the `fullURI` every time the handler function runs. When I go to `ipfs://`, I can see all the metadata for the specific NFT. So this is not it. We’re missing something else.
Back to square 1.
diff --git a/docs/subgraphs-tutorial-deploying-a-lido-subgraph-with-chainstack.mdx b/docs/subgraphs-tutorial-deploying-a-lido-subgraph-with-chainstack.mdx
index 373fc2e8..089612ff 100644
--- a/docs/subgraphs-tutorial-deploying-a-lido-subgraph-with-chainstack.mdx
+++ b/docs/subgraphs-tutorial-deploying-a-lido-subgraph-with-chainstack.mdx
@@ -22,23 +22,11 @@ In this tutorial, we will learn how to deploy a subgraph to Chainstack.
## Overview
To get from zero to a deployed subgraph with Chainstack:
-
-
- Create a [subgraph](https://console.chainstack.com/subgraphs) in your project.
-
-
- Set up a subgraph development environment in your system.
-
-
- Configure your subgraph by creating new entities and handler functions.
-
-
- Deploy the subgraph using your Chainstack console.
-
-
- Query the subgraph using Chainstack’s Query URL or GraphQL UI URL.
-
-
+1. Create a [subgraph](https://console.chainstack.com/subgraphs) in your project.
+2. Set up a subgraph development environment in your system.
+3. Configure your subgraph by creating new entities and handler functions.
+4. Deploy the subgraph using your Chainstack console.
+5. Query the subgraph using Chainstack’s Query URL or GraphQL UI URL.
## Step-by-step
@@ -48,26 +36,18 @@ To get from zero to a deployed subgraph with Chainstack:
Subgraphs must be associated with a project. If you don’t already have a project to add the subgraph to, see [create a project](/docs/manage-your-project#create-a-project).
-
-
- In [Subgraphs](https://console.chainstack.com/subgraphs), click **Add subgraph**.
-
-
- In the **Choose network** section:
+1. In [Subgraphs](https://console.chainstack.com/subgraphs), click **Add subgraph**.
+2. In the **Choose network** section:
* Choose a **Blockchain protocol**.
* Choose the **Network**.
* Choose the **Type**.
* Click **Next**. The **Create subgraph** section is displayed.
-
-
- In the **Create subgraph** section:
+3. In the **Create subgraph** section:
* Enter a **Name** for the subgraph.
* Select the **Project** that you want to assign your subgraph to.
* Click **Add subgraph**. The details page of the new subgraph is displayed.
-
-
### Set up a subgraph development environment
@@ -223,37 +203,26 @@ Please note that this is a basic subgraph built to index data from the Lido smar
### Deploy to Chainstack Subgraphs
-
-
- Open your Chainstack Subgraphs console.
-
-
- To deploy your subgraph, copy the deployment command and run it in a terminal at the root of your project directory.
+1. Open your Chainstack Subgraphs console.
+
+2. To deploy your subgraph, copy the deployment command and run it in a terminal at the root of your project directory.
The deployment command from the Chainstack console will look like the following:
-
- ```solidity solidity
- graph deploy --node https://api.graph-eu.p2pify.com/API_KEY/deploy --ipfs https://api.graph-eu.p2pify.com/API_KEY/ipfs PROJECT_NAME
- ```
-
-
-
- Run the command. Enter any version number of your choice and press Enter.
-
-
- If your subgraph is successfully deployed, your terminal will look like this:
+ ```bash
+ graph deploy --node https://api.graph-eu.p2pify.com/API_KEY/deploy --ipfs https://api.graph-eu.p2pify.com/API_KEY/ipfs PROJECT_NAME
+ ```
-
- ```bash Shell
- Deployed to https://chainstack.com/subgraphs/SG-123-456-789
+3. Run the command. Enter any version number of your choice and press Enter.
- Subgraph endpoints:
- Queries (HTTP): https://ethereum-mainnet.graph-eu.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d/my_subgraph_v1_0
- ```
-
-
-
+4. If your subgraph is successfully deployed, your terminal will look like this:
+
+ ```bash
+ Deployed to https://chainstack.com/subgraphs/SG-123-456-789
+
+ Subgraph endpoints:
+ Queries (HTTP): https://ethereum-mainnet.graph-eu.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d/my_subgraph_v1_0
+ ```
### Query your Subgraph
diff --git a/docs/subgraphs-tutorial-indexing-uniswap-data.mdx b/docs/subgraphs-tutorial-indexing-uniswap-data.mdx
index baeac53c..b9a61dbe 100644
--- a/docs/subgraphs-tutorial-indexing-uniswap-data.mdx
+++ b/docs/subgraphs-tutorial-indexing-uniswap-data.mdx
@@ -503,28 +503,18 @@ And with that, your subgraph is ready for deployment.
Subgraphs must be associated with a project. If you don’t already have a project to add the subgraph to, see [create a project](/docs/manage-your-project#create-a-project).
-
-
- In [Subgraphs](https://console.chainstack.com/subgraphs), click **Add subgraph**.
-
-
-
- In the **Choose network** section:
-
- * Choose a **Blockchain protocol**.
- * Choose the **Network**.
- * Choose the **Type**.
- * Click **Next**. The **Create subgraph** section is displayed.
-
-
-
- In the **Create subgraph** section:
-
- * Enter a **Name** for the subgraph.
- * Select the **Project** that you want to assign your subgraph to.
- * Click **Add subgraph**. The details page of the new subgraph is displayed.
-
-
+1. In [Subgraphs](https://console.chainstack.com/subgraphs), click **Add subgraph**.
+
+2. In the **Choose network** section:
+ * Choose a **Blockchain protocol**.
+ * Choose the **Network**.
+ * Choose the **Type**.
+ * Click **Next**. The **Create subgraph** section is displayed.
+
+3. In the **Create subgraph** section:
+ * Enter a **Name** for the subgraph.
+ * Select the **Project** that you want to assign your subgraph to.
+ * Click **Add subgraph**. The details page of the new subgraph is displayed.
Once the subgraph is created, scroll down to the part where it shows the subgraph **Deployment command** and copy the command.
diff --git a/docs/tezos-tooling.mdx b/docs/tezos-tooling.mdx
index 82bbd02e..94af0df6 100644
--- a/docs/tezos-tooling.mdx
+++ b/docs/tezos-tooling.mdx
@@ -9,25 +9,18 @@ title: "Tezos tooling"
## Tezos client
-
-
- Install the Tezos client. See [Tezos client Installation and setup](https://tezos.gitlab.io/introduction/tezos.html#octez).
-
-
- Connect the Tezos client to the Chainstack-deployed Tezos node:
-
-
- ```bash Shell
- octez-client -E --endpoint YOUR_CHAINSTACK_ENDPOINT
- ```
-
-
- where YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
- Run the Tezos [client commands](https://tezos.gitlab.io/shell/cli-commands.html).
-
-
+
+1. Install the Tezos client. See [Tezos client Installation and setup](https://tezos.gitlab.io/introduction/tezos.html#octez).
+
+2. Connect the Tezos client to the Chainstack-deployed Tezos node:
+
+ ```bash
+ octez-client -E --endpoint YOUR_CHAINSTACK_ENDPOINT
+ ```
+
+ where YOUR_CHAINSTACK_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+
+3. Run the Tezos [client commands](https://tezos.gitlab.io/shell/cli-commands.html).
Example to get the balance of an address in tez:
@@ -39,64 +32,47 @@ Example to get the balance of an address in tez:
## Taquito
-
-
- Install Taquito. See [Quick Start](https://tezostaquito.io/docs/quick_start).
-
-
- Use `RpcClient` to connect to your Tezos node:
-
-
- ```javascript Javascript
- const { RpcClient } = require('@taquito/rpc');
-
- async function main() {
- const client = new RpcClient('YOUR_CHAINSTACK_ENDPOINT');
- await client.getBlock().then((data) => {
- console.log('-- Chain ID: ', data.chain_id);
- console.log('-- Head block: ', data);
- }).catch((error) => console.log(JSON.stringify(error, null, 2)));
-
- }
- ```
-
-
- where YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS endpoint. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
-
-
+
+1. Install Taquito. See [Quick Start](https://tezostaquito.io/docs/quick_start).
+
+2. Use `RpcClient` to connect to your Tezos node:
+
+ ```javascript
+ const { RpcClient } = require('@taquito/rpc');
+
+ async function main() {
+ const client = new RpcClient('YOUR_CHAINSTACK_ENDPOINT');
+ await client.getBlock().then((data) => {
+ console.log('-- Chain ID: ', data.chain_id);
+ console.log('-- Head block: ', data);
+ }).catch((error) => console.log(JSON.stringify(error, null, 2)));
+ }
+ ```
+
+ where YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
## Temple wallet
-
-
- Install the [Temple wallet](https://templewallet.com/).
-
-
- In the wallet, click **Settings** > **Networks**.
-
-
- Under **Add network**, in the **RPC base URL** field, provide your Tezos node endpoint.
-
-
+
+1. Install the [Temple wallet](https://templewallet.com/).
+
+2. In the wallet, click **Settings** > **Networks**.
+
+3. Under **Add network**, in the **RPC base URL** field, provide your Tezos node endpoint.
+
See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
## SmartPy
-
-
- Install [SmartPy](https://smartpy.io).
-
-
- Originate your contract through a Chainstack-deployed Tezos node:
-
-
- ```bash Shell
- SmartPy.sh originate-contract --code CONTRACT --storage STORAGE --rpc YOUR_CHAINSTACK_ENDPOINT
- ```
-
+
+1. Install [SmartPy](https://smartpy.io).
+
+2. Originate your contract through a Chainstack-deployed Tezos node:
+
+ ```bash
+ SmartPy.sh originate-contract --code CONTRACT --storage STORAGE --rpc YOUR_CHAINSTACK_ENDPOINT
+ ```
where
- * YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS endpoint
+ * YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint
* CONTRACT — your compiled contract
* STORAGE — your compiled contract storage
-
-
diff --git a/docs/tezos-tutorial-a-simple-fund-contract-in-ligo.mdx b/docs/tezos-tutorial-a-simple-fund-contract-in-ligo.mdx
index 3b1f5a24..7f291192 100644
--- a/docs/tezos-tutorial-a-simple-fund-contract-in-ligo.mdx
+++ b/docs/tezos-tutorial-a-simple-fund-contract-in-ligo.mdx
@@ -28,29 +28,13 @@ The simple fund contract does the following:
To get from zero to a deployed contract on Ghostnet, do the following:
-
-
- Get a Tezos node endpoint.
-
-
- Fund your developer Tezos account through a [faucet](https://teztnets.xyz/).
-
-
- With LIGO, create the contract.
-
-
- With the Tezos client, compile and originate the contract through your Tezos node.
-
-
- With the Tezos client, fund the contract.
-
-
- Fund your user Tezos account through a faucet and your Temple wallet.
-
-
- With Temple wallet, interact with the contract.
-
-
+1. Get a Tezos node endpoint.
+2. Fund your developer Tezos account through a [faucet](https://teztnets.xyz/).
+3. With LIGO, create the contract.
+4. With the Tezos client, compile and originate the contract through your Tezos node.
+5. With the Tezos client, fund the contract.
+6. Fund your user Tezos account through a faucet and your Temple wallet.
+7. With Temple wallet, interact with the contract.
### Install LIGO
@@ -90,17 +74,9 @@ Get the generated account address:
### Fund your account with testnet tez
-
-
- Go to the [faucet](https://teztnets.xyz/).
-
-
- In **fund any address**, paste your generated address.
-
-
- Click **Request 6001 tz**.
-
-
+1. Go to the [faucet](https://teztnets.xyz/).
+2. In **fund any address**, paste your generated address.
+3. Click **Request 6001 tz**.
### Create the contract
Create a simple fund contract in the PascaLIGO syntax with two entrypoints:
@@ -251,42 +227,18 @@ Once the operation is included in a block, check the contract balance by queryin
### Get a Temple wallet account with test tez
You need an account in the Temple wallet with some test tez to execute operations on Ghostnet.
-
-
- Install the [Temple wallet](https://templewallet.com/).
-
-
- Go to the [faucet](https://teztnets.xyz/).
-
-
- Connect with yout Temple wallet.
-
-
- Once connected, click **Request 6001 tz**.
-
-
+1. Install the [Temple wallet](https://templewallet.com/).
+2. Go to the [faucet](https://teztnets.xyz/).
+3. Connect with your Temple wallet.
+4. Once connected, click **Request 6001 tz**.
### Interact with the contract using the Temple wallet
-
-
- Navigate to the [BCD explorer](https://better-call.dev/).
-
-
- Click **Ghostnet**.
-
-
- In the search field, provide your originated contract address.
-
-
- On the contract page, click **Interact**.
-
-
- Click **withdraw** > **Execute** > **Temple - Tezos Wallet**.
-
-
- Click **Confirm**.
-
-
+1. Navigate to the [BCD explorer](https://better-call.dev/).
+2. Click **Ghostnet**.
+3. In the search field, provide your originated contract address.
+4. On the contract page, click **Interact**.
+5. Click **withdraw** > **Execute** > **Temple - Tezos Wallet**.
+6. Click **Confirm**.
This will connect your account from the Temple wallet with the contract and withdraw 1 tez to the account.
## Conclusion
diff --git a/docs/ton-how-to-customize-fungible-tokens-jettons.mdx b/docs/ton-how-to-customize-fungible-tokens-jettons.mdx
index cd22c9f1..fe33d6a7 100644
--- a/docs/ton-how-to-customize-fungible-tokens-jettons.mdx
+++ b/docs/ton-how-to-customize-fungible-tokens-jettons.mdx
@@ -81,12 +81,11 @@ To ensure the contracts are set up properly, compile and run the tests using the
In this section, we will update the minter contract to include a capped supply and token price functionality.
-
-
+### Adding capped supply and price fields
- In the contract storage, we will add two new fields, `capped_supply` and `price`. Here is the updated `load_data` and `save_data` functions:
+In the contract storage, we will add two new fields, `capped_supply` and `price`. Here is the updated `load_data` and `save_data` functions:
-
+
```c FunC
(int, int, int, slice, cell, cell) load_data() inline {
slice ds = get_data().begin_parse();
@@ -111,10 +110,10 @@ In this section, we will update the minter contract to include a capped supply a
.end_cell()
);
}
- ```
-
-
-
+ ```
+
+
+### Updating function calls
Since we have updated the mentioned functions, we now need to update their calls with the respective parameters. Here is an example of the updated getters:
@@ -173,8 +172,6 @@ Please note that we need to calculate the buy amount to reserve some TON for sto
}
```
-
-
### Wrappers
@@ -186,12 +183,11 @@ Please note that we need to calculate the buy amount to reserve some TON for sto
Next, we will update the wrapper to include the new capped supply and token price functionality. The wrapper will provide functions to retrieve and manipulate these fields.
-
-
+### Updating minter config
- We need to update the configuration type in `JettonMinter.ts` to include the new fields `capped_supply` and `price`.
+We need to update the configuration type in `JettonMinter.ts` to include the new fields `capped_supply` and `price`.
-
+
```typescript TypeScript
export type JettonMinterConfig = {
admin: Address;
@@ -215,8 +211,8 @@ Next, we will update the wrapper to include the new capped supply and token pric
}
```
-
-
+
+### Updating minting message
In this version, we are packing the jetton minting message within the minter contract itself. This means that our interface now composes a simple message containing the TON amount and the recipient's address.
@@ -240,10 +236,10 @@ In this version, we are packing the jetton minting message within the minter con
}
```
-
-
-As we added new propertes, the getters also must be updated. Note that we modified `getJettonData` and added `getTokenPrice`.
+### Updating getters
+
+As we added new properties, the getters also must be updated. Note that we modified `getJettonData` and added `getTokenPrice`.
```typescript TypeScript
@@ -287,15 +283,12 @@ As we added new propertes, the getters also must be updated. Note that we modifi
}
```
-
-
### Tests
We will add test cases to verify that the capped supply and token price functionality work as expected.
-
-
+### Testing minting within capped supply
This test verifies jetton minting based on the TON sent, ensuring the correct jetton amount is minted and updates both user balance and total supply accordingly.
@@ -384,8 +377,6 @@ To test the contracts using Sandbox, run the command:
npx blueprint test
```
-
-
### Deployment
diff --git a/docs/ton-tooling.mdx b/docs/ton-tooling.mdx
index e20c0d3c..e8d72939 100644
--- a/docs/ton-tooling.mdx
+++ b/docs/ton-tooling.mdx
@@ -43,14 +43,10 @@ There are also multiple TON-related plugins for various IDEs. You can find them
### [Nujan IDE](https://ide.nujan.io/)
To enable Nujan IDE to interact with the network via a Chainstack node, you can follow these steps:
-
-
- Install and set up OpenMask to use a Chainstack node for interaction. Refer to the guide on interacting through OpenMask for detailed instructions.
-
-
- Open the IDE and navigate to the **Build & Deploy** tab. Click on **Connect Wallet** and select a wallet with your configured custom RPC endpoint.
-
-
+
+1. Install and set up OpenMask to use a Chainstack node for interaction. Refer to the guide on interacting through OpenMask for detailed instructions.
+
+2. Open the IDE and navigate to the **Build & Deploy** tab. Click on **Connect Wallet** and select a wallet with your configured custom RPC endpoint.
## Blockchain interaction libraries
@@ -319,20 +315,14 @@ For macOS, ensure the following packages are installed:
For Windows, ensure the following are installed:
-
-
- CMake: Install via [cmake.org](http://cmake.org/)
-
-
- Install `libsodium` and other dependencies via `vcpkg`:
-
-
- ```bash Bash
- vcpkg install libsodium libsecp256k1 lz4
- ```
-
-
-
+
+1. CMake: Install via [cmake.org](http://cmake.org/)
+
+2. Install `libsodium` and other dependencies via `vcpkg`:
+
+ ```bash
+ vcpkg install libsodium libsecp256k1 lz4
+ ```
**Initialize a project**
diff --git a/docs/tracking-some-bored-apes-the-ethereum-event-logs-tutorial.mdx b/docs/tracking-some-bored-apes-the-ethereum-event-logs-tutorial.mdx
index e3cdeb7e..27f693b2 100644
--- a/docs/tracking-some-bored-apes-the-ethereum-event-logs-tutorial.mdx
+++ b/docs/tracking-some-bored-apes-the-ethereum-event-logs-tutorial.mdx
@@ -63,35 +63,23 @@ Before you start writing the code, make sure you have the following components i
Once you have everything, the next step is to set up a node project and install the web3.js library.
-
-
- Create a new directory.
-
-
- Open a terminal in the directory.
-
-
- Run the following command to initialize a Node project:
-
-
- ```bash Shell
- npm init
- ```
-
-
-
- Provide the details for the project, as per the prompt.
-
-
- Once the project is initialized, use the following command to install the web3.js package:
-
-
- ```bash Shell
- npm install web3
- ```
-
-
-
+1. Create a new directory.
+
+2. Open a terminal in the directory.
+
+3. Run the following command to initialize a Node project:
+
+ ```bash
+ npm init
+ ```
+
+4. Provide the details for the project, as per the prompt.
+
+5. Once the project is initialized, use the following command to install the web3.js package:
+
+ ```bash
+ npm install web3
+ ```
## Decoding the logs using Bored Apes
diff --git a/docs/tron-mastering-energy-bandwidth-with-python-and-chainstack.mdx b/docs/tron-mastering-energy-bandwidth-with-python-and-chainstack.mdx
index bc9b6ca4..20f5479c 100644
--- a/docs/tron-mastering-energy-bandwidth-with-python-and-chainstack.mdx
+++ b/docs/tron-mastering-energy-bandwidth-with-python-and-chainstack.mdx
@@ -40,17 +40,11 @@ Let's do a full cycle script that retrieves the account's Energy and Bandwidth d
### Prerequisites
-
-
- Python 3.7+
-
-
- A Chainstack TRON Nile node endpoint—register on [Chainstack](https://console.chainstack.com/). Make sure you pick the HTTP API endpoint that looks like this `https://tron-nile.core.chainstack.com/11112222333444555666677778888/wallet`
-
-
- A TRON account with a private key and some TRX balance that you can get from the [Nile faucet](https://nileex.io/join/getJoinPage)
-
-
+1. Python 3.7+
+
+2. A Chainstack TRON Nile node endpoint—register on [Chainstack](https://console.chainstack.com/). Make sure you pick the HTTP API endpoint that looks like this `https://tron-nile.core.chainstack.com/11112222333444555666677778888/wallet`
+
+3. A TRON account with a private key and some TRX balance that you can get from the [Nile faucet](https://nileex.io/join/getJoinPage)
### Install dependencies
diff --git a/docs/tron-tooling.mdx b/docs/tron-tooling.mdx
index 286f5d47..7491e764 100644
--- a/docs/tron-tooling.mdx
+++ b/docs/tron-tooling.mdx
@@ -24,14 +24,9 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and TRON nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -100,38 +95,30 @@ where
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Klaytn nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- chainstack: {
- url: "YOUR_CHAINSTACK_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+
+2. Create a new environment in `hardhat.config.js`:
+
+ ```javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ chainstack: {
+ url: "YOUR_CHAINSTACK_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
where
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
@@ -139,27 +126,17 @@ See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstac
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/tutorial-covalent-api-magic-how-to-retrieve-all-transactions-made-by-an-account.mdx b/docs/tutorial-covalent-api-magic-how-to-retrieve-all-transactions-made-by-an-account.mdx
index 9a54b645..e359b74f 100644
--- a/docs/tutorial-covalent-api-magic-how-to-retrieve-all-transactions-made-by-an-account.mdx
+++ b/docs/tutorial-covalent-api-magic-how-to-retrieve-all-transactions-made-by-an-account.mdx
@@ -164,14 +164,11 @@ The code defines a `ChainstackApi` class to interact with the **Get transactions
It fetches every transaction ever made by an address on a given blockchain network, the Ethereum mainnet in this example. Here's how the code works step by step:
-
-
- Define the `ChainstackApi` class with a constructor that initializes the JWT and creates an encoded key for authentication.
+1. Define the `ChainstackApi` class with a constructor that initializes the JWT and creates an encoded key for authentication.
* The constructor sets `COVALENT_JWT_TOKEN` to the value from the environment variable.
-
-
- Define the `fetchTransactions` method within the `ChainstackApi` class.
+
+2. Define the `fetchTransactions` method within the `ChainstackApi` class.
* This method takes four parameters: `chainName`, `walletAddress`, `currency`, and `noLogs`.
@@ -180,20 +177,16 @@ It fetches every transaction ever made by an address on a given blockchain netwo
* It sends a GET request to the Covalent API using Axios, passing the parameters as part of the URL and the encoded key in the headers.
* If the request is successful, it returns the transaction data. If there's an error, it logs the error and throws it.
-
-
- Define the `main` async function that:
- * Create a new instance of the `ChainstackApi` class.
+3. Define the `main` async function that:
+
+ * Creates a new instance of the `ChainstackApi` class.
* Defines the required parameters: `chainName`, `walletAddress`, `currency`, and `noLogs`.
* Calls the `fetchTransactions` method of the `ChainstackApi` instance and destructures the `data` property from the response, storing it in `transactionsData`.
* Logs the `transactionsData` to the console.
- * If an error occurs during the execution, log the error.
-
-
- Invoke the `main` function to execute the code.
-
-
+ * If an error occurs during the execution, logs the error.
+
+4. Invoke the `main` function to execute the code.
This program is designed to be modular, so you can add more methods to the `ChainstackApi` class and then export it with `module.exports = ChainstackApi;`.
diff --git a/docs/unichain-tooling.mdx b/docs/unichain-tooling.mdx
index b9e99d13..e8aa5529 100644
--- a/docs/unichain-tooling.mdx
+++ b/docs/unichain-tooling.mdx
@@ -9,14 +9,9 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Unichain nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -47,14 +42,9 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Unichain nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -88,65 +78,47 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Unichain nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
-
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- chainstack: {
- url: "YOUR_CHAINSTACK_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+
+2. Create a new environment in `hardhat.config.js`:
+
+ ```javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ chainstack: {
+ url: "YOUR_CHAINSTACK_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
where
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
diff --git a/docs/unlimited-node.mdx b/docs/unlimited-node.mdx
index 42db834f..241c33ec 100644
--- a/docs/unlimited-node.mdx
+++ b/docs/unlimited-node.mdx
@@ -36,17 +36,10 @@ Instead of paying per request, you pick an RPS (requests per second) tier, activ
## Enable Unlimited Node
-
-
- In **Nodes**, open the node you want to upgrade.
-
-
- Click **Add-ons** > **Unlimited Node**.
-
-
- Pick an RPS tier and click **Apply changes**.
-
-
- Confirm payment. The add‑on starts within seconds.
-
-
\ No newline at end of file
+1. In **Nodes**, open the node you want to upgrade.
+
+2. Click **Add-ons** > **Unlimited Node**.
+
+3. Pick an RPS tier and click **Apply changes**.
+
+4. Confirm payment. The add‑on starts within seconds.
\ No newline at end of file
diff --git a/docs/work-with-chainstack-marketplace.mdx b/docs/work-with-chainstack-marketplace.mdx
index ca337350..5ea7de0d 100644
--- a/docs/work-with-chainstack-marketplace.mdx
+++ b/docs/work-with-chainstack-marketplace.mdx
@@ -6,39 +6,25 @@ title: "Work with Marketplace"
To start using Chainstack Marketplace, do the following:
-
-
- Go to the [Marketplace in your console](https://console.chainstack.com/marketplace/).
-
-
- Purchase and install the app you decided to use.
-
-
- [Generate a Chainstack API key](/reference/platform-api-getting-started#create-api-key) that you will use to retrieve your JSON web token (JWT).
-
-
- [Retrieve your JWT](https://api.chainstack.com/reference/#operation/retrieveToken) using Chainstack Platform API.
-
-
- Interact with your purchased app directly.
-
-
+1. Go to the [Marketplace in your console](https://console.chainstack.com/marketplace/).
+
+2. Purchase and install the app you decided to use.
+
+3. [Generate a Chainstack API key](/reference/platform-api-getting-started#create-api-key) that you will use to retrieve your JSON web token (JWT).
+
+4. [Retrieve your JWT](https://api.chainstack.com/reference/#operation/retrieveToken) using Chainstack Platform API.
+
+5. Interact with your purchased app directly.
## Install an app
To install the app in the Chainstack Marketplace, do the following:
-
-
- Go to the [Marketplace in your console](https://console.chainstack.com/marketplace/).
-
-
- Click **Install** on the app you want to install.
-
-
- Select the app subscription plan and click **Complete order and begin installation**.
-
-
+1. Go to the [Marketplace in your console](https://console.chainstack.com/marketplace/).
+
+2. Click **Install** on the app you want to install.
+
+3. Select the app subscription plan and click **Complete order and begin installation**.
The payment will be made and the app will get installed to your console. If a payment is unsuccessful, [check your balance](/docs/manage-your-billing) and try again.
@@ -58,19 +44,12 @@ With your API key, retrieve a JSON web token by using the [corresponding method]
By deleting an app, you automatically cancel your subscription to it. To delete an app and cancel your subscription to it, do the following:
-
-
- Open the app page.
-
-
- Go to **Settings**.
-
-
- Click **Delete app**.
-
-
- Enter the requested phrase into the text field and click **Yes, I'm sure**.
-
-
+1. Open the app page.
+
+2. Go to **Settings**.
+
+3. Click **Delete app**.
+
+4. Enter the requested phrase into the text field and click **Yes, I'm sure**.
The app gets uninstalled and your subscription to it gets canceled. Unused period will be calculated and returned to your Chainstack balance automatically.
diff --git a/docs/work-with-ipfs-storage.mdx b/docs/work-with-ipfs-storage.mdx
index a3e55cc5..46b2294a 100644
--- a/docs/work-with-ipfs-storage.mdx
+++ b/docs/work-with-ipfs-storage.mdx
@@ -16,52 +16,33 @@ A bucket can contain any number of files. You can also create folders and catalo
To create a bucket:
-
-
- On the left pane, click **IPFS Storage**.
-
-
- Click **Create bucket**.
-
-
- Provide a name. Click **Create**.
-
-
+1. On the left pane, click **IPFS Storage**.
+
+2. Click **Create bucket**.
+
+3. Provide a name. Click **Create**.
This will create a bucket.
### Rename a bucket
To rename a bucket:
-
-
- Navigate to the list of your buckets.
-
-
- Hover over the bucket you want to rename and click the three-dot icon > **Edit**.
-
-
- Enter a bucket's new name.
-
-
- Click **Save**.
-
-
+1. Navigate to the list of your buckets.
+
+2. Hover over the bucket you want to rename and click the three-dot icon > **Edit**.
+
+3. Enter a bucket's new name.
+
+4. Click **Save**.
### Delete a bucket
To delete a bucket:
-
-
- Navigate to the list of your buckets.
-
-
- Hover over the bucket you want to delete and click the three-dot icon > **Delete**.
-
-
- Click **Yes, I'm sure**.
-
-
+1. Navigate to the list of your buckets.
+
+2. Hover over the bucket you want to delete and click the three-dot icon > **Delete**.
+
+3. Click **Yes, I'm sure**.
## Manage your folders
@@ -71,14 +52,9 @@ Within a bucket, you can optionally create a folder to organize your data. Folde
To create a folder:
-
-
- Click **Create folder**.
-
-
- Provide a name. Click **Create**.
-
-
+1. Click **Create folder**.
+
+2. Provide a name. Click **Create**.
This will create a folder.
@@ -86,17 +62,11 @@ This will create a folder.
To delete a folder:
-
-
- Navigate to the folder's location in your bucket.
-
-
- Hover over the folder you want to delete and click the three-dot icon > **Delete**.
-
-
- Click **Yes, I'm sure**.
-
-
+1. Navigate to the folder's location in your bucket.
+
+2. Hover over the folder you want to delete and click the three-dot icon > **Delete**.
+
+3. Click **Yes, I'm sure**.
## Upload a file
@@ -123,17 +93,11 @@ This will upload your objects through the Chainstack-hosted IPFS nodes to the St
To upload from the IPFS network:
-
-
- In your bucket, click **Upload**.
-
-
- Select **CID**.
-
-
- Provide the [content identifier](https://docs.ipfs.tech/concepts/glossary/#cid) of a file that is available on the IPFS network.
-
-
+1. In your bucket, click **Upload**.
+
+2. Select **CID**.
+
+3. Provide the [content identifier](https://docs.ipfs.tech/concepts/glossary/#cid) of a file that is available on the IPFS network.
This will retrieve the file by its CID off the IPFS network and upload it to the Storj network. The file will be automatically pinned.
@@ -143,29 +107,20 @@ IPFS dedicated gateways allow for faster and more reliable storage of files in t
To create a dedicated gateway, do the following:
-
-
- Navigate to **IPFS Storage** > **Gateways**.
-
-
- Click **Create dedicated gateway**.
-
-
- Select one of the following gateway modes:
+1. Navigate to **IPFS Storage** > **Gateways**.
+
+2. Click **Create dedicated gateway**.
+
+3. Select one of the following gateway modes:
* **Private** — to create a gateway that will provide access to a single bucket within your organization.
* **Open** — to create a gateway that will provide access to any data objects in the IPFS network.
-
-
- For the private mode, select a bucket to assign a gateway.
-
-
- Enter the **Gateway name**. This name also will be used as a unique part of the gateway domain.
-
-
- Click **Create**.
-
-
+
+4. For the private mode, select a bucket to assign a gateway.
+
+5. Enter the **Gateway name**. This name also will be used as a unique part of the gateway domain.
+
+6. Click **Create**.
## Retrieve your files
@@ -178,13 +133,8 @@ To retrieve through the public or dedicated gateway, on the Chainstack platform,
Retrieve using the file's CID:
-
-
- On the Chainstack platform, navigate to your file.
-
-
- In the **CID** field, click **Copy**.
-
-
+1. On the Chainstack platform, navigate to your file.
+
+2. In the **CID** field, click **Copy**.
This will copy the file's CID that you can use to retrieve the file using [IPFS tools](https://github.com/ipfs/awesome-ipfs).
diff --git a/docs/yellowstone-grpc-geyser-plugin.mdx b/docs/yellowstone-grpc-geyser-plugin.mdx
index 9fc69598..85030bf7 100644
--- a/docs/yellowstone-grpc-geyser-plugin.mdx
+++ b/docs/yellowstone-grpc-geyser-plugin.mdx
@@ -22,17 +22,11 @@ Benefits
## Enable the Yellowstone gRPC Geyser plugin
-
-
-Deploy a Solana [Global Node](/docs/global-elastic-node)
-
-
-Click on your deployed Solana node.
-
-
-Click **Add-ons** > **Yellowstone gRPC Geyser Plugin** > **Install**.
-
-
+1. Deploy a Solana [Global Node](/docs/global-elastic-node)
+
+2. Click on your deployed Solana node.
+
+3. Click **Add-ons** > **Yellowstone gRPC Geyser Plugin** > **Install**.
## Limits
diff --git a/docs/zksync-era-tooling.mdx b/docs/zksync-era-tooling.mdx
index 1bf4c658..7dee3762 100644
--- a/docs/zksync-era-tooling.mdx
+++ b/docs/zksync-era-tooling.mdx
@@ -17,21 +17,17 @@ See [zksync-ethers](https://github.com/zksync-sdk/zksync-ethers).
### Hardhat
Configure [Hardhat](https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync) to deploy contracts and interact through your zkSync Era nodes.
-
-
- Install [Hardhat](https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync) and create a project.
+1. Install [Hardhat](https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync) and create a project.
```shell Shell
yarn add -D typescript ts-node ethers@^5.7.2 zksync-web3 hardhat @matterlabs/hardhat-zksync-solc @matterlabs/hardhat-zksync-deploy @matterlabs/zksync-contracts @openzeppelin/contracts @matterlabs/hardhat-zksync-verify @nomicfoundation/hardhat-verify dotenv
```
-
-
- Install the [dotenv](https://www.npmjs.com/package/dotenv) package to securely load your sensitive variables from a `.env` file
-
-
- Create a new environment in `hardhat.config.ts`:
+
+2. Install the [dotenv](https://www.npmjs.com/package/dotenv) package to securely load your sensitive variables from a `.env` file
+
+3. Create a new environment in `hardhat.config.ts`:
```js hardhat.config.ts
@@ -69,8 +65,6 @@ Configure [Hardhat](https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync)
export default config;
```
-
-
Follow the tutorial for a better understanding: [zkSync Era∎: Develop a custom paymaster contract](/docs/zksync-tutorial-develop-a-custom-paymaster-contract)
@@ -78,14 +72,9 @@ Configure [Hardhat](https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync)
### web3.js
Build DApps using [web3.js](https://github.com/ethereum/web3.js/) and zkSync Era nodes deployed with Chainstack.
-
-
- Install [web3.js](https://web3js.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket.
-
-
+1. Install [web3.js](https://web3js.readthedocs.io/).
+
+2. Connect over HTTP or WebSocket.
#### HTTPS
@@ -122,14 +111,9 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node WSS endpoint protected either with
### web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and zkSync Era nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+
+2. Connect over HTTP or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
#### HTTPS
@@ -216,14 +200,9 @@ You can build a web app to query data using node.js and [axios](https://www.npmj
### ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and zkSync Era nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTPS or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+
+2. Connect over HTTPS or WebSocket. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
#### HTTPS
@@ -281,13 +260,8 @@ where
To make Remix IDE interact with the network through a zkSync Era node deployed with Chainstack:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
diff --git a/docs/zksync-tutorial-develop-a-custom-paymaster-contract.mdx b/docs/zksync-tutorial-develop-a-custom-paymaster-contract.mdx
index 99cc1284..d9c3ef31 100644
--- a/docs/zksync-tutorial-develop-a-custom-paymaster-contract.mdx
+++ b/docs/zksync-tutorial-develop-a-custom-paymaster-contract.mdx
@@ -44,35 +44,23 @@ zkSync Era introduces the concept of smart accounts and paymasters, designed to
To get from zero to a paymaster-sponsored transaction, do the following:
-
-
- With Chainstack, create a public chain project.
-
-
- With Chainstack, join the zkSync Era Sepolia Testnet.
-
-
- With Chainstack, access your zkSync Era Sepolia Testnet node credentials.
-
-
- Setup the project and install the required dependencies.
-
-
- Create the smart contracts.
-
-
- Get zkSync Era Sepolia Testnet funds from the faucet.
-
-
- Set up the Hardhat scripts to deploy and interact.
-
-
- Deploy the smart contracts.
-
-
- Use the paymaster to mint tokens to a new address without using gas.
-
-
+1. With Chainstack, create a public chain project.
+
+2. With Chainstack, join the zkSync Era Sepolia Testnet.
+
+3. With Chainstack, access your zkSync Era Sepolia Testnet node credentials.
+
+4. Setup the project and install the required dependencies.
+
+5. Create the smart contracts.
+
+6. Get zkSync Era Sepolia Testnet funds from the faucet.
+
+7. Set up the Hardhat scripts to deploy and interact.
+
+8. Deploy the smart contracts.
+
+9. Use the paymaster to mint tokens to a new address without using gas.
## Step-by-step
diff --git a/docs/zora-tooling.mdx b/docs/zora-tooling.mdx
index f2cf72b1..83b1f44d 100644
--- a/docs/zora-tooling.mdx
+++ b/docs/zora-tooling.mdx
@@ -9,14 +9,9 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## web3.py
Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Zora nodes deployed with Chainstack.
-
-
- Install [web3.py](https://web3py.readthedocs.io/).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [web3.py](https://web3py.readthedocs.io/).
+
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -47,14 +42,9 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
## ethers.js
Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js/) and Zora nodes deployed with Chainstack.
-
-
- Install [ethers.js](https://www.npmjs.com/package/ethers).
-
-
- Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
-
-
+1. Install [ethers.js](https://www.npmjs.com/package/ethers).
+
+2. Connect over HTTP. See also [EVM node connection: HTTP vs WebSocket](https://support.chainstack.com/hc/en-us/articles/900002187586-Ethereum-node-connection-HTTP-vs-WebSocket).
### HTTP
@@ -88,12 +78,9 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Zora nodes.
-
-
- Install [Hardhat](https://hardhat.org/) and create a project.
-
-
- Create a new environment in `hardhat.config.js`:
+1. Install [Hardhat](https://hardhat.org/) and create a project.
+
+2. Create a new environment in `hardhat.config.js`:
```javascript Javascript
@@ -115,38 +102,25 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
-
-
- Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
-
-
+
+3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
See also [Forking EVM-compatible mainnet with Hardhat](https://support.chainstack.com/hc/en-us/articles/900004242406).
## Remix IDE
To make Remix IDE interact with the network through a Chainstack node:
-
-
- Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
-
-
- In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
-
-
+1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [Interacting through MetaMask](#metamask).
+
+2. In Remix IDE, navigate to the **Deploy** tab. Select **Injected Provider - MetaMask** in **Environment**.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
## Foundry
-
-
- Install [Foundry](https://getfoundry.sh/).
-
-
- Use `--rpc-url` to run the operation through your Chainstack node.
-
-
+1. Install [Foundry](https://getfoundry.sh/).
+
+2. Use `--rpc-url` to run the operation through your Chainstack node.
### Forge
From a17e95b6bc9ad08d7bd0435731b0fc475d4449ea Mon Sep 17 00:00:00 2001
From: Ake <10195782+akegaviar@users.noreply.github.com>
Date: Tue, 8 Jul 2025 09:07:54 +0800
Subject: [PATCH 2/6] Fix coderabbit comments
---
docs/avalanche-tooling.mdx | 12 ++---
docs/cronos-tooling.mdx | 40 ++++++++--------
docs/ethereum-tooling.mdx | 4 +-
docs/filecoin-tooling.mdx | 2 +-
...simple-metaverse-contract-with-foundry.mdx | 2 +-
...secrets-guide-to-environment-variables.mdx | 48 ++++++++++---------
docs/klaytn-tooling.mdx | 4 +-
docs/manage-your-account.mdx | 17 ++-----
docs/tezos-tooling.mdx | 42 ++++++++--------
...w-to-customize-fungible-tokens-jettons.mdx | 4 --
10 files changed, 81 insertions(+), 94 deletions(-)
diff --git a/docs/avalanche-tooling.mdx b/docs/avalanche-tooling.mdx
index 603e0f13..baced60d 100644
--- a/docs/avalanche-tooling.mdx
+++ b/docs/avalanche-tooling.mdx
@@ -318,7 +318,7 @@ where
* NETWORK\_ID — Avalanche C-Chain network ID:
* Mainnet: `43114`
- * Testnet: `43113`
+ * Fuji Testnet: `43113`
See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
@@ -343,7 +343,7 @@ where
* NETWORK\_ID — Avalanche C-Chain network ID:
* Mainnet: `43114`
- * Testnet: `43113`
+ * Fuji Testnet: `43113`
See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
@@ -369,7 +369,7 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
* NETWORK\_ID — Avalanche C-Chain network ID:
* Mainnet: `43114`
- * Testnet: `43113`
+ * Fuji Testnet: `43113`
Example to run the deployment script:
@@ -447,7 +447,7 @@ where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either wi
1. Install [AvalancheJS](https://github.com/ava-labs/avalanchejs).
2. Use [AvalancheJS examples](https://github.com/ava-labs/avalanchejs/tree/master/examples) to interact with the X-Chain through your Avalanche node with the following settings:
-3.
+
```javascript Javascript
const ip: string = "BASE_ENDPOINT"
// const port: number = 9650
@@ -463,8 +463,8 @@ where
* CHAIN\_ID — the chain ID of the network you are connecting to:
- * Mainnet: `1`
- * Fuji testnet: `5`
+ * Mainnet: `43114`
+ * Fuji Testnet: `43113`
Make sure you remove `const port` and change `port` to `null` in the default example.
diff --git a/docs/cronos-tooling.mdx b/docs/cronos-tooling.mdx
index 769d1f0a..32ab8313 100644
--- a/docs/cronos-tooling.mdx
+++ b/docs/cronos-tooling.mdx
@@ -14,26 +14,26 @@ Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact throu
2. Create a new environment in `hardhat.config.js`:
-
- ```javascript Javascript
- require("@nomiclabs/hardhat-waffle");
- ...
- module.exports = {
- solidity: "0.7.3",
- networks: {
- chainstack: {
- url: "YOUR_CHAINSTACK_ENDPOINT",
- accounts: ["YOUR_PRIVATE_KEY"]
- },
- }
- };
- ```
-
-
- where
-
- * YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
- * YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
+
+ ```javascript Javascript
+ require("@nomiclabs/hardhat-waffle");
+ ...
+ module.exports = {
+ solidity: "0.7.3",
+ networks: {
+ chainstack: {
+ url: "YOUR_CHAINSTACK_ENDPOINT",
+ accounts: ["YOUR_PRIVATE_KEY"]
+ },
+ }
+ };
+ ```
+
+
+ where
+
+ * YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+ * YOUR\_PRIVATE\_KEY — the private key of the account that you use to deploy the contract
3. Run `npx hardhat run scripts/deploy.js --network chainstack` and Hardhat will deploy using Chainstack.
diff --git a/docs/ethereum-tooling.mdx b/docs/ethereum-tooling.mdx
index 3af72528..eb4287cf 100644
--- a/docs/ethereum-tooling.mdx
+++ b/docs/ethereum-tooling.mdx
@@ -151,11 +151,11 @@ Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Ethereum no
```python Python
from web3 import Web3
- // Using HTTP provider
+ # Using HTTP provider
http_web3 = Web3(Web3.HTTPProvider("/*YOUR_HTTP_CHAINSTACK_ENDPOINT*/"))
print(http_web3.eth.block_number)
- // Using WebSocket provider
+ # Using WebSocket provider
with Web3(Web3.WebsocketProvider("/*YOUR_WS_CHAINSTACK_ENDPOINT*/")) as ws_web3:
print(ws_web3.eth.block_number)
```
diff --git a/docs/filecoin-tooling.mdx b/docs/filecoin-tooling.mdx
index e6d99d02..92072e56 100644
--- a/docs/filecoin-tooling.mdx
+++ b/docs/filecoin-tooling.mdx
@@ -10,7 +10,7 @@ title: "Filecoin tooling"
## MetaMask
-You can set your [MetaMask](https://metamask.io/) to interact through your Filecoin nodes..
+You can set your [MetaMask](https://metamask.io/) to interact through your Filecoin nodes.
1. Open your MetaMask and click the network selector.
2. In the network selector, click **Custom RPC**.
diff --git a/docs/harmony-tutorial-a-simple-metaverse-contract-with-foundry.mdx b/docs/harmony-tutorial-a-simple-metaverse-contract-with-foundry.mdx
index ece391f9..1dc2ed0d 100644
--- a/docs/harmony-tutorial-a-simple-metaverse-contract-with-foundry.mdx
+++ b/docs/harmony-tutorial-a-simple-metaverse-contract-with-foundry.mdx
@@ -100,7 +100,7 @@ See [Foundry](https://getfoundry.sh/).
}
modifier supplyCap {
- require(supply.current() <= maxSupply, "All patches minted.");
+ require(supply.current() < maxSupply, "All patches minted.");
_;
}
diff --git a/docs/how-to-store-your-web3-dapp-secrets-guide-to-environment-variables.mdx b/docs/how-to-store-your-web3-dapp-secrets-guide-to-environment-variables.mdx
index 744d285f..646a37e7 100644
--- a/docs/how-to-store-your-web3-dapp-secrets-guide-to-environment-variables.mdx
+++ b/docs/how-to-store-your-web3-dapp-secrets-guide-to-environment-variables.mdx
@@ -100,46 +100,48 @@ Here’s what you need to do to replicate this for your environment:
3. Install the dotenv package from your CLI via npm:
- ```bash
- npm install dotenv
- ```
+ ```bash
+ npm install dotenv
+ ```
4. Create a `.env` file and enter your secrets in the appropriate format:
- ```sh
- CHAINSTACK_NODE_URL="https://nd-123-456-789.p2pify.com/API_KEY"
- ```
+ ```sh
+ CHAINSTACK_NODE_URL="https://nd-123-456-789.p2pify.com/API_KEY"
+ ```
5. Enter this as early as possible in your DApp's JavaScript file to load the package once it runs:
- ```js
- require('dotenv').config();
- ```
+ ```js
+ require('dotenv').config();
+ ```
6. Fetch your DApp secret like so:
- ```js
- const secret = process.env.CHAINSTACK_NODE_URL;
- ```
+ ```js
+ const secret = process.env.CHAINSTACK_NODE_URL;
+ ```
7. Confirm your secret is loading correctly in your script by logging the result in the console:
- ```js
- // If secret is declared
- console.log(secret);
+ ```js
+ // If secret is declared
+ console.log(secret);
- // If the secret is not declared
- console.log(process.env.YOUR_KEY);
- ```
+ // If the secret is not declared
+ console.log(process.env.YOUR_KEY);
+ ```
8. Run your script and check if the result is correct:
- ```bash
- $ node index.js
+ ```bash
+ node index.js
+ ```
- // Script response
- YOUR_VALUE
- ```
+ ```bash
+ // Script response
+ YOUR_VALUE
+ ```
### Full script example
diff --git a/docs/klaytn-tooling.mdx b/docs/klaytn-tooling.mdx
index 42a1b782..3eeee1b7 100644
--- a/docs/klaytn-tooling.mdx
+++ b/docs/klaytn-tooling.mdx
@@ -8,9 +8,9 @@ On [node access details](/docs/manage-your-node#view-node-access-and-credentials
## caver-js
-[caver-js](https://docs.klaytn.foundation/docs/references/sdk/caver-js/) is a JavaScript library enabling developers to interact with a Klaytn node via HTTP connection. It supports all [Klaytn APIs](https://docs.klaytn.foundation/docs/references/sdk/caver-js/api/).
+[caver-js](https://docs.kaia.io/references/sdk/caver-js/) is a JavaScript library enabling developers to interact with a Klaytn node via HTTP connection. It supports all [Klaytn APIs](https://docs.klaytn.foundation/docs/references/sdk/caver-js/api/).
-1. Install [caver-js](https://docs.klaytn.foundation/docs/references/sdk/caver-js/get-started/#installation-).
+1. Install [caver-js](https://docs.kaia.io/references/sdk/caver-js/).
2. Connect over HTTP:
diff --git a/docs/manage-your-account.mdx b/docs/manage-your-account.mdx
index b4d9af0d..a91cf997 100644
--- a/docs/manage-your-account.mdx
+++ b/docs/manage-your-account.mdx
@@ -40,22 +40,11 @@ To enable 2FA:
3. Provide your current password.
-4. Enter your new password twice to confirm.
-
-5. Click **Save** to apply the change.
-
-## Download your 2FA recovery codes
-
-1. Go to **Settings** > **Personal** in your account.
-
-2. Under **Security**, click **Download 2FA recovery codes**.
-
-3. Download, print, or copy your 2FA recovery codes. These are the backup codes that you will need to restore your 2FA access if you lose it.
-
-4. Scan the QR code with your authenticator app or enter the code manually.
+4. Download, print, or copy your 2FA recovery codes. These are the backup codes that you will need to restore your 2FA access if you lose it.
-5. Enter the code provided by the authenticator app in the 2FA wizard. Click **Enable 2FA**.
+5. Scan the QR code with your authenticator app or enter the code manually.
+6. Enter the code provided by the authenticator app in the 2FA wizard. Click **Enable 2FA**.
The 2FA recovery codes are shown once and cannot be retrieved.
diff --git a/docs/tezos-tooling.mdx b/docs/tezos-tooling.mdx
index 94af0df6..aa42ace6 100644
--- a/docs/tezos-tooling.mdx
+++ b/docs/tezos-tooling.mdx
@@ -14,9 +14,9 @@ title: "Tezos tooling"
2. Connect the Tezos client to the Chainstack-deployed Tezos node:
- ```bash
- octez-client -E --endpoint YOUR_CHAINSTACK_ENDPOINT
- ```
+ ```bash
+ octez-client -E --endpoint YOUR_CHAINSTACK_ENDPOINT
+ ```
where YOUR_CHAINSTACK_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
@@ -37,19 +37,19 @@ Example to get the balance of an address in tez:
2. Use `RpcClient` to connect to your Tezos node:
- ```javascript
- const { RpcClient } = require('@taquito/rpc');
+ ```javascript
+ const { RpcClient } = require('@taquito/rpc');
- async function main() {
- const client = new RpcClient('YOUR_CHAINSTACK_ENDPOINT');
- await client.getBlock().then((data) => {
- console.log('-- Chain ID: ', data.chain_id);
- console.log('-- Head block: ', data);
- }).catch((error) => console.log(JSON.stringify(error, null, 2)));
- }
- ```
+ async function main() {
+ const client = new RpcClient('YOUR_CHAINSTACK_ENDPOINT');
+ await client.getBlock().then((data) => {
+ console.log('-- Chain ID: ', data.chain_id);
+ console.log('-- Head block: ', data);
+ }).catch((error) => console.log(JSON.stringify(error, null, 2)));
+ }
+ ```
- where YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
+ where YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint. See also [node access details](/docs/manage-your-node#view-node-access-and-credentials).
## Temple wallet
@@ -67,12 +67,12 @@ See also [node access details](/docs/manage-your-node#view-node-access-and-crede
2. Originate your contract through a Chainstack-deployed Tezos node:
- ```bash
- SmartPy.sh originate-contract --code CONTRACT --storage STORAGE --rpc YOUR_CHAINSTACK_ENDPOINT
- ```
+ ```bash
+ SmartPy.sh originate-contract --code CONTRACT --storage STORAGE --rpc YOUR_CHAINSTACK_ENDPOINT
+ ```
- where
+ where
- * YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint
- * CONTRACT — your compiled contract
- * STORAGE — your compiled contract storage
+ * YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint
+ * CONTRACT — your compiled contract
+ * STORAGE — your compiled contract storage
diff --git a/docs/ton-how-to-customize-fungible-tokens-jettons.mdx b/docs/ton-how-to-customize-fungible-tokens-jettons.mdx
index fe33d6a7..c4516d10 100644
--- a/docs/ton-how-to-customize-fungible-tokens-jettons.mdx
+++ b/docs/ton-how-to-customize-fungible-tokens-jettons.mdx
@@ -135,8 +135,6 @@ Since we have updated the mentioned functions, we now need to update their calls
}
```
-
-
To prevent minting more than the capped supply and ensure that the correct price is applied, we need to modify the `recv_internal` function. We will:
@@ -337,8 +335,6 @@ This test verifies jetton minting based on the TON sent, ensuring the correct je
});
```
-
-
This test checks that minting beyond the capped supply fails, verifying that the transaction is aborted with the correct exit code.
From f4ea843dd17b67f03ccf7f95e970f48bd9a1c14d Mon Sep 17 00:00:00 2001
From: Ake <10195782+akegaviar@users.noreply.github.com>
Date: Tue, 8 Jul 2025 09:17:38 +0800
Subject: [PATCH 3/6] Fix coderabbit nitpicks
---
docs/ethereum-tooling.mdx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/ethereum-tooling.mdx b/docs/ethereum-tooling.mdx
index eb4287cf..53baf8f0 100644
--- a/docs/ethereum-tooling.mdx
+++ b/docs/ethereum-tooling.mdx
@@ -67,12 +67,12 @@ To enable Remix IDE to interact with the network through a Chainstack node, you
1. Install and set up MetaMask to use a Chainstack node for interaction. You can refer to the guide on Interacting through MetaMask for detailed instructions.
2. Open Remix IDE and go to the Deploy tab (or Deploy and run transactions tab). Here, select **Injected Provider - MetaMask** as your [environment](https://remix-ide.readthedocs.io/en/latest/run.html#environment).
-### ChainIDE
+### Remix IDE
To enable Remix IDE to interact with the network through a Chainstack node, you can follow these steps:
1. Install and set up MetaMask to use a Chainstack node for interaction. You can refer to the guide on Interacting through MetaMask for detailed instructions.
-2. Open ChainIDE and navigate the [Connect Wallet](https://chainide.gitbook.io/chainide-english-1/ethereum-ide-1/1.-ethereum-ide/quick-demo#id-3.-connect-to-ethereum-evm) button. Here, select **Injected Web3 Provider** and then **MetaMask**.
+2. Open Remix IDE and navigate the [Connect Wallet](https://remix.ethereum.org/) button. Here, select **Injected Web3 Provider** and then **MetaMask**.
## Programming languages and libraries
@@ -596,7 +596,7 @@ Configure [Truffle](https://github.com/trufflesuite/truffle) to deploy contracts
const YourContract = artifacts.require("CONTRACT_NAME");
module.exports = function (deployer) {
- deployer.YourContract();
+ deployer.deploy(YourContract);
};
```
From f21ca2d7891687e5818aaa5b21ca28c22d5774d7 Mon Sep 17 00:00:00 2001
From: Ake <10195782+akegaviar@users.noreply.github.com>
Date: Tue, 8 Jul 2025 09:23:55 +0800
Subject: [PATCH 4/6] More coderabbit nitpicks
---
docs/ethereum-tooling.mdx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/ethereum-tooling.mdx b/docs/ethereum-tooling.mdx
index 53baf8f0..8f34adcb 100644
--- a/docs/ethereum-tooling.mdx
+++ b/docs/ethereum-tooling.mdx
@@ -58,7 +58,7 @@ To add a custom RPC to Frame Desktop, open the wallet and navigate to the **Chai
## IDEs
-Cloud-based IDEs provide the flexibility to use injected providers. MetaMask is the most commonly used one. By adding a Chainstack RPC node in MetaMask and connecting to the wallet in your IDE, you can seamlessly interact with the network throught a Chainstack node.
+Cloud-based IDEs provide the flexibility to use injected providers. MetaMask is the most commonly used one. By adding a Chainstack RPC node in MetaMask and connecting to the wallet in your IDE, you can seamlessly interact with the network through a Chainstack node.
### Remix IDE
@@ -168,7 +168,7 @@ Build DApps using [Nethereum](https://github.com/Nethereum/Nethereum) and Ethere
2. Initialize HTTP or WebSocket provider
- ```csharp csharp
+ ```csharp
using Nethereum.JsonRpc.WebSocketClient;
using Nethereum.Web3;
@@ -522,9 +522,9 @@ Configure [Scaffold-ETH 2](https://github.com/scaffold-eth/scaffold-eth-2) to de
yarn deploy --network sepolia
```
-8. To start the NextJS app with the Chainstack configuration
+8. To start the Nextюоы app with the Chainstack configuration
- ```Text Bash
+ ```bash
yarn start
```
From 7f18c79a4b842d1d2e8d9d165045380a17280251 Mon Sep 17 00:00:00 2001
From: Ake <10195782+akegaviar@users.noreply.github.com>
Date: Tue, 8 Jul 2025 09:34:02 +0800
Subject: [PATCH 5/6] Fix nitpicks
---
docs/ethereum-tooling.mdx | 55 +++++++++++++++++----------------------
1 file changed, 24 insertions(+), 31 deletions(-)
diff --git a/docs/ethereum-tooling.mdx b/docs/ethereum-tooling.mdx
index 8f34adcb..4edb5e95 100644
--- a/docs/ethereum-tooling.mdx
+++ b/docs/ethereum-tooling.mdx
@@ -64,13 +64,6 @@ Cloud-based IDEs provide the flexibility to use injected providers. MetaMask is
To enable Remix IDE to interact with the network through a Chainstack node, you can follow these steps:
-1. Install and set up MetaMask to use a Chainstack node for interaction. You can refer to the guide on Interacting through MetaMask for detailed instructions.
-2. Open Remix IDE and go to the Deploy tab (or Deploy and run transactions tab). Here, select **Injected Provider - MetaMask** as your [environment](https://remix-ide.readthedocs.io/en/latest/run.html#environment).
-
-### Remix IDE
-
-To enable Remix IDE to interact with the network through a Chainstack node, you can follow these steps:
-
1. Install and set up MetaMask to use a Chainstack node for interaction. You can refer to the guide on Interacting through MetaMask for detailed instructions.
2. Open Remix IDE and navigate the [Connect Wallet](https://remix.ethereum.org/) button. Here, select **Injected Web3 Provider** and then **MetaMask**.
@@ -86,7 +79,7 @@ Build DApps using [web3.js](https://github.com/web3/web3.js) and Ethereum nodes
1. Install web3.js
- ```Text Bash
+ ```bash
npm install web3
```
@@ -114,7 +107,7 @@ Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js) and Ethere
1. Install ethers.js
- ```Text Bash
+ ```bash
npm install ethers
```
@@ -142,13 +135,13 @@ Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Ethereum no
1. Install web3.py
- ```Text Bash
+ ```bash
pip install web3
```
2. Initialize HTTP or WebSocket provider
- ```python Python
+ ```python
from web3 import Web3
# Using HTTP provider
@@ -243,7 +236,7 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
1. Install Foundry
- ```Text Bash
+ ```bash
curl -L https://foundry.paradigm.xyz | bash
foundryup
```
@@ -253,7 +246,7 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
Create a new Foundry project:
- ```Text Bash
+ ```bash
forge init my_project
cd my_project
```
@@ -274,7 +267,7 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
```bash Bash
source .env
- echo $CHAINSTACK_DEVNET_URL
+ echo $CHAINSTACK_DEVNET_ENDPOINT
echo $PRIVATE_KEY_DEVNET
```
@@ -289,8 +282,8 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
libs = ['lib']
[rpc_endpoints]
- mainnet = "${CHAINSTACK_MAINNET_URL}"
- devnet = "${CHAINSTACK_DEVNET_URL}"
+ mainnet = "${CHAINSTACK_MAINNET_ENDPOINT}"
+ devnet = "${CHAINSTACK_DEVNET_ENDPOINT}"
```
3. Before deploying, ensure that your contracts are compiled. This step is crucial to avoid deployment issues.
@@ -302,7 +295,7 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
4. To use the Chainstack endpoint for deployment, you can use the following command:
```bash Bash
- forge create --rpc-url ${CHAINSTACK_DEVNET_URL} --private-key ${PRIVATE_KEY_DEVNET} src/YourContract.sol:YourContract
+ forge create --rpc-url ${CHAINSTACK_DEVNET_ENDPOINT} --private-key ${PRIVATE_KEY_DEVNET} src/YourContract.sol:YourContract
```
@@ -352,7 +345,7 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
5. Interact with the blockchain using Cast. Use the following command to query the balance of an Ethereum address:
```bash Bash
- cast balance --rpc-url $CHAINSTACK_RPC_URL
+ cast balance --rpc-url $CHAINSTACK_DEVNET_ENDPOINT
```
@@ -364,7 +357,7 @@ Configure [Hardhat](https://github.com/NomicFoundation/hardhat) to deploy contra
1. Install Hardhat and other dependencies
- ```Text Bash
+ ```bash
npm init -y
npm install --save-dev hardhat @nomiclabs/hardhat-ethers ethers dotenv
```
@@ -373,7 +366,7 @@ Configure [Hardhat](https://github.com/NomicFoundation/hardhat) to deploy contra
Create a `.env` file in your project root and add your Chainstack endpoint and private key:
- ```Text Bash
+ ```bash
CHAINSTACK_MAINNET_ENDPOINT=https://your-chainstack-mainnet-url
CHAINSTACK_DEVNET_ENDPOINT=https://your-chainstack-devnet-url
@@ -518,11 +511,11 @@ Configure [Scaffold-ETH 2](https://github.com/scaffold-eth/scaffold-eth-2) to de
7. To deploy your contracts using the Chainstack endpoint, run
- ```Text Bash
+ ```bash
yarn deploy --network sepolia
```
-8. To start the Nextюоы app with the Chainstack configuration
+8. To start the Next.js app with the Chainstack configuration
```bash
yarn start
@@ -534,7 +527,7 @@ Configure [Truffle](https://github.com/trufflesuite/truffle) to deploy contracts
1. Install Truffle and other dependencies
- ```Text Bash
+ ```bash
# Initialize a new npm project
npm init -y
@@ -618,7 +611,7 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
1. Install Ape and dependencies
- ```Text Bash
+ ```bash
pip install eth-ape
```
@@ -626,7 +619,7 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
Initialize a project:
- ```bash Bash
+ ```bash
ape init
```
@@ -662,7 +655,7 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
4. To deploy your contracts using the Chainstack endpoint, you can create a deployment script, for example scripts/deploy.py
- ```python Python
+ ```python
from ape import accounts, project
def main():
@@ -691,7 +684,7 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
6. Run the deployment script using
- ```Text Bash
+ ```bash
ape run scripts/deploy.py --network ethereum:sepolia
```
@@ -710,7 +703,7 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
Create a new Brownie project (add `--force` if a folder is not empty):
- ```Text Bash
+ ```bash
brownie init
```
@@ -756,7 +749,7 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
Add a custom network to Brownie's network list:
- ```bash Bash
+ ```bash
brownie networks add Ethereum chainstack-mainnet host=${CHAINSTACK_MAINNET_ENDPOINT} chainid=1
brownie networks add Ethereum chainstack-devnet host=${CHAINSTACK_DEVNET_ENDPOINT} chainid=1337
```
@@ -765,7 +758,7 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
To use your private key for deployments, you can create a `scripts/deploy.py` file:
- ```python Python
+ ```python
import os
from brownie import accounts, Counter # Replace 'Counter' with your contract's class name
@@ -783,7 +776,7 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
3. To deploy your contracts using the Chainstack endpoint, run
- ```Text Bash
+ ```bash
brownie run scripts/deploy.py --network chainstack-devnet
```
From 938db5dc5c450197c57713c905fc2bd29a74db37 Mon Sep 17 00:00:00 2001
From: Ake <10195782+akegaviar@users.noreply.github.com>
Date: Tue, 8 Jul 2025 09:42:38 +0800
Subject: [PATCH 6/6] Fix nitpicks
---
docs/ethereum-tooling.mdx | 44 +++++++++++++++++++--------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/docs/ethereum-tooling.mdx b/docs/ethereum-tooling.mdx
index 4edb5e95..bda34a88 100644
--- a/docs/ethereum-tooling.mdx
+++ b/docs/ethereum-tooling.mdx
@@ -79,7 +79,7 @@ Build DApps using [web3.js](https://github.com/web3/web3.js) and Ethereum nodes
1. Install web3.js
- ```bash
+ ```bash Bash
npm install web3
```
@@ -107,7 +107,7 @@ Build DApps using [ethers.js](https://github.com/ethers-io/ethers.js) and Ethere
1. Install ethers.js
- ```bash
+ ```bash Bash
npm install ethers
```
@@ -135,13 +135,13 @@ Build DApps using [web3.py](https://github.com/ethereum/web3.py) and Ethereum no
1. Install web3.py
- ```bash
+ ```bash Bash
pip install web3
```
2. Initialize HTTP or WebSocket provider
- ```python
+ ```python Python
from web3 import Web3
# Using HTTP provider
@@ -161,7 +161,7 @@ Build DApps using [Nethereum](https://github.com/Nethereum/Nethereum) and Ethere
2. Initialize HTTP or WebSocket provider
- ```csharp
+ ```csharp C#
using Nethereum.JsonRpc.WebSocketClient;
using Nethereum.Web3;
@@ -196,7 +196,7 @@ Build DApps using [viem](https://github.com/wevm/viem) and Ethereum nodes deploy
2. Initialize HTTP or WebSocket provider
- ```typescript TypeScript
+ ```typescript Typescript
import { createPublicClient, http, webSocket } from 'viem';
import { mainnet } from 'viem/chains';
@@ -236,7 +236,7 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
1. Install Foundry
- ```bash
+ ```bash Bash
curl -L https://foundry.paradigm.xyz | bash
foundryup
```
@@ -246,7 +246,7 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
Create a new Foundry project:
- ```bash
+ ```bash Bash
forge init my_project
cd my_project
```
@@ -254,7 +254,7 @@ Configure [Foundry](https://github.com/foundry-rs/foundry) to deploy contracts u
Create a `.env` file in your project root and add your Chainstack endpoint and private key:
- ```
+ ```bash Bash
CHAINSTACK_MAINNET_ENDPOINT=https://your-chainstack-mainnet-url
CHAINSTACK_DEVNET_ENDPOINT=https://your-chainstack-devnet-url
@@ -357,7 +357,7 @@ Configure [Hardhat](https://github.com/NomicFoundation/hardhat) to deploy contra
1. Install Hardhat and other dependencies
- ```bash
+ ```bash Bash
npm init -y
npm install --save-dev hardhat @nomiclabs/hardhat-ethers ethers dotenv
```
@@ -366,7 +366,7 @@ Configure [Hardhat](https://github.com/NomicFoundation/hardhat) to deploy contra
Create a `.env` file in your project root and add your Chainstack endpoint and private key:
- ```bash
+ ```bash Bash
CHAINSTACK_MAINNET_ENDPOINT=https://your-chainstack-mainnet-url
CHAINSTACK_DEVNET_ENDPOINT=https://your-chainstack-devnet-url
@@ -546,7 +546,7 @@ Configure [Truffle](https://github.com/trufflesuite/truffle) to deploy contracts
Create a `.env` file in your project root and add your Chainstack endpoint and private key:
- ```bash
+ ```bash Bash
CHAINSTACK_MAINNET_ENDPOINT=https://your-chainstack-mainnet-url
CHAINSTACK_DEVNET_ENDPOINT=https://your-chainstack-devnet-url
@@ -611,7 +611,7 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
1. Install Ape and dependencies
- ```bash
+ ```bash Bash
pip install eth-ape
```
@@ -619,7 +619,7 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
Initialize a project:
- ```bash
+ ```bash Bash
ape init
```
@@ -655,7 +655,7 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
4. To deploy your contracts using the Chainstack endpoint, you can create a deployment script, for example scripts/deploy.py
- ```python
+ ```python Python
from ape import accounts, project
def main():
@@ -684,7 +684,7 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
6. Run the deployment script using
- ```bash
+ ```bash Bash
ape run scripts/deploy.py --network ethereum:sepolia
```
@@ -693,7 +693,7 @@ Configure [Ape Framework](https://github.com/ApeWorX/ape) to deploy contracts us
Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts using Chainstack Ethereum nodes.
1. Create a Python virtual environment and install Brownie
- ```bash
+ ```bash Bash
python -m venv venv
source venv/bin/activate # On Windows, use venv\Scripts\activate
@@ -703,14 +703,14 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
Create a new Brownie project (add `--force` if a folder is not empty):
- ```bash
+ ```bash Bash
brownie init
```
In your project directory, create a `.env` file and add your Chainstack endpoint and private key:
- ```
+ ```bash Bash
CHAINSTACK_MAINNET_ENDPOINT=https://your-chainstack-mainnet-url
CHAINSTACK_DEVNET_ENDPOINT=https://your-chainstack-devnet-url
@@ -749,7 +749,7 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
Add a custom network to Brownie's network list:
- ```bash
+ ```bash Bash
brownie networks add Ethereum chainstack-mainnet host=${CHAINSTACK_MAINNET_ENDPOINT} chainid=1
brownie networks add Ethereum chainstack-devnet host=${CHAINSTACK_DEVNET_ENDPOINT} chainid=1337
```
@@ -758,7 +758,7 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
To use your private key for deployments, you can create a `scripts/deploy.py` file:
- ```python
+ ```python Python
import os
from brownie import accounts, Counter # Replace 'Counter' with your contract's class name
@@ -776,7 +776,7 @@ Configure [Brownie](https://github.com/eth-brownie/brownie) to deploy contracts
3. To deploy your contracts using the Chainstack endpoint, run
- ```bash
+ ```bash Bash
brownie run scripts/deploy.py --network chainstack-devnet
```