Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions regarding the implementation and use of the Truffle development and testing environment.
2
votes
Accepted
it should be possible to use interfaces with truffle
Check issue #67 and PR #68 on Github.
https://github.com/ConsenSys/solidity-parser/issues/67
https://github.com/ConsenSys/solidity-parser/pull/68
Apparently it has been fixed but not yet released. …
1
vote
Why are there two types of tests in Truffle?
Truffle allows you to test your contracts either in JS or Solidity. …
1
vote
how does truffle decide when to update a contract?
I don't have a proper answer. Many times it seems like it doesn't detect a file has changed and it will tell you its up to date.
Sometimes it doesn't say it's up to date but still the compilation and …
2
votes
Accepted
testrpc requires restart after each test
You should review the test you are running. The "problem" you are facing doesn't have to do with testrpc itself but with what the test you are running does.
One of the test cases invest the maximum a …
1
vote
Syntax Error When Defining Network in truffle.js
The code should go within the module.exports like so:
module.exports = {
networks: {
development: {
host: "localhost",
port: 7545,
network_id: "*"
}
}
};
1
vote
Accepted
How to call a function from truffle
You should do it like this:
this.HelloWorld
.deployed()
.then(instance => {
return instance.deposit(500,{
from: this.account
});
})
.then(result => { …
0
votes
User Truffle on Testrpc offline
After updating truffle and initializing it you can run $ truffle develop to get a development blockchain without testrpc. You could give it a try to check if it works offline. … Here are the release notes:
https://github.com/trufflesuite/truffle/releases …
1
vote
Invalid number of arguments in ERC20 code?
You are missing the from:account parameter.
var account_one = "0x1234..."; // the address calling this function. Get the list of accounts and use account[0];
token.transfer(alice, 44, {from: accoun …
0
votes
Send ether from web3 to fallback payable contract function
If you are using truffle you can do it exactly as you wrote above:
instance.sendTransaction({
from: account,
gas: _gas,
value: _value
}).then(function(result) {
//
});
Here's the truffle reference … : https://github.com/trufflesuite/truffle-contract#sending-ether--triggering-the-fallback-function …
0
votes
Deploying same contract with different address
If you use truffle migrate, you can see the log in the console telling you the tx hash and address where it got deployed. …
1
vote
Accepted
Truffle Compile Error (Could not find zeppelin)
You are missing ".sol" in the filename you want to import. It should be:
import "zeppelin-solidity/contracts/token/ERC20/MintableToken.sol";
1
vote
Accepted
Creating a new contract from a already deployed contract
You can try moving the logic (if any) out of the constructor into a separate function that would be manually called in a separate transaction. That might help saving gas costs on contract creation.
H …
17
votes
truffle has not been deployed to detected network
Sometimes I've run into a similar issue where truffle doesn't detect changes in my contracts and either it doesn't compile it or, when it does, it doesn't migrate it (saying network is up to date). … You can try running truffle compile (and/or truffle migrate) with the --reset flag. …
21
votes
Accepted
How to deploy contracts that take parameters in their initialisers using Truffle?
In your 2_deploy_contracts.js file you can add parameters when deploying the contract:
var Contract = artifacts.require("./Contract.sol");
module.exports = function(deployer) {
deployer.deploy(Con …
2
votes
Accepted
Truffle Setup Fails for some Truffle commands
You are using truffle 3.x.x. which doesn't come with it's own testrpc replacement.
If you don't want to use testrpc, update to 4.x and test using the truffle develop command. …