Skip to content

Commit

Permalink
Merge pull request #118 from OpenSTFoundation/release-0.9
Browse files Browse the repository at this point in the history
Release v0.9.2
  • Loading branch information
jasonklein authored Mar 28, 2018
2 parents 4a20d24 + 556f2c3 commit 62a46e7
Show file tree
Hide file tree
Showing 48 changed files with 8,523 additions and 1,771 deletions.
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
dist: trusty
language: node_js
sudo: required
branches:
only:
- master
- develop
notifications:
email:
recipients:
- ci.report@ost.com
on_success: always
on_failure: always
node_js:
- "8"
before_install:
- sudo apt-get update
- sudo apt-get install nodejs
- sudo apt-get install npm
install:
- npm install
before_script:
- nohup ./tools/runTestRpc.sh </dev/null >/dev/null 2>&1 &
script:
- truffle test
after_script:
- kill $(ps aux | grep 'testrpc' | awk '{print $2}')
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
## OpenST-protocol v0.9.1 December 19 2017
## OpenST-protocol [v0.9.2](https://github.com/OpenSTFoundation/openst-protocol/releases/tag/v0.9.2) March 27 2018

OpenST v0.9.2 improves usability to facilitate application by the [OpenST-Platform](https://github.com/OpenSTFoundation/openst-platform) and other services. Additionally, this release increases test coverage, with additional unit and integration tests, and adds continuous integration with Travis CI.

Detailed changelog:

- Introduce `conversionRateDecimals` to `BrandedToken` to treat conversion rate as a fixed point arithmetic number ([openst-protocol #107](https://github.com/OpenSTFoundation/openst-protocol/pull/107))
- Expose list of registered tokens on `OpenSTUtility` ([openst-protocol #89](https://github.com/OpenSTFoundation/openst-protocol/pull/89))
- Make token UUIDs iterable on the value chain ([openst-protocol #103](https://github.com/OpenSTFoundation/openst-protocol/pull/103))
- Make token UUIDs iterable on the utility chain ([openst-protocol #102](https://github.com/OpenSTFoundation/openst-protocol/pull/102))
- Incorporate a `beneficiary` into redeem and unstake ([openst-protocol #101](https://github.com/OpenSTFoundation/openst-protocol/pull/101))
- Expose `mints` and `redemptions` on `OpenSTUtility` ([openst-protocol #100](https://github.com/OpenSTFoundation/openst-protocol/pull/100))
- Expose `stakes` and `unstakes` on `OpenSTValue` ([openst-protocol #99](https://github.com/OpenSTFoundation/openst-protocol/pull/99))
- Revise `UtilityTokenAbstract` to set certain invariants upon construction and to expose them ([openst-protocol #97](https://github.com/OpenSTFoundation/openst-protocol/pull/97))
- Remove unneeded files ([openst-protocol #93](https://github.com/OpenSTFoundation/openst-protocol/pull/93))
- Tests: configure Travis CI to run unit tests on `master` and `develop` branches for every commit, merge and pull request ([openst-protocol #87](https://github.com/OpenSTFoundation/openst-protocol/pull/87), [openst-protocol #105](https://github.com/OpenSTFoundation/openst-protocol/pull/105))
- Tests: denominate tokens consistently ([openst-protocol #82](https://github.com/OpenSTFoundation/openst-protocol/pull/82))
- Tests: add unit tests for reversion functions ([openst-protocol #74](https://github.com/OpenSTFoundation/openst-protocol/pull/74))
- Tests: migrate unit tests for `Owned`, `OpsManaged`, and `SafeMath` from SimpleTokenSale repo ([openst-protocol #73](https://github.com/OpenSTFoundation/openst-protocol/pull/73))
- Tests: add integration tests for reversion functions ([openst-protocol #65](https://github.com/OpenSTFoundation/openst-protocol/pull/65))

## OpenST-protocol [v0.9.1](https://github.com/OpenSTFoundation/openst-protocol/releases/tag/v0.9.1) December 19 2017

OpenST v0.9.1 is the first release deployed on Ethereum mainnet combined with the
activation of Simple Token to power the OpenST platform. The OpenST platform
Expand Down
104 changes: 57 additions & 47 deletions contracts/BrandedToken.sol
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* solhint-disable-next-line compiler-fixed */
pragma solidity ^0.4.17;

// Copyright 2017 OpenST Ltd.
Expand Down Expand Up @@ -27,6 +28,7 @@ import "./SafeMath.sol";
import "./EIP20Token.sol";
import "./UtilityTokenAbstract.sol";


/// @dev Branded Token is an EIP20 token minted by staking Simple Token
/// on Ethereum mainnet. Branded tokens are designed to be used
/// within a (decentralised) application and support:
Expand All @@ -38,59 +40,67 @@ import "./UtilityTokenAbstract.sol";
/// their equivalent part of the Simple Token stake
/// on Ethereum (before v1.0)
contract BrandedToken is EIP20Token, UtilityTokenAbstract {
using SafeMath for uint256;

/*
* Public functions
*/
function BrandedToken(
address _openSTProtocol,
bytes32 _uuid,
string _symbol,
string _name,
uint8 _decimals)
EIP20Token(_symbol, _name, _decimals)
UtilityTokenAbstract(_openSTProtocol, _uuid)
public
{
using SafeMath for uint256;

}
/*
* Public functions
*/
function BrandedToken(
bytes32 _uuid,
string _symbol,
string _name,
uint8 _decimals,
uint256 _chainIdValue,
uint256 _chainIdUtility,
uint256 _conversionRate,
uint8 _conversionRateDecimals)
public
EIP20Token(_symbol, _name, _decimals)
UtilityTokenAbstract(
_uuid,
_symbol,
_name,
_chainIdValue,
_chainIdUtility,
_conversionRate,
_conversionRateDecimals)
{ }

function claim(
address _beneficiary)
public
returns (bool /* success */)
{
uint256 amount = claimInternal(_beneficiary);
function claim(
address _beneficiary)
public
returns (bool /* success */)
{
uint256 amount = claimInternal(_beneficiary);

return claimEIP20(_beneficiary, amount);
}
return claimEIP20(_beneficiary, amount);
}

function mint(
address _beneficiary,
uint256 _amount)
public
onlyProtocol
returns (bool /* success */)
{
mintEIP20(_amount);
function mint(
address _beneficiary,
uint256 _amount)
public
onlyProtocol
returns (bool /* success */)
{
mintEIP20(_amount);

return mintInternal(_beneficiary, _amount);
}
return mintInternal(_beneficiary, _amount);
}

function burn(
address _burner,
uint256 _amount)
public
onlyProtocol
payable
returns (bool /* success */)
{
// force non-payable, as only ST' handles in base tokens
require(msg.value == 0);
function burn(
address _burner,
uint256 _amount)
public
onlyProtocol
payable
returns (bool /* success */)
{
// force non-payable, as only ST' handles in base tokens
require(msg.value == 0);

burnEIP20(_amount);
burnEIP20(_amount);

return burnInternal(_burner, _amount);
}
return burnInternal(_burner, _amount);
}
}
8 changes: 6 additions & 2 deletions contracts/Hasher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ contract Hasher {
uint256 _chainIdValue,
uint256 _chainIdUtility,
address _openSTUtility,
uint256 _conversionRate)
uint256 _conversionRate,
uint8 _conversionRateDecimals)
public
pure
returns (bytes32)
Expand All @@ -43,7 +44,8 @@ contract Hasher {
_chainIdValue,
_chainIdUtility,
_openSTUtility,
_conversionRate);
_conversionRate,
_conversionRateDecimals);
}

function hashStakingIntent(
Expand Down Expand Up @@ -72,6 +74,7 @@ contract Hasher {
bytes32 _uuid,
address _account,
uint256 _accountNonce,
address _beneficiary,
uint256 _amountUT,
uint256 _escrowUnlockHeight)
public
Expand All @@ -82,6 +85,7 @@ contract Hasher {
_uuid,
_account,
_accountNonce,
_beneficiary,
_amountUT,
_escrowUnlockHeight);
}
Expand Down
Loading

0 comments on commit 62a46e7

Please sign in to comment.