Sitelet https://github.com/Dargon789/account/commit/d1d8d9be388f0f5109e9d36656cb62d0349a33ca
Skip to content

Commit d1d8d9b

Browse files
Dargon789github-actions[bot]legion2002howydevactions-user
authored
Legion (#38)
* feat: add ERC20 transfer benchmark for Porto with passkey Add testERC20TransferViaPortoOrchestratorWithPasskey() benchmark to isolate passkey authentication costs from spend limit enforcement costs. - Uses secp256k1 passkey for transaction signing - Sets execution permissions for ERC20 transfers - Requires spend limits (set to max) for passkey operations - Gas cost: 116,094 (vs 97,030 without passkey, 117,083 with restrictive limits) - Provides clean measurement of passkey overhead (~19k gas) Resolves ithacaxyz#272 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Tanishk Goyal <legion2002@users.noreply.github.com> * feat: allow early refunds by recipient in escrow * feat: add callSansTo support to ERC7821 execute * chore: improvements and fixes to ERC7821Ithaca * chore: add address(0) replacement to new compute digest * fix: sanitize upper bits before checking replacement + tests * feat: do not add replay safe wrapper if sig is eoa * chore: bump contract versions due to bytecode changes - Contracts updated: IthacaAccount * chore: use `auto-assign-pr.yml` org action * fix: combine improvements from PRs ithacaxyz#357, ithacaxyz#314, and ithacaxyz#379 Combines the following fixes: - PR ithacaxyz#357: Replace SuperAdminCanSpendAnything with SuperAdminCanExecuteEverything in setCallChecker - PR ithacaxyz#314: Fix typos across codebase (overriden→overridden, Calcualated→Calculated, etc.) - PR ithacaxyz#379: Correct inline comment about approval amount (20-byte all-ones, not type(uint256).max) Co-Authored-By: GarmashAlex <noreply@github.com> Co-Authored-By: sukrucildirr <noreply@github.com> Co-Authored-By: Forostovec <noreply@github.com> 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: bump contract versions due to bytecode changes - Contracts updated: IthacaAccount * feat: subaccount design using spend function * test: complete subaccount flow with unit test * chore: bump contract versions due to bytecode changes - Contracts updated: IthacaAccount * feat: add merkle sigs natively into the account * fix: tests * test: add more sophisticated fuzz test * chore: bump contract versions due to bytecode changes - Contracts updated: IthacaAccount * feat: fix and simplify multichain design (ithacaxyz#327) * feat: simplify multichain nonce design * chore: readd merkle verification prefix * chore: undo blank line addns * chore: lint * chore: redundant multichain bool * fix: lint * . * feat: remove intent struct (ithacaxyz#365) * feat: simplify multichain nonce design * chore: readd merkle verification prefix * chore: undo blank line addns * chore: lint * . * ~50 failing tests down to 5 * down to 1 failing test * fixed failing test * chore: remove console logs and bench * . * Update test/Base.t.sol * Update src/Orchestrator.sol * Update test/utils/mocks/MockPayerWithSignatureOptimized.sol * chore: final cleanup, rebench * Update src/Orchestrator.sol * chore: bump contract versions due to bytecode changes - Contracts updated: IthacaAccount,Orchestrator,SimpleFunder,Simulator * chore: cleanup * rebase * fix --------- Co-authored-by: GitHub Action <action@github.com> * feat: native merkle sig verification in Account * chore: fmt * chore: unify merkle sig flow for orchestrator multi chain intents * chore: bump contract versions due to bytecode changes - Contracts updated: Orchestrator,SimpleFunder,Simulator * Add .circleci/config.yml (#1) Add CircleCI configuration file to set up a basic pipeline with a say-hello job and workflow CI: Add .circleci/config.yml to define a say-hello job that checks out the code and prints a greeting using the cimg/base Docker image Add a workflow to orchestrate the say-hello job under the CircleCI 2.1 engine * Update ci.yaml Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml (#2) CI: Update Forge test command to use --rerun and increase verbosity to -vvvvv Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml (#4) Enhance the CI test step to automatically rerun failed tests and increase verbosity in Forge. CI: Enable the --rerun flag for Forge tests to retry failures automatically Increase Forge test verbosity from -vvv to -vvvvv Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml (#5) Change Forge test invocation from "forge test --rerun -vvvvv" to "forge test -vvv" Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Create CNAME * Revert "Merge branch 'master'" This reverts commit 6c02fbf, reversing changes made to a317ddb. * Create CNAME (#9) * Update ci.yaml (#2) CI: Update Forge test command to use --rerun and increase verbosity to -vvvvv Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml (#4) Enhance the CI test step to automatically rerun failed tests and increase verbosity in Forge. CI: Enable the --rerun flag for Forge tests to retry failures automatically Increase Forge test verbosity from -vvv to -vvvvv Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml (#5) Change Forge test invocation from "forge test --rerun -vvvvv" to "forge test -vvv" Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Create CNAME * Revert "Merge branch 'master'" This reverts commit 6c02fbf, reversing changes made to a317ddb. --------- Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml (#10) reback use test CI and automation chores (ithacaxyz#394) 7dd8a5d Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Potential fix for code scanning alert no. 3: Workflow does not contain permissions (#15) https://github.com/Dargon789/account/security/code-scanning/3 Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update ci.yaml (#16) reback use test CI and automation chores (ithacaxyz#394) 7dd8a5d Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Delete CNAME * Update Brutalizer.sol * Potential fix for code scanning alert no. 2: Workflow does not contain permissions (#17) Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Refactor deployment scripts and update configs Migrates deployment scripts to use fork-based configuration loading, removes legacy CircleCI and GitHub workflow files, and introduces a registry-based contract deployment record. Updates .env.example, README, and foundry configuration. Removes LayerZero vendor and test files, adds devtools submodule, and improves LayerZeroSettler configuration logic for multi-chain deployments. * Fix commit user email format in CI workflow (#18) 30a2096 Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Potential fix for code scanning alert no. 4: Workflow does not contain permissions (#19) Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for code scanning alert no. 1: Workflow does not contain permissions (#20) Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update ci.yaml (#21) reback use test CI and automation chores (ithacaxyz#394) 7dd8a5d Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Master (#22) * Merge branch 'master' (#8) * Update ci.yaml (#2) CI: Update Forge test command to use --rerun and increase verbosity to -vvvvv Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml (#4) Enhance the CI test step to automatically rerun failed tests and increase verbosity in Forge. CI: Enable the --rerun flag for Forge tests to retry failures automatically Increase Forge test verbosity from -vvv to -vvvvv Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml (#5) Change Forge test invocation from "forge test --rerun -vvvvv" to "forge test -vvv" Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Create CNAME --------- Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Revert "fix vm block accoount (#11)" (#13) Reverts #11 Summary by Sourcery CI: Update the Forge test command in the CI workflow to enable reruns and increase verbosity. This reverts commit 942017f. --------- Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update ci.yaml Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Refactor function signatures and formatting for consistency Updated function signatures in IFunder and SimpleFunder for single-line style, and improved code formatting in IthacaAccount, test/Account.t.sol, test/Benchmark.t.sol, and test/LayerZeroSettler.t.sol for readability and consistency. No logic changes were made. * Delete .circleci directory (#27) Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * # Default ignored files * .snapshot_worktree * Delete .idea directory (#35) Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * pre-commit * pre-commit * deploy execute_config.sh * Update forge-std * Update check-bytecode-changes.js * pre-commit * chore: bump contract versions due to bytecode changes * chore: bump contract versions due to bytecode changes * chore: bump contract versions due to bytecode changes contracts update * v0.5.11 * chore: unify merkle sig flow for orchestrator multi chain intents * test: add tests for getContextKeyHash in Account.t.sol (ithacaxyz#412) * Refactor function signatures and formatting for consistency --------- Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tanishk Goyal <legion2002@users.noreply.github.com> Co-authored-by: Tanishk Goyal <goyaltanishk02@gmail.com> Co-authored-by: howy <132113803+howydev@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: o-az <omaraziz.dev@proton.me> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: googleworkspace-bot <googleworkspace-bot@google.com>
1 parent 3d3022c commit d1d8d9b

63 files changed

Lines changed: 2201 additions & 4884 deletions

Some content is hidden

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

‎.changeset/README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

‎.changeset/config.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

‎.env.example‎

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,41 @@
22
# Copy this file to .env and fill in with actual values
33

44
# ============================================
5-
# UPGRADE TESTS
5+
# PRIVATE KEY (Required for deployment)
66
# ============================================
7-
UPGRADE_TEST_RPC_URL=https://base-mainnet.g.alchemy.com/v2/YOUR_API_KEY # Base
8-
UPGRADE_TEST_OLD_PROXY=0x7C27e3AEcbF42879B64d76f604dC3430F4886462
9-
UPGRADE_TEST_OLD_VERSION=0.5.10
7+
# NEVER commit your actual private key!
8+
PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
109

1110
# ============================================
12-
# DEPLOYMENT SCRIPTS
11+
# RPC ENDPOINTS (Required)
1312
# ============================================
14-
PRIVATE_KEY=
15-
1613
# Format: RPC_{chainId}
1714

1815
# Mainnet chains
1916
RPC_1=https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY # Ethereum
17+
RPC_42161=https://arb-mainnet.g.alchemy.com/v2/YOUR_API_KEY # Arbitrum
18+
RPC_8453=https://base-mainnet.g.alchemy.com/v2/YOUR_API_KEY # Base
2019

2120
# Testnet chains
2221
RPC_11155111=https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY # Sepolia
2322

24-
# Test mnemonic for funding script
25-
GAS_SIGNER_MNEMONIC="dash between kangaroo vacant gaze glass way sudden retire output retire evil"
26-
23+
# Local development
24+
RPC_28405=https://porto-dev-paros.rpc.ithaca.xyz # Porto Devnet
25+
RPC_28406=https://porto-dev-tinos.rpc.ithaca.xyz # Porto Devnet
26+
RPC_28407=https://porto-dev-leros.rpc.ithaca.xyz # Porto Devnet
2727

28+
# ============================================
29+
# VERIFICATION API KEYS (Optional)
30+
# ============================================
31+
# Format: VERIFICATION_KEY_{chainId}
32+
# Get API keys from respective block explorers
2833

34+
VERIFICATION_KEY_1=YOUR_ETHERSCAN_API_KEY # https://etherscan.io
35+
VERIFICATION_KEY_42161=YOUR_ARBISCAN_API_KEY # https://arbiscan.io
36+
VERIFICATION_KEY_8453=YOUR_BASESCAN_API_KEY # https://basescan.org
2937

38+
# ============================================
39+
# CONFIGURATION
40+
# ============================================
41+
# All deployment configuration is in deploy/deploy-config.json
42+
# See deploy/README.md for detailed instructions

‎.github/workflows/auto-assign.yaml‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎.github/workflows/ci.yaml‎

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ on:
55
push:
66
branches: [main]
77

8-
permissions:
9-
contents: write
10-
pull-requests: write
11-
128
jobs:
139
test:
1410
name: Tests
11+
permissions:
12+
contents: read
1513
runs-on: ubuntu-latest
1614
steps:
1715
- uses: actions/checkout@v4
@@ -21,31 +19,22 @@ jobs:
2119
- name: Install Foundry
2220
uses: foundry-rs/foundry-toolchain@v1
2321
with:
24-
version: nightly
22+
version: nightly
2523

2624
- name: Build
2725
run: |
2826
forge build
2927
30-
- name: Run tests
31-
env:
32-
UPGRADE_TEST_RPC_URL: ${{ secrets.UPGRADE_TEST_RPC_URL }}
33-
UPGRADE_TEST_OLD_PROXY: ${{ secrets.UPGRADE_TEST_OLD_PROXY }}
34-
UPGRADE_TEST_OLD_VERSION: ${{ secrets.UPGRADE_TEST_OLD_VERSION }}
28+
- name: Check formatting
3529
run: |
36-
forge test -vvv
30+
forge fmt --check
3731
38-
- name: Format contracts and generate snapshots
39-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
32+
- name: Run tests
4033
run: |
41-
forge fmt
42-
forge snapshot --isolate --match-contract Benchmark --via-ir
34+
forge test --rerun -vvvvv
4335
44-
- name: Commit formatting and snapshot changes
45-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
46-
uses: stefanzweifel/git-auto-commit-action@v5
47-
with:
48-
commit_message: "chore: fmt contracts and update gas snapshots"
49-
file_pattern: "*.sol snapshots/"
50-
commit_user_name: github-actions[bot]
51-
commit_user_email: github-actions[bot]@users.noreply.github.com
36+
- name: Snapshot main branch
37+
run: git fetch origin main && git worktree prune &&rm -rf .snapshot_worktree && git worktree add .snapshot_worktree origin/main && (cd .snapshot_worktree && forge snapshot --match-contract Benchmark --snap .temp-snapshot) && cp .snapshot_worktree/.temp-snapshot gas-snapshots/.gas-snapshot-main && git worktree remove --force .snapshot_worktree && git worktree prune
38+
39+
- name: Compare gas snapshots
40+
run: forge snapshot --match-contract Benchmark --diff gas-snapshots/.gas-snapshot-main

‎.github/workflows/claude-code.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
check-permissions:
1818
name: Check permissions
1919
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
2022
outputs:
2123
has-permission: ${{ steps.check.outputs.has-permission }}
2224
steps:

‎.github/workflows/manual-deployment.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Manual Deployment Execution
22

3+
permissions:
4+
contents: read
5+
36
on:
47
workflow_dispatch:
58
inputs:

‎.github/workflows/version-check.yaml‎

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,31 @@ jobs:
5757
- name: Bump version if needed
5858
if: steps.check.outputs.needs_version_bump == 'true'
5959
run: |
60+
# Configure git
61+
git config --local user.email "action@github.com"
62+
git config --local user.name "GitHub Action"
63+
6064
# Get the contracts that need bumping
6165
CONTRACTS_TO_BUMP="${{ steps.check.outputs.contracts_to_bump }}"
62-
66+
6367
echo "Bumping versions for contracts: $CONTRACTS_TO_BUMP"
64-
68+
6569
# Update Solidity files using the upgrade script with specific contracts
6670
CONTRACTS_TO_BUMP="$CONTRACTS_TO_BUMP" node prep/update-version.js
67-
68-
- name: Commit version bump changes
69-
if: steps.check.outputs.needs_version_bump == 'true'
70-
uses: stefanzweifel/git-auto-commit-action@v5
71-
with:
72-
commit_message: "chore: bump contract versions due to bytecode changes - Contracts updated: ${{ steps.check.outputs.contracts_to_bump }}"
73-
file_pattern: "src/*.sol"
74-
commit_user_name: github-actions[bot]
75-
commit_user_email: github-actions[bot]@users.noreply.github.com
71+
72+
# Commit changes (only Solidity files, not package.json)
73+
git add src/*.sol
74+
git commit -m "chore: bump contract versions due to bytecode changes - Contracts updated: $CONTRACTS_TO_BUMP"
75+
76+
# Pull latest changes and rebase
77+
# Pull latest changes and rebase
78+
if ! git pull origin ${{ github.event.pull_request.head.ref }} --rebase; then
79+
echo "Failed to rebase version bump changes. Manual intervention required."
80+
exit 1
81+
fi
82+
83+
# Push to the PR branch
84+
git push origin HEAD:${{ github.event.pull_request.head.ref }}
7685
7786
- name: Create PR comment
7887
if: steps.check.outputs.needs_version_bump == 'true'

‎.gitmodules‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
[submodule "lib/LayerZero-v2"]
88
path = lib/LayerZero-v2
99
url = https://github.com/LayerZero-Labs/LayerZero-v2
10+
[submodule "lib/devtools"]
11+
path = lib/devtools
12+
url = https://github.com/LayerZero-Labs/devtools
1013
[submodule "lib/openzeppelin-contracts"]
1114
path = lib/openzeppelin-contracts
1215
url = https://github.com/OpenZeppelin/openzeppelin-contracts

‎CHANGELOG.md‎

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
# porto-account
22

3-
> Note: After v0.5.5, all changelogs will be published along with the release notes.
4-
> From here on, this file is deprecated.
5-
6-
## 0.5.5
7-
8-
### Patch Changes
9-
- Update foundry config, to not include metadata in the bytecode. This ensures that the contract bytecode doesn't change because of some other change in the repository.
10-
11-
12-
## 0.5.4
13-
14-
### Patch Changes
15-
16-
- SimpleFunder supports multiple orchestrators instead of single immutable orchestrator
17-
- Replaced immutable `ORCHESTRATOR` with `orchestrators` mapping and `setOrchestrators()` function
18-
- Maintained backward compatibility with old `fund()` signature
19-
- Added `supported_orchestrators` config field for deployment
20-
- Version bumped to "0.1.5"
21-
223
## 0.5.0
234

245
### Minor Changes
@@ -113,7 +94,7 @@
11394
- All fill related functions removed from EP.
11495
- EP is now completely stateless, also does not have a constructor.
11596
- PreCall with `nonce = type(uint256).max` is not replayable anymore.
116-
- `OpDataTooShort` error, udpated to `OpDataError`, to enforce tighter validation of opdata.
97+
- `OpDataTooShort` error, updated to `OpDataError`, to enforce tighter validation of opdata.
11798
- `checkAndIncrementNonce` function added to account. Can only be called by EP.
11899
- 6b3294a: Optimize `_isSuperAdmin`
119100

@@ -150,7 +131,7 @@
150131

151132
- Add back the INSUFFICIENT_GAS check, which prevents the relay from setting up the `execute` call on the
152133
account, in such a way causing it to intentionally fail.
153-
For the relay, gExecute now has to be set atleast as `gExecute > (gCombined + 100_000) * 64/63)`
134+
For the relay, gExecute now has to be set at least as `gExecute > (gCombined + 100_000) * 64/63)`
154135

155136
### Patch Changes
156137

0 commit comments

Comments
 (0)