Skip to content

Commit

Permalink
Merge pull request #186 from OpenST/release-0.10
Browse files Browse the repository at this point in the history
Release 0.10
  • Loading branch information
abhayks1 authored Mar 28, 2019
2 parents d7f5150 + 4817bb0 commit 3601d89
Show file tree
Hide file tree
Showing 124 changed files with 12,971 additions and 7,321 deletions.
5 changes: 3 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"airbnb-base"
],
"rules": {
"indent": ["error", 4],
"no-console": "off",
"no-underscore-dangle": "off"
"no-underscore-dangle": "off",
"import/no-extraneous-dependencies": "off",
"strict": "off"
},
"env": {
"mocha": true,
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sol linguist-language=Solidity
35 changes: 29 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
# OSX
.DS_Store
.idea/

# VS Code
.vscode

# Vagrant
.vagrant/
ubuntu-xenial-16.04-cloudimg-console.log

# npm_package
openst-openst-contracts-*.tgz
npm_package/dist/contracts.json
npm_package/test/node_modules
npm_package/test/openst-openst-contracts-*.tgz
npm_package/test/package.json
npm_package/test/package-lock.json

# don't commit node_modules
node_modules

# Don't commit package-lock.json file
package-lock.json

# Do not track builds
build/

contracts/abi/
contracts/bin/
# Do not track IDE files
.idea/
.vscode/
*.iml

# LaTeX auxiliary files
*.aux
*.log

# NPM package generated files:
dist/contracts.json

## Build tool auxiliary files:
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "external/gnosis/safe-contracts"]
path = external/gnosis/safe-contracts
url = https://github.com/OpenST/safe-contracts.git
6 changes: 0 additions & 6 deletions .solcover.js

This file was deleted.

3 changes: 3 additions & 0 deletions .soliumignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
external/gnosis
contracts/truffle/Migrations.sol
19 changes: 19 additions & 0 deletions .soliumrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "solium:recommended",
"plugins": [
"security"
],
"rules": {
"error-reason": [
"error"
],
"quotes": [
"error",
"double"
],
"indentation": [
"error",
4
]
}
}
28 changes: 19 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ language: node_js
sudo: required
branches:
only:
- master
- develop
- master
- develop
- /^feature\/.*/
- /^release-.*/
git:
quiet: true
submodules: true
notifications:
email:
recipients:
Expand All @@ -19,14 +24,19 @@ before_install:
- sudo apt-get install npm
- sudo apt-get install software-properties-common
- sudo add-apt-repository -y ppa:ethereum/ethereum
- sudo apt-get update
- sudo apt-get --allow-unauthenticated install solc
- git submodule update --init --recursive
install:
- npm install
- npm install --quiet
- export PATH=./node_modules/.bin/:${PATH}
before_script:
- nohup sh tools/runGanacheCli.sh </dev/null >/dev/null 2>&1 &
- bash tools/compile.sh
- ./tools/run_ganache_cli.sh </dev/null 1>/dev/null 2>&1 &
script:
- truffle test
- npm run update
- npm run lint:sol
- npm run lint:js
- npm run compile-all
- npm run build-package
- npm run test:contracts
- npm run test:package
after_script:
- kill $(ps aux | grep 'testrpc' | awk '{print $2}')
- kill $(ps aux | grep 'ganache-cli' | awk '{print $2}')
74 changes: 74 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# OpenST Contracts Change Log

## Version 0.10.0

### Changes

- Contracts: TokenHolder
- In the current release, TokenHolder's ownership key management functionality
(implemented previously in MultiSigWallet contract and inherited by TokenHolder)
and session key management functionality (authorizeSession(), revokeSession(),
logout(), executeRule(), executeRedemption()) are separated. Ownership key
management functionality (MultiSigWallet.sol) is removed and replaced by
Gnosis Safe. TokenHolder receives an owner key during construction.
authorizeSession(), revokeSession() and logout() functions are
guarded by onlyOwner modifier. Logout() function has been revisited and
currently logs out all active session keys and can be called only by the owner.
- Contracts: TokenRules
- Global constraints functionality is removed.
- Direct transfers functionality is added allowing a TokenHolder account to
execute transfers without going around with TransferRule. Direct transfers
are by default enabled for a token economy and can be disabled by
organization's workers.
- TokenRules is Organized, that allows to refine modifiers (previously only
onlyOrganization was available) and add onlyWorker. registerRule,
enableDirectTransfers, disableDirectTransfers are guarded by onlyWorker
modifier.
- Contracts: DelayedRecoveryModule
- DelayedRecoveryModule is a Gnosis Safe module allowing to recover an owner
key in case of loss. Gnosis Safe modules execute transactions without any
confirmation. An owner can sign an intent to recover access in
DelayedRecoveryModule which is relayed to the module by a controller key. The
intent execution can be carried on by any key after a required number of
blocks passes. An owner or controller can abort the recovery process.
- Contracts: PriceOracleInterface and PricerRule
- PriceOracleInterface defines the required interface for price oracles used
within PricerRule.
- PricerRule allows to pay beneficiaries in any currency: price oracle for the
pay currency should be registered beforehand.
- Contracts: MasterCopyNonUpgradable, Proxy, ProxyFactory and UserWalletFactory
- A proxy contracts family is introduced to save gas (currently, in
openst-contracts no contract is upgradeable).
- Proxy: A generic proxy contract
- ProxyFactory: A generic proxy factory contract
- UserWalletFactory: A proxy contract, allowing to create a user wallet
by composing gnosis safe and token holder in a single transaction
(UserWalletFactory::createUserWallet)
- MasterCopyNonUpgradable: Contracts acting as master copies should
inherit (should always be first in inheritance list) from this contract.
- Contracts: OrganizationInterface, Organization, and Organized
- Organization contracts are added into the project. TokenRules and PricerRule
are "is Organized" and using inherited onlyWorker and onlyOrganization modifiers.
- Contracts: Upgraded the contracts to 0.5.0 version of solidity.
- Infrastructure: Replaced the mock naming convention for test doubles to
correct ones: spy, fake, double.
- Infrastructure: Align the Airbnb JS style guide across OpenST protocol
projects through the .eslintrc.
- Infrastructure: Add .gitattributes for Solidity syntax highlighting in Github.
- Infrastructure: Contracts directory restructuring.
- Infrastructure: Remove .solcover.js as it does not support the solidity
version 0.5.0.
- Infrastructure: Add .soliumignore to exclude unnecessary directories and
files to be linted.
- Infrastructure: Add .soliumrc to share solidity lint rules across the project
contributors.
- Infrastructure: Improve travis.yml to include updating of git submodules,
using binaries from ./node_modules/.bin, lint-build-steps and use npm scripts
instead of raw calls.
- Infrastructure: Add CODE_OF_CONDUCT.md for contribution guidelines.
- Infrastructure: Update contracts license to Apache Version 2.0.
- Infrastructure: Update README.md file for release 0.10.0.
- Infrastructure: Update VERSION file for release 0.10.0.
- Infrastructure: Improved package.json with new set of scripts: compile,
compile-all, lint:js, lint:js:fix, lint:sol, lint:sol:fix, lint:build-package.
- Infrastructure: NPM module publishing.
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
Loading

0 comments on commit 3601d89

Please sign in to comment.