-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from ChronoBank/release/release-0.2.2
Release/release 0.2.2
- Loading branch information
Showing
22 changed files
with
11,380 additions
and
504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
build/* | ||
contracts/* | ||
node_modules/* | ||
.* | ||
*.json | ||
truffle* | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
module.exports = { | ||
"parser": "babel-eslint", | ||
"extends": "eslint:recommended", | ||
"env": { | ||
"es6": true, | ||
"node": true, | ||
"mocha": true, | ||
}, | ||
"globals": { | ||
"web3": false, | ||
"artifacts": false, | ||
"assert": false, | ||
"contract": false, | ||
}, | ||
"rules": { | ||
"indent": ["error", "tab"], | ||
|
||
"comma-dangle": ["error", "always"], | ||
"no-cond-assign": ["error", "always"], | ||
"no-await-in-loop": "off", | ||
"block-scoped-var": "error", | ||
"curly": "error", | ||
"eqeqeq": ["error", "always"], | ||
"no-alert": "error", | ||
"no-else-return": ["error", { "allowElseIf": true }], | ||
"no-magic-numbers": ["warn", { "ignoreArrayIndexes": true }], | ||
"no-multi-spaces": ["error", { "exceptions": { "Property": true }}], | ||
"no-restricted-syntax": ["error", "SequenceExpression"], | ||
"no-useless-return": "warn", | ||
"require-await": "warn", | ||
"vars-on-top": "off", | ||
"no-unused-vars": "warn", | ||
"yoda": "error", | ||
|
||
"global-require": "error", | ||
"array-bracket-spacing": ["error", "always", { "singleValue": false, "objectsInArrays": false }], | ||
"block-spacing": ["error", "always"], | ||
"brace-style": ["error", "stroustrup", { "allowSingleLine": false }], | ||
"camelcase": ["error", { "properties": "never" }], | ||
"key-spacing": ["error", { "beforeColon": false, "afterColon": true, "mode": "strict" }], | ||
"keyword-spacing": ["error", { "before": true, "after": true }], | ||
"no-lonely-if": "error", | ||
"no-negated-condition": "error", | ||
"no-trailing-spaces": "error", | ||
"no-whitespace-before-property": "error", | ||
"object-curly-newline": ["error", { "multiline": true, "minProperties": 4 }], | ||
"object-curly-spacing": ["error", "always"], | ||
"object-property-newline": ["warn", { "allowAllPropertiesOnSameLine": true }], | ||
"quote-props": ["warn", "as-needed", { "keywords": true, "numbers": true }], | ||
|
||
"semi": ["error", "never"], | ||
|
||
"arrow-parens": ["error", "as-needed"], | ||
"arrow-spacing": "error", | ||
|
||
"no-duplicate-imports": "error", | ||
"prefer-const": "error", | ||
|
||
"no-undef": "warn", | ||
"no-empty": "warn", | ||
|
||
"no-console": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ node_modules/ | |
|
||
*.log | ||
*.bac | ||
|
||
coverage/ | ||
coverage.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,21 @@ | ||
*.log | ||
*.bac | ||
npm-debug.log | ||
|
||
build/ | ||
migrations/ | ||
test/ | ||
ethpm.json | ||
migrations/ | ||
ethpm.json | ||
.travis.yml | ||
.solcover* | ||
.gitattributes | ||
.es* | ||
.solium* | ||
truffle* | ||
truffle.js | ||
|
||
contracts/Migrations.sol | ||
contracts/stub/ | ||
|
||
coverage/ | ||
coverage.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
copyNodeModules: true, | ||
skipFiles: [ | ||
'Migrations.sol', | ||
'ERC20Interface.sol', | ||
'stub/StubToken.sol', | ||
'stub/StubOwned.sol', | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
test | ||
setup | ||
build | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"extends": "solium:recommended", | ||
"plugins": [ | ||
"security" | ||
], | ||
"rules": { | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"indentation": [ | ||
"error", | ||
4 | ||
], | ||
"security/no-low-level-calls": [ | ||
"error", [ | ||
"callcode" | ||
] | ||
], | ||
"max-line-length": "off", | ||
"security/no-assign-params": "off", | ||
"security/no-inline-assembly": "warning" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,17 @@ | ||
sudo: false | ||
sudo: required | ||
dist: trusty | ||
language: node_js | ||
node_js: 8 | ||
node_js: | ||
- '9' | ||
before_install: | ||
- export PATH=$PATH:$(pwd)/node_modules/.bin | ||
- git config --global user.email "mike@chronobank.com" | ||
- git config --global user.name "Travis-CI" | ||
- export NODE_OPTIONS="--max_old_space_size=4096" | ||
- export PATH=$PATH:$(pwd)/node_modules/.bin | ||
install: | ||
- npm install | ||
script: | ||
- ganache-cli -g 1 --network-id 424242 > /dev/null & | ||
- truffle migrate --network test | ||
- truffle test --network test --clear | ||
|
||
# - if [ "$TRAVIS_BRANCH" == "release" ]; then | ||
# git config credential.helper "store --file=.git/credentials"; | ||
# echo "https://${GH_TOKEN}:@github.com" > .git/credentials; | ||
# npm run release; | ||
# npm publish; | ||
# fi | ||
# notifications: | ||
# slack: chrono-dev:a6jsr4kW5U4uxrGNOxygOWGF | ||
|
||
# deploy: | ||
# provider: npm | ||
# email: mike.chronobank | ||
# api_key: | ||
# secure: fMwTum2BrHQUtI1nJiLxfkb7H5VyIb39heLQrmcnM9crttKQxsE8aCgI6/RHNOR0edDPfJnFd4ZDwRTfPUuRQnWoLgTHNv8dZGL0T3bXG1vi0pTaYTSyidJ9nx167gRZY1iq7jlLwLxDsqHQFIDL3QTJJ+13DrmgsiPRpa/BA5FDJAkW7uUD6EJSI/7TKqbVANAx0tpCAo5f52A/8ztC03IVGcGAYAX9drEm51JHI74uhhe6JsmIH6Q1G9ZyzkZaqibt2Oim4T63RXYtt1xP8qNcKmXo7V22I/NT2XDWB2jSJVGCWMmB5z4Q7Fftg/3PcO3fbpaTK4wc91nx05RXhzUFT1et789oVYNsTZd7DXrKsInWXVmzw+SOV9mKu1D7obdF02IdgspD1Sn39uBm32BsNDonsUlYNCyPGLerONSqm+rUE9RNblj1QxwqhNdCqk2ZXRdxriDDcUyjMFhQGJqMYLieHazWireQLckmz8Ndtqp9SV2oYU25Phett0/xNewDPFre/MZzjFUZwI5/BOwSqFZA1eoeUYqGxz0wj04Yz+wApYkWol5ifS9IGiki2PNAuNQSuP/7zHF+0bBywfG7yxB8AVjjscyMdBY98PHL/Y+sEpFlJz3LeSuuDgxdECuFnF8h/CR552H75QpKPYRQuTlJwTE+IBvEGlcOkrU= | ||
# on: | ||
# tags: true | ||
# repo: ChronoBank/solidity-shared-lib | ||
# branch: release | ||
# env: | ||
# global: | ||
# secure: Xd5gNWvEmiefw835mdgq8Z2YdBmBTQTJ5gMMgw5eZ3/7dNS8PlErKWGQbg21X+YMfBR/v/qyYcST9PDWLLc452LAHIYGQsKJTLTlWOpIISVgvL0525bW/koFaRoGRgG2lLiD9vvv4/zNoM+tI8EUQo5VyUvpv5if5GWDAzYL0LHfFH0O5AoW7JNTDPbFkDKU+m2/E8VfYQdcRlhInjPb41Shme9D5gm9ut4OcQ+yP+FhHK/3roqNEyvmmYg1r15SHEk7s6mNTzlisZXk7wAeCVWW4C+FBB4jwJ+6Hw5H+WnNtzyV+Gr2jJmdFBL4kEyk7ReTmL6iDmSlunAL4NxJjB0Lj1333xN5TRv1X8nWZQopEmY3/6z4hJW3DtyeFYcf/ZpveLW3YWH3fQe6F4q6A1TJjl5EKYbnlp5h46ZLHhk1qquxY9eGkT6IGPSF3K95qyAPbU2KfpWN7888ChzbL/u+4BzirRLdtZ4qIec4RGgreOnAdQH246jyLTDiWJ/0CufWdQrevlf6z7OKBZvYoAfSKQr5f7r1S5I5TkoQkmm+IwSzr+YskZ1qQs2RLwiBAT1YHkHgSFOdOoh9ABkyUbeR9vXJ0bDwZH3FnSkaGQSCGMk0iLnkwySwCFtrD7cC6tSih5M0Uv22hAvgwYQbTjVW3Rh4NlpRc7P/In1wXHc= | ||
- npm test | ||
before_script: | ||
- ganache-cli > /dev/null & | ||
- sleep 5 | ||
after_script: | ||
- travis_wait 50 npm run coverage && cat coverage/lcov.info | coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
|
||
<a name="0.2.2"></a> | ||
## 0.2.2 (2018-07-16) | ||
- add linters (eslint and solium); | ||
- add more tests to cover smart contracts; | ||
- update **Owned** contract implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,28 @@ | ||
# solidity-shared-lib | ||
# Shared smart contracts [![Build Status](https://travis-ci.org/ChronoBank/solidity-shared-lib.svg?branch=master)](https://travis-ci.org/ChronoBank/solidity-shared-lib) [![Coverage Status](https://coveralls.io/repos/github/ChronoBank/solidity-shared-lib/badge.svg?branch=master)](https://coveralls.io/github/ChronoBank/solidity-shared-lib?branch=master) | ||
|
||
Part of [LaborX project](https://github.com/ChronoBank). Contains a list of basic smart contracts and interfaces that should be at hands for every developer. | ||
|
||
- **ERC20Interface** - describes an interface for ERC20 token standard; | ||
- [**Owned**](#owned) - provides a smart contract that is owned by its creator and allows to transfer an ownership in different ways (immediately or with pending timeout). | ||
|
||
## Installation | ||
|
||
Organized as npm package this smart contracts could be easily added to a project by | ||
|
||
```bash | ||
npm install -s solidity-shared-lib | ||
``` | ||
|
||
## Usage | ||
|
||
Right before you decided to use them add this library to package dependencies and import any contract according to this pattern, for example: | ||
|
||
```javascript | ||
import "solidity-shared-lib/contracts/Owned.sol"; | ||
``` | ||
|
||
## Details | ||
|
||
### Owned | ||
|
||
This smart contract besides pinning a contract owner also allows to withdraw any tokens or ether that were mistakenly transferred to a contract (only for contract owner). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Copyright 2017–2018, LaborX PTY | ||
* Licensed under the AGPL Version 3 license. | ||
*/ | ||
|
||
pragma solidity ^0.4.23; | ||
|
||
|
||
import "../Owned.sol"; | ||
|
||
|
||
contract StubOwned is Owned { | ||
|
||
function() external payable { | ||
|
||
} | ||
} |
Oops, something went wrong.