Questions tagged [truffle]

Development environment, testing framework and asset pipeline for Ethereum

Truffle is a development environment, testing framework and asset pipeline for Ethereum, aiming to make life as an Ethereum developer easier. With Truffle, you get:

  • Built-in smart contract compilation, linking, deployment and binary management.
  • Automated contract testing with Mocha and Chai.
  • Configurable build pipeline with support for custom build processes.
  • Scriptable deployment & migrations framework.
  • Network management for deploying to many public & private networks.
  • Interactive console for direct contract communication.
  • Instant rebuilding of assets during development.
  • External script runner that executes scripts within a Truffle environment.

Github Repository

Official Website

1088 questions
3
votes
1 answer

Test Smart Contract with arguments in constructor with truffle

I want to test smart contract with parameter in constructor but have error. Here is my smart contract and test files: pragma solidity >=0.4.25 <0.7.0; contract Test { string public test; constructor(string memory _test) public { …
Artem
  • 364
  • 2
  • 18
3
votes
3 answers

Error in Deployment in Binance Testnet : Could not create addresses from your mnemonic or private key(s)

I was trying to deploy my contract to Binance Smart Chain Testnet and I got this error. I am using truffle and also successfully installed truffle HD wallet Provider. Truffle Error:- Error: Could not create addresses from your mnemonic or private…
Bsc Talk
  • 41
  • 3
3
votes
1 answer

Replacement fee too low

I am trying to run a script with nodejs to get some data. The script is the following one that I attach in the next lines: const IdentityManager = artifacts.require("IdentityManager"); const fs = require("fs"); const path = require("path"); const…
zoit
  • 617
  • 2
  • 20
  • 41
3
votes
1 answer

How to nest promises with truffle deployer in truffle migration script

I am using truffle deployer to deploy my solidity contracts: module.exports = function(deployer, network) { ... } I would like to store some data on the chain within this migration process. Basic storing of data is working properly by using the…
3
votes
2 answers

How to configure a different polling interval in Truffle?

How does one configure either Truffle itself, or Truffle's HDWalletProvider such that the poll interval is different? I would like my Truffle instance to be less "chatty" over JSON-RPC, when it has submitted a transaction and is waiting for a…
bguiz
  • 27,371
  • 47
  • 154
  • 243
3
votes
2 answers

How to interact with OpenZeppelin proxy contracts from Truffle console?

I cannot figure out how to use @truffle/contract to interact with contracts deployed by package @openzeppelin/truffle-upgrades (ProxyAdmin and AdminUpgradeabilityProxy). I have deployed my contracts to Ganache: Deploying 'MetaToken' …
kivi_o
  • 103
  • 1
  • 9
3
votes
2 answers

Slice numbers in Solidity (For example extract 2 first number from uint)

I have this numbers: uint256 numbers = 123456789; I need to extract the two first number (12) into uint variable. Also possibility to extract the next 2 numbers following the previous one: 34 ect. Is there any easy way to do such thing in solidity…
3
votes
2 answers

sending signTransaction with web3.js. but I can't confirm this transaction in ganache

I want to put data in rawTransaction and send it to the smart contact of the ganache local node. By the way, the raw transaction I made with the data was created, but I can't see the transaction on ganache. Why did you do that? const Web3 =…
yuhatown
  • 33
  • 1
  • 4
3
votes
0 answers

Truffle stuck when deploy smart contract

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 name: 'ropsten' > Network id: 3 > Block gas…
Filip Laurentiu
  • 854
  • 3
  • 9
  • 29
3
votes
2 answers

zsh: command not found: truffle

I have install: npm install -g truffle Node version: v10.20.1 NPM version: 6.14.4 After installing npm install -g truffle, it gets install successfully, but when I checked truffle version it shows me ,command not found truffle
aksh
  • 31
  • 1
  • 3
3
votes
0 answers

After running truffle unbox react getting error

After first initialization of running truffle compile then truffle unbox react getting error Unhandled Rejection (Error): This contract object doesn't have address set yet, please set an address first. I am trying to install a react dapp so i can…
Elisha Day
  • 43
  • 1
3
votes
1 answer

TypeError: Cannot read property '_alreadyWrapped' of undefined

I created a project that integrates the truffle and react frameworks,Then I configured rinkeby test network of Ethereum in truffle-config.js.But, when I migrate the contract to rinkeby network, something went wrong. truffle compile truffle…
Leo
  • 43
  • 4
3
votes
2 answers

Web3 not treating web3.eth.Contract as a contructor

I'm writing a JS file to provide functionality to a smart contract. From what I can tell, MetaMask is injecting web3 into the webpage, but when I attempt to create a contract object, my browsers console (brave browser) is stating that…
jkean
  • 31
  • 1
3
votes
2 answers

migration run out of gas

Hi I am using Geth and i try to truffle migrate but it gives error. truffle-config.js is belown: development: { host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) network_id:…
jhdm
  • 147
  • 3
  • 8
3
votes
1 answer

How to fix "Unknown network "ganache". See your Truffle configuration file for available networks."

I'm trying to deploy a contract to rinkeby. I'm using the following command: $ truffle migrate --networks rinkeby Compiling your contracts... =========================== > Compiling ./contracts/Migrations.sol > Compiling ./contracts/Voting.sol >…
ErickAgrazal
  • 83
  • 1
  • 9