Skip to content

Updated OpenZeppelin to version 5.1.0 #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Nov 13, 2024
Merged

Conversation

aritkulova
Copy link
Contributor

@aritkulova aritkulova commented Jul 23, 2024

  • Since this PR suggests a bug fix, the tests have been added and the coverage is 100%.
  • Since this PR introduces a new feature, the update has been discussed in an Issue or with the team.
  • This PR is just a minor change, like a typo fix.

@aritkulova aritkulova requested a review from KyrylR July 23, 2024 15:17
@aritkulova aritkulova self-assigned this Jul 23, 2024
@KyrylR
Copy link
Member

KyrylR commented Jul 24, 2024

Let's use solhint more to help with style checking, etc

@KyrylR
Copy link
Member

KyrylR commented Aug 5, 2024

CI?

@KyrylR
Copy link
Member

KyrylR commented Aug 5, 2024

Rename TransparentUpgradeableProxy to avoid collisions

aritkulova and others added 7 commits August 5, 2024 16:28
* Switched to custom errors in contracts

* Review fixes:
removed prefixes;
removed redundant comments;
refactored namings;
added args to errors.

* require -> revert in vectorMock

* Remover unused imports

* Review: removed zero args;
added useful args.

* Ordering errors in alphabetical order

* Splited Traversal into separate file

* review fixes;
linting;
errors are located at the top of file.

* switched to own custom error instead of erc20 in DiamondERC20

* Explicitly marked visibility of state in mock contract

* Fixed typo

* Typo InvalidMaxDepth -> MaxDepthIsZero

* switched to revertedWithCustomError in tests

* Switched to custom error in RawReturnMock

* Added testcase for _checkOnERC721Received. Coverage is 100%

* Cleanup:
ZERO_ADDR -> ZeroAddress from ethers;
ordered imports in tests.

* Specified import

* Replaced ZERO_BYTES32 with ethers.ZeroHash

* Replaced ZERO_ADDRESS with ethers.ZeroAddress

* Updated .solhint config. Resolved solhint warnings

---------

Co-authored-by: Kyryl Riabov <kyryl.ryabov@gmail.com>
@KyrylR KyrylR self-requested a review September 30, 2024 08:58
Copy link
Member

@KyrylR KyrylR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@KyrylR KyrylR requested a review from Arvolear September 30, 2024 09:00
@Arvolear Arvolear changed the title Updated OpenZeppelin to version 5.0.2 Updated OpenZeppelin to version 5.1.0 Nov 12, 2024
@Arvolear Arvolear changed the base branch from master to dev November 12, 2024 11:41
- deleted `_beforeTokenTransfer` and `_afterTokenTransfer` hooks;
- added a new `_update` function for customizations
- deleted `_beforeTokenTransfer` and `_afterTokenTransfer` hooks;
- added a new `_update` function for customizations
Copy link
Member

@Arvolear Arvolear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Arvolear Arvolear merged commit 6924639 into dev Nov 13, 2024
2 checks passed
@Arvolear Arvolear deleted the feat/update-to-openzeppelin-v5 branch November 13, 2024 11:45
Arvolear pushed a commit that referenced this pull request Dec 3, 2024
* updated dependencies

* specified initialOwner for __Ownable_init function

* MathUpgradeable lib -> Math lib

* created mock contract for ERC721Holder

* updated test's error handlers to catch custom errors

* fixed typo in test

* Added custom TransparentUpgradeableProxy contract

* Removed isContract()

* Fixed typo

* Cleaned up dependencies

* Dropped tests for isContract() check in Diamond

* Removed unnecessary dependency

* Added solhint command to scripts

* Renamed TransparentUpgradeableProxy to avoid collisions

* Updated dependencies

* Fixed package-lock

* Switched to custom errors in contracts (#113)

* Switched to custom errors in contracts

* Review fixes:
removed prefixes;
removed redundant comments;
refactored namings;
added args to errors.

* require -> revert in vectorMock

* Remover unused imports

* Review: removed zero args;
added useful args.

* Ordering errors in alphabetical order

* Splited Traversal into separate file

* review fixes;
linting;
errors are located at the top of file.

* switched to own custom error instead of erc20 in DiamondERC20

* Explicitly marked visibility of state in mock contract

* Fixed typo

* Typo InvalidMaxDepth -> MaxDepthIsZero

* switched to revertedWithCustomError in tests

* Switched to custom error in RawReturnMock

* Added testcase for _checkOnERC721Received. Coverage is 100%

* Cleanup:
ZERO_ADDR -> ZeroAddress from ethers;
ordered imports in tests.

* Specified import

* Replaced ZERO_BYTES32 with ethers.ZeroHash

* Replaced ZERO_ADDRESS with ethers.ZeroAddress

* Updated .solhint config. Resolved solhint warnings

---------

Co-authored-by: Kyryl Riabov <kyryl.ryabov@gmail.com>

* Added missed .withArgs() to error handlers

* Updated .solhint config

* Updated versions

* updated openzeppelin to 5.1.0

* review fixes: linting

* renamed TransparentProxy to AdminableProxy

* moved IAdminableProxy to the interfaces;
moved VerifierHelper out of snarkjs dir.

* switched from staticcall to call through interface in AdminableProxyUpgrader

* updated dev dependencies

* downgraded types/chai and types/node

* renamed transparent dir to adminable

* placed Traversal lib into AvlTree file

* erc721:
- deleted `_beforeTokenTransfer` and `_afterTokenTransfer` hooks;
- added a new `_update` function for customizations

* erc20:
- deleted `_beforeTokenTransfer` and `_afterTokenTransfer` hooks;
- added a new `_update` function for customizations

* linting

* linting

---------

Co-authored-by: Kyryl Riabov <kyryl.ryabov@gmail.com>
Arvolear added a commit that referenced this pull request Feb 24, 2025
* Updated OpenZeppelin to version 5.1.0 (#109)

* updated dependencies

* specified initialOwner for __Ownable_init function

* MathUpgradeable lib -> Math lib

* created mock contract for ERC721Holder

* updated test's error handlers to catch custom errors

* fixed typo in test

* Added custom TransparentUpgradeableProxy contract

* Removed isContract()

* Fixed typo

* Cleaned up dependencies

* Dropped tests for isContract() check in Diamond

* Removed unnecessary dependency

* Added solhint command to scripts

* Renamed TransparentUpgradeableProxy to avoid collisions

* Updated dependencies

* Fixed package-lock

* Switched to custom errors in contracts (#113)

* Switched to custom errors in contracts

* Review fixes:
removed prefixes;
removed redundant comments;
refactored namings;
added args to errors.

* require -> revert in vectorMock

* Remover unused imports

* Review: removed zero args;
added useful args.

* Ordering errors in alphabetical order

* Splited Traversal into separate file

* review fixes;
linting;
errors are located at the top of file.

* switched to own custom error instead of erc20 in DiamondERC20

* Explicitly marked visibility of state in mock contract

* Fixed typo

* Typo InvalidMaxDepth -> MaxDepthIsZero

* switched to revertedWithCustomError in tests

* Switched to custom error in RawReturnMock

* Added testcase for _checkOnERC721Received. Coverage is 100%

* Cleanup:
ZERO_ADDR -> ZeroAddress from ethers;
ordered imports in tests.

* Specified import

* Replaced ZERO_BYTES32 with ethers.ZeroHash

* Replaced ZERO_ADDRESS with ethers.ZeroAddress

* Updated .solhint config. Resolved solhint warnings

---------

Co-authored-by: Kyryl Riabov <kyryl.ryabov@gmail.com>

* Added missed .withArgs() to error handlers

* Updated .solhint config

* Updated versions

* updated openzeppelin to 5.1.0

* review fixes: linting

* renamed TransparentProxy to AdminableProxy

* moved IAdminableProxy to the interfaces;
moved VerifierHelper out of snarkjs dir.

* switched from staticcall to call through interface in AdminableProxyUpgrader

* updated dev dependencies

* downgraded types/chai and types/node

* renamed transparent dir to adminable

* placed Traversal lib into AvlTree file

* erc721:
- deleted `_beforeTokenTransfer` and `_afterTokenTransfer` hooks;
- added a new `_update` function for customizations

* erc20:
- deleted `_beforeTokenTransfer` and `_afterTokenTransfer` hooks;
- added a new `_update` function for customizations

* linting

* linting

---------

Co-authored-by: Kyryl Riabov <kyryl.ryabov@gmail.com>

* Updated pragma solidity to ^0.8.21 + renamed Abstract contracts (#116)

* Updated crypto libs for v3.0.0 (#118)

* Crypto libs (#115)

* added ecdsa384 lib

* added rsassapss

* try fix ci

* fix callvalue

* Added tests covering the `verify` and `_isOnCurve` functions

* fix coverage

* split getModifiedSigOrPubKey into modifyLeft and modifyRight

* Added tests covering the RSASSAPSS lib

* switched to assert two unreachable conditions

* fixed typos in test

* removed unused functions in U384 lib

* added test for a U384.cmp function

* trying to fix test for cmp

* add brainpoolP384r1 test

---------

Co-authored-by: aritkulova <aritkulova.yuliia@gmail.com>

* updated crypto lib contracts:
- pragma solidity;
- solhint;
- custom errors

* updated missed pragma solidity

* fixed typo in README

---------

Co-authored-by: Artem Chystiakov <47551140+Arvolear@users.noreply.github.com>

* updated:
- ecdsa256 contract (pragma solidity, solhint, custom errors);
- package lock

* refactor and add reinitializer

* update readme

---------

Co-authored-by: Yuliia Aritkulova <94910987+aritkulova@users.noreply.github.com>
Co-authored-by: Kyryl Riabov <kyryl.ryabov@gmail.com>
Co-authored-by: aritkulova <aritkulova.yuliia@gmail.com>
Co-authored-by: mllwchrry <mariia.zhvanko@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants