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
2 answers

Linking together smart contracts at deployment

I'm building an application that is comprised of 3 smart contracts. The aim is to have the controller control the other two (contract A and B in the image). Previously, if I wanted to restrict the access to a smart contact, I would do it through a…
39fredy
  • 1,923
  • 2
  • 21
  • 40
3
votes
1 answer

Truffle migrate fails due to missing function, but it exists in node_modules

While attempting to run a truffle migration, I get the following error: Using network 'development'. Running migration: 1_initial_migration.js Replacing Migrations... ... 0x1e30a241296f07f9e4e702f5066031ba128e163fd7858cfd09311ddff14bebf8 …
3
votes
2 answers

Why is truffle returning instead of the actual value of the event?

I have indexed some values on my events. When I run tests, why don't they show up ? Example : Events emitted during test: --------------------------- Upgrade(_tokenId: , _upgradeType: 1) --------------------------- Why isn't it showing…
M. Mez
  • 75
  • 1
  • 8
3
votes
1 answer

Truffle migrate success but contract address is not displayed

I am using testrpc to deploy my contracts. Contract deployment is successful and it also displays the contract address in console when it is deployed. But when I try to query from truffle console it throws this error: Contract has no network…
ToniyaSundaram
  • 191
  • 3
  • 12
3
votes
1 answer

Calling External Contract throws error : VM Exception while processing transaction: revert

I've deployed the ScoreStore contract to test RPC, and it works fine. This is ScoreStore contract: pragma solidity ^0.4.4; contract ScoreStore { mapping(string => int) PersonScores; function SetScore(string name, int score) { …
Fariha Abbasi
  • 145
  • 1
  • 11
3
votes
0 answers

Invalid JSON RPC response -32603 fetching address array from contract

I'm trying to access a storage address array in a contract through web3 but I receive an error : Error: Invalid JSON RPC response: {"id":3,"jsonrpc":"2.0","error":{"code":-32603}} at Object.InvalidResponse (inpage.js:14308) at…
BramBram
  • 31
  • 3
3
votes
1 answer

Deploying Contracts with Circular Dependency in Truffle

The CryptoKitties contracts apparently have circular dependency. I don't know how to sequence the deployment of the contracts in Truffle. ClockAuction's constructor requires an address to a contract that implements "ERC721". In this code, ERC721 is…
Jonas Arcangel
  • 2,085
  • 11
  • 55
  • 85
3
votes
0 answers

Error: Contract transaction couldn't be found after 50 blocks

When migrating my smart contract to a private Azure block chain I get this. Error: Contract transaction couldn't be found after 50 blocks. I am trying to migrate a ScoreStore smart contract which is deployed successfully on the development…
Kamal Joshi
  • 498
  • 1
  • 7
  • 19
3
votes
1 answer

Ganache (from Truffle) hangs when started

When I run the file "ganache-1.0.1-x86_64.AppImage" that I downloaded from GitHub, Ganache just hangs showing the following screen with no more actions. Is something missed? I tried Ganache version 1.0.0 and and version 1.0.1. My system…
Muhammad Altabba
  • 2,583
  • 19
  • 31
3
votes
2 answers

Truffle Webpack: Can't resolve 'module' in require-from-string

This happens during compilation when the require call is made in : The error points to the line where this is declared: var Module = require('module'); this is in the index.js of require-from-string Actually I can put that require statement…
Phillip Gibb
  • 523
  • 1
  • 6
  • 19
3
votes
2 answers

Why i cannot get 100 ether in pet-shop?

I have done 8 steps in pet-shop in Truffle: In the box titled "New RPC URL" enter http://localhost:9545 and click Save. The network name at the top will switch to say "Private Network". Click the left-pointing arrow next to "Settings" to close out…
Bob Zheng
  • 825
  • 4
  • 14
  • 25
3
votes
1 answer

Can I configure my truffle project to use an .ipc endpoint file instead of an ethereum RPC listener?

I'm working on a project that uses truffle framework and want to test my code on a private ethereum network. When I run truffle console, it connects to the network specified in truffle.js, like this: module.exports = { networks: { development:…
3
votes
3 answers

Link Javascript to Solidity?

Is it possible to link/connect/ send a signal from JavaScript code into Solidity/Ethereum?
user8529348
3
votes
1 answer

Synchronous requests are not supported when deploying smart contract using web3

I'm trying to deploy a smart contract locally using Web3, Truffle, and Testrpc. I used Truffle to compile a smart contract and have the following code to extract the ABI and bytecode. In the same script, I'm trying to deploy the contract using…
Bill Chen
  • 128
  • 9
3
votes
1 answer

How to test smart contract with cross-contract invoke using truffle?

I have two contract, I write in in one file, named Sum.sol. The sum contract invoke Add contract. I just want to test cross-contract invoking. If I didn't put the two contract in one file, The compile of Sum using truffle would fail. But when I do…
hxmmm
  • 51
  • 3