EVM-Compatible Networks
Using Ethers.js or Web3.js with the Wepin Provider allows you to interact with EVM-compatible blockchain networks.
Supported Networks
Chain ID | Network Name | Network Variable |
---|---|---|
1 | Ethereum Mainnet | ethereum |
5 | Ethereum Goerli Testnet | evmeth-goerli |
11155111 | Ethereum Sepolia Testnet | evmeth-sepolia |
19 | Songbird Canary Network | evmsongbird |
137 | Polygon Mainnet | evmpolygon |
80002 | Polygon Amoy | evmpolygon-amoy |
1001 | Klaytn Testnet | klaytn-testnet |
8217 | Klaytn Mainnet | klaytn |
2731 | TimeNetwork Testnet | evmtimenetwork-testnet |
Installation
First, import @wepin/widget-sdk
and @wepin/provider
into your peoject.
Initialize Web3.js
First, initialize Wepin
, then obtain the provider to initialize web3.js.
Methods
Get Accounts
Through the initialized web3
, you can retrieve account information.
Get Balance
Using the account information, you can query the balance.
You can refer to the link below to query not only the balance but also fee information, block number, etc.
Send Transaction
You can send transactions.
Contract Call
You can perform contract calls.
For more details on the Ethereum-compatible network provider, please refer to the link below.
Last updated