Creates and returns a typed Ethers v6 contract instance for the Bank precompile contract. This contract is used for interoperability between the EVM and Cosmos.
import { getBankPrecompileEthersV6Contract } from '@sei-js/evm/ethers';import { ethers } from 'ethers';const provider = new ethers.BrowserProvider(window.ethereum); // or any other providerconst signer = await provider.getSigner();const accounts = await provider.send('eth_requestAccounts', []);const bankPrecompileContract = getBankPrecompileEthersV6Contract(signer);const balance = await bankPrecompileContract.balance(accounts[0], 'usei');console.log('Balance:', balance); Copy
import { getBankPrecompileEthersV6Contract } from '@sei-js/evm/ethers';import { ethers } from 'ethers';const provider = new ethers.BrowserProvider(window.ethereum); // or any other providerconst signer = await provider.getSigner();const accounts = await provider.send('eth_requestAccounts', []);const bankPrecompileContract = getBankPrecompileEthersV6Contract(signer);const balance = await bankPrecompileContract.balance(accounts[0], 'usei');console.log('Balance:', balance);
A Provider (read-only) or ethers.Signer to use with the contract.
The typed contract instance for interacting with the Bank precompile contract.
Creates and returns a typed Ethers v6 contract instance for the Bank precompile contract. This contract is used for interoperability between the EVM and Cosmos.
Example