New answers tagged

0

Try one thing, Change your constructor to constructor(){} instead of function Election() public{} because there has been some changes in Solidity's new versions.


0

You can use web3.eth.network api . 'use strict'; global.artifacts = artifacts; global.web3 = web3; async function main(){ const newtworkType = await web3.eth.net.getNetworkType(); const networkId = await web3.eth.net.getId(); console.log("network type:"+newtworkType); console.log("network id:"+networkId); } // For truffle exec module....


0

Eveything is up to date, there is nothing to compile This means that your contracts have already been compiled and there is no need to recompile them. You can verify this by looking in your build/ directory to verify that your contracts are there. If they are not there, then you have an issue with your deployment script. If this is the case, then you are ...


0

To solve the error you need to pass the arguments of the constructor in your migration file. Based on your two params: // Untested // Deploy a single contract with constructor arguments deployer.deploy(towater, ["string_1", "string_2"], ["0x15458ef540ade6068dfe2f44e8fa733c", "0x15458ef540ade6068dfe2f44e8fa734c"] ); Check the Truffle docs.


Top 50 recent answers are included