Questions tagged [truffle-deployment]
The truffle-deployment tag has no usage guidance.
183
questions
1
vote
0
answers
13
views
Can't deploy contracts on Mumbai
I'm trying to deploy one smart contract on Mumbai with truffle but It gives me this error
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to ...
0
votes
0
answers
55
views
abortHandshake(this, req, `Unexpected server response: ${res.statusCode}`);
truffle migrate --network sepolia
Compiling your contracts...
Everything is up to date, there is nothing to compile.
/mnt/c/pr0/bootcamp-completed/node_modules/ws/lib/websocket.js:542
abortHandshake(...
0
votes
0
answers
24
views
Getting this error while deploying contract on truffle
I am using command {truffle migrate --network 'Network Name'} to deploy on truffle. I don't know where this error is comming from.
Someone who has worked on truffle, kindly help.
0
votes
0
answers
18
views
Truffle migrate didn't migrate contract despite calling truffle migrate --reset
Here's my 2_gimmy_migration.js
const Gimmy = artifacts.require("Gimmy_NFT.sol");
module.exports = function (deployer){
deployer.deploy(Gimmy);
};
I had tried truffe migrate --reset ...
1
vote
1
answer
48
views
Error While trying to Use provider.getAddress Module
When I try to run this module, it giveas an error "TypeError: provider.getAddress is not a function".
const fs = require('fs')
const Web3 = require('web3')
function loadAccount (...
1
vote
0
answers
22
views
Deactivate clean-room environment in truffle
Everything is in the question, does anyone have a way to prevent the redeployment of the contract every time you run a test and keep using the same "contract" feature ?
Edit : I've found it, ...
0
votes
0
answers
30
views
Unable to call deployer.deploy()
I am currently trying to build this small blockchain app using JS, truffle and solidity. However, I am stuck trying to run the following command: todoList = await Todolist.deploy(). It responds with ...
0
votes
0
answers
32
views
Truffle migrations - it doesn't recognize the network from external file, why?
1_initial_migration.js file:
const Globals = require("../globals.js");
const Migrations = artifacts.require("Migrations");
const Test = artifacts.require("Test");
...
0
votes
1
answer
35
views
Can someone please help me with this deployment error?
This error occurred while deploying to Ganache using Truffle.
0
votes
1
answer
63
views
Truffle: { Error: Invalid number of parameters for "undefined". Got 0 expected 1! at module.exports
I am trying to execute the following smart contract using Truffle:
pragma solidity 0.5.16;
contract Phishable {
address public owner;
constructor (address _owner) public{
owner = ...
1
vote
0
answers
160
views
Error deploying contract via Truffle to Polygon mainnet
When I try deploying with command npx truffle migrate --config=truffle-config.js --network polygon, I get the following error.
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ([object Object])
at ...
2
votes
1
answer
548
views
"contract x" ran out of gas. Something in the constructor (ex: infinite loop) caused gas estimation to fail ganache
i'm trying to deploy contracts on private network ganache using ganache application.
but it threw an error because of its big size:
"contract x" ran out of gas. Something in the constructor (...
0
votes
1
answer
122
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-...
1
vote
1
answer
299
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 ...
0
votes
1
answer
94
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\...
0
votes
1
answer
173
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 ...
3
votes
0
answers
371
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 ...
0
votes
1
answer
54
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 ...
0
votes
1
answer
123
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&...
0
votes
2
answers
715
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 ...
0
votes
0
answers
53
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 &...
0
votes
1
answer
2k
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:
...
0
votes
0
answers
25
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 ...
0
votes
1
answer
545
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 ...
0
votes
2
answers
189
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 ...
1
vote
0
answers
389
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 ...
1
vote
1
answer
2k
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/...
2
votes
2
answers
987
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 ...
0
votes
1
answer
110
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 ...
1
vote
1
answer
5k
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 ...
0
votes
1
answer
46
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
1
answer
388
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
1
answer
39
views
deploying dydxexchange/solo: '"OperationImpl" ran out of gas'
I'm trying to deploy the 'solo' (https://github.com/dydxprotocol/solo)
After cloning [email protected]:dydxprotocol/solo.git and resolving all dependencies
Contracts compilation is successful, however ...
0
votes
1
answer
370
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 ...
0
votes
2
answers
696
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
...
2
votes
1
answer
3k
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
2
answers
287
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
1
answer
265
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
0
answers
113
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
0
answers
260
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
1
answer
462
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
3
answers
262
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
1
answer
23
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 ...
1
vote
0
answers
225
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 ...
3
votes
3
answers
8k
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 ...
3
votes
1
answer
637
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
1
answer
189
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
1
answer
336
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
1
answer
1k
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
1
answer
701
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(&...