Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/core/solidity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
},
"devDependencies": {
"@openzeppelin/community-contracts": "git+https://github.com/OpenZeppelin/openzeppelin-community-contracts.git#269f9b5",
"@openzeppelin/contracts": "^5.4.0",
"@openzeppelin/contracts-upgradeable": "^5.4.0",
"@openzeppelin/contracts": "^5.5.0.rc-0",
"@openzeppelin/contracts-upgradeable": "^5.5.0-rc.0",
"@types/node": "^20.0.0",
"@types/semver": "^7.5.7",
"ava": "^6.0.0",
Expand All @@ -36,4 +36,4 @@
"ts-node": "^10.4.0",
"typescript": "^5.0.0"
}
}
}
4 changes: 2 additions & 2 deletions packages/core/solidity/src/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ function format(upgradeable: false | 'uups' | 'transparent') {
}
}

for (const signer of [false, 'ERC7702', 'ECDSA', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] as const) {
for (const signer of [false, 'ECDSA', 'EIP7702', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] as const) {
for (const upgradeable of [false, 'uups', 'transparent'] as const) {
if (signer === 'ERC7702' && !!upgradeable) continue;
if (signer === 'EIP7702' && !!upgradeable) continue;

Comment on lines +64 to 67
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

EIP7702 rename + skip logic look correct; please confirm no stale ERC7702 references remain.

Matrix uses 'EIP7702' and correctly skips upgradeable combos. Run a quick sweep to catch any lingering keys, error paths, or UI bindings still using ERC7702/erc7702.


🏁 Script executed:

#!/bin/bash
# Find any leftovers after the rename
rg -nP 'ERC7702|erc7702'

Length of output: 2343


Remove all stale ERC7702 references
Several artifacts still use ERC7702 and must be updated to EIP7702 for consistency:

  • In packages/ui/api/ai-assistant/function-definitions/solidity.ts, update the enum entry on line 205.
  • In packages/mcp/src/solidity/schemas.ts, replace z.literal('ERC7702') on line 126.
  • In packages/common/src/ai/descriptions/solidity.ts, adjust the descriptive bullet at line 69.
  • In the CHANGELOG.md files under packages/mcp and packages/core/solidity, rename all mentions of SignerERC7702 and related entries.
🤖 Prompt for AI Agents
In packages/core/solidity/src/account.test.ts around lines 64 to 67, update
stale ERC7702 references to EIP7702 and clean up related artifacts: replace any
occurrence of 'ERC7702' with 'EIP7702' in the listed files
(packages/ui/api/ai-assistant/function-definitions/solidity.ts line ~205,
packages/mcp/src/solidity/schemas.ts line ~126,
packages/common/src/ai/descriptions/solidity.ts line ~69) and rename
SignerERC7702 mentions in CHANGELOG.md under packages/mcp and
packages/core/solidity to the new EIP7702 naming; ensure any conditional logic
or enums that previously referenced ERC7702 are updated to use the exact string
'EIP7702' and run tests to confirm no remaining stale references.

let title = 'Account';
if (signer) {
Expand Down
1,677 changes: 795 additions & 882 deletions packages/core/solidity/src/account.test.ts.md

Large diffs are not rendered by default.

Binary file modified packages/core/solidity/src/account.test.ts.snap
Binary file not shown.
38 changes: 19 additions & 19 deletions packages/core/solidity/src/contract.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Foo {␊
Expand All @@ -21,7 +21,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Footec {␊
Expand All @@ -33,7 +33,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {Bar} from "./Bar.sol";␊
Expand All @@ -47,7 +47,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {Bar} from "./Bar.sol";␊
Expand All @@ -62,7 +62,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {Bar} from "./Bar.sol";␊
Expand All @@ -77,7 +77,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {Bar} from "./Bar.sol";␊
Expand All @@ -93,7 +93,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Foo {␊
Expand All @@ -105,7 +105,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Foo {␊
Expand All @@ -125,7 +125,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Foo {␊
Expand All @@ -149,7 +149,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Foo {␊
Expand All @@ -162,7 +162,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Foo {␊
Expand All @@ -177,7 +177,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Foo {␊
Expand All @@ -192,7 +192,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {Bar} from "./Bar.sol";␊
Expand All @@ -209,7 +209,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Foo {␊
Expand All @@ -224,7 +224,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Foo {␊
Expand All @@ -240,7 +240,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Foo {␊
Expand All @@ -253,7 +253,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Foo {␊
Expand All @@ -267,7 +267,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract FooBarBaz {␊
Expand All @@ -279,7 +279,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
/// @custom:security-contact [email protected]
Expand Down
Binary file modified packages/core/solidity/src/contract.test.ts.snap
Binary file not shown.
36 changes: 17 additions & 19 deletions packages/core/solidity/src/custom.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract MyContract {␊
Expand All @@ -21,7 +21,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract Contract {␊
Expand All @@ -33,7 +33,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊
Expand All @@ -57,10 +57,10 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊
import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊
contract MyContract is Initializable {␊
/// @custom:oz-upgrades-unsafe-allow constructor␊
Expand All @@ -75,22 +75,21 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊
import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊
import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊
contract MyContract is Initializable, OwnableUpgradeable, UUPSUpgradeable {␊
/// @custom:oz-upgrades-unsafe-allow constructor␊
/// @custom:oz-upgrades-unsafe-allow-reachable constructor␊
constructor() {␊
_disableInitializers();␊
}␊
function initialize(address initialOwner) public initializer {␊
__Ownable_init(initialOwner);␊
__UUPSUpgradeable_init();␊
}␊
function _authorizeUpgrade(address newImplementation)␊
Expand All @@ -106,7 +105,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
contract MyContract {␊
Expand All @@ -118,7 +117,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊
Expand All @@ -133,7 +132,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊
Expand All @@ -150,7 +149,7 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊
Expand All @@ -165,22 +164,21 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1

`// SPDX-License-Identifier: MIT␊
// Compatible with OpenZeppelin Contracts ^5.4.0␊
// Compatible with OpenZeppelin Contracts ^5.5.0-rc.0␊
pragma solidity ^0.8.27;␊
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊
import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊
import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊
contract MyContract is Initializable, OwnableUpgradeable, UUPSUpgradeable {␊
/// @custom:oz-upgrades-unsafe-allow constructor␊
/// @custom:oz-upgrades-unsafe-allow-reachable constructor␊
constructor() {␊
_disableInitializers();␊
}␊
function initialize(address initialOwner) public initializer {␊
__Ownable_init(initialOwner);␊
__UUPSUpgradeable_init();␊
}␊
function _authorizeUpgrade(address newImplementation)␊
Expand Down
Binary file modified packages/core/solidity/src/custom.test.ts.snap
Binary file not shown.
Loading
Loading