-
Notifications
You must be signed in to change notification settings - Fork 452
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 d2ec96a
Showing
522 changed files
with
84,040 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,11 @@ | ||
comment: off | ||
github_checks: | ||
annotations: false | ||
coverage: | ||
status: | ||
patch: | ||
default: | ||
target: 95% | ||
project: | ||
default: | ||
threshold: 1% |
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,62 @@ | ||
{ | ||
"extends" : [ | ||
"standard" | ||
], | ||
"plugins": [ | ||
"mocha" | ||
], | ||
"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-exclusive-tests": ["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: Questions & Support Requests | ||
url: https://forum.openzeppelin.com/c/support/contracts/18 | ||
about: Ask in the OpenZeppelin 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 Contracts 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,20 @@ | ||
<!-- Thank you for your interest in contributing to OpenZeppelin! --> | ||
|
||
<!-- Consider opening an issue for discussion prior to submitting a PR. --> | ||
<!-- New features will be merged faster if they were first discussed and designed with the team. --> | ||
|
||
Fixes #???? <!-- Fill in with issue number --> | ||
|
||
<!-- Describe the changes introduced in this pull request. --> | ||
<!-- Include any context necessary for understanding the PR's purpose. --> | ||
|
||
|
||
#### PR Checklist | ||
|
||
<!-- Before merging the pull request all of the following must be complete. --> | ||
<!-- Feel free to submit a PR or Draft PR even if some items are pending. --> | ||
<!-- Some of the items may not apply. --> | ||
|
||
- [ ] Tests | ||
- [ ] Documentation | ||
- [ ] Changelog entry |
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,20 @@ | ||
name: Setup | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14.x | ||
cache: npm | ||
- uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: '**/node_modules' | ||
key: npm-v3-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
run: npm ci --prefer-offline | ||
shell: bash | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
env: | ||
SKIP_COMPILE: true |
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,66 @@ | ||
name: checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release-v* | ||
pull_request: {} | ||
workflow_dispatch: {} | ||
|
||
concurrency: | ||
group: checks-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- run: npm run lint | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- name: Transpile | ||
run: | | ||
bash scripts/upgradeable/git-user-config.sh | ||
bash scripts/upgradeable/merge-upstream.sh | ||
bash scripts/upgradeable/transpile.sh | ||
env: | ||
REF: 'refs/heads/patches' | ||
BASE_REF: HEAD | ||
if: ${{ github.base_ref || github.ref }} == 'refs/heads/patches' | ||
- run: npm run test | ||
env: | ||
FORCE_COLOR: 1 | ||
ENABLE_GAS_REPORT: true | ||
- run: npm run test:inheritance | ||
- run: npm run test:generation | ||
|
||
coverage: | ||
if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- run: npm run coverage | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=4096 | ||
- uses: codecov/codecov-action@v3 | ||
|
||
slither: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- uses: crytic/[email protected] |
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,16 @@ | ||
name: Build Docs | ||
|
||
on: | ||
push: | ||
branches: [release-v*] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- run: bash scripts/git-user-config.sh | ||
- run: node scripts/update-docs-branch.js | ||
- run: git push --all origin |
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: Merge upstream | ||
|
||
on: | ||
push: | ||
branches: [patches] | ||
workflow_dispatch: {} | ||
repository_dispatch: | ||
types: [Update] | ||
# client_payload: { ref: string } | ||
|
||
concurrency: | ||
group: merge-${{ github.event.client_payload.ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
merge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: patches | ||
fetch-depth: 0 | ||
ssh-key: ${{ secrets.DEPLOY_KEY }} | ||
- run: bash scripts/upgradeable/git-user-config.sh | ||
- run: bash scripts/upgradeable/merge-upstream.sh | ||
env: | ||
REF: ${{ github.event.client_payload.ref || github.ref}} | ||
- run: git push origin HEAD |
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,27 @@ | ||
name: Transpile | ||
|
||
on: | ||
workflow_dispatch: {} | ||
push: | ||
branches: [patched/*] | ||
|
||
concurrency: | ||
group: transpile-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
transpile: | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/heads/patched/') | ||
steps: | ||
- run: echo ::set-output name=name::"${GITHUB_REF#refs/heads/patched/}" | ||
id: branch | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ssh-key: ${{ secrets.DEPLOY_KEY }} | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- run: bash scripts/upgradeable/git-user-config.sh | ||
- run: bash scripts/upgradeable/transpile-onto.sh ${{ steps.branch.outputs.name }} origin/${{ steps.branch.outputs.name }} | ||
- run: git push origin ${{ steps.branch.outputs.name }} |
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 @@ | ||
*.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 | ||
|
||
# hardhat | ||
cache | ||
artifacts | ||
|
||
# Certora | ||
.certora* | ||
.last_confs | ||
certora_* |
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 @@ | ||
module.exports = { | ||
require: 'hardhat/register', | ||
timeout: 4000, | ||
}; |
Oops, something went wrong.