@zapjs/zaptoken
v3.0.1
Published
Zap Token
Downloads
6
Keywords
Readme
@zapjs/zaptoken
This repository provides an interface tothe Zap ERC20 token contract. This package enables a Zap holder to check their balance, transfer Zap to other accounts, and delegate transfers (approvals) to other accounts and smart contracts.
Prerequisites
- Node 12.20 <=14.15
- Typescript
Usage
Using ZapToken package for ERC20 methods with Zap Token
npm install --save `@zapjs/zaptoken`
import {ZaopToken} from '@zapjs/zaptoken';
let myZapToken = new ZapToken();
Custom configuration
let myZapToken = new ZapToken({networkId,networkProvider,coordinator})
get Zap balance of an addrss
const balance = await myZapToken.balanceOf(address);
Approve Zap Token to an address
await myZapToken.approve({from,to,amount,gas})
//note : from address has to be in web3.eth.accounts
Send Zap Token to an address
await myZapToken.send({from,to,amount,gas})
//note : from address has to be in web3.eth.accounts
See more Usages of each packages :
Built With
- Lerna - The tool to manage monorepo project
- Typescript
- Mocha
- Truffle
- Ganache