-
Notifications
You must be signed in to change notification settings - Fork 2
chore: sync with main #287
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
Open
supervaulter
wants to merge
68
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
e8f8ff3
feat: added initial spec [SV-1100]
supervaulter d034a9f
chore: cursor feedback
supervaulter 0608169
chore: spec simplified
supervaulter e694fad
fix: add missing validation checks to PT amortized oracle spec
supervaulter 0750ce1
feat: added initial pendle pt boring strategy pricing oracle [SV-1096]
supervaulter 568b8e3
chore: added claude CI files, cursor fixes, deployment scripts-wip an…
supervaulter e52e4ea
chore: deployment scripts update + simulation and small fixes
supervaulter d10a3f2
chore: fixed test
supervaulter c30d0d8
chore: fix claude PR access
supervaulter 63c7563
chore: added more test to go over coverage threshold
supervaulter fd218ea
chore: revert on unregsitered amount
supervaulter 99be11a
chore: regenerated bytecode & fixed cursor comments
supervaulter 5ef8a62
chore: removed handling the special case when A_t0 == 0
supervaulter a5f0aeb
chore: added sellOrderId and regernated bytecode
supervaulter ff66736
chore: fixed cursor comments
supervaulter 2947f3d
chore: coverage test fix
supervaulter 1ab7498
chore: small fix for fuzz test
supervaulter 7c86fb1
feat: added a simplified oracle version - hook based flow
supervaulter a9d856f
Merge pull request #283 from superform-xyz/feat/oracle-simplified
supervaulter 58b16c7
chore: regenerated bytecode + scripts fixes
supervaulter e0de0ec
Merge pull request #284 from superform-xyz/feat/oracle-simplified
supervaulter 645dff2
chore: removed lastUpdatePtAmount
supervaulter 6b0ca96
chore: regenerated bytecode
supervaulter 5efccb5
Merge pull request #282 from superform-xyz/feat/spec-for-pseudo-pt-or…
supervaulter c6ecb5f
chore: small improvements for upload to s3
supervaulter 639a980
chore: generated local prod latest.json
supervaulter f7cc6f6
Merge pull request #286 from superform-xyz/chore/upload-to-s3-small-i…
supervaulter 14020c6
feat: added IYieldSourceInteface compatibility to pendle oracle [SV-1…
supervaulter 9c1d375
chore: new pendle oracle [SV-1209]
supervaulter ccf862a
chore: added argument validation + oracle return logic in case of mat…
supervaulter 1507356
chore: latest prod file
supervaulter 7fc39b1
chore: increased oracle coverage
supervaulter 42da8ba
check for address0 in transfer script
supervaulter 44b2f72
Merge pull request #288 from superform-xyz/feat/pendle-oracle-updates…
supervaulter d20c032
chore: latest v2-core
supervaulter 7d53b57
Merge pull request #289 from superform-xyz/chore/sync-v2-core
subhasishgoswami a29450b
chore: added support for hyperevm - periphery
supervaulter 136555b
Merge pull request #290 from superform-xyz/chore/hyperevm-scripts-per…
supervaulter 4b04310
chore: [SV-1279] & [SV-1282] up oracle change test and pendle deth to…
supervaulter af7d71d
chore: small fixed price oracle fix
supervaulter bcc4a8e
chore: added batch operator transfer script
supervaulter 986c398
feat: [SV-1330] pendle amortized oracle v2 - wip
supervaulter aa0deee
chore: use in the new oracle
supervaulter c78b539
chore: added tests and v1 vs v2 simulations + oracle fixes
supervaulter d20f6d9
chore: staging deployment + test fix
supervaulter 44a7979
chore: coverage improvement
supervaulter 3fce9f1
feat: scripts preparations for up and superform oracle
supervaulter fcb9275
chore: deployed up oft and gas oracle on hyperevm
supervaulter 6a2801a
chore: added verification scripts + v2 periphery deployment
supervaulter fd4b72c
chore: more hyperevm deployments and scripts updates + prod latest js…
supervaulter 8c38a1e
chore: deployed batch operator
supervaulter 9b63b80
feat: pendle amortized oracle merge + simulate and script fixes
supervaulter c7d63e7
feat: deployed pendle oracle v2
supervaulter 6d5fc2d
feat: staging deployed
supervaulter a677045
Merge pull request #291 from superform-xyz/chore/oracle-pendle-integr…
supervaulter 357823a
chore: v2-core update
supervaulter 7f80043
Merge pull request #293 from superform-xyz/feat/up-oft-hyperevm
supervaulter f651fb0
feat: integration tests for SuperBank [SV-1398]
supervaulter 4cd63b7
chore: tests improvements + configure from delegate for oft
supervaulter ed5b307
Merge pull request #294 from superform-xyz/feat/integration-tests-SV-…
supervaulter 37be5fb
chore: moved pendle oracle to v2-core
supervaulter a15c274
chore: rmeoved forgatten files
supervaulter bbbb41c
chore: removed oracles from verification scripts
supervaulter 35fe924
Merge pull request #295 from superform-xyz/chore/oracle-to-core-sv-1408
supervaulter 83329d7
chore: added standard json outputs and updated verification script [S…
supervaulter 87c5428
chore: [SV-247] final coverage for periphery
supervaulter e344e70
Merge pull request #298 from superform-xyz/chore/coverage-increase
supervaulter a86581b
Merge pull request #297 from superform-xyz/chore/verification-script-…
supervaulter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: Claude Code Review | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize] | ||
| # Optional: Only run on specific file changes | ||
| # paths: | ||
| # - "src/**/*.ts" | ||
| # - "src/**/*.tsx" | ||
| # - "src/**/*.js" | ||
| # - "src/**/*.jsx" | ||
|
|
||
| jobs: | ||
| claude-review: | ||
| # Optional: Filter by PR author | ||
| # if: | | ||
| # github.event.pull_request.user.login == 'external-contributor' || | ||
| # github.event.pull_request.user.login == 'new-developer' || | ||
| # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' | ||
|
|
||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: read | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Run Claude Code Review | ||
| id: claude-review | ||
| uses: anthropics/claude-code-action@v1 | ||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
| prompt: | | ||
| REPO: ${{ github.repository }} | ||
| PR NUMBER: ${{ github.event.pull_request.number }} | ||
|
|
||
| Please review this pull request and provide feedback on: | ||
| - Code quality and best practices | ||
| - Potential bugs or issues | ||
| - Performance considerations | ||
| - Security concerns | ||
| - Test coverage | ||
|
|
||
| Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback. | ||
|
|
||
| Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR. | ||
|
|
||
| # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md | ||
| # or https://code.claude.com/docs/en/cli-reference for available options | ||
| claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Claude Code | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
| pull_request_review_comment: | ||
| types: [created] | ||
| issues: | ||
| types: [opened, assigned] | ||
| pull_request_review: | ||
| types: [submitted] | ||
|
|
||
| jobs: | ||
| claude: | ||
| if: | | ||
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || | ||
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || | ||
| (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || | ||
| (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: read | ||
| id-token: write | ||
| actions: read # Required for Claude to read CI results on PRs | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Run Claude Code | ||
| id: claude | ||
| uses: anthropics/claude-code-action@v1 | ||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
|
|
||
| # This is an optional setting that allows Claude to read CI results on PRs | ||
| additional_permissions: | | ||
| actions: read | ||
|
|
||
| # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. | ||
| # prompt: 'Update the pull request description to include a summary of changes.' | ||
|
|
||
| # Optional: Add claude_args to customize behavior and configuration | ||
| # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md | ||
| # or https://code.claude.com/docs/en/cli-reference for available options | ||
| # claude_args: '--allowed-tools Bash(gh pr:*)' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,243 @@ | ||
| // SPDX-License-Identifier: UNLICENSED | ||
| pragma solidity >=0.8.30; | ||
|
|
||
| import { DeployV2Base } from "./DeployV2Base.s.sol"; | ||
| import { SuperGovernor } from "../src/SuperGovernor.sol"; | ||
| import { console2 } from "forge-std/console2.sol"; | ||
|
|
||
| /// @title ConfigureGovernorAddresses | ||
| /// @notice Script to register core contract addresses in SuperGovernor | ||
| /// @dev This is a standalone script to set SUPER_VAULT_AGGREGATOR, SUPER_ORACLE, and SUPER_BANK | ||
| /// addresses in SuperGovernor when the deployment script exits early due to all contracts | ||
| /// already being deployed. | ||
| contract ConfigureGovernorAddresses is DeployV2Base { | ||
| /// @notice Configure SuperGovernor with core contract addresses | ||
| /// @param env Environment (0 = prod, 1 = test, 2 = staging) | ||
| /// @param chainId Chain ID for deployment | ||
| function run(uint256 env, uint64 chainId) external broadcast(env) { | ||
| _setBaseConfiguration(env, ""); | ||
| _configure(chainId, env); | ||
| } | ||
|
|
||
| /// @notice Configure SuperGovernor with core contract addresses (with salt namespace) | ||
| /// @param env Environment (0 = prod, 1 = test, 2 = staging) | ||
| /// @param chainId Chain ID for deployment | ||
| /// @param saltNamespace Salt namespace for deployment | ||
| function run(uint256 env, uint64 chainId, string calldata saltNamespace) external broadcast(env) { | ||
| _setBaseConfiguration(env, saltNamespace); | ||
| _configure(chainId, env); | ||
| } | ||
|
|
||
| function _configure(uint64 chainId, uint256 env) internal { | ||
| console2.log("=== Configuring SuperGovernor Core Addresses ==="); | ||
| console2.log("Chain ID:", chainId); | ||
| console2.log("Environment:", env); | ||
|
|
||
| // Read addresses from deployment JSON | ||
| string memory peripheryJson = _readPeripheryContractsFromOutput(chainId, env); | ||
|
|
||
| if (bytes(peripheryJson).length == 0) { | ||
| console2.log("ERROR: Could not read periphery deployment file"); | ||
| revert("PERIPHERY_JSON_NOT_FOUND"); | ||
| } | ||
|
|
||
| // Parse addresses from JSON | ||
| address superGovernor = _safeParseJsonAddress(peripheryJson, ".SuperGovernor"); | ||
| address superVaultAggregator = _safeParseJsonAddress(peripheryJson, ".SuperVaultAggregator"); | ||
| address superOracle = _safeParseJsonAddress(peripheryJson, ".SuperOracle"); | ||
| address superBank = _safeParseJsonAddress(peripheryJson, ".SuperBank"); | ||
| address ecdsappsOracle = _safeParseJsonAddress(peripheryJson, ".ECDSAPPSOracle"); | ||
|
|
||
| console2.log(""); | ||
| console2.log("Addresses from deployment file:"); | ||
| console2.log(" SuperGovernor:", superGovernor); | ||
| console2.log(" SuperVaultAggregator:", superVaultAggregator); | ||
| console2.log(" SuperOracle:", superOracle); | ||
| console2.log(" SuperBank:", superBank); | ||
| console2.log(" ECDSAPPSOracle:", ecdsappsOracle); | ||
|
|
||
| if (superGovernor == address(0)) { | ||
| console2.log("ERROR: SuperGovernor address not found in deployment file"); | ||
| revert("SUPER_GOVERNOR_NOT_FOUND"); | ||
| } | ||
|
|
||
| SuperGovernor governor = SuperGovernor(superGovernor); | ||
|
|
||
| // Set SuperVaultAggregator | ||
| if (superVaultAggregator != address(0)) { | ||
| _setAddressIfNeeded(governor, governor.SUPER_VAULT_AGGREGATOR(), superVaultAggregator, "SUPER_VAULT_AGGREGATOR"); | ||
| } else { | ||
| console2.log("SKIP: SuperVaultAggregator not in deployment file"); | ||
| } | ||
|
|
||
| // Set SuperOracle | ||
| if (superOracle != address(0)) { | ||
| _setAddressIfNeeded(governor, governor.SUPER_ORACLE(), superOracle, "SUPER_ORACLE"); | ||
| } else { | ||
| console2.log("SKIP: SuperOracle not in deployment file"); | ||
| } | ||
|
|
||
| // Set SuperBank | ||
| if (superBank != address(0)) { | ||
| _setAddressIfNeeded(governor, governor.SUPER_BANK(), superBank, "SUPER_BANK"); | ||
| } else { | ||
| console2.log("SKIP: SuperBank not in deployment file"); | ||
| } | ||
|
|
||
| // Set Active PPS Oracle (ECDSAPPSOracle) | ||
| if (ecdsappsOracle != address(0)) { | ||
| _setActivePPSOracleIfNeeded(governor, ecdsappsOracle); | ||
| } else { | ||
| console2.log("SKIP: ECDSAPPSOracle not in deployment file"); | ||
| } | ||
|
|
||
| // Set Validator Configuration | ||
| _setValidatorConfigIfNeeded(governor); | ||
|
|
||
| console2.log(""); | ||
| console2.log("=== Configuration Complete ==="); | ||
| } | ||
|
|
||
| /// @notice Set validator configuration if not already set | ||
| function _setValidatorConfigIfNeeded(SuperGovernor governor) internal { | ||
| // Get current validator config | ||
| (, address[] memory currentValidators,, uint256 currentQuorum) = governor.getValidatorConfig(); | ||
|
|
||
| console2.log(""); | ||
| console2.log("Validator Configuration:"); | ||
| console2.log(" Current validator count:", currentValidators.length); | ||
| console2.log(" Current quorum:", currentQuorum); | ||
| console2.log(" Expected validator count:", validators.length); | ||
| console2.log(" Expected quorum:", INITIAL_VALIDATOR_QUORUM); | ||
|
|
||
| // Check if already configured correctly | ||
| if (currentValidators.length == validators.length && currentQuorum == INITIAL_VALIDATOR_QUORUM) { | ||
| // Verify all validators match | ||
| bool allMatch = true; | ||
| for (uint256 i = 0; i < validators.length; i++) { | ||
| if (currentValidators[i] != validators[i]) { | ||
| allMatch = false; | ||
| break; | ||
| } | ||
| } | ||
| if (allMatch) { | ||
| console2.log("SKIP: Validator configuration already set correctly"); | ||
| return; | ||
| } | ||
| } | ||
|
|
||
| // Set validator configuration | ||
| console2.log("SET: Validator configuration with %s validators", validators.length); | ||
| governor.setValidatorConfig( | ||
| INITIAL_VALIDATOR_CONFIG_VERSION, | ||
| validators, | ||
| validatorPublicKeys, | ||
| INITIAL_VALIDATOR_QUORUM, | ||
| "" // offchainConfig - empty for initial setup | ||
| ); | ||
| console2.log("SUCCESS: Validator configuration set"); | ||
| } | ||
|
|
||
| /// @notice Set the active PPS oracle if not already set | ||
| function _setActivePPSOracleIfNeeded(SuperGovernor governor, address expected) internal { | ||
| // Check if already set correctly | ||
| try governor.getActivePPSOracle() returns (address current) { | ||
| if (current == expected) { | ||
| console2.log("SKIP: Active PPS Oracle already set correctly to %s", current); | ||
| return; | ||
| } else { | ||
| // Already set to different address - requires timelock to change | ||
| console2.log("WARNING: Active PPS Oracle already set to different address: %s", current); | ||
| console2.log("WARNING: Use proposeActivePPSOracle + executeActivePPSOracleChange to change it"); | ||
| return; | ||
| } | ||
| } catch { | ||
| // Not set yet - can set directly | ||
| console2.log("SET: Active PPS Oracle to %s", expected); | ||
| } | ||
|
|
||
| // Set the active PPS oracle | ||
| governor.setActivePPSOracle(expected); | ||
| console2.log("SUCCESS: Active PPS Oracle configured"); | ||
| } | ||
|
|
||
| /// @notice Set an address in SuperGovernor if not already set to the expected value | ||
| function _setAddressIfNeeded( | ||
| SuperGovernor governor, | ||
| bytes32 key, | ||
| address expected, | ||
| string memory keyName | ||
| ) internal { | ||
| // Check if already set correctly | ||
| try governor.getAddress(key) returns (address current) { | ||
| if (current == expected) { | ||
| console2.log("SKIP: %s already set correctly to %s", keyName, current); | ||
| return; | ||
| } else { | ||
| console2.log("UPDATE: %s from %s to %s", keyName, current, expected); | ||
| } | ||
| } catch { | ||
| console2.log("SET: %s to %s", keyName, expected); | ||
| } | ||
|
|
||
| // Set the address | ||
| governor.setAddress(key, expected); | ||
| console2.log("SUCCESS: %s configured", keyName); | ||
| } | ||
|
|
||
| /// @notice Read periphery contracts from output files | ||
| function _readPeripheryContractsFromOutput(uint64 chainId, uint256 env) internal view returns (string memory) { | ||
| string memory peripheryRoot = vm.projectRoot(); | ||
| string memory chainName = _getChainName(chainId); | ||
|
|
||
| string memory envName; | ||
| if (env == 0) { | ||
| envName = "prod"; | ||
| } else if (env == 2) { | ||
| envName = "staging"; | ||
| } else { | ||
| envName = "test"; | ||
| } | ||
|
|
||
| string memory outputPath = string( | ||
| abi.encodePacked( | ||
| peripheryRoot, | ||
| "/script/output/", | ||
| envName, | ||
| "/", | ||
| vm.toString(uint256(chainId)), | ||
| "/", | ||
| chainName, | ||
| "-latest.json" | ||
| ) | ||
| ); | ||
|
|
||
| console2.log("Reading from:", outputPath); | ||
|
|
||
| try vm.readFile(outputPath) returns (string memory fileContent) { | ||
| return fileContent; | ||
| } catch { | ||
| console2.log("Failed to read:", outputPath); | ||
| return ""; | ||
| } | ||
| } | ||
|
|
||
| /// @notice Get chain name from chain ID | ||
| function _getChainName(uint64 chainId) internal pure returns (string memory) { | ||
| if (chainId == 1) return "Ethereum"; | ||
| if (chainId == 8453) return "Base"; | ||
| if (chainId == 999) return "HyperEVM"; | ||
| if (chainId == 10) return "Optimism"; | ||
| if (chainId == 42161) return "Arbitrum"; | ||
| return "Unknown"; | ||
| } | ||
|
|
||
| /// @notice Safely parse an address from JSON | ||
| function _safeParseJsonAddress(string memory json, string memory key) internal pure returns (address) { | ||
| try vm.parseJsonAddress(json, key) returns (address addr) { | ||
| return addr; | ||
| } catch { | ||
| return address(0); | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workflow has insufficient permissions to comment on issues
Medium Severity
The
claude.ymlworkflow triggers onissues: [opened, assigned]andissue_comment: [created]events (lines 4–9), but the permissions block only grantsissues: read(line 24). The officialclaude-code-actionexample and documentation specifyissues: writeis required for Claude to post response comments. Withissues: read, Claude will process the request but silently fail to respond when triggered from an issue or issue comment containing@claude.