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

TestRPC/Ganache: the tx doesn't have the correct nonce

I have been experimenting with truffle recently and followed the following tutorial: http://truffleframework.com/tutorials/pet-shop Whenever I try to setup a transaction I keep getting the same error below Error: Error: the tx doesn't have the…
user1664
  • 481
  • 1
  • 7
  • 6
29
votes
14 answers

Truffle command not found after installation

I installed truffle through npm with the following: sudo npm install -g truffle but when I run truffle list on the console it just gives me bash: truffle: command not found
user3480478
  • 429
  • 1
  • 4
  • 5
24
votes
2 answers

Module is extraneous npm

I've checked that the connect-privkey-to-provider module is in the dependencies. However, it keeps saying Module 'connect-privkey-to-provider' is extraneous npm and cannot find module 'connect-privkey-to-provider'. What's wrong with my code? PS…
1Sun
  • 2,305
  • 5
  • 14
  • 21
17
votes
2 answers

Member equal is not available in type(library Assert)

The problem arises when I want to test whether a string value is correct. Numbers are asserted correctly and don't return an error message when they are trying to be compiled. However, when I try to assert a string, it returns the following error…
DevNebulae
  • 4,566
  • 3
  • 16
  • 27
16
votes
2 answers

Send signed transactions to Ropsten or Truffle develop network with Trezor (Hardware Wallet)

Im trying to integrate web3js with Trezor in a truffle dev network or using ropsten test network. The idea is to sign the transactions using the hardware wallet and then send a raw transaction using web3js Im getting that we dont have balance to…
Marcos Martínez
  • 545
  • 2
  • 9
  • 24
13
votes
1 answer

who is the owner of the contracts deployed using truffle?

I am using testrpc and truffle to test my contract. When I type truffle migrate , this will deploy my contract to the testrpc network. My question is , which account (from testrpc accounts) has been used to deploy the contract. In other word, whose…
sheemar
  • 467
  • 3
  • 13
12
votes
6 answers

Test ethereum Event Logs with truffle

I have a contract's function which emit events on each call. I would like to have an event emitted on each test which are passing, here are some tests : it("should emit Error event when sending 5 ether", function(done){ var insurance =…
ltheron
  • 301
  • 1
  • 3
  • 12
11
votes
4 answers

Error: Failed to fetch the Solidity compiler

I am new to Truffle and going through the Metacoin tutorial; I followed all the steps but when I do truffle compile, I get the following: Error: Failed to fetch the Solidity compiler from the following locations:…
Emily Kuo
  • 121
  • 1
  • 5
11
votes
1 answer

This version of µWS is not compatible with your Node.js build: Error: node-loader. while running "truffle console"

I'm working on a Blockchain project where I use Truffle. when I run the Truffle Console command I face this issue. Complete Log: This version of µWS is not compatible with your Node.js build: Error: node-loader: Error: The specified module could not…
Abdur Rahman
  • 153
  • 2
  • 7
11
votes
5 answers

Error: Truffle is currently using solc 0.5.16, but one or more of your contracts specify “pragma solidity ^0.8.0”

Error: Truffle is currently using solc 0.5.16, but one or more of your contracts specify “pragma solidity ^0.8.0” Here is a photo of the error - https://gyazo.com/2f5ea2f50cc1d4ef5eea2f21d0e04fe7 All my contracts are using the ^0.8.0 pragma. My…
Palm
  • 360
  • 2
  • 17
10
votes
8 answers

contract has not been deployed to detected network (network/artifact mismatch) on Rinkeby Network

I have been running into the specified in the title. I have developed a smart contract and have successfully compiled and deployed it to the network as follows: 1. Run testrpc 2. truffle compile 3. truffle migrate However, the error above is still…
Sho0310
  • 101
  • 1
  • 1
  • 5
10
votes
3 answers

Where does ganache store the Ethereum blockchain

I'm actually using truffle with Ganache to do some development. I would like to know where does Ganache store it's blockchain to see how much data is used by my test. Is it stored somewhere accessible on the pc ? I'm using Ubuntu 17.10…
Zackorrigan
  • 178
  • 1
  • 10
9
votes
6 answers

Getting Error on installing Truffle on windows 10 using npm install truffle -g

When i tried to install truffle i got these errors :- I have installed Node.js earlier and also i have pip installed. PS C:\Users\pk199\Documents> npm install -g truffle npm ERR! code 1 npm ERR! path…
Purushottam
  • 149
  • 1
  • 3
  • 10
9
votes
1 answer

Is it possible to use @truffle/contract in TypeScript?

Here is the package I would like to use How can I import this in a TypeScript file (without using require) What is the proper syntax? None of these work: import contract from "@truffle/contract"; import Contract from "@truffle/contract"; import…
nehtron
  • 138
  • 5
9
votes
1 answer

Module not found: Error: Can't resolve JSON

I've commanded npm run dev to run my code. However, it pops up several errors the first error it pops up is Module not found: Error: Can't resolve '../../build/contracts/User.json' I don't know why it pops up this Error, since in my…
Jessie
  • 1,155
  • 3
  • 16
  • 27
1
2 3
72 73