conflux-web-cfx-contract
This is a sub package of conflux-web
This is the contract package to be used in the conflux-web-cfx
package.
Please read the documentation for more.
Installation
Node.js
npm install conflux_web-cfx-contract
In the Browser
Build running the following in the web3.js repository:
npm run-script build-all
Then include dist/conflux-web-cfx-contract.js
in your html file.
This will expose the ConfluxWebCfxContract
object on the window object.
Usage
var ConfluxWebCfxContract = require('conflux-web-cfx-contract');
ConfluxWebCfxContract.setProvider('ws://localhost:8546');
var contract = new Web3EthContract(jsonInterface, address);
contract.methods.somFunc().send({from: ....})
.on('receipt', function(){
...
});