https://github.com/ujjwalguptaofficial/ethcontracts-ethers
ethers.js wraper for ethcontracts.js
https://github.com/ujjwalguptaofficial/ethcontracts-ethers
Last synced: about 1 month ago
JSON representation
ethers.js wraper for ethcontracts.js
- Host: GitHub
- URL: https://github.com/ujjwalguptaofficial/ethcontracts-ethers
- Owner: ujjwalguptaofficial
- License: mit
- Created: 2022-11-29T02:10:55.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-05T09:24:43.000Z (over 2 years ago)
- Last Synced: 2025-08-06T13:41:32.547Z (2 months ago)
- Language: TypeScript
- Size: 1.2 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ethcontracts-ethers
ethers.js wraper for ethcontracts.js> It contains ethers.js client which can be used inside ethcontracts.js.
# install
```
npm i @ethcontracts/ethers
```# Usage
```
import { ERC20 } from "@ethcontracts/core";
import { EthersClient } from "@ethcontracts/ethers";
import { providers } from "ethers"// create token with token address
const token = new ERC20("0x8f3cf7ad23cd3cadbd9735aff958023239c6a063");// create provider
const provider = new providers.JsonRpcProvider('https://polygon-rpc.com');// initiate token with provider
await token.init(
new EthersClient(provider)
);// call token balance api
const balance = await token.getBalance("0xd5D3F35Bdd08950CCFE0DeAb638F8B5498297076");
console.log("balance", balance);
```For more documentation, please visit - [https://ujjwalguptaofficial.github.io/ethcontracts-doc/](https://ujjwalguptaofficial.github.io/ethcontracts-doc/)