pec-eth-contract
v1.0.5
Published
pec module to interact with Ethereum smart contracts.
Downloads
22
Readme
pec-eth-contract
[![NPM Package][npm-image]][npm-url] [![Dependency Status][deps-image]][deps-url] [![Dev Dependency Status][deps-dev-image]][deps-dev-url]
This is a sub-package of [pec.js][repo].
This is the contract package used in the pec-eth
package.
Please read the [documentation][docs] for more.
Installation
Node.js
npm install pec-eth-contract
Usage
const Web3EthContract = require('pec-eth-contract');
// Set provider for all later instances to use
Web3EthContract.setProvider('ws://localhost:8546');
const contract = new Web3EthContract(jsonInterface, address);
contract.methods.somFunc().send({from: ....})
.on('receipt', function(){
...
});
Types
All the TypeScript typings are placed in the types
folder.