Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor improvements to Basil demo #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/docs/basil.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ npm init --yes
Next, let's take a look at the `Basil` contract we will use to control the light bulb:

```sol
pragma solidity ^0.4.21;
pragma solidity ^0.4.24;

import "openzeppelin-zos/contracts/ownership/Ownable.sol";

Expand Down Expand Up @@ -67,17 +67,17 @@ contract Basil is Ownable {
g = _g;
b = _b;
highestDonation = msg.value;
NewDonation(
emit NewDonation(
msg.sender, msg.value,
r, g, b);
}

function withdraw(address wallet) public onlyOwner {
require(this.balance > 0);
require(address(this).balance > 0);
require(wallet != address(0));
uint256 value = this.balance;
uint256 value = address(this).balance;
wallet.transfer(value);
Withdrawal(wallet, value);
emit Withdrawal(wallet, value);
}
}
```
Expand Down Expand Up @@ -117,7 +117,7 @@ By now, the json files looks like this:
}
```

OpenZeppelin will use this file to track your project's contracts on chain, making them upgradeable and dynamically linkable to pre-deployed libraries, as well see soon.
OpenZeppelin will use this file to track your project's contracts on chain, making them upgradeable and dynamically linkable to pre-deployed libraries, as we'll see soon.

## Deploying our first version of Basil, locally

Expand Down Expand Up @@ -164,7 +164,7 @@ Another common thing that happens when developing smart contracts for Ethereum i
We could modify `contracts/Basil.sol`. But now let's try something else. Let's make a new contract in `contracts/BasilERC721.sol`, that inherits from our initial version of Basil:

```sol
pragma solidity ^0.4.21;
pragma solidity ^0.4.24;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you mind updating the project as well to follow this update?


import "./Basil.sol";
import "openzeppelin-zos/contracts/token/ERC721/MintableERC721Token.sol";
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install zos-lib
Next, let's create a file named `MyContract.sol` in the `contracts/` folder with the following Solidity code:

```js
pragma solidity ^0.4.21;
pragma solidity ^0.4.24;
import "zos-lib/contracts/migrations/Migratable.sol";

contract MyContract is Migratable {
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/low_level_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ await App.deploy(initialVersion)
An initial version of the Solidity contract could look like:

```sol
pragma solidity ^0.4.21;
pragma solidity ^0.4.24;

import "openzeppelin-zos/contracts/ownership/Ownable.sol";
import "openzeppelin-zos/contracts/math/SafeMath.sol";
Expand Down Expand Up @@ -87,7 +87,7 @@ npm install openzeppelin-zos
Done! Now we can easily mint non-fungible tokens from our smart contract:

```sol
pragma solidity ^0.4.21;
pragma solidity ^0.4.24;

import "./DonationsV0.sol";
import "openzeppelin-zos/contracts/token/ERC721/MintableERC721Token.sol";
Expand Down