Repository navigation
Releases
Improved Code documentation
Release Notes - Version 1.0.3
π§ Changes
- Improved internal code documentation for better maintainability and onboarding.
- Enhanced JSDoc comments across wallet interaction functions.
- Refactored and clarified example usage in the HTML demo page.
- Standardized function naming and inline comments in
example.js.
π Note
This version introduces no functional changes. All features listed in v1.0.2 remain unchanged, but code readability and developer experience have been significantly improved.
π Usage remains the same. If you were already using v1.0.2, this is a safe upgrade for better clarity.
Added the Feature of contract Interactions (Read/Write Operations)
Release Notes - Version 1.0.2
Added
- Contract Interaction: We've added new functionalities to the library for interacting with smart contracts. You can now easily perform both read and write operations on contracts.
Features:
-
Read Operations:
- Fetch data from smart contracts using the provided methods (e.g.,
getBalance,getOwner, etc.). - Supports querying contract state variables and getting information like balances, ownership, and more.
- Fetch data from smart contracts using the provided methods (e.g.,
-
Write Operations:
- Submit transactions to smart contracts for modifying their state (e.g.,
transfer,mint,burn, etc.). - Automatically handles gas estimation and transaction sending.
- Submit transactions to smart contracts for modifying their state (e.g.,
Improvements:
- Enhanced error handling for transaction failure scenarios.
- Optimized performance for interacting with Ethereum-based networks.
Breaking Changes:
- None in this release.
Example Usage:
// contract ABI
const Abi = [
{
"inputs": [
{
"internalType": "int256",
"name": "_value",
"type": "int256"
}
],
"name": "setValue",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "get",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
}
]
// Connect wallet
const { provider, account } = await WalletConnector.connectWallet({chainId: 11155111});
// Create contract instance
const tokenContract = WalletConnector.createContract(
provider,
'0x1A9CD84b055255E14848A691828B54Ef477a818d', // Replace with actual token address
Abi
);
// Read token balance
const value = await tokenContract.read('get', []);
console.log('Value Variable:', value);
const value2 = await tokenContract.estimateGas('get', []);
console.log('Gas Value:', value2);
// Contract Interaction
const txHash = await tokenContract.write('setValue', [
500961
], {
from: account,
gasLimit: '300000'
});
console.log('Transfer tx hash:', txHash);
}```Full implementation of wallect connect funtionality over 50 diffrerent chains including Testnet and Mainnet
π EVM Wallet Connector β Universal JavaScript Implementation
Version: v1.0.0
Initial Release
This release introduces a universal EVM wallet connector that supports multiple EVM-compatible blockchains and wallets. It's designed to simplify integration with MetaMask, Coinbase Wallet, Trust Wallet, Rabby, and many others.
β¨ Features
-
π Multi-wallet Support
Seamless detection and connection with major EVM wallets. -
π Chain Switching & Auto-Adding
Automatically switch or add chains based on user selection. -
π Mainnet & Testnet Coverage
Preconfigured RPC endpoints and explorers for over 40+ EVM chains, including:- Ethereum, BNB Chain, Polygon, Arbitrum, Optimism, Avalanche, Fantom, zkSync Era
- Scroll, Base, Linea, Mantle, Telos, Metis, Boba, Klaytn, OKExChain, IoTeX, Syscoin
- And many more mainnets and testnets!
-
βοΈ Customizable Chain Configurations
Easily extend or override chain settings via theEVM_CHAINSobject.
π How to Use
Import or include the script and initialize with your desired chain ID or detection logic.
Support for:
- Switching chains
- Adding new chains
- Reading chain names, symbols, RPC URLs, and block explorers from config
π¦ What's Inside
EVM_CHAINS: A complete mapping of chain IDs to their metadata (name, symbol, RPC, explorer)- Full support for:
wallet_switchEthereumChainwallet_addEthereumChain
π§ͺ Testnets Included
Includes major testnets like:
- Sepolia, BSC Testnet, Fuji, Arbitrum Sepolia, zkSync Era Testnet, Optimism Sepolia
- Scroll Sepolia, Base Sepolia, Moonbase Alpha, Aurora Testnet, Harmony, Celo Alfajores
π§ Future Improvements
- β TypeScript typings
- β Auto-detect supported wallets
π License
GPL 3.0
Let us know if you'd like support for a specific EVM chain or feature enhancement!