Getting Started
You can quickly connect with all EVM chains by integrating EVM Network into your projects.
EVM Network works in conjunction with the web3js library. Add the library codes to your website.
<script src="https://cdnjs.cloudflare.com/ajax/libs/web3/4.0.2/web3.min.js"></script>
or
npm:
npm install web3
yarn:
yarn add web3
pure js: link the
dist/web3.min.js
After that you need to create a web3 instance and set a provider.
Most Ethereum-supported browsers like MetaMask have an EIP-1193 compliant provider available at window.ethereum
.
For web3.js, check Web3.givenProvider
.
If this property is null
you should connect to a remote/local node.
// In Node.js use: const Web3 = require('web3');
const web3 = new Web3(Web3.givenProvider || "ws://localhost:8545");
That’s it! now you can use the web3
object.
Adding evm.js
Incorporating EVM Network into your project is very easy during testing. All you have to do is embed evm.js into your codes.
<script src="https://evm.network/script/evm.js"></script>
That's it! You are now ready to use the EVM functions.
Last updated