The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [truffle]

Questions regarding the implementation and use of the Truffle development and testing environment.

Filter by
Sorted by
Tagged with
0
votes
1answer
16 views

Metamask TestRPC shows 0 Ether while connecting to Ganache- CLI

I've gone through various Q/A(s) of the problem of ganache-cli and metamask not linking but after trying all the solutions, still doesn't work for me. As soon as I type ganache-cli in windows cmd ...
0
votes
0answers
16 views

Truffle - Get ETH Balance with Web3JS - two different errors

Using Gnache and Truffle unit tests, I have tried two helper routines to get Eth balance for an address. URL to source of the code in comments inline below: const Web3 = require('web3') const ...
0
votes
1answer
9 views

Truffle returning balances from a function

This maybe just a simple Javascript issue, but it's in the context of running under Truffle. I can't seem to access my object variables coming back from my function; thus the tests are failing with ...
0
votes
1answer
20 views

Not able to successfully send Transactions via MetaMask on Firefox Browser

Does anybody help me figuring out why I am getting failed transaction here?What does this error means? Few days back,with the same line of code,I was able to successfully send transactions. An update:...
0
votes
0answers
9 views

Is there any example of a drizzle-react dapp implementation that uses render props?

Render props were added after React 16.3 and the github readme for drizzle-react suggests to use them. The problem for is that there is no updated documentation (other then the small example in the ...
0
votes
1answer
37 views

Arduino Vs Raspberry pi with Ethereuem Blockcain [on hold]

I already built a smart contract for Ethereum Blockchain by using truffle to track the ownership of IoT devices; Now, I'm looking to connect my smart contract with the IoT environment (node) to detect ...
0
votes
1answer
14 views

Are there any virtual IoT simulators that facilitate the connection with Ethereum Blockchain?

I already built a smart contract for Ethereum Blockchain by using truffle; Now, I'm looking to connect my smart contract with the IoT environment. So are there any IoT simulators (platform, framework,...
0
votes
0answers
16 views

What is the networkid and chain id of truffle cli?

I am using truffle console to deploy contracts and using Nodejs/web3js to interract with it. I wanted to use ethereumjs-tx for signing transaction, here is the reference link. I am not sure ,how can ...
0
votes
1answer
16 views

rpc error with payload and exception thrown in contract code

This is the problem I get when trying to run my contract! And then when I go ahead and run it, this pops up This is my js code: import React, { Component } from 'react'; import Web3 from 'web3'; ...
0
votes
1answer
17 views

what is 'UnimplementedFeatureError: Not yet implemented - FixedPointType' error?

what is 'UnimplementedFeatureError: Not yet implemented - FixedPointType' error in solidity while compiling through truffle ? How to fix it ? Using solidity compiler version - 0.5.9
0
votes
1answer
13 views

Why do I always get “Returned values are not valid, did it run Out of Gas”?

I'm new on Ethereum blockchain and I'm working on deploy and using smart contract using truffle on my private blockchain. I have followed exactly this guide https://www.trufflesuite.com/docs/...
0
votes
0answers
24 views

Error: invalid number/address values

Having trouble with the submitOracleResponse inside the callback below: flightSuretyApp.events.OracleRequest({ fromBlock: 0 }, function (error, event) { if (error) console.log(error); ...
0
votes
0answers
36 views

Unable to deposit ether from External Account to Contract

This is my first question on StackOverflow. I am having trouble sending Ether from an account to the contract. The DApp I am creating is separated into a Data & App contract, where the Data ...
0
votes
1answer
26 views

Adding a payee to a donation contract. Error: Transaction reverted

Disclaimer: I'm a noob when it comes to programming altogether let alone smart contracts. I refactored this code that was written like three years ago so it could work with solidity 0.5.0. I deployed ...
0
votes
0answers
22 views

Truffle test including mainnet contract - Error: Cannot create instance of Whitelist; no code at address

Problem with the error Error: Cannot create instance of Whitelist; no code at address 0x6198149b79AFE8114dc07b46A01d94a6af304ED9 How do I have to setup truffle so that I can run a test which includes ...
0
votes
0answers
14 views

Can't migrate, ropsten randomly throws out of gas

I have the following migration files with 50 contracts' deployment and their setup (calling each other functions like privileges, access and so on): On the development network everything works fine. ...
0
votes
1answer
31 views

Emited Solidity Events not being watched at frontend truffle contract instance

So, I have been reading through A LOT of pages about events in Solidity and how to interact with them on frontend but I am still pretty new to this and it seems like there have been multiple changes, ...
0
votes
0answers
31 views

Truffle how to test with reference to mainnet smart contract - Error: while migrating VM Exception while processing transaction: revert

I would like to run a truffle test on a smart contract that includes a smart contract address deployed on mainnet. However, this results in the following error Error: Error: Error: while migrating ...
0
votes
1answer
31 views

How to solve the error “”before all“ hook: prepare suite:” [closed]

When I tested my contract, I got this error ""before all" hook: prepare suite:" Does anyone know how to solve this error? This is my dependencies. "truffle": "5.0.7", "web3": "1.0.0-beta.46"
0
votes
1answer
14 views

What are the ways to call a smart contract function during development?

What are the ways to call a smart contract function during development using Truffle simulated VM with a GUI interface (like Remix or EtherScan offer)? I know I could use CLI options like Truffle ...
3
votes
0answers
36 views

What's the point of Truffle Migrations?

I've been reading a few articles and StackExchange posts (e.g. What are truffle migrations?) about Truffle Migrations, but I still don't get it: why do we need them? It seems they do only one thing (...
0
votes
0answers
17 views

Developing a dapp using Truffle. Metamask will sometime throw this error when interacting with a simple contract

Trying to setup my development environment to start a personal dapp project. I am starting off the project with the React truffle box. 1) I start by running truffle develop which launches a local ...
1
vote
0answers
34 views

Help hacking this contract

This is a very simple contract that I can't hack and I'm stuck, I need some help to get the concepts right. pragma solidity ^0.4.10; contract SimpleToken { mapping(address => uint) public ...
0
votes
1answer
31 views

Web3 - how to add WEI and ETH values correctly

I'm working on an auction feature in my DApp and having problems correctly adding together two WEI values. The contract stores two important values: 1. A minBidIncrement variable - which I've set to ...
0
votes
0answers
17 views

sender account not recognized error when using “WrestlingInstance.registerAsAnOpponent({from: account1}) ”

I'm following the ethereum walkthrough at: https://hackernoon.com/ethereum-development-walkthrough-part-2-truffle-ganache-geth-and-mist-8d6320e12269 I got stuck at account0 = web3.eth.accounts[0]. ...
0
votes
0answers
32 views

send().catch() doesn't give me the error message anymore

I'm using Truffle/Drizzle/MetaMask and calling methods with send() and using .then() and .catch() and I rely on getting the error message send to .catch() e.g. contract.methods['hello'](arg).send({ ...
0
votes
1answer
191 views

MetaMask - RPC Error: Internal JSON-RPC error

I am getting this error when i trying to use metamask on my local for a simple transaction from one account(say A) to another (say B). code: -32603 data: {originalError: {…}} message: "Internal ...
0
votes
1answer
40 views

truffle migrate --network kovan >> ProviderError: VM Exception while processing transaction: revert

I am a beginner. I can deploy to a private network but I can not deploy to a public network. I need a Deploy to the kovan test network. please help me. >truffle init >npm install truffle-...
0
votes
0answers
22 views

Contract deployed successfully on localhost and mainnet, but gives error on rinkeby and ropsten

I tried to deploy a contract to rinkeby then on ropsten, but getting an error: Network ropsten-fork Minting initial supply of 5000000000 ... Error: Error: Error: invalid address (arg="_to", coderType=...
0
votes
1answer
36 views

BigNumber string error when passed as uint256

I get the following error when passing (new BigNumber('2')).exponentiatedBy(100) big number value as uint256 Error: invalid BigNumber string value (arg="value", value="1....
1
vote
2answers
133 views

Issue with Ganche and Truffle with Metamask. Can't load token balance

I'm testing to create a token in Truffle; it compiles fine, but it won't load the balance of the token in to Metamask. I've set the connection correct: it does load the ETH balances of the Ganache ...
1
vote
1answer
54 views

Could not find __Truffle__NotFound.sol from any sources

This is the file I'm trying to compile. I've been using truffle for a few years and I remember that we used to be able to compile files with different names than the contracts inside. I'm using ...
0
votes
1answer
46 views

gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1

I used the command truffle unbox react to build a dapp. It is just the initial step of my dapp development. However, it sucks. It continually pops up gyp ERR! build error gyp ERR! stack Error: `C:\...
0
votes
0answers
27 views

not able to assign address to a public property using web3

while everything is working fine when working on remix ide but on truffle its not updaing value of a property (player2) i am also returning that address value and its returning as it should be. but ...
0
votes
0answers
19 views

Error based on inheritance and dependency between contracts (Using EternalStorage contract)

I have been using EternalStorage contract with my contracts for the storage purpose. Now the structure is some like this: Eternal Storage <- Contract (A) <- Contract (B) <- Contract (C) Now ...
0
votes
1answer
43 views

web3 - web3.utils.toHex zeros length

I'm trying to send 12 integer as bytes to a contract function. If I use web3.utils.toHex(12) the variable will become 0xc The problem is that when contract function parses bytes, it reads uint256, ...
0
votes
2answers
30 views

Truffle migration script does not make transaction

Please look at my simple example below. Is migration script 3 being executed, such that it sets the value on the blockchain -- I think not, because there is no speak about a txHash or cost... How to ...
2
votes
2answers
60 views

Drizzle and Contract Instances

I am currently developing a dApp with Drizzle on top of ReactJS. My project consists of, basically, 8 .sol files. 4 of them are just abstract contracts that include the functions, structs etc. for ...
0
votes
2answers
36 views

truffle migrate fails silently

I'm trying to deploy a truffle project to testnet. When I run truffle migrate --reset --network rinkeby --verbose-rpc, this is output: You can improve web3's peformance when running Node.js versions ...
4
votes
1answer
45 views

couldnt understand implementaion of UpgradeabilityProxyFactory

I want to use UpgradeabilityProxy provided by zeppelin, they have one method createProxyAndCall which they say initialize the new implementation with data parameter we provided which looks like: * ...
0
votes
2answers
61 views

Where web3.eth.accounts.create() creates new account?

I am using ganache which creates an ethereum blockchain with 10 accounts. The blockchain created by ganache is linked with truffle's pet-shop box using web3. I want to add a new account in that ...
0
votes
1answer
42 views

Truffle: 'func.call()' retrieves the return-value of a non-constant function

I've just learned that one can easily obtain the return-value of a non-constant function, by using myContract.func.call() (instead of myContract.func(), which retrieves a response object). Up until ...
0
votes
0answers
115 views

Error: Truffle is currently using solc 0.5.8,

i run migrate in the terminalbut it shows Error: Truffle is currently using solc 0.5.8, but one or more of your contracts specify "pragma solidity ^0.4.27". Please update your truffle config or ...
0
votes
1answer
26 views

I am getting the following wrror while i tried to do node <file name> and also truffle test <file name>

Error: Cannot find module 'web3' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module....
1
vote
0answers
132 views

Error while installing truffle-hdwallet-provider

I am on windows OS and my current python version is 3.6 and node version is v10.12.0 I am trying to install truffle-hdwallet-provider by running following command: npm install --save truffle-...
0
votes
2answers
58 views

ParserError: Expected identifier, got 'LParen' constructor() public {

i don't know why i get this problem, anybody who can helps thanks a lot pragma solidity ^0.4.21; contract MathContract { function mulAtoB(uint a, uint b) pure public returns(uint) { ...
0
votes
0answers
18 views

Error: IPFSInbox has not been deployed to detected network

It's my first time writing smart contract in solidity and using IPFS to develop my dapp. I don't know how to solve it and why it pops up this errorNo web3 instance injected, using Local web3. Error: ...
0
votes
1answer
30 views

“truffle init” problem

What to do to resolve below issue coming in initiating a truffle project? YuweideMacBook-Air:vantoken yuwei$ truffle version Truffle v4.1.4 (core: 4.1.4) Solidity v0.4.21 (solc-js) YuweideMacBook-...
0
votes
1answer
29 views

how to correct this code with pragma solidity^ 0.5.8? thx

pragma solidity ^0.5.8; contract HelloWorld { function test() pure returns (string) { return "HelloWorld"; } }
0
votes
0answers
12 views

Truffle migrations - get deployed contracts list

I have the following problem: migrations no. 7: (deploy proxies) await deployer.deploy(TestProxy); await ExportUtils.addDeployed(await TestProxy.deployed(), true, { privileges: [ { ...