Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Coulter authored and Tim Coulter committed Jul 18, 2016
2 parents cf4ba0f + 63c90d2 commit d30d090
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/advanced/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $ truffle [command] [options]

# Available Commands

##### build
##### build

Build a development version of the app; creates the `./build` directory.

Expand All @@ -28,7 +28,7 @@ Run a console with your contract objects instantiated and ready to use.
$ truffle console
```

Once the console starts you can then use your contracts via the command line like you would in your code. Additionally, all truffle commands listed here are available within the console.
Once the console starts, you can then use your contracts via the command line like you would in your code. Additionally, all truffle commands listed here are available within the console.

Optional parameters:

Expand Down
12 changes: 6 additions & 6 deletions docs/getting_started/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Transactions fundamentally change the state of the network. A transaction can be

### Calls

Calls, on the other hand, are very different. Calls can be used to execute code on the network, though no data will be permanently changed. Calls are free to run, and they're defining characteristic is that they read data. When you execute a contract function via a call you will receive the return value immediately. In summary, calls:
Calls, on the other hand, are very different. Calls can be used to execute code on the network, though no data will be permanently changed. Calls are free to run, and their defining characteristic is that they read data. When you execute a contract function via a call you will receive the return value immediately. In summary, calls:

* Are free (do not cost gas)
* Do not change the state of the network
Expand Down Expand Up @@ -47,8 +47,8 @@ contract MetaCoin {
return true;
}

function getBalanceInEth(address addr) returns(uint){
return ConvertLib.convert(getBalance(addr),2);
function getBalanceInEth(address addr) returns(uint) {
return ConvertLib.convert(getBalance(addr), 2);
}

function getBalance(address addr) returns(uint) {
Expand Down Expand Up @@ -98,7 +98,7 @@ meta.sendCoin(account_two, 10, {from: account_one}).then(function(tx_id) {
// this callback.
alert("Transaction successful!")
}).catch(function(e) {
// There was an error! Handle it.
// There was an error! Handle it.
})
```

Expand All @@ -123,7 +123,7 @@ meta.getBalance.call(account_one, {from: account_one}).then(function(balance) {
// Let's print the return value.
console.log(balance.toNumber());
}).catch(function(e) {
// There was an error! Handle it.
// There was an error! Handle it.
})
```

Expand Down Expand Up @@ -165,7 +165,7 @@ MetaCoin.new().then(function(instance) {
// If this callback is called, the deployment was successful.
console.log(instance.address);
}).catch(function(e) {
// There was an error! Handle it.
// There was an error! Handle it.
});
```

Expand Down
6 changes: 3 additions & 3 deletions docs/getting_started/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ Here's an example test provided for you by `truffle init`. This will tell Truffl

```javascript
contract('MetaCoin', function(accounts) {
it("should put 10000 MetaCoin in the first account", function(done) {
it("should put 10000 MetaCoin in the first account", function() {
// Get a reference to the deployed MetaCoin contract, as a JS object.
var meta = MetaCoin.deployed();

// Get the MetaCoin balance of the first account, and assert that it's 10000.
meta.getBalance.call(accounts[0]).then(function(balance) {
return meta.getBalance.call(accounts[0]).then(function(balance) {
assert.equal(balance.valueOf(), 10000, "10000 wasn't in the first account");
}).then(done).catch(done);
});
});
});
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "truffle",
"namespace": "consensys",
"version": "1.0.2",
"version": "2.0.0",
"description": "Truffle - Simple development framework for Ethereum",
"dependencies": {
"async": "^1.4.2",
Expand Down

0 comments on commit d30d090

Please sign in to comment.