Questions tagged [truffle-deployment]

The tag has no usage guidance.

66 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
747 views

Truffle migrate Error Invalid number of arguments to Solidity function

Truffle 4.0.1 I've got a contract declared "is Pausable" (OpenZeppelin framework) and I want to pause it as part of the deployment logic. I'm getting an error, however, when invoking pause() Error: ...
3
votes
0answers
536 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
0answers
59 views

Many Contract Testing strategies

I'm trying to wrap my brain around how to effectively test multi "projects" in Truffle, assume a simple ganache setup, also assume that these contracts seem to work, in remix, and in unit tests, but, ...
3
votes
1answer
893 views

Deploying on contract on main net - Error: insufficient funds for gas * price + value

Running geth v 1.7.3 truffle 4.0.5 truffle-config.js module.exports = { networks: { development: { host: "localhost", port: 8545, network_id: "*" // Match any network id ...
2
votes
0answers
29 views

When does 'truffle deploy' yield a different output every time?

truffle deploy (aka truffle migrate) is documented here. I'm doing the following sequence: Starting a local Ganache node Running truffle deploy I'd expect this sequence to yield the exact same ...
2
votes
1answer
557 views

call other contract's external function , the error: The contract code couldn't be stored, please check your gas amount

when I deploy a contract, the truffle frame told me this error :“The contract code couldn't be stored, please check your gas amount”。 the solidity code is: 1) Base.sol pragma solidity ^0.4.22; ...
2
votes
0answers
43 views

Orders Facilitator Contract has not been deployed to detected network

I'm trying to deploy a simple contract to truffle. This is very confusing now because truffle has it's own network built into it, yet the tutorial I'm following uses test-rpc. I've looked at a few ...
2
votes
0answers
320 views

Truffle deployment with metamask to ganache leads private key error

I'm using Truffle, web3js and Metamask to build a webapp. I'm using ganache for local testing. I'm trying to deploy a contract with import TruffleDeployer from 'truffle-deployer'; import ...
2
votes
1answer
151 views

truffle migrate fails when I remove console.log

I have this migration script: var MyTok = artifacts.require("./MyTok.sol") var MyTok_Crowdfund = artifacts.require('./MyTok_Crowdfund.sol') module.exports = function (deployer, _, accounts) { ...
2
votes
0answers
602 views

Truffle delpoyment Error: unknown account

i am trying to deploy my smart contract on live network, i have successfully deployed the same contract on rinkeby but facing error while on live network, here is the detail 1 - Account balance 0....
1
vote
0answers
362 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 ...
1
vote
1answer
94 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 ...
1
vote
3answers
1k 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 ...
1
vote
0answers
38 views

truffle can not build success

when I fllow this document step by step enter link description here,I have something wrong with my truffle build,and I delete truffle.js ,this is photo, please help thx!!
1
vote
0answers
476 views

Error: authentication needed: password or unlock when deploying a contract with truffle

i am using angular with truffle. I am trying to deploy a contract through truffle migrate. here is my 2_deploy_contracts.js var contractFacotry = artifacts.require('./contractFactory.sol'); module....
1
vote
1answer
131 views

Unable to deploy contract on ropsten

Firstly I installed geth and it's running I created an account and verified keystore file in the location: ~/Library/ethereum/testnet/keystore Then I used: Web3.personal.newAccount('password') ...
0
votes
1answer
7 views

Truffle v5.4.15 deploy error with newly create project

truffle deploy returns with the following error, in a newly create project (using flutter init) 1_initial_migration.js Deploying 'Migrations' Error: *** Deployment Failed *** "Migrations" -...
0
votes
1answer
12 views

How to save truffle artifact for already deployed contract?

I have several contrats to deploy on different chains. Normally, when I just deploy the contract with truffle-v5 it creates/updates json object of artifacts by the path ./build/contracts/MyContract....
0
votes
0answers
9 views

Truffle gas price on mainnet

I am trying to deploy my contract on mainnet. My truffle config says: live: { provider: function () { return new HDWalletProvider(MNEMONIC, API_URL) }, network_id: 1, ...
0
votes
0answers
20 views

Hit a require or revert statement somewhere in its constructor

I have created a contract which creates a new UniswapV3Factory contract in the TopLevelContract constructor. The code is below pragma solidity = 0.7.6; import './../v3-core/contracts/UniswapV3Factory....
0
votes
0answers
18 views

Truffle test fails with Error: Returned values aren't valid, did it run Out of Gas?

I created a string function library (using VS Code, Truffle and Ganache) which depends on another library, and one of the functions keeps failing with this error message when I run a truffle test as ...
0
votes
0answers
11 views

"Error: Returned values aren't valid, did it run Out of Gas?" while calling ownerOf method in truffle develop

I am using the following code of NFT // contracts/MyNFT.sol // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; // pragma solidity ^0.7.1; import "@openzeppelin/contracts/token/...
0
votes
2answers
55 views

Migration to test net works, but not to main net

I am trying to deploy my contract to the ETH mainnet / livenet. Everything works fine for the testnet, and also the dry-run for the mainnet works, but not the actual migration. Here is the output: ...
0
votes
1answer
128 views

"Uncaught ReferenceError: global 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 ...
0
votes
0answers
17 views

How to call selfdestruct in my other contract on the same tx I deploy my new contract with Truffle?

Title says it all. I have a contract already deployed on the blockchain. Unfortunately I need to do some changes to it so will need to re-deploy it, and the previous one will become useless. I'd like ...
0
votes
0answers
20 views

Unable to deploy contract using Truffle on local network Geth : "ProxyAdmin" hit an invalid opcode while deploying

I am trying to deploy a simple contract using truffle on my local Geth network. But it is throwing the following error: Santanu@ITS-7 MINGW64 /d/xampp/htdocs/truffle_nft_example_nuxt (main) > ...
0
votes
0answers
43 views

Error with Truffle React (the contract doesn't have address)

Someone knows something about this error with Truffle React box? Must be my Metamask wallet address but it is already in my truffle-config file. I leave the App.js file here (I didn't make it. It's ...
0
votes
0answers
42 views

"Undefined" when trying to use async/await/promise

I'm currently trying to put in the function: truffle console truffle (development) > const token = await Token.deployed() And the result is coming up as undefined. I've started over my DAPP project ...
0
votes
1answer
14 views

Can I change the code in openzeppelin library in the node modules?

I am doing nft platform like opensea using openzeppelin. There are some limitations in openzeppelin like only the owner can send the token to anyone. I don't want to use approve function. If I comment ...
0
votes
0answers
31 views

Best way to Deploy smart contracts without Infura

I'm wondering what will be the best way to deploy our smart contracts. If i use Infura API, they are only serving 100 thousand requests per day.Due to that our team lost a client while performing a ...
0
votes
1answer
86 views

Truffle and Ganache GUI: GUI and blockchain disconnect or some other error

For some reason, I am having a lot of weird issues with ganache at the same time and I have no idea what's causing them or even what to show to explain it. After migration, which appears to succeed, ...
0
votes
0answers
8 views

linking contract deployment process to a html button

It's been a while since i am struggling with this issue in my project. Actually my main purpose is to have my contract deployed by clicking just one button which does all steps we are doing on Remix ...
0
votes
0answers
20 views

Can't find funded ropsten account using truffle console

I am not able to see my account on the ropsten network in truffle console when connecting to the ropsten network. I copied the mnemonic out of metamask and start truffle console with 'truffle console -...
0
votes
0answers
83 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
0answers
141 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
0answers
42 views

How to make a deployer in truffle tests?

For some reason, our app will only work with a forked instance of the mainnet. And hence, we want to run our test on the forked ganache. We are using truffle, so we have written all of our tests in ...
0
votes
0answers
145 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
1answer
22 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, ...
0
votes
0answers
28 views

"No Contracts Deployed" TRUFFLE ERROR PLEASE HELP!

I really need help! [12:20 PM] i deployed an erc721 smart contract to testnet, it worked fine! Then i deployed it into the live network. It worked. But, i have an other script to mint my tokens. I ...
0
votes
1answer
121 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 ...
0
votes
0answers
204 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 ...
0
votes
0answers
23 views

Gas price to deploy contracts in ETC Mainnet

What is the standard Gas price to specify while deploying contracts in ETC mainnet? We can always reference ethereum gas station when it comes to ethereum network. But is there any trusted source like ...
0
votes
1answer
74 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 ...
0
votes
0answers
86 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 ...
0
votes
0answers
25 views

deployment failed

Error: * Deployment Failed * "ERC20TransferLiquidityLock" is an abstract contract or an interface and cannot be deployed. Import abstractions into the '.sol' file that uses them instead of ...
0
votes
1answer
910 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 ...
0
votes
0answers
15 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 ...
0
votes
0answers
384 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
0answers
105 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 ...
0
votes
1answer
271 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 ...