@etransfer/utils v1.14.0
@etransfer/utils
This package provides common methods about etransfer services.
Including obtaining contracts, operating contracts, formatting amounts, address judgment, etc.
Installation
Using NPM
npm install @etransfer/utilsUsing Yarn
yarn add @etransfer/utilsPrerequisites
Package.json Scripts
| Script | Description |
|---|---|
| clean | Uses rm to remove dist/ |
| build | Uses tsc to build package and dependent packages |
| lint | Uses eslint to lint package |
| lint:fix | Uses eslint to check and fix any warnings |
| format | Uses prettier to format the code |
How to use
See more Developer Documentation.
import { checkTokenAllowanceAndApprove } from '@etransfer/utils'
// Get the token contract.
const tokenContract = await getTokenContract('node address', 'token contract address');
// Check whether the account balance is sufficient. If not, trigger setting allowance.
const result = await checkTokenAllowanceAndApprove()8 months ago
10 months ago
11 months ago
10 months ago
11 months ago
9 months ago
10 months ago
10 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago