Skip to content

Commit

Permalink
Merge branch 'master' into draft-eip-1820
Browse files Browse the repository at this point in the history
  • Loading branch information
nventuro committed Mar 15, 2019
2 parents f96f621 + 40d2eb3 commit a7ec4dd
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ about: Report a bug in OpenZeppelin

<!-- Briefly describe the issue you're experiencing. Tell us what you were trying to do and what happened instead. -->

<!-- Remember, this is not a place to ask for help debugging code. For that, we welcome you in the OpenZeppelin Slack channel: https://slack.openzeppelin.org/. -->
<!-- Remember, this is not a place to ask for help debugging code. For that, we welcome you in the Zeppelin Forum: https://forum.zeppelin.solutions/. -->

**💻 Environment**

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Changelog

## 2.3.0 (unreleased)

### New features:
* `ERC1820`: added support for interacting with the [ERC1820](https://eips.ethereum.org/EIPS/eip-1820) registry contract (`IERC1820Registry`), as well as base contracts that can be registered as implementers there. ([#1677](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1677))

## 2.2.0 (unreleased)
## 2.2.0 (2019-03-14)

### New features:
* `ERC20Snapshot`: create snapshots on demand of the token balances and total supply, to later retrieve and e.g. calculate dividends at a past time. ([#1617](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1617))
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
npm install openzeppelin-solidity
```

OpenZeppelin features a stable API, which means your contracts won't break unexpectedly when upgrading to a newer minor version. You can read ṫhe details in our [API Stability](https://forum.zeppelin.solutions/t/api-stability/138) document.

## Usage

To write your custom contracts, import ours and extend them through inheritance.
Expand All @@ -30,7 +32,7 @@ contract MyNFT is ERC721Full, ERC721Mintable {

> You need an ethereum development framework for the above import statements to work! Check out these guides for [Truffle] or [Embark].
On our site you will find a few [guides] to learn about the different parts of OpenZeppelin, as well as [documentation for the API][API docs]. Keep in mind that the API docs are work in progress, and don’t hesitate to ask questions in [our Slack][Slack].
On our site you will find a few [guides] to learn about the different parts of OpenZeppelin, as well as [documentation for the API][API docs]. Keep in mind that the API docs are work in progress, and don’t hesitate to ask questions in [our forum][forum].

## Security

Expand All @@ -53,7 +55,7 @@ OpenZeppelin is released under the [MIT License](LICENSE).

[API docs]: https://openzeppelin.org/api/docs/token_ERC721_ERC721BasicToken.html
[guides]: https://openzeppelin.org/api/docs/get-started.html
[Slack]: https://slack.openzeppelin.org
[forum]: https://forum.zeppelin.solutions
[Zeppelin]: https://zeppelin.solutions
[contribution guide]: CONTRIBUTING.md
[Truffle]: https://truffleframework.com/docs/truffle/quickstart
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Once the CI run for the new tag is green, publish on npm under the `next` tag. Y
npm publish --tag next
```

Publish the release notes on GitHub and ask our community manager to announce the release candidate on at least Slack and Twitter.
Publish the release notes on GitHub and the forum, and ask our community manager to announce the release candidate on at least Twitter.

## Creating the final release

Expand Down
6 changes: 3 additions & 3 deletions contracts/drafts/ERC20Snapshot.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract ERC20Snapshot is ERC20 {
}

mapping (address => Snapshots) private _accountBalanceSnapshots;
Snapshots private _totalSupplySnaphots;
Snapshots private _totalSupplySnapshots;

// Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.
Counters.Counter private _currentSnapshotId;
Expand All @@ -56,7 +56,7 @@ contract ERC20Snapshot is ERC20 {
}

function totalSupplyAt(uint256 snapshotId) public view returns(uint256) {
(bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnaphots);
(bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);

return snapshotted ? value : totalSupply();
}
Expand Down Expand Up @@ -118,7 +118,7 @@ contract ERC20Snapshot is ERC20 {
}

function _updateTotalSupplySnapshot() private {
_updateSnapshot(_totalSupplySnaphots, totalSupply());
_updateSnapshot(_totalSupplySnapshots, totalSupply());
}

function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {
Expand Down
2 changes: 1 addition & 1 deletion ethpm.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package_name": "zeppelin",
"version": "2.1.3",
"version": "2.2.0",
"description": "Secure Smart Contract library for Solidity",
"authors": [
"OpenZeppelin Community <maintainers@openzeppelin.org>"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openzeppelin-solidity",
"version": "2.1.3",
"version": "2.2.0",
"description": "Secure Smart Contract library for Solidity",
"files": [
"build",
Expand Down
4 changes: 3 additions & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ start_ganache() {
if [ "$SOLIDITY_COVERAGE" = true ]; then
node_modules/.bin/testrpc-sc --gasLimit 0xfffffffffff --port "$ganache_port" "${accounts[@]}" > /dev/null &
else
node_modules/.bin/ganache-cli --gasLimit 0xfffffffffff "${accounts[@]}" > /dev/null &
node_modules/.bin/ganache-cli --gasLimit 0xfffffffffff --port "$ganache_port" "${accounts[@]}" > /dev/null &
fi

ganache_pid=$!

sleep 1
}

if ganache_running; then
Expand Down

0 comments on commit a7ec4dd

Please sign in to comment.