Questions tagged [truffle-deployment]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
4 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
2answers
33 views
+50

Issue while migrating to Ropsten network

I am trying to migrate the contract to ROPSTEN network. It fails for the following reason. Please advice. migrate command $env:MNEMONIC=' XX XX XX';truffle migrate --reset --network ropsten Error ...
0
votes
1answer
39 views

Best security practices for contract deployment?

I'm using Truffle to develop an ERC721 smart contract. Truffle expects HDWalletProvider to be installed so that Truffle can sign transactions for you, however this requires storing your mnemonic ...
0
votes
0answers
12 views

Error on migration on truffle [closed]

I tried to clone this contract. (which has LP lock and setting Exchange router) it is okay in the remix, but when I use truffle, although it compiles correctly and without any error, but when I try to ...
0
votes
0answers
16 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
35 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
90 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
16 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
40 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
32 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 ...
1
vote
2answers
49 views

Cannot find module '@chainlink/contracts/truffle/v0.4/LinkToken'

I was following these steps in order to use Chainlink on Kovan testnet. when I've finished the configuration (truffle-config.js, npm install to get all the dependencies, etc.) and I've compiled the ...
0
votes
1answer
13 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
23 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
471 views

Unable to connect to polygon mumbai test network using truffle

I'm trying to use Polygon test network with truffle and I followed this document and youtube video to configure Polygon network for truffle. But when I'm trying to execute truffle deploy --network ...
2
votes
1answer
85 views

Why does smart contract successfully deploying to Rinkeby fail to deploy to mainnet?

truffle.js: var HDWalletProvider = require("truffle-hdwallet-provider"); var mnemonic = ""; module.exports = { networks: { development: { host: "localhost", ...
0
votes
1answer
25 views

Editing gas price to limite contract deployment cost?

My smart contract costs 3.65 USD to deploy from truffle-cli. I wish to accomplish this in 2.5 USD. Is it possible to limit the gas price in gwei in truffle-config.js to accomplish this? I don't mind ...
0
votes
1answer
56 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
1answer
126 views

Timeout error while attempting to migrate in the ganache-cli

I'm trying to deploy the smart contract using ganache-cli local blockchain server. I started the ganache-cli server and this is how my truffle-config.js file looks like... Truffle-config.js module....
0
votes
1answer
92 views

Deploy multiple truffle contracts with dependency

Suppose I would like to migrate 2 contracts that are dependent on each other. This can can be done with var contract1 = artifacts.require("contract1"); var contract2 = artifacts.require(&...
1
vote
1answer
29 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
1answer
46 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
0answers
16 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
11 views

Truffle deploy smart contract from specific file [duplicate]

My contracts folder has the following files: AdSpace.sol,Migration.sol,AdSpaceV2.sol, and EAdSpace.sol. I have earlier deployed AdSpace.sol, and just added the other 2 files. AdSpaceV2.sol contains ...
0
votes
0answers
72 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
2answers
282 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
1answer
113 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 ...
0
votes
0answers
121 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
37 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
108 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
0answers
20 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
1answer
21 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
27 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 ...
1
vote
2answers
75 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
1answer
97 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
1answer
106 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/...
0
votes
0answers
279 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
0answers
173 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
22 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
63 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
2answers
297 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
0answers
80 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
23 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 ...
3
votes
0answers
497 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(); ...
0
votes
1answer
791 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
0answers
358 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
0answers
20 views

How deployment in the ETC network is cheaper than in the ETH network?

What factors differ in deployment & transaction cost in ETC compared with ETH network? I checked the gas for deployment in ropsten and kotti which costs the same at a gas price of 20 gwei. In what ...
0
votes
1answer
55 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 ...