Skip to content

Commit d2ec96a

Browse files
Transpile c319c80
0 parents  commit d2ec96a

File tree

522 files changed

+84040
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

522 files changed

+84040
-0
lines changed

.codecov.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
comment: off
2+
github_checks:
3+
annotations: false
4+
coverage:
5+
status:
6+
patch:
7+
default:
8+
target: 95%
9+
project:
10+
default:
11+
threshold: 1%

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
indent_style = space
10+
insert_final_newline = true
11+
trim_trailing_whitespace = false
12+
max_line_length = 120
13+
14+
[*.sol]
15+
indent_size = 4
16+
17+
[*.js]
18+
indent_size = 2
19+
20+
[*.adoc]
21+
max_line_length = 0

.eslintrc

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"extends" : [
3+
"standard"
4+
],
5+
"plugins": [
6+
"mocha"
7+
],
8+
"env": {
9+
"browser" : true,
10+
"node" : true,
11+
"mocha" : true,
12+
"jest" : true,
13+
},
14+
"globals" : {
15+
"artifacts": false,
16+
"contract": false,
17+
"assert": false,
18+
"web3": false,
19+
"usePlugin": false,
20+
"extendEnvironment": false,
21+
},
22+
"rules": {
23+
24+
// Strict mode
25+
"strict": ["error", "global"],
26+
27+
// Code style
28+
"array-bracket-spacing": ["off"],
29+
"camelcase": ["error", {"properties": "always"}],
30+
"comma-dangle": ["error", "always-multiline"],
31+
"comma-spacing": ["error", {"before": false, "after": true}],
32+
"dot-notation": ["error", {"allowKeywords": true, "allowPattern": ""}],
33+
"eol-last": ["error", "always"],
34+
"eqeqeq": ["error", "smart"],
35+
"generator-star-spacing": ["error", "before"],
36+
"indent": ["error", 2],
37+
"linebreak-style": ["error", "unix"],
38+
"max-len": ["error", 120, 2],
39+
"no-debugger": "off",
40+
"no-dupe-args": "error",
41+
"no-dupe-keys": "error",
42+
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
43+
"no-redeclare": ["error", {"builtinGlobals": true}],
44+
"no-trailing-spaces": ["error", { "skipBlankLines": false }],
45+
"no-undef": "error",
46+
"no-use-before-define": "off",
47+
"no-var": "error",
48+
"object-curly-spacing": ["error", "always"],
49+
"prefer-const": "error",
50+
"quotes": ["error", "single"],
51+
"semi": ["error", "always"],
52+
"space-before-function-paren": ["error", "always"],
53+
54+
"mocha/no-exclusive-tests": ["error"],
55+
56+
"promise/always-return": "off",
57+
"promise/avoid-new": "off",
58+
},
59+
"parserOptions": {
60+
"ecmaVersion": 2018
61+
}
62+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sol linguist-language=Solidity

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Bug report
3+
about: Report a bug in OpenZeppelin Contracts
4+
5+
---
6+
7+
<!-- Briefly describe the issue you're experiencing. Tell us what you were trying to do and what happened instead. -->
8+
9+
<!-- 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/. -->
10+
11+
**💻 Environment**
12+
13+
<!-- Tell us what version of OpenZeppelin Contracts you're using, and how you're using it: Truffle, Remix, etc. -->
14+
15+
**📝 Details**
16+
17+
<!-- 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. -->
18+
19+
**🔢 Code to reproduce bug**
20+
21+
<!-- We will be able to better help if you provide a minimal example that triggers the bug. -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
contact_links:
2+
- name: Questions & Support Requests
3+
url: https://forum.openzeppelin.com/c/support/contracts/18
4+
about: Ask in the OpenZeppelin Forum
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for OpenZeppelin Contracts
4+
5+
---
6+
7+
**🧐 Motivation**
8+
<!-- Is your feature request related to a specific problem? Is it just a crazy idea? Tell us about it! -->
9+
10+
**📝 Details**
11+
<!-- Please describe your feature request in detail. -->
12+
13+
<!-- Make sure that you have reviewed the OpenZeppelin Contracts Contributor Guidelines. -->
14+
<!-- https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CONTRIBUTING.md -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!-- Thank you for your interest in contributing to OpenZeppelin! -->
2+
3+
<!-- Consider opening an issue for discussion prior to submitting a PR. -->
4+
<!-- New features will be merged faster if they were first discussed and designed with the team. -->
5+
6+
Fixes #???? <!-- Fill in with issue number -->
7+
8+
<!-- Describe the changes introduced in this pull request. -->
9+
<!-- Include any context necessary for understanding the PR's purpose. -->
10+
11+
12+
#### PR Checklist
13+
14+
<!-- Before merging the pull request all of the following must be complete. -->
15+
<!-- Feel free to submit a PR or Draft PR even if some items are pending. -->
16+
<!-- Some of the items may not apply. -->
17+
18+
- [ ] Tests
19+
- [ ] Documentation
20+
- [ ] Changelog entry

.github/actions/setup/action.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Setup
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- uses: actions/setup-node@v3
7+
with:
8+
node-version: 14.x
9+
cache: npm
10+
- uses: actions/cache@v3
11+
id: cache
12+
with:
13+
path: '**/node_modules'
14+
key: npm-v3-${{ hashFiles('**/package-lock.json') }}
15+
- name: Install dependencies
16+
run: npm ci --prefer-offline
17+
shell: bash
18+
if: steps.cache.outputs.cache-hit != 'true'
19+
env:
20+
SKIP_COMPILE: true

.github/workflows/checks.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: checks
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- release-v*
8+
pull_request: {}
9+
workflow_dispatch: {}
10+
11+
concurrency:
12+
group: checks-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
lint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up environment
21+
uses: ./.github/actions/setup
22+
- run: npm run lint
23+
24+
tests:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v3
28+
with:
29+
fetch-depth: 0
30+
- name: Set up environment
31+
uses: ./.github/actions/setup
32+
- name: Transpile
33+
run: |
34+
bash scripts/upgradeable/git-user-config.sh
35+
bash scripts/upgradeable/merge-upstream.sh
36+
bash scripts/upgradeable/transpile.sh
37+
env:
38+
REF: 'refs/heads/patches'
39+
BASE_REF: HEAD
40+
if: ${{ github.base_ref || github.ref }} == 'refs/heads/patches'
41+
- run: npm run test
42+
env:
43+
FORCE_COLOR: 1
44+
ENABLE_GAS_REPORT: true
45+
- run: npm run test:inheritance
46+
- run: npm run test:generation
47+
48+
coverage:
49+
if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v3
53+
- name: Set up environment
54+
uses: ./.github/actions/setup
55+
- run: npm run coverage
56+
env:
57+
NODE_OPTIONS: --max_old_space_size=4096
58+
- uses: codecov/codecov-action@v3
59+
60+
slither:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v3
64+
- name: Set up environment
65+
uses: ./.github/actions/setup
66+
- uses: crytic/slither-action@v0.1.1

0 commit comments

Comments
 (0)