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
272 views

Is there a way to programmatically withdraw money from address?

I am trying to write a test using the Truffle framework and for one of the tests I need to send the contract some ether. Is there a way that I can programmatically make a specified ether account send ...
0
votes
1answer
524 views

Pass address[] array to Truffle deployer (MultisigWallet)

I am trying to deploy the MultisigWallet contract on testrpc. However, I can't figure out how to provide the address[] _owners constructor parameter in the deployment command. I've tried several ...
0
votes
1answer
3k views

Testing contract function after transaction with Truffle

I try to test this contract with Truffle but the test of checkGoalReached function Fail and I do not understand why. The code to reproduce this problem is available here With Remix Solidity IDE, the ...
0
votes
2answers
2k views

truffle installation on ubuntu 16.04

Trying to install truffle on Ubuntu 16.04 (on window I tried and failed). First I followed the simple instruction to install "npm install -g truffle" and later on followed this link . Still not able ...
0
votes
1answer
175 views

Contract not being initialized

Having issues with a contract creating another contract using Truffle dev environment. Here are my steps - truffle console var node = Node.deployed() node.then(function(instance){node=instance}) var ...
0
votes
1answer
299 views

Some Truffle tests not running after truffle init (Mac OSX) Uncaught TypeError

I am trying to build a DApp using Truffle. I have installed Testrpc and Truffle globally with NPM. I ran testrpc in a terminal window and ran truffle test. I get 2 passing and 3 failing tests. The ...
0
votes
1answer
967 views

truffle - how to invoke functions based on the address elements

// 1) I am invoking a function and getting the entire project list - SUCCESS truffle(development)> hub.then(function(instance){return instance.getProjAddr.call();}) [ '...
0
votes
2answers
1k views

truffle and metacoin. How can I send a transaction?

I am trying to learn truffle, and I have compiled, migrated, and test the example contract. I load the example Dapp in my browser from local host, and I have the lists of addresses created by testRPC,...
0
votes
2answers
377 views

Function, variable, struct or modifier declaration expected [duplicate]

I am using the following code structure; pragma solidity ^0.5.0; contract TtdmToken { uint256 public totalSupply; function TtdmToken () public { totalSupply = 1000000; } } ...
0
votes
2answers
54 views

Effective way to compare to arrays

What is the most cost effective way to compare to arrays eg. uint arrays in solidity. Running a for loop takes too much gas.
0
votes
3answers
349 views

Truffle compile command stuck at “Compiling your contracts…”

I developed a dapp using my PC (OS: Pop_OS!) and it was running fine. Then I had to format PC and installed new OS (Ubuntu 18.04 LTS), due to some issues in compatibility and performance.After that, I ...
0
votes
1answer
41 views

How do I access the properties of a contract xyz from an enclosing contract abc?

With respect to the following code: pragma solidity ^0.4.23; contract xyz { uint x = 0; function setX(uint pX) public { x = pX; } function getX() public view returns(uint){ ...
0
votes
3answers
135 views

Error in the truffle init command, quorum

i'm trying to truffle a project but each time it shows me this message, whereas, i'm sure i installed the truffle successfully. vagrant@ubuntu-xenial:~/quorum-examples$ cd project vagrant@ubuntu-...
0
votes
1answer
38 views

Get deployed contract details from Private network in all connected Peers

I have created one Ethereum private network and added two nodes inside that n/w. I have migrate one contract using truffle in that n/w from one node. Now I want to access that contract inside ...
0
votes
2answers
2k views

Cannot read property 'deployed' of undefined issue

I am trying to launch an Election-Dapp. I have these dependencies installed: - Nodejs v9.11.1 - npm v5.8.0 - Truffle v4.1.3 - web3js v0.2 - ganache-cli Below is my solidity contract pragma ...
0
votes
1answer
480 views

Problem updating truffle framework

I have problems updating truffle. I run the command "truffle --version" and i got truffle version 4.0.1 and solc version 0.4.18. So i wanted to upgrade to 4.1.6 which is the latest version. I run "...
0
votes
1answer
647 views

How to deploy a truffle built Dapp

I've completed my truffle Dapp, the contracts are deployed to the Ropsten test network and my web code talks nicely to them, it works great from http://localhost:8080/ when I do an npm run dev. I now ...
-1
votes
1answer
45 views

Truffle ganache error

I have this error~! Contract has not been deployed to detected network (network/artifact mismatch) Can you help me thank you!
-1
votes
1answer
117 views

Problem with the compilation in the truffle framework

I made a smart contract in Remix-Solidity IDE, when I compiled it I had no errors and I was able to remove the contract but when I tried to use the truffle for my Dapp and compiled it it showed me ...
-1
votes
1answer
70 views

I want to oraclize this smartcontract to get some output on a localhost. I am desperate what should i do?

pragma solidity ^0.4.17; import "installed_contracts/oraclize-api/contracts/usingOraclize.sol"; contract DevCoin is usingOraclize { mapping (address => uint256) public balances; event ...
-1
votes
1answer
87 views

I have deployed my contract using truffle but to see my accounts i am using web3 can any one explain what is going inside my contract while deploying

web3.eth.accounts [ '0x5aad8308d0c45d2b9fc1c465316ba071d2eb6f9c', '0x9d73990623df116eb56d300773aa458a11b11e4b', '0x1ea4dc6c3ab6d9ddca32083e3d5313ee319abd29', '...
-1
votes
1answer
373 views

Cannot deploy HelloWorld contract to my netowrk (testrpc)

ANSWER TO THIS QUESTION IS HERE : https://stackoverflow.com/questions/48044742/cannot-deploy-helloworld-contract-to-my-network-testrpc pardon my basic question, bud what else do i need to deploy my ...
-1
votes
1answer
398 views

how to withdraw ether from a ERC20 token contract Address

how to add withdraw function to get smart contract ether to my wallet https://github.com/rohitsahu21/Token-Sale
-1
votes
1answer
191 views

Value of msg.sender is not changing after specifying {from} in truffle

Given two contracts : contract First { function cSender() public view returns(address){ return msg.sender; } } contract Second { First f; function Second() public { f = new First(); ...
-2
votes
2answers
81 views

Can I make a proper website by using ganache and truffle? Like maybe abc.com?

I have developed a voting system usinh dapp that runs on local host. It uses accounts from ganache and metamask for transactions of votes. Now if i want to buy a domain and make the thing work, is it ...
-2
votes
1answer
77 views

I had error when I ran truffle test call which I had followed the documentation of official truffle petshop documentation [closed]

chittiError: CompileError: Error parsing /Users/rahul/pet-shop-tutorial/test/TestAdoption.sol: ParsedContract.sol:10:1: ParserError: Expected pragma, import directive or contract/interface/library ...
-2
votes
1answer
137 views

ParserError compiling Smart Contract, what's wrong?

I'm getting this error when trying to compile a contract using cmd on windows: Error parsing C:/Users/alexa/Desktop/contracts/contracts/ApprovalContract.sol: ParsedContract.sol:6:37: ParserError: ...

1
40 41 42 43
44