Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename custom error
Browse files Browse the repository at this point in the history
Amxx committed Sep 3, 2024
1 parent 4364f58 commit c9aa715
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contracts/proxy/Clones.sol
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ import {Errors} from "../utils/Errors.sol";
* deterministic method.
*/
library Clones {
error EIP170ContractCodeSizeLimit();
error CloneArgumentsTooLong();

/**
* @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
@@ -251,7 +251,7 @@ library Clones {
address implementation,
bytes memory args
) private pure returns (bytes memory) {
if (args.length > 0x5fd3) revert EIP170ContractCodeSizeLimit();
if (args.length > 0x5fd3) revert CloneArgumentsTooLong();
return
abi.encodePacked(
hex"61",
4 changes: 2 additions & 2 deletions test/proxy/Clones.test.js
Original file line number Diff line number Diff line change
@@ -165,11 +165,11 @@ describe('Clones', function () {

await expect(
this.factory.$predictDeterministicAddressWithImmutableArgs(this.implementation, args, salt),
).to.be.revertedWithCustomError(this.factory, 'EIP170ContractCodeSizeLimit');
).to.be.revertedWithCustomError(this.factory, 'CloneArgumentsTooLong');

await expect(this.factory.$cloneWithImmutableArgs(this.implementation, args)).to.be.revertedWithCustomError(
this.factory,
'EIP170ContractCodeSizeLimit',
'CloneArgumentsTooLong',
);
});
});

0 comments on commit c9aa715

Please sign in to comment.