1

Change line 4 to: address payable admin; Hope it helps.


1

You're missing () after myContractInstance.methods['0xc4e41b22'].


1

For your question no. 1: Search for "type": "constructor" in your ABI. From this object, you can see the inputs that has an array of parameters along with their name and type. Example: { "inputs": [ { "internalType": "uint256", "name": "_ff", "type": "uint256" }, { "internalType": "string", "...


1

This is due to the behavior of call(). Call is for read-only, e.g. any state alterations done in the function are not persistent. If you change the instances of instance.addPayment.call() to instance.addPayment(), it will persist the changes. There is another complication of course, that you are using the return value of addPayment, which doesn't really ...


1

This is failing because the block number passed as the first parameter to eth_gasBlockByNumber must be a hex string. Instead of doing parseInt(res.result, 16), just store res.result directly and pass that in.


1

I'm not the strongest player in this dialect, but this looks familier: await instance.purchaseTokens.call('12'); Try adding transaction arguments (gas, gasPrice, value) like this: await instance.purchaseTokens.call({value: <amount>}); call is probably wrong, so: `await instance.purchaseTokens({value: }); Hope it helps. p.s. If there are ...


Only top voted, non community-wiki answers of a minimum length are eligible