Skip to content

Commit 8cb7caa

Browse files
Transpile ac4198fcf
0 parents  commit 8cb7caa

File tree

580 files changed

+83085
-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.

580 files changed

+83085
-0
lines changed

.changeset/config.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "OpenZeppelin/openzeppelin-contracts"
7+
}
8+
],
9+
"commit": false,
10+
"access": "public",
11+
"baseBranch": "master"
12+
}

.changeset/eighty-hounds-promise.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': minor
3+
---
4+
5+
`Strings`: Add `parseUint`, `parseInt`, `parseHexUint` and `parseAddress` to parse strings into numbers and addresses. Also provide variants of these functions that parse substrings, and `tryXxx` variants that do not revert on invalid input.

.changeset/four-chairs-help.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"openzeppelin-solidity": minor
3+
---
4+
5+
`Clones`: Add `cloneWithImmutableArgs` and `cloneDeterministicWithImmutableArgs` variants that create clones with per-instance immutable arguments. The immutable arguments can be retrieved using `fetchCloneArgs`. The corresponding `predictDeterministicWithImmutableArgs` function is also included.

.changeset/great-lions-hear.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': patch
3+
---
4+
5+
`VotesExtended`: Create an extension of `Votes` which checkpoints balances and delegates.

.changeset/healthy-books-shout.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': minor
3+
---
4+
5+
`CAIP2` and `CAIP10`: Add libraries for formatting and parsing CAIP-2 and CAIP-10 identifiers.

.changeset/hot-shrimps-wait.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': minor
3+
---
4+
5+
`Packing`: Add variants for packing `bytes10` and `bytes22`

.changeset/lovely-dodos-lay.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': minor
3+
---
4+
5+
`NoncesKeyed`: Add a variant of `Nonces` that implements the ERC-4337 entrypoint nonce system.

.changeset/pink-wasps-hammer.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': patch
3+
---
4+
5+
`GovernorCountingOverridable`: Add a governor counting module that enables token holders to override the vote of their delegate.

.changeset/pre.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"mode": "pre",
3+
"tag": "rc",
4+
"initialVersions": {
5+
"openzeppelin-solidity": "5.1.0"
6+
},
7+
"changesets": [
8+
"eighty-hounds-promise",
9+
"four-chairs-help",
10+
"great-lions-hear",
11+
"healthy-books-shout",
12+
"hot-shrimps-wait",
13+
"lovely-dodos-lay",
14+
"pink-wasps-hammer",
15+
"proud-planes-arrive",
16+
"seven-donkeys-tap",
17+
"small-seahorses-bathe",
18+
"tricky-bats-pretend",
19+
"weak-roses-bathe"
20+
]
21+
}

.changeset/proud-planes-arrive.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': minor
3+
---
4+
5+
`Bytes`: Add a library of common operations that operate on `bytes` objects.

.changeset/seven-donkeys-tap.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': patch
3+
---
4+
5+
Update some pragma directives to ensure that all file requirements match that of the files they import.

.changeset/small-seahorses-bathe.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': minor
3+
---
4+
5+
`ERC7579Utils`: Add a reusable library to interact with ERC-7579 modular accounts

.changeset/tricky-bats-pretend.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': minor
3+
---
4+
5+
`ERC1363Utils`: Add helper similar to the existing `ERC721Utils` and `ERC1155Utils`

.changeset/weak-roses-bathe.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openzeppelin-solidity': minor
3+
---
4+
5+
`ERC4337Utils`: Add a reusable library to manipulate user operations and interact with ERC-4337 contracts

.codecov.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
comment: off
2+
github_checks:
3+
annotations: false
4+
coverage:
5+
status:
6+
patch:
7+
default:
8+
target: 95%
9+
only_pulls: true
10+
project:
11+
default:
12+
threshold: 1%
13+
ignore:
14+
- "test"
15+
- "contracts/mocks"
16+
- "contracts/vendor"

.editorconfig

+21
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,md}]
21+
max_line_length = 0

.githooks/pre-push

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
if [ "${CI:-"false"}" != "true" ]; then
6+
npm run test:generation
7+
npm run lint
8+
fi

.github/ISSUE_TEMPLATE/config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Bug Reports & Feature Requests
4+
url: https://github.com/OpenZeppelin/openzeppelin-contracts/issues/new/choose
5+
about: Visit the OpenZeppelin Contracts repository
6+
- name: Questions & Support Requests
7+
url: https://forum.openzeppelin.com/c/support/contracts/18
8+
about: Ask in the OpenZeppelin Forum

.github/PULL_REQUEST_TEMPLATE.md

+20
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+
- [ ] Changeset entry (run `npx changeset add`)
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Compare gas costs
2+
description: Compare gas costs between branches
3+
inputs:
4+
token:
5+
description: github token
6+
required: true
7+
report:
8+
description: report to read from
9+
required: false
10+
default: gasReporterOutput.json
11+
out_report:
12+
description: report to read
13+
required: false
14+
default: ${{ github.ref_name }}.gasreport.json
15+
ref_report:
16+
description: report to read from
17+
required: false
18+
default: ${{ github.base_ref }}.gasreport.json
19+
20+
runs:
21+
using: composite
22+
steps:
23+
- name: Download reference report
24+
if: github.event_name == 'pull_request'
25+
run: |
26+
RUN_ID=`gh run list --repo ${{ github.repository }} --branch ${{ github.base_ref }} --workflow ${{ github.workflow }} --limit 100 --json 'conclusion,databaseId,event' --jq 'map(select(.conclusion=="success" and .event!="pull_request"))[0].databaseId'`
27+
gh run download ${RUN_ID} --repo ${{ github.repository }} -n gasreport
28+
env:
29+
GITHUB_TOKEN: ${{ inputs.token }}
30+
shell: bash
31+
continue-on-error: true
32+
id: reference
33+
- name: Compare reports
34+
if: steps.reference.outcome == 'success' && github.event_name == 'pull_request'
35+
run: |
36+
node scripts/checks/compareGasReports.js ${{ inputs.report }} ${{ inputs.ref_report }} >> $GITHUB_STEP_SUMMARY
37+
env:
38+
STYLE: markdown
39+
shell: bash
40+
- name: Rename report for upload
41+
if: github.event_name != 'pull_request'
42+
run: |
43+
mv ${{ inputs.report }} ${{ inputs.out_report }}
44+
shell: bash
45+
- name: Save report
46+
if: github.event_name != 'pull_request'
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: gasreport
50+
path: ${{ inputs.out_report }}

.github/actions/setup/action.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Setup
2+
description: Common environment setup
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- uses: actions/setup-node@v4
8+
with:
9+
node-version: 20.x
10+
- uses: actions/cache@v4
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
17+
shell: bash
18+
if: steps.cache.outputs.cache-hit != 'true'
19+
- name: Install Foundry
20+
uses: foundry-rs/foundry-toolchain@v1
21+
with:
22+
version: nightly
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Compare storage layouts
2+
description: Compare storage layouts between branches
3+
inputs:
4+
token:
5+
description: github token
6+
required: true
7+
buildinfo:
8+
description: compilation artifacts
9+
required: false
10+
default: artifacts/build-info/*.json
11+
layout:
12+
description: extracted storage layout
13+
required: false
14+
default: HEAD.layout.json
15+
out_layout:
16+
description: storage layout to upload
17+
required: false
18+
default: ${{ github.ref_name }}.layout.json
19+
ref_layout:
20+
description: storage layout for the reference branch
21+
required: false
22+
default: ${{ github.base_ref }}.layout.json
23+
24+
runs:
25+
using: composite
26+
steps:
27+
- name: Extract layout
28+
run: |
29+
node scripts/checks/extract-layout.js ${{ inputs.buildinfo }} > ${{ inputs.layout }}
30+
shell: bash
31+
- name: Download reference
32+
if: github.event_name == 'pull_request'
33+
run: |
34+
RUN_ID=`gh run list --repo ${{ github.repository }} --branch ${{ github.base_ref }} --workflow ${{ github.workflow }} --limit 100 --json 'conclusion,databaseId,event' --jq 'map(select(.conclusion=="success" and .event!="pull_request"))[0].databaseId'`
35+
gh run download ${RUN_ID} --repo ${{ github.repository }} -n layout
36+
env:
37+
GITHUB_TOKEN: ${{ inputs.token }}
38+
shell: bash
39+
continue-on-error: true
40+
id: reference
41+
- name: Compare layouts
42+
if: steps.reference.outcome == 'success' && github.event_name == 'pull_request'
43+
run: |
44+
node scripts/checks/compare-layout.js --head ${{ inputs.layout }} --ref ${{ inputs.ref_layout }}
45+
shell: bash
46+
- name: Rename artifacts for upload
47+
if: github.event_name != 'pull_request'
48+
run: |
49+
mv ${{ inputs.layout }} ${{ inputs.out_layout }}
50+
shell: bash
51+
- name: Save artifacts
52+
if: github.event_name != 'pull_request'
53+
uses: actions/upload-artifact@v3
54+
with:
55+
name: layout
56+
path: ${{ inputs.out_layout }}

.github/workflows/actionlint.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: lint workflows
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/**/*.ya?ml'
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Add problem matchers
14+
run: |
15+
# https://github.com/rhysd/actionlint/blob/3a2f2c7/docs/usage.md#problem-matchers
16+
curl -LO https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json
17+
echo "::add-matcher::actionlint-matcher.json"
18+
- uses: docker://rhysd/actionlint:latest

.github/workflows/changeset.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: changeset
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
types:
8+
- opened
9+
- synchronize
10+
- labeled
11+
- unlabeled
12+
13+
concurrency:
14+
group: changeset-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
check:
19+
runs-on: ubuntu-latest
20+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ignore-changeset') }}
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0 # Include history so Changesets finds merge-base
25+
- name: Set up environment
26+
uses: ./.github/actions/setup
27+
- name: Check changeset
28+
run: npx changeset status --since=origin/${{ github.base_ref }}

0 commit comments

Comments
 (0)