From af5b218a2ae04542f13301b4898e25aea8c952c9 Mon Sep 17 00:00:00 2001 From: Phil Date: Wed, 15 Jun 2022 15:55:31 +0800 Subject: [PATCH] Use the "new" keyword to instantiate a contract. Fix #11 --- contract.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contract.js b/contract.js index abea66b..bf47db2 100644 --- a/contract.js +++ b/contract.js @@ -9,6 +9,6 @@ const web3 = new Web3(new Web3.providers.HttpProvider((Config || {}).provider || const contractAddress = (Config || {}).contractAddress; module.exports.getContract = () => { - const contract = web3.eth.Contract(Parameters.abi, contractAddress); + const contract = new web3.eth.Contract(Parameters.abi, contractAddress); return contract; };