Conflux-Chain / ConfluxWeb

Conflux JavaScript API, under active development
GNU Lesser General Public License v3.0
7 stars 5 forks source link

why following code always return null, I need number #10

Closed cfx-gspos closed 4 years ago

cfx-gspos commented 4 years ago

callSol(); async function callSol() { const ConfluxWeb = require('conflux-web'); const confluxWeb = new ConfluxWeb('http://testnet-jsonrpc.conflux-chain.org:12537');

const contract = new confluxWeb.cfx.Contract(
    require('./build/birdgame.abi.json'),
    '0xcdf5441a834bd412116ed85c2735c229b057a3dc'
);
const account = confluxWeb.cfx.accounts.wallet.add(PRIVATE_KEY);

console.log(await contract.methods.inc(1).call())

}

resodo commented 4 years ago

The repo is no longer actively maintained. Please use https://github.com/Conflux-Chain/js-conflux-sdk