npm.io
1.0.4 • Published 8 years ago

weth

Licence
ISC
Version
1.0.4
Deps
1
Size
7 kB
Vulns
0
Weekly
0

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);

Keywords