New answers tagged

1

In my case, downgrading Truffle from v5.0.27 to v5.0.5 fixed the issue. npm i -g truffle@v5.0.5


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

The problem is with the way I run truffle, nothing with truffle or the code. I was using truffle as a local npm package. I set up a script in package.json as "scripts": { ": "node_modules/.bin/truffle" }, and I was running the binary with npm run truffle The script runs normally when compiling: npm run truffle compile However, as the network ...


0

Seems like I had a problem with using function(), I ended up using fat arrow style: ropsten: { provider: () => new HDWalletProvider(mnemonic, url, 1), network_id: "3" }


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.


1

There is no information about your deployment/testing methodology in the OP. Here's a likely cause. Ganache blockchains are transient. Each time you restart ganache it's a new network with a new network id. Any previous deployments/migrations will not be present. Make it your habit to $ truffle migrate --reset when you restart ganache. You'll see ...


1

You can set also the gas amount on your truffle-config.js, try setting the gas like this one below: ... networks: { ropsten: { provider: new HDWalletProvider(mnemonic, "https://ropsten.infura.io/xxxxxxxx"), network_id: 3, gas: 4600000 }, } ...


1

Smart contracts are immutable (code cannot be changed) by design. Truffle and ZeppelinOS are platforms for the development of smart contracts for Ethereum based blockchains. Truffle migrate manages the deployment of contracts to blockchain(s). Each time you migrate a contract you deploy a new instance to a new public address. To use the new smart ...


2

In case of truffle the stored values will not remain in the upgraded contract whereas in proxy approach it is possible to obtain the stored values in the upgraded contract too. In truffle upgrade a new version of contract is being deployed to the network and we will be obtaining a new contract address. If try to console the contract address in migrations ...


0

gasPrice should be a string (allowing it to be 0!) https://github.com/trufflesuite/truffle/issues/680


Top 50 recent answers are included