2

Try changing on for once var myContract = new web3.eth.Contract(_abi, senderAddress, options); const toDeploy = myContract.deploy({ data: _bytecode, arguments: [100000, "0xD41396Fa287B20311DD389D563539d8578dad23e"] }); toDeploy .send({ gas: 5000000, from: myAddress }) .once("confirmation", (confirmationNumber, receipt) => { //After several ...


2

Per this comment on solc-js issue #31, you can append this stanza to package.json. "jest": { "testEnvironment": "node" } (which I guess tells jest to run in node, which will bring in the things that solc needs).


1

There are a few different things that can be wrong here, and they all stem from whether your contract is really at that address in your code: Have you actually deployed your contract yet? Your code there assumes that the listed contract is already deployed at that address, it doesn't do any deploying. Are you sure Metamask is connected to the same network ...


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