Package Exports
- @openzeppelin/contract-loader
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@openzeppelin/contract-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
OpenZeppelin Contract Loader
Load contract ABIs from built artifacts and return web3-eth-contract objects.
Installation
npm install --save-dev @openzeppelin/contract-loaderUsage
const load = require('@openzeppelin/contract-loader')({ web3Contract: web3.eth.Contract });
const ERC20 = load('ERC20');
const balance = await ERC20.methods.balanceOf(sender).call();
await ERC20.methods.transfer(receiver, balance).send({ from: sender });