Questions tagged [truffle-deployment]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
19 views

Truffle - Invalid number of parameters for "undefined". Got 0 expected 2!

I have the below js script to deploy my contract to the Ropsten test network. I am using @truffle/hdwallet-provider v2.0.8 and web3.js v1.7.3. const HDWalletProvider = require('@truffle/hdwallet-...
user avatar
0 votes
0 answers
40 views

Problems with find a compiler version matching 0.8.13 with truffle compile

I'm very lost with this issue. I'm trying to make a dapp but when I run truffle compile I get the error that I post on title. Next I run truffle compile --list and a receive this: $ truffle compile --...
user avatar
1 vote
0 answers
33 views

truffle installed but not working

I'm using node version 12.20.2 and npm version 6.14.11 and installed truffle with cmd as administrator, the truffle framework version 5.5.12 has been installed but when I run any command in the vs ...
user avatar
0 votes
1 answer
33 views

unable to install truffle

I'm trying to install truffle on node version 8.9.0 but it shows it has been installed and when I try to do anything on that, throws this error. C:\Users\com\AppData\Roaming\nvm\v8.9.0\node_modules\...
user avatar
0 votes
1 answer
65 views

How can i interact with my contract i deployed on rinkeby network and send eth to uniswap

I am practicing using the uniswap v3 router and i created a simple contract that attempts to swap a certain amount of ETH to dai. This is the function that does so function convertETHToDAI() external ...
user avatar
0 votes
0 answers
72 views

Embedded vs linked libraries

I recently became aware of linked vs embedded libraries. My understanding is that if your library uses public pure functions and/or manages storage, then you need to deploy and link the library to ...
user avatar
0 votes
1 answer
30 views

contract has not been deployed to detected network (network/artifact mismatch) when use truffle console --network kovan

i'm trying to call a function from contract that i deployed to kovan network, then when i used the truffle console --network kovan and tried to deploy my contract, it says that this contract has not ...
user avatar
0 votes
0 answers
33 views

Fantom Deployment with Truffle stuck in confirmation

I try to deploy a contract with truffle on FTM mainnet. But it looks like the transactions never get submitted. Output: Deploying 'Contract' ------------------------- ⠋ Blocks: 0 ...
user avatar
  • 111
0 votes
0 answers
49 views

How to resolve "Uncaught TypeError: Cannot read property 'match' of undefined"

truffle(develop)> let instance =await hellopeop.deployed() Uncaught TypeError: Cannot read property 'match' of undefined I am getting this error. I am new to writing smart contracts and was ...
user avatar
0 votes
1 answer
42 views

Truffle Contracts deploy with name undefined

Whenever I truffle deploy my smart contracts, I get a message "duplicate contract names found for undefined". When I then try to interact with them, I get ReferenceError: <contract name&...
user avatar
  • 3
0 votes
0 answers
65 views

truffle migrate error -> Error: Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: -0x1

Error: Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: -0x1 I keep seeing this every time I try to truffle migrate. Does anyone know what ...
user avatar
0 votes
0 answers
20 views

Urgent Help. Please!!! Can you explain what are runs optimisers? Is it best to set it high or not?

I deployed a very large and complex smart contract using runs this way: settings: { // See the solidity docs for advice about optimization and evmVersion optimizer: { enabled: true, runs: ...
user avatar
  • 193
0 votes
1 answer
126 views

Is HD wallet providers mnemonic same as your private key?

I'm trying to deploy a contract to rinkeby using truffle. In the truffle-config file, in the HD wallet provider, you are supposed to specify a mnemonic and also your api from infura. The problem is ...
user avatar
0 votes
0 answers
25 views

Deploying a smart contract for the second time (version2) and read/writing from etherscan.io

I successfully deployed my smart contract that enables me to mint NFTs. Now I know that everything on the blockchain is permanent, so if I wanted to make changes to that contract, I have to deploy a &...
user avatar
0 votes
1 answer
633 views

"Migrations" ran out of gas

I am trying to deploy 3 contracts to Avalanche. I have already deployed these same contracts to Ropsten, Rinkeby, and Ethereum mainnet. When I try to deploy to Avalanche, I get this error message: ...
user avatar
0 votes
0 answers
24 views

Truffle deployment error in VS code [duplicate]

I am using Ganache and Truffle to deploy a practice smart contract from VS code. When I run: HelloWorld.deployed().then(function(instance){return instance}); in the truffle development console, I get ...
user avatar
  • 33
0 votes
0 answers
34 views

How to access different contracts with same name in Truffle

I deployed three contracts where the contract itself is same but the parameters are different. const Token = artifacts.require("Token"); module.exports = async function (deployer) { // ...
user avatar
0 votes
1 answer
310 views

Unable to install npm truffle - WARN deprecated

I'm trying to set up npm truffle in the terminal in visual studio, but I got failure message saying npm WARN deprecated. The command I use is npm install truffle -g What should I do next? What ...
user avatar
0 votes
2 answers
82 views

deploy contracts, invalid number of parameters

need a little help. I'm frustrated with this. here's my sol. very simple pragma solidity ^0.8.10; import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; contract EkoToken is ERC20 ...
user avatar
0 votes
0 answers
204 views

Error: transaction underpriced

The below code just stops working at the line "Attempting to deploy from account: .." in console and after sometime it gives "Trnsaction was not mined within 750s, please make sure your ...
user avatar
0 votes
1 answer
611 views

Can I get abi file from deployed contract? or resore abi json file

I deployed ERC-721 contract to mainnet last night with truffle Contract is successfully deployed but no abi file generated (I don't know why..) so I can't run my dapp https://etherscan.io/address/...
user avatar
  • 23
0 votes
0 answers
167 views

Verify that your constructor params satisfy all require conditions

Smartcontract requires two addresses to be passed while deploying contract via truffle. I am deploying this contract on Ganache locally. Here's the smartcontract constructor. constructor (address ...
user avatar
0 votes
0 answers
46 views

How to connect a wallet to a smart contract and deploy the application to ethereum blockchain?

I have made a smart contract that will get some money. But most people recommend not to store money on a smart contract. So how do I connect a wallet to a smart contract? And how do I deploy the ...
user avatar
  • 1
0 votes
1 answer
513 views

Cannot deploy by Truffle to Polygon Mumbai testnet

I`m trying to deploy by truffle to testnet polygon Mumbai a smart contract , However it does not work with my contract. It worked with another smaller contract , but with this one which imports ...
user avatar
0 votes
0 answers
59 views

this.state.manager returning an empty array

I've made a solidity contract which was deployed perfectly. Now, when I'm connecting with it my react Dapp after getting the ABI and address and trying to render it, it renders nothing. my web3.js ...
user avatar
0 votes
0 answers
60 views

Cannot deploy ERC721 contract to Rinkeby network - address is not whitelisted. How can that be fixed?

I cannot deploy to Rinkeby because the address of my future contract ERC721 is not whitelisted..... How can I fix it? I am specifically using the OpenSea template for the contract which supposedly ...
user avatar
1 vote
1 answer
3k views

What is that error called "code: -32000, message: 'header not found'" when I deploy smart contracts to BSC?

I am just stuck with this error as follow; Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({ code: -32000, message: 'header not found' }) I have no idea of any reason why I got this since I could see ...
user avatar
  • 105
0 votes
1 answer
26 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" -...
user avatar
  • 836
0 votes
1 answer
172 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....
user avatar
  • 246
0 votes
0 answers
96 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, ...
user avatar
0 votes
1 answer
26 views

deploying dydxexchange/solo: '"OperationImpl" ran out of gas'

I'm trying to deploy the 'solo' (https://github.com/dydxprotocol/solo) After cloning git@github.com:dydxprotocol/solo.git and resolving all dependencies Contracts compilation is successful, however ...
user avatar
0 votes
1 answer
141 views

Deploying 'dydxprotocol / solo' results "Error: spawnSync /bin/sh ENOBUFS"

I'm running in Amazon cloud9 https://github.com/dydxprotocol/solo running 'npm run deploy_test' At some point of the contracts compilation (maybe the end) I get the ENOBUFS error. Is that something in ...
user avatar
0 votes
0 answers
96 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....
user avatar
0 votes
2 answers
488 views

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 ...
user avatar
  • 623
1 vote
1 answer
2k 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 ...
user avatar
0 votes
0 answers
98 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 ...
user avatar
  • 457
0 votes
0 answers
58 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/...
user avatar
  • 317
0 votes
2 answers
195 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: ...
user avatar
0 votes
1 answer
201 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 ...
user avatar
0 votes
0 answers
52 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 ...
user avatar
  • 379
0 votes
0 answers
35 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) > ...
user avatar
0 votes
0 answers
152 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 ...
user avatar
  • 141
0 votes
1 answer
290 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 ...
user avatar
  • 1
1 vote
3 answers
201 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 ...
user avatar
  • 141
0 votes
1 answer
19 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 ...
user avatar
0 votes
0 answers
138 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 ...
user avatar
1 vote
3 answers
5k 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 ...
user avatar
  • 232
3 votes
1 answer
591 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", ...
user avatar
0 votes
1 answer
108 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 ...
user avatar
0 votes
1 answer
242 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, ...
user avatar