Questions tagged [truffle-deployment]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

Why does truffle test break my migrations?

I have created a deployment script for an upgradable token contract which takes a flag from the command line for the deployment type. I type... truffle migrate --reset --type initial truffle migrate --...
0 votes
1 answer
1k views

Error in creating instance of deployed contract using truffle console

I deployed Token and Crowdsale contract in separate migration files. During Migration, there was no error. Migration logs are share: Running migration: 2_deploy_token.js Deploying DappToken... ......
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
2 answers
323 views

unable to deploy contract on ropston testnet

I am trying to deploy contract on ropston testnet. I have created an account through truffle console and got three test ethers from https://faucet.bitfwd.xyz/. I have confirmed that my account has ...
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
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 ...
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
1 answer
781 views

How fast can I deploy to Ropsten?

Does anyone know how fast I can deploy to the Ropsten network? I am using the following command: truffle migrate --network ropsten and I have an instance of geth running. In the geth console, when ...
0 votes
2 answers
836 views

How to access Truffle deployed contracts with app's javascript code?

I have some smart contracts deployed with Truffle on the local Ganache network, but I don't know how to access it with the app's javascript in order to make function calls to the contract. How would I ...
1 vote
2 answers
3k views

Error : invalid asm.js : Invalid member of stdlib when executing node deploy.js

Unable to deploy contract on Rinkeby network using infura and mnemonic of metamask account. I am using Atom as IDE for writing smart contract using solidity. As soon as I execute node deploy.js, I ...
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 ...
0 votes
1 answer
476 views

How can i connect external AWS server's truffle in browser?

I have deployed geth, truffle, testrpc whichever needed in live AWS server. All the configurations are working properly. I have initiated 'truffle develop' and 'npm run dev'. Both are working fine. ...
4 votes
1 answer
1k 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 ...
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: ...
2 votes
2 answers
989 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
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
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: ...
2 votes
1 answer
915 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: Base.sol pragma solidity ^0.4.22; contract ...
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
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 ...
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
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
2 answers
435 views

How to communicate with a deployed token?

Using Truffle, I am trying to deploy the following contract: pragma solidity ^0.4.13; contract ERC20Events { event Approval(address indexed src, address indexed guy, uint wad); event ...
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"); ...
4 votes
5 answers
2k views

How do I determine the network within a truffle exec script?

I'm writing a script to be executed with truffle exec and I need to add some logic conditional on the network we're calling truffle exec with. This is (roughly) what I want in my script: const ...
9 votes
3 answers
13k views

What is use of HDWalletProvider in Truffle config?

The sample code here for deploying to Ropsten used HDWalletProvider and a mnemonic in the configuration, but I am not sure I understand its purpose. Is this just telling it the account that will ...
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
35 views

Can someone please help me with this deployment error?

This error occurred while deploying to Ganache using Truffle.
0 votes
1 answer
1k views

Truffle.js file is not created with truffle init command

I have run the truffle init command successfully with creating the following directories and files such as contracts, migrations, test, and truffle-config.js but the one file is missing as truffle.js? ...
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
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 ...
29 votes
5 answers
22k views

What is the real price of deploying a contract on the Mainnet?

I'm trying to deploy a contract on the mainnet, but I've been getting some issues deploying with Truffle. ➜ ballot git:(master) ✗ truffle migrate --network mainnet --dry-run Using network 'mainnet' (...
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 ...
0 votes
1 answer
546 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 ...
2 votes
1 answer
214 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) { ...
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 ...
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 ...
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 ...
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-...
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 ...
5 votes
5 answers
2k views

Unhandled promise rejection(gas limit) when deploying Contract to rinkeby using truffle-hdwallet-provider

I am trying to Deploy a beginners contract onto the rinkeby test network through Infura node. It is throwing the following error. (node:35183) UnhandledPromiseRejectionWarning: Unhandled promise ...
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 ...
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 ...
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&...