1.0.4 • Published 6 years ago

weth v1.0.4

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

weth

call w-eth's smart contract

Super simple to use

Require and config:

const Weth = require('weth');
Weth.config({
    web3: web3, // your web3,
    contractAddress: contractAddress, // weth's contract address
    ownerAddress: ownerAddress // weth's owner address
});

withdraw

UNWRAP WETH to ETH:

Weth.withdraw(address, privateKeyAddress, amount);

deposit

WRAP ETH to WETH:

Weth.deposit(address, privateKeyAddress, amount);