Questions tagged [truffle-deployment]
The truffle-deployment tag has no usage guidance.
183
questions
1
vote
1
answer
70
views
Accidentally deployed two identical contracts on blockchain. How can I pick the one I wish to interact with?
I deployed two identical contracts on the same blockchain.
contract V1 address:0x48A2a37fF1Cff6eB1984aCA7fCA4cAa25B1C9287
contract V2 address:0xdfaDE9c110eBD5C00243Ca0b3AdCf5B73A8f0e42
However I ...
0
votes
1
answer
637
views
Is it compulsory to deploy 1_initial_migration.js every time I deploy a contract?
When I run truffle deploy, it deploys 1_initial_migration.js before every contract. Is there anyway this can be avoided? Or is this part of protocol and is supposed to happen everytime?
Thank you.
0
votes
0
answers
158
views
Receving Error "'Migrations'-- invalid sender" during deployment to BSC mainnet
I have tried each of the suggestions mentioned in the official issue pointing to this problem to no prevail in BSC MainNet.
I have had success in BSC TestNet as well as Ropsten TestNet.
However, the ...
0
votes
2
answers
1k
views
Truffle Deployment Error: has no network configuration for its current network id (97)
I'm having an issue deploying a contract with Truffle. The contract constructor takes 7 parameters which are all within the 2_deploy_xxx.js file. However, every time I do, I get an error when I get to ...
0
votes
1
answer
627
views
"Uncaught ReferenceError: TodoList is not defined" as I tried to call Todolist.deployed() in truffle console
I was trying this Beginner tutorial on smart contracts and solidity. I typed truffle compile, truffle migrate and they ran without any error and I got my gas cost used up in Ganache. When I opened ...
1
vote
1
answer
682
views
How to use truffle-plugin-verify when you are not deploying the contract?
Here is my A contract:
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
contract A {
B public b;
constructor() public {
b = new B();
}
}
contract B {}
As ...
0
votes
0
answers
311
views
how to pass my arguments to constructor smart contract while deploying using web3 truffle
could you please help me with this step?
I have a smart contract with a constructor with a parameter, but I don't know how to pass this parameter when deploying the smart contract using truffle and ...
0
votes
0
answers
27
views
Error: Returned error: VM Exception while processing transaction [duplicate]
Gettting Error: Returned error: VM Exception while processing transaction
function getLatestPrice() public payable returns (int) {
(
uint80 roundID,
int price,
...
0
votes
1
answer
47
views
Truffle Migrate Endless Run
I am trying to deploy my contracts with
const Migrations = artifacts.require("Migrations");
const Market = artifacts.require("Market");
module.exports = function (deployer, ...
1
vote
2
answers
186
views
Why does this contract cost 1 Eth to deploy?
Truffle is telling me that it costs 1 Eth to deploy. Is that seriously the cost of deploying a simple contract (this is my first Mainnet deploy)? Or is there something else going on?
mainnet: {
...
0
votes
1
answer
338
views
"Truffle Networks" spits out error and can't migrate to Mainnet
I'm trying to deploy to Mainnet (for the first time) but the initial migration (1_initial_migration) is getting stuck. Deploying to Kovan works fine and is super fast. I have enough Eth to deploy to ...
1
vote
1
answer
829
views
Do contracts deploy their imported dependency contracts? Or do they point to live, already deployed versions?
This is a very newbie question about deploying contracts with imported dependencies.
I'm using Chainlink's AggregatorV3Interface and SafeMath from openzeppelin.
import "@chainlink/contracts/src/...
1
vote
2
answers
1k
views
Estimate the cost of gas in Truffle Console?
Is there a way in the Truffle console to estimate the cost of gas for deploying a contract to mainnet?
I'm attempting to truffle migrate --network main a contract, and it's running out of gas.
I've ...
0
votes
0
answers
525
views
Migration 2_deploycontract invalid or does not take any parameters
I am trying to create this token and for some reason, the second migration keeps giving me this
Migration 2_deploycontracts.js invalid or does not take in any parameters
1_initial_migrations.js seems ...
1
vote
1
answer
408
views
Initialize function is not invoked during deployment of upgradeable contract
This is initialize function of my upgradeable contract
contract MyContract is
Initializable,
ERC20PresetMinterPauserUpgradeable,
OwnableUpgradeable
{
function initialize(string ...
1
vote
2
answers
519
views
Unable to Deploy/Migrate to Mainnet via Truffle/Infura
On 12/26/2020 I successfully compiled, migrated and tested on Ropsten via Truffle the following contract https://github.com/estudios-amazonia/FilmVault/blob/main/contracts/FVP_Token.sol.
See Ropsten ...
0
votes
0
answers
227
views
Truffle "test" is passing only 1 it("") test instead of showing "all 3 tests passed"
MyToken.sol
//// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MyToken is ERC20 {
constructor(uint256 ...
3
votes
0
answers
993
views
Timeout while attempting to connect and deploy in the Ropsten network
I am trying to deploy the contract in Ropsten network. It fails with the timeout error
The same is deployed in Ganache without any issues. Please advice
truffle-config.js
require('dotenv').config();
...
3
votes
5
answers
4k
views
Truffle artifacts are not being generated when compiling
I am new to smart contract development and I am trying to deploy my first contract. When running the truffle compile for the first time I can see that a build folder was generated on my project ...
1
vote
0
answers
431
views
What factory (UniswapV2Factory) shoud I use when deploy Sushiswap clone?
Hi I'm forking Sushiswap and about to deploy contract to mainnet.
While I'm writing deploy_contract.js in Truffle.
Which Factory shoud I use in my migration code? I saw several code example but ...
0
votes
1
answer
184
views
When truffle migrate required account to be unlocked?
I've done several deployment using truffle, but it didn't ask me to unlock the account while deploying the contract on my private chain. But recently I have done one deployment and it asked me to ...
0
votes
0
answers
24
views
Migrate with truffle deployer by using new
Hi I am trying to figure out what is the right way to migrate the contract by using new() method of the contract. The following does not work, the contract does not seam to be migrated (though it is ...
1
vote
1
answer
216
views
Node version upgrade for contract deployment throws error
I wrote a solidity contract using version 0.4.24 using OpenZeppline-solidity version 1.12.0. This used to deploy using the Nodejs version 8.12. The Nodejs version 8 is no longer being maintained from ...
0
votes
1
answer
296
views
Saving migration to chain.insufficient funds for gas * price + value
It looks like the contract was deployed well on mainnet
However, eventually this error occurs
Saving migration to chain.insufficient funds for gas * price + value
Does it mean that the migration was ...
0
votes
0
answers
561
views
Truffle stuck when deploy smart contract when using Ledger wallet
I have a little problem deploying smart contract with ledger nano s as provider on ropsten. The script just remain stuck at first migration
Starting migrations...
======================
> Network ...
0
votes
1
answer
665
views
truffle deployment: not sure about 2_deploy_contracts.js for 2 contracts
I am working on Ubuntu 18.04. When I execute the “truffle migrate” command, I am getting first deploying and then replacing contract messages. Is this right? I am not sure about the code of ...
1
vote
1
answer
574
views
Ubuntu 18.04: Error during compilation using Truffle: How to install the updated version
I am working on Ubuntu 18.04. I have installed Truffle from the following site:
Truffle for Linux
I am trying to execute an application from the following site:
Petshop Tutorial
I am able to ...
9
votes
2
answers
15k
views
Truffle Deployment Error: Invalid number of parameters for "undefined". Got 1 expected 0!
I am trying to deploy my smart contract. When I run truffle compile everything works however when I run truffle migrate, I get this occurring error message:
Error: * Deployment Failed *
"KJToken&...
1
vote
1
answer
144
views
not able to deploy contract
I'm working on API'S for smart contract. I'm using tronbox to compile and migrate. Error is this contract constructor expected 1 arguments, received 0 I tried to add arguments in migrations like this ...
0
votes
1
answer
40
views
looking for a start in solidity [duplicate]
I am totally new to the Solidity Programing. I was working on NodeJS, express and mongoDB. Few days ago I started working on blockchain. I have to write the API'S for contracts. We are using truffle ...
0
votes
0
answers
322
views
If I set unlimited gas in a dev environment, am I just postponing dealing with a problem in my contract or is it a Truffle issue?
Booted up ganache with this command:
ganache-cli --gasLimit=0x1fffffffffffff --allowUnlimitedContractSize -e 1000000000
because I was running into this error on truffle migrate in my development ...
1
vote
1
answer
468
views
Unable to deploy contract on Besu network(docker) using dynamic IP
I am stuck with a weird situation. I create a local Ethereum network with Hyperledger Besu in docker environment. I try to deploy contracts to a rpc node using Truffle(different container in same ...
0
votes
1
answer
137
views
Error when deploying contract in geth with truffle ? --> Returned values aren't valid, did it run Out of Gas?
I have deployed a contract in a geth private network by using truffle. I can send transaction via my UI in html / nodejs but i am not able to do a call to retrieve informations. If I do, nothing ...
1
vote
2
answers
920
views
Contract deployment with "truffle-contract"
My purpose is deploying a smart contract to a private network with Node-js. I work on Truffle and Ganache. I tried it with "truffle-contract". But in deploying process an error occurs. My contract ...
0
votes
3
answers
80
views
What is .new()?
I am using the following code to deploying a smart contract to a private network with Node-js. But the error TypeError: contract_object.new is not a function occurs. What are .new() and the error's ...
1
vote
4
answers
582
views
Assigning address, data, and gas to smart contract to deploy with Node-js
I used this guide to deploy a smart contract with Node-js. I followed as far as my contract was created as an object. Because the mentioned guide is old some web3 methods changed nowadays. So it looks ...
0
votes
1
answer
4k
views
Deployment Failed | hit a require or revert statement somewhere in its constructor
I create a custom ERC20Token and a contract to store data sent from web3.Js. after storing data in mapping I would like to call ERC20Token contracts functionality inside this contract.
code of ...
1
vote
3
answers
2k
views
Truffle Error: ContractName has no network configuration for its current network id (1575203139857)
Im doing the tutorial at https://github.com/ConsenSys-Academy/proof-of-existence-exercise and running into the following error:
$ truffle console
truffle(development)> var poe = await ...
0
votes
1
answer
306
views
Error : migrate kovan
From : truffle migrate --network kovan >> ProviderError: VM Exception while processing transaction: revert
>truffle migrate --reset --network kovan
Warning: Both truffle-config.js and ...
0
votes
1
answer
273
views
truffle migrate --network kovan >> ProviderError: VM Exception while processing transaction: revert
I am a beginner.
I can deploy to a private network but I can not deploy to a public network.
I need a Deploy to the kovan test network. please help me.
>truffle init
>npm install truffle-...
0
votes
0
answers
42
views
Error based on inheritance and dependency between contracts (Using EternalStorage contract)
I have been using EternalStorage contract with my contracts for the storage purpose. Now the structure is some like this:
Eternal Storage <- Contract (A) <- Contract (B) <- Contract (C)
Now ...
0
votes
0
answers
126
views
Deploying contract using web3js but failed
I am a beginner for solidity 👶
My question about deploy using with web3js.
I have two smart contract and in main contract I have a createContract function which is create a new subtoken contract ...
2
votes
2
answers
10k
views
Error: Truffle is currently using solc 0.5.8,
I run migrate in the terminal, but it shows
Error: Truffle is currently using solc 0.5.8, but one or more of your contracts specify "pragma solidity ^0.4.27".
Please update your truffle ...
1
vote
1
answer
987
views
Uncaught (in promise) Error: Contract has not been deployed to detected network (network/artifact mismatch)
The client side application always throws the above error. I have connected the ganache account(by copying the private key)also with the correct port number in Metamask extension as well as in the ...
1
vote
4
answers
3k
views
Error: HelloWorld has not been deployed to detected network (network/artifact mismatch)
I'm following the steps in this link to create a truffle project.
I'm using ganache-cli as the ethereum client.
rajkumar@rajkumar: Ethereum$ mkdir helloworld
rajkumar@rajkumar: Ethereum$ cd ...
0
votes
1
answer
685
views
truffle deploy --network ropsten issues
I am having an issue deploying to ropsten. I am receiving an insufficient funds error but I believe my address to have ether on ropsten.
This command:
truffle migrations --network ropsten
Also ...
0
votes
1
answer
36
views
Smart Contract Deployment issue
I am making a smart contract with a Transfer function.
function transfer(address _to, uint256 _value) public returns(bool success) {
//checking whether sender has enough number of tokens
...
2
votes
4
answers
2k
views
truffle migrate --network kovan issue
When I run truffle migrate --network kovan in the terminal the contract deployment doesn't run. Just:
Compiling your contracts...==================== >Eveything is up to date, there is nothing to ...
0
votes
2
answers
3k
views
Truffle error when deploy a contract
Does anybody know how to solve this? I've try to compile and deploy my contract to get the address, why obtained this error
Error:
1_initial_migration.js
======================
Deploying '...
0
votes
2
answers
1k
views
Unknown network "ganache". See your Truffle configuration file for available networks
I am working windows 10 and have both
truffle.js
&
truffle-config.js
I am using command
truffle migrate --reset --networks rinkeby
Error produced: Unknown network "ganache". See ...