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
6
votes
3 answers

Difference between Openzeppelin SDK and Truffle?

For smart contract development, what is the difference between Openzeppelin SDK and Truffle? When should I use one or another, or both together?
tinker
  • 1,396
  • 11
  • 20
6
votes
5 answers

Source file requires different compiler version : Truffle

I have written one simple smart contract in solidity and trying to migrate it with truffle. $ truffle migrate Compiling .\contracts\Election.sol... Compiling .\contracts\Migrations.sol... /D/ethereum/electiondemo/contracts/Migrations.sol:1:1:…
Vikas Banage
  • 494
  • 1
  • 8
  • 25
6
votes
1 answer

Network up to date on truffle deploy

I've been working with solidity and truffle for a few days to develop a contract. I'm testing using the network created by Ganache an RPC client for build a local blockchain enviroment. There is one thing I do not understand though. I follow these…
Alberto Favaro
  • 1,824
  • 3
  • 21
  • 46
6
votes
2 answers

Truffle error: Error encountered, bailing. Network state unknown. Review successful transactions manually

Every time I try to deploy truffle migrate --reset my Organization.sol contract, I get the following error: Error encountered, bailing. Network state unknown. Review successful transactions manually. I Googled the error and apparently this is due…
Red Ghost
  • 302
  • 2
  • 12
6
votes
4 answers

Truffle console variable declaration

I'm currently following this tutorial (https://medium.com/zeppelin-blog/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05) as I try to get into ethereum programming. Step 3 is interacting with the deployed contract. When I…
Daniel Gretzke
  • 426
  • 4
  • 19
5
votes
1 answer

What is the best practice of copying from array to array in Solidity?

I am trying to save gas by optimize code. In a flash, however, I was wondered what is the best practice of copying from array to array in Solidity. I present two option. One is copying by pointer (I guess) and the other is using…
TyeolRik
  • 466
  • 2
  • 25
5
votes
1 answer

Encountered an error while attempting to update latest block

I'm new to blockchain and i was just trying to deploy a simple smart contract to ropsten test net. I've used the smart contract code from https://github.com/t4sk/solidity-multi-sig-wallet. Also i'm using the account provided by truffle develop My…
Abhishek Jha
  • 163
  • 1
  • 11
5
votes
3 answers

Cannot Install NPM Package - Code 128 An unknown git error occurred

I'm trying to install the package @truffle/hdwallet-provider . As written in the doc, I'm running: npm i @truffle/hdwallet-provider Here is the error message I'm getting: npm ERR! code 128 npm ERR! An unknown git error occurred npm ERR! command git…
Henri
  • 1,571
  • 5
  • 23
  • 38
5
votes
0 answers

Smart Contracts - Chainlink VRF / @openzeppelin/truffle-upgrades compatibility

Right now i am transforming a basic smart contract into a upgradeable smart contract using @openzeppelin/truffle-upgrades So i followed all required steps from the docs but one issue remains: Truffle-Upgrades requires me to replace the constructor…
5
votes
2 answers

How to change account in truffle(ganache)?

I use ganache-cli to build local blockchain and truffle to deploy contract. To interact with deployed contracts i use truffle console. For example i transfer tokens from my current account(that is web3.eth.personal.getAccounts()[0]) to…
raury
  • 85
  • 1
  • 7
5
votes
1 answer

Time out error during Deployment in Binance Smart Chain

I got an error while deploying contract in Binance Smart Chain plz help me if anybody knows it error message looks like this Deploying 'WhitePaperInterestRateModel' --------------------------------------- > transaction hash: …
hyunki_cho
  • 51
  • 1
5
votes
0 answers

Truffle test suite code hinting issues, how to solve?

For truffle, a generated test for a contract looks like this: var PaymentRequest = artifacts.require("PaymentRequest"); contract("PaymentRequest", accounts => { it("should assert true", done => { var paymentRequest =…
psymeuk
  • 71
  • 3
5
votes
1 answer

npm error "Keccak bindings compilation fail." while installing truffle

I tried to install Truffle, but then I got this error: $ npm install -g truffle C:\Users\dany.vandermeij\AppData\Roaming\npm\truffle -> C:\Users\dany.vandermeij\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js > keccak@1.4.0…
BlockchainProgrammer
  • 1,999
  • 5
  • 20
  • 32
5
votes
1 answer

how to fix "insufficient funds for gas * price + value"?

windows 10 Home x64 bignumber.js@^7.2.1 openzeppelin-solidity@1.10.0 react@16.4.1 react-dom@16.4.1 truffle@4.1.13 web3@1.0.0-beta.34 Full version reference: https://github.com/tooploox/ethereum-ico-examples/blob/master/package.json I have done a…
user9460187
5
votes
0 answers

TruffleHDWalletProvider Alternative That works with Websockets

I'm currently working on a dapp that requires a backend, and event-listening. I've setup web3js with a infura websocket on the rinkeby network but I'm having a hard time setting up my accounts(using a mnemonic) into web3js. So right now the event…
Luis Osta
  • 144
  • 1
  • 13
1 2
3
72 73