Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [truffle]

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

25
votes
4answers
5k views

Error while compiling: Stack too deep

When trying to compile, I am getting the following error: "Internal compiler error: Stack too deep, try removing local variables." Is there any way around this? I'm not sure if I'll be able to ...
3
votes
0answers
25 views

No event after a struct push in solidity [duplicate]

I am testing a contract with Truffle, which code is : Contribution[] public contributions; struct Contribution { address participantAddress; string name; uint timestamp; uint amount;...
5
votes
3answers
1k views

Does deploying a contract mean it will overwrite the last instance?

I must have missed something about deploying contracts, but to be sure: I'm using Truffle, Does deploying a contract mean it will overwrite the last instance? Since I see that it gets a new address ...
1
vote
1answer
340 views

Storing an address in nested mapping does not work

Why doesn't this work? contract NameRegistry { function NameRegistry() { // names["users"]["stefreak"] = 0x123; } function register(address record, string namespace, string name) returns (...
4
votes
1answer
562 views

How to use IPFS with truffle framework [duplicate]

How to use IPFS to get the hash of the document and store it on private blockchain (using go-ethereum )? consider truffle framework and solidity as contract oriented language.
6
votes
1answer
489 views

Workflow for Dapp Development

There is so much information out there that turns around this point that I decided to make a post, can someone please help out? Does that sound correct as a work-flow for medium/large size projects ?:...
2
votes
2answers
702 views

Can I write API endpoints with Truffle?

Does anybody knows how to write an API inside a Truffle application?
8
votes
2answers
7k views

How do you get the balance of an account using truffle/ether-pudding?

Is there an ether-pudding way to get the balance of a contract/account, or should I just use web3.eth.getBalance(account)?
2
votes
1answer
2k views

How do you send ether using truffle/ether-pudding?

How do you do a sendTransaction to simply send ether from one account to another in ether-pudding? In web3 I would do this: web3.eth.sendTransaction({ from: a, to: b, value: 100 }) I would like the ...
3
votes
1answer
345 views

Dapp Communication using smart contract written in solidity in truffle framework [duplicate]

How will two Dapps, developed using truffle framework, will communicate with the contract deployed by one Dapp ( Consider testnet using geth)?
1
vote
0answers
189 views

Truffle Dapp Development [closed]

Is there anybody who has developed the Dapp using truffle framework and ethereum testnet ? I am getting some alien errors and i am not getting the solution on internet.So i need a person who has done ...
5
votes
0answers
153 views

Dapp Development using Truffle framework getting error

I am using truffle framework, which has pudding functionality. I have compiled the same contract on the both Dapps and deployed it on the one Dapp. Now i am trying to access it from another Dapp using ...
4
votes
1answer
944 views

Truffle Dapp Deployed Contract Access

Which function we need to use in truffle for the communication of second Dapp to the contract deployed on blockchain by first Dapp, because contract deployed by truffle is not accessible by geth node. ...
3
votes
1answer
378 views

Did anyone succeed in using Truffle with Node v6?

Truffle looks to be buggy when using with Node v6 (installed from homebrew). There's a ticket on Truffle github, but none seems to take it into account. Are people not using Node v6 or is there a ...
4
votes
1answer
276 views

Truffle Dapp Communication

In truffle, a dapp is deployed using the port of running geth node (in testnet). Then how will another machine node will communicate to that dapp because it is impossible to run a node on same port ...
4
votes
3answers
884 views

Iterating through an array in JS and simple promises (web3/pudding)

This might be more to do with my lack of understanding some JS basics however it's in ethereum/web3 context so here it goes. I have a public array posts in my contract and a global variable in JS of ...
4
votes
1answer
494 views

How do you provide a GasPrice and GasLimit to overcome the “low tx nonce or out of funds” log message

I am getting the following logged by my private chain geth node when running a test in truffle: removed tx ( TX(ff8ec4f713e64fb25df07d153607e29629c9276b57e0b7e331f17b5a3c31fdd1) Contract: ...
2
votes
1answer
295 views

Is it possible to change the coinbase dynamically?

I'm testing the following contract using Truffle framework and deploying on TestRPC network. contract MetaCoin { mapping (address => uint) balances; function MetaCoin() { balances[tx....
6
votes
1answer
2k views

How do I manage unlocking accounts in a test in Truffle

I have a test that exercises a contract function across different accounts. How do I unlock these accounts in the context of the test? contract('MyContract', function (accounts) { it("should ...
4
votes
2answers
1k views

truffle deploy to geth failing, generating “receipt not found” repeatedly from geth

I've just installed truffle on an ubuntu virtualbox, and it is failing to deploy to a geth dev setup. Geth gives me a never-ending receipt not found for transaction ...
8
votes
1answer
4k views

How to pass arbitrary bytes to a function (2016)

I'm trying to implement a contract which will store bytes blob, a dynamic bytes array. For example I have following struct: Sign { address signer; bytes16 signType; bytes sign; } plus ...
6
votes
1answer
573 views

Event.watch gets fired infinitely many times

I am trying out truffle + web3 + ethereumjs-testrpc. In the app I have the following code: window.onload = function() { var meta = MetaCoin.deployed(); var event = meta.Transfer({}, {fromBlock: 0,...
3
votes
1answer
817 views

How to get the running instance of a Contract

I have a contract with name AuxContract and imported it in my Dapp.sol. In my Dapp.sol I have a variable of type AuxContractwhich I want to initialize with a running instance of an ...
3
votes
1answer
142 views

Migration between frameworks

How much effort would it be to migrate a Dapp written in embark to truffle or vice-versa? Which parts of the code can be preseved (would work in both frameworks)?
9
votes
1answer
624 views

Truffle framework with storage

How can I integrate truffle with swarm or ipfs for permanent document storage? Are there any libraries?
6
votes
1answer
804 views

Not enough components (4) in value to assign all variables (6)

This is an exception on compilation I am getting with truffle. The code I am running builds a store from a container contract and then makes a call to get a product from it. Store s = Store(saddress)...
18
votes
1answer
4k views

What is truffle?

What is the truffle framework? Who can use it, who should use it? And what are the benefits?