Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
33 changes: 23 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,41 @@
# Copy this file to .env and fill in with actual values

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

# ============================================
# DEPLOYMENT SCRIPTS
# RPC ENDPOINTS (Required)
# ============================================
PRIVATE_KEY=

# Format: RPC_{chainId}

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

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

# Test mnemonic for funding script
GAS_SIGNER_MNEMONIC="dash between kangaroo vacant gaze glass way sudden retire output retire evil"

# Local development
RPC_28405=https://porto-dev-paros.rpc.ithaca.xyz # Porto Devnet
RPC_28406=https://porto-dev-tinos.rpc.ithaca.xyz # Porto Devnet
RPC_28407=https://porto-dev-leros.rpc.ithaca.xyz # Porto Devnet

# ============================================
# VERIFICATION API KEYS (Optional)
# ============================================
# Format: VERIFICATION_KEY_{chainId}
# Get API keys from respective block explorers

VERIFICATION_KEY_1=YOUR_ETHERSCAN_API_KEY # https://etherscan.io
VERIFICATION_KEY_42161=YOUR_ARBISCAN_API_KEY # https://arbiscan.io
VERIFICATION_KEY_8453=YOUR_BASESCAN_API_KEY # https://basescan.org

# ============================================
# CONFIGURATION
# ============================================
# All deployment configuration is in deploy/deploy-config.json
# See deploy/README.md for detailed instructions
12 changes: 0 additions & 12 deletions .github/workflows/auto-assign.yaml

This file was deleted.

35 changes: 12 additions & 23 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ on:
push:
branches: [main]

permissions:
contents: write
pull-requests: write

jobs:
test:
name: Tests
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -21,31 +19,22 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
version: nightly

- name: Build
run: |
forge build

- name: Run tests
env:
UPGRADE_TEST_RPC_URL: ${{ secrets.UPGRADE_TEST_RPC_URL }}
UPGRADE_TEST_OLD_PROXY: ${{ secrets.UPGRADE_TEST_OLD_PROXY }}
UPGRADE_TEST_OLD_VERSION: ${{ secrets.UPGRADE_TEST_OLD_VERSION }}
- name: Check formatting
run: |
forge test -vvv
forge fmt --check

- name: Format contracts and generate snapshots
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
- name: Run tests
run: |
forge fmt
forge snapshot --isolate --match-contract Benchmark --via-ir
forge test --rerun -vvvvv

- name: Commit formatting and snapshot changes
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: fmt contracts and update gas snapshots"
file_pattern: "*.sol snapshots/"
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
- name: Snapshot main branch
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

- name: Compare gas snapshots
run: forge snapshot --match-contract Benchmark --diff gas-snapshots/.gas-snapshot-main
2 changes: 2 additions & 0 deletions .github/workflows/claude-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
check-permissions:
name: Check permissions
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
has-permission: ${{ steps.check.outputs.has-permission }}
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/manual-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Manual Deployment Execution

permissions:
contents: read

on:
workflow_dispatch:
inputs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-infra.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Manual Deployment Execution
permissions:
contents: read

on:
workflow_dispatch:
Expand Down
31 changes: 20 additions & 11 deletions .github/workflows/version-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,31 @@ jobs:
- name: Bump version if needed
if: steps.check.outputs.needs_version_bump == 'true'
run: |
# Configure git
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"

# Get the contracts that need bumping
CONTRACTS_TO_BUMP="${{ steps.check.outputs.contracts_to_bump }}"

echo "Bumping versions for contracts: $CONTRACTS_TO_BUMP"

# Update Solidity files using the upgrade script with specific contracts
CONTRACTS_TO_BUMP="$CONTRACTS_TO_BUMP" node prep/update-version.js

- name: Commit version bump changes
if: steps.check.outputs.needs_version_bump == 'true'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: bump contract versions due to bytecode changes - Contracts updated: ${{ steps.check.outputs.contracts_to_bump }}"
file_pattern: "src/*.sol"
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com

# Commit changes (only Solidity files, not package.json)
git add src/*.sol
git commit -m "chore: bump contract versions due to bytecode changes - Contracts updated: $CONTRACTS_TO_BUMP"

# Pull latest changes and rebase
# Pull latest changes and rebase
if ! git pull origin ${{ github.event.pull_request.head.ref }} --rebase; then
echo "Failed to rebase version bump changes. Manual intervention required."
exit 1
fi

# Push to the PR branch
git push origin HEAD:${{ github.event.pull_request.head.ref }}

- name: Create PR comment
if: steps.check.outputs.needs_version_bump == 'true'
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
[submodule "lib/LayerZero-v2"]
path = lib/LayerZero-v2
url = https://github.com/LayerZero-Labs/LayerZero-v2
[submodule "lib/devtools"]
path = lib/devtools
url = https://github.com/LayerZero-Labs/devtools
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
clear && forge fmt && forge snapshot --isolate --match-contract Benchmark --via-ir && git add snapshots
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/account.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading