Ronin tooling
Truffle
Configure Truffle Suite to deploy contracts to your Ronin nodes.
Install Truffle Suite, HD Wallet-enabled Web3 provider, and create a project.
Create a new environment in truffle-config.js
, add your mnemonic phrase generated by a wallet and the Ronin endpoint instead of YOUR_CHAINSTACK_ENDPOINT:
web3.js
Build DApps using web3.js and Ronin nodes deployed with Chainstack.
Install web3.js.
Connect over HTTP or WebSocket.
HTTP
Use the HttpProvider
object to connect to your node HTTPS endpoint and get the latest block number:
where YOUR_CHAINSTACK_ENDPOINT is your node HTTPS endpoint protected either with the key or password.
WebSocket
Use the WebsocketProvider
object to connect to your node WSS endpoint and get the latest block number:
where YOUR_CHAINSTACK_ENDPOINT is your node WSS endpoint protected either with the key or password.
web3.py
Build DApps using web3.py and Ronin nodes deployed with Chainstack.
Install web3.py.
Connect over HTTP or WebSocket. See also EVM node connection: HTTP vs WebSocket.
HTTP
Use the HTTPProvider
to connect to your node endpoint and get the latest block number.
where
- YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
- HOSTNAME — your node HTTPS endpoint hostname
- USERNAME — your node access username (for password-protected endpoints)
- PASSWORD — your node access password (for password-protected endpoints)
See also node access details.
WebSocket
Use the WebsocketProvider
object to connect to your node WSS endpoint and get the latest block number.
where
- YOUR_CHAINSTACK_ENDPOINT — your node WSS endpoint protected either with the key or password
- HOSTNAME — your node WSS endpoint hostname
- USERNAME — your node access username (for password-protected endpoints)
- PASSWORD — your node access password (for password-protected endpoints)
See also WebSocket connection to an EVM node.
ethers.js
Build DApps using ethers.js and Ronin nodes deployed with Chainstack.
Install ethers.js.
Connect over HTTP or WebSocket. See also EVM node connection: HTTP vs WebSocket.
HTTP
Use the JsonRpcProvider
object to connect to your node endpoint and get the latest block number:
where
-
YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
-
USERNAME — your node access username (for password-protected endpoints)
-
PASSWORD — your node access password (for password-protected endpoints)
-
NETWORK_ID — Ronin network ID:
- Ronin Mainnet:
2020
- Saigon Testnet:
2021
- Ronin Mainnet:
See also node access details.
WebSocket
Use the WebSocketProvider
object to connect to your node WSS endpoint and get the latest block number:
where
-
YOUR_CHAINSTACK_ENDPOINT — your node WSS endpoint endpoint protected either with the key or password
-
NETWORK_ID — Ronin network ID:
- Ronin Mainnet:
2020
- Saigon Testnet:
2021
- Ronin Mainnet:
See also node access details.