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

Installing Ganache.appx on Windows 10

I am using the following command in PowerShell to install Truffle's Ganache on my Windows 10 machine: Add-AppxPackage -Path "C:\Users\mabel\Downloads\Ganache.appx" Whenever I run that command I get the following error: Add-AppxPackage :…
Mabel Oza
  • 557
  • 8
  • 22
4
votes
1 answer

Truffle console send ETH to smartContract

I want to send some ETH to smart contract address Test.deployed().then(function(instance) {return instance.contribute("0x1e0c326f4f24b5e9f5d42d695f48983d0a72b240", {from:web3.eth.accounts[0],value:10});}) but I always get truffle(development)>…
senzacionale
  • 20,448
  • 67
  • 204
  • 316
4
votes
1 answer

How to call Web3js function from Nodejs file

I have the following working web3js code, Calling App.createContract() on button click works well on a webpage, however I want to call App.createContract() or similar from another Nodejs controller. Infact what I am thinking of is making an API in…
NaN
  • 1,012
  • 3
  • 13
  • 25
4
votes
4 answers

Truffle deployed contracts can't be verified through Etherscan

I am faced with the problem the truffle generates a different bytecode than solcjs (local compiler) and also than Remix (online compiler). And therefor I can't verify my contracts throght Etherscan (see https://etherscan.io/verifyContract) My…
Alex
  • 43
  • 1
  • 3
4
votes
1 answer

How to log all of the events emitted by a Contract since it's inception?

I'm currently using the Truffle framework to check but all the documentation is around watching current events. var meta = MetaCoin.deployed(); var events = meta.allEvents(); events.watch(function(error, result) { if (error == null) { …
Klaus
  • 295
  • 2
  • 9
3
votes
2 answers

how to convert bytes to uint256 in solidity

I am trying to convert bytes to uint256 in solidity. Here is solidity code, // SPDX-License-Identifier: MIT pragma solidity 0.8.13; contract Sample { function getValue(bytes memory a) external pure returns(uint256 value) { assembly { …
sel
  • 169
  • 5
  • 13
3
votes
1 answer

How to set price for all NFTs in a collection on opensea?

If I mint a collection of n items on my own address (via smart contract) , it'll be publicly visible on my account under the collected / created section like this . The problem is that , in order to complete the listing I must manually set the price…
Ngyfsoau
  • 39
  • 2
3
votes
8 answers

Why this truffle installation error coming

I'm trying to install truffle from 2 days I don't know why error is coming in the same way I install truffle in my computer but in my laptopp when I'm trying it is showing an error I install Python 3.10 then visual studio build tools also but now I…
3
votes
2 answers

Truffle testing - Trying to use web3 to test EIP712, are there any alternatives?

I've been studying EIP712 and tried to implement some testing using truffle and Web3js. However, I noticed that web3.eth.accounts.sign() is compliant with EIP191, therefore I cannot retrieve the signer address correctly by using ECDSA.recover from…
3
votes
1 answer

I try to deploy my smart contract in truffle but is says "unsupported compiler" when I "truffle migrate" how can I fix this?

PS D:\Projects\ANIS\Decentralized_Bank> truffle compile Compiling your contracts... Compiling .\src\contracts\Migrations.sol Compiling .\src\contracts\Migrations.sol Compiling .\src\contracts\Tether.sol Compiling…
3
votes
5 answers

(intermediate value).toBigNumber is not a function

I am following the Building your First Blockchain tutorial(https://www.youtube.com/watch?v=coQ5dg8wM2o&t=494s). I have the following in my index.html:
Katlock
  • 1,200
  • 1
  • 17
  • 41
3
votes
2 answers

transaction could not be decoded: could not recover secp256k1 key: calculated Rx is larger than curve P

I am getting following error while trying to compile solidity contract: transaction could not be decoded: could not recover secp256k1 key: calculated Rx is larger than curve P
Ayan
  • 8,192
  • 4
  • 46
  • 51
3
votes
2 answers

Cannot find module 'fs-extra' when testing with Truffle

I am reading the tutorial on Ethereum Pet Shop -- Your First DApp, everything seems ok until I test with truffle test with below error: Error: Cannot find module 'fs-extra' at Function.Module._resolveFilename…
nambk
  • 445
  • 3
  • 13
3
votes
0 answers

Truffle test doesn't seem to finish before "succeeding", and doesn't wait for transactionHash of a sent tx

Quick problem I've been slamming my head against since last night, My truffle (v5.2.3) test file performs two (2) tests, that serially call() then actually send a transaction to make persistent changes on my smart contract's storage. These tests are…
Dimitris Sfounis
  • 2,400
  • 4
  • 31
  • 46
3
votes
1 answer

Truffle deploy insufficient funds (despite using Truffle's total price estimates)

1. Dry run deploy Migrations dry-run (simulation) ..... > Total deployments: 2 > Final cost: 0.058258696 ETH That's $83.83 2. Do I have $83.83? Yes I do. 3. Double check mainNet configs (truffle-config.js): Current gas in Gwei 105…
GN.
  • 8,672
  • 10
  • 61
  • 126