UNPKG

seeleteam.js

Version:

Generic script api library for Seele blockchain

13 lines (9 loc) 688 B
const SeeleJS = require('../src/seele') var seele = new SeeleJS("117.50.82.193:8027") // initial contract with abi and address info var abiString = '[{"constant": false,"inputs": [{"name": "x","type": "uint256"}],"name": "set","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [],"name": "get","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"}]'; jsonABI = JSON.parse(abiString) var contractAddress = "0x2816ea84eff2f7d46d2b8a2a0f4afd2c72330012" var myContract = seele.contract.init(jsonABI,contractAddress) myContract.call("get") console.log(myContract)