-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c0b9fd6
Showing
280 changed files
with
40,219 additions
and
0 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,3 @@ | ||
comment: off | ||
coverage: | ||
range: "100...100" |
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,21 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = false | ||
max_line_length = 120 | ||
|
||
[*.sol] | ||
indent_size = 4 | ||
|
||
[*.js] | ||
indent_size = 2 | ||
|
||
[*.adoc] | ||
max_line_length = 0 |
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 @@ | ||
{ | ||
"extends" : [ | ||
"standard", | ||
"plugin:promise/recommended", | ||
], | ||
"plugins": [ | ||
"mocha-no-only", | ||
"promise", | ||
], | ||
"env": { | ||
"browser" : true, | ||
"node" : true, | ||
"mocha" : true, | ||
"jest" : true, | ||
}, | ||
"globals" : { | ||
"artifacts": false, | ||
"contract": false, | ||
"assert": false, | ||
"web3": false, | ||
"usePlugin": false, | ||
"extendEnvironment": false, | ||
}, | ||
"rules": { | ||
|
||
// Strict mode | ||
"strict": ["error", "global"], | ||
|
||
// Code style | ||
"array-bracket-spacing": ["off"], | ||
"camelcase": ["error", {"properties": "always"}], | ||
"comma-dangle": ["error", "always-multiline"], | ||
"comma-spacing": ["error", {"before": false, "after": true}], | ||
"dot-notation": ["error", {"allowKeywords": true, "allowPattern": ""}], | ||
"eol-last": ["error", "always"], | ||
"eqeqeq": ["error", "smart"], | ||
"generator-star-spacing": ["error", "before"], | ||
"indent": ["error", 2], | ||
"linebreak-style": ["error", "unix"], | ||
"max-len": ["error", 120, 2], | ||
"no-debugger": "off", | ||
"no-dupe-args": "error", | ||
"no-dupe-keys": "error", | ||
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"], | ||
"no-redeclare": ["error", {"builtinGlobals": true}], | ||
"no-trailing-spaces": ["error", { "skipBlankLines": false }], | ||
"no-undef": "error", | ||
"no-use-before-define": "off", | ||
"no-var": "error", | ||
"object-curly-spacing": ["error", "always"], | ||
"prefer-const": "error", | ||
"quotes": ["error", "single"], | ||
"semi": ["error", "always"], | ||
"space-before-function-paren": ["error", "always"], | ||
|
||
"mocha-no-only/mocha-no-only": ["error"], | ||
|
||
"promise/always-return": "off", | ||
"promise/avoid-new": "off", | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2018 | ||
} | ||
} |
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 @@ | ||
*.sol linguist-language=Solidity |
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,21 @@ | ||
--- | ||
name: Bug report | ||
about: Report a bug in OpenZeppelin Contracts | ||
|
||
--- | ||
|
||
<!-- 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 Community Forum: https://forum.openzeppelin.com/. --> | ||
|
||
**💻 Environment** | ||
|
||
<!-- Tell us what version of OpenZeppelin Contracts you're using, and how you're using it: Truffle, Remix, etc. --> | ||
|
||
**📝 Details** | ||
|
||
<!-- Describe the problem you have been experiencing in more detail. Include as much information as you think is relevant. Keep in mind that transactions can fail for many reasons; context is key here. --> | ||
|
||
**🔢 Code to reproduce bug** | ||
|
||
<!-- We will be able to better help if you provide a minimal example that triggers the bug. --> |
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,4 @@ | ||
contact_links: | ||
- name: Support request | ||
url: https://forum.openzeppelin.com/c/support/contracts/18 | ||
about: Ask the community in the Community Forum |
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,14 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for OpenZeppelin Contracts | ||
|
||
--- | ||
|
||
**🧐 Motivation** | ||
<!-- Is your feature request related to a specific problem? Is it just a crazy idea? Tell us about it! --> | ||
|
||
**📝 Details** | ||
<!-- Please describe your feature request in detail. --> | ||
|
||
<!-- Make sure that you have reviewed the OpenZeppelin Contributor Guidelines. --> | ||
<!-- https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CONTRIBUTING.md --> |
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,22 @@ | ||
<!-- 0. 🎉 Thank you for submitting a PR! --> | ||
|
||
<!-- 1. Does this close any open issues? Please list them below. --> | ||
|
||
<!-- Keep in mind that new features have a better chance of being merged fast if | ||
they were first discussed and designed with the maintainers. If there is no | ||
corresponding issue, please consider opening one for discussion first! --> | ||
|
||
Fixes # | ||
|
||
<!-- 2. Describe the changes introduced in this pull request. --> | ||
<!-- Include any context necessary for understanding the PR's purpose. --> | ||
|
||
<!-- 3. Before submitting, please make sure that you have: | ||
- reviewed the OpenZeppelin Contributor Guidelines | ||
(https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CONTRIBUTING.md), | ||
- added tests where applicable to test new functionality, | ||
- made sure that your contracts are well-documented, | ||
- run the Solidity linter (`npm run lint:sol`) and fixed any issues, | ||
- run the JS linter and fixed any issues (`npm run lint:fix`), and | ||
- updated the changelog, if applicable. | ||
--> |
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,67 @@ | ||
# Configuration for probot-stale - https://github.com/probot/stale | ||
|
||
# Number of days of inactivity before an Issue or Pull Request becomes stale | ||
daysUntilStale: 15 | ||
|
||
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. | ||
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. | ||
daysUntilClose: 15 | ||
|
||
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable | ||
exemptLabels: | ||
- on hold | ||
- meta | ||
|
||
# Set to true to ignore issues in a project (defaults to false) | ||
exemptProjects: false | ||
|
||
# Set to true to ignore issues in a milestone (defaults to false) | ||
exemptMilestones: false | ||
|
||
# Set to true to ignore issues with an assignee (defaults to false) | ||
exemptAssignees: false | ||
|
||
# Label to use when marking as stale | ||
staleLabel: stale | ||
|
||
# Comment to post when marking as stale. Set to `false` to disable | ||
markComment: > | ||
Hi all! | ||
This Pull Request has not had any recent activity, is it still relevant? If so, what is blocking it? | ||
Is there anything we can do to help move it forward? | ||
Thanks! | ||
# Comment to post when removing the stale label. | ||
# unmarkComment: > | ||
# Your comment here. | ||
|
||
# Comment to post when closing a stale Issue or Pull Request. | ||
closeComment: > | ||
Hi folks! | ||
This Pull Request is being closed as there was no response to the previous prompt. | ||
However, please leave a comment whenever you're ready to resume, so it can be reopened. | ||
Thanks again! | ||
# Limit the number of actions per hour, from 1-30. Default is 30 | ||
limitPerRun: 30 | ||
|
||
# Limit to only `issues` or `pulls` | ||
only: pulls | ||
|
||
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': | ||
# pulls: | ||
# daysUntilStale: 30 | ||
# markComment: > | ||
# This pull request has been automatically marked as stale because it has not had | ||
# recent activity. It will be closed if no further activity occurs. Thank you | ||
# for your contributions. | ||
|
||
# issues: | ||
# exemptLabels: | ||
# - confirmed |
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,22 @@ | ||
name: Merge upstream | ||
|
||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: '0 10 * * *' | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rokroskar/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{github.token}} | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: upstream-patched | ||
fetch-depth: 0 | ||
ssh-key: ${{secrets.DEPLOY_KEY}} | ||
- run: bash scripts/upgradeable/git-user-config.sh | ||
- run: bash scripts/upgradeable/merge-upstream.sh | ||
- run: git push |
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,28 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release-v* | ||
pull_request: {} | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10.x | ||
- uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: '**/node_modules' | ||
key: npm-v2-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: npm-v2- | ||
- run: npm ci | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
- run: bash scripts/upgradeable/transpile.sh | ||
if: github.event_name == 'pull_request' | ||
- run: npm run test |
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,33 @@ | ||
name: Transpile | ||
|
||
on: | ||
workflow_dispatch: {} | ||
push: | ||
branches: [upstream-patched] | ||
|
||
jobs: | ||
transpile: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rokroskar/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{github.token}} | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: upstream-patched | ||
fetch-depth: 0 | ||
ssh-key: ${{secrets.DEPLOY_KEY}} | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10.x | ||
- uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: '**/node_modules' | ||
key: npm-v2-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: npm-v2- | ||
- run: npm ci | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
- run: bash scripts/upgradeable/git-user-config.sh | ||
- run: bash scripts/upgradeable/transpile-onto.sh master origin/master | ||
- run: git push origin master |
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,59 @@ | ||
*.swp | ||
*.swo | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
allFiredEvents | ||
scTopics | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
coverage.json | ||
coverageEnv | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Dependency directory | ||
node_modules | ||
|
||
# Debug log from npm | ||
npm-debug.log | ||
|
||
# local env variables | ||
.env | ||
|
||
# truffle build directory | ||
build/ | ||
|
||
# macOS | ||
.DS_Store | ||
|
||
# truffle | ||
.node-xmlhttprequest-* | ||
|
||
# IntelliJ IDE | ||
.idea | ||
|
||
# docs artifacts | ||
docs/modules/api | ||
|
||
# only used to package @openzeppelin/contracts | ||
contracts/build/ | ||
contracts/README.md | ||
|
||
# temporary artifact from solidity-coverage | ||
allFiredEvents | ||
.coverage_artifacts | ||
.coverage_cache | ||
.coverage_contracts | ||
|
||
# buidler | ||
cache | ||
artifacts |
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,3 @@ | ||
module.exports = { | ||
timeout: 4000, | ||
}; |
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,11 @@ | ||
module.exports = { | ||
norpc: true, | ||
testCommand: 'npm test', | ||
compileCommand: 'npm run compile', | ||
skipFiles: [ | ||
'mocks', | ||
], | ||
providerOptions: { | ||
default_balance_ether: '10000000000000000000000000', | ||
}, | ||
} |
Oops, something went wrong.