forked from ForgeYields/starknet_vault_kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: Redemption router and minor bug fixes #8
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
akiraonstarknet
wants to merge
14
commits into
sherlock-audited
Choose a base branch
from
redemption-router
base: sherlock-audited
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
14 commits
Select commit
Hold shift + click to select a range
d705539
Add redemption router
akiraonstarknet a0e10e4
add keys to events [RR] and minor fixes
akiraonstarknet 623b21d
rm nohup
akiraonstarknet 2604af6
set min report delay to 0
akiraonstarknet 0d7c9d5
add Redeem and subscribe in Router
akiraonstarknet ee0f503
script updates
akiraonstarknet 2b96c38
improve comments on redemption router
akiraonstarknet cf0f930
audit-fix: Missing fee upper bound for integrator fee
akiraonstarknet 13db213
audit-fix: Unused internal functions
akiraonstarknet a75a51b
audit-fix: Missing event emissions for setter functions
akiraonstarknet 8417e63
audit-fix: Incorrect epoch offset calculation due to skipped currentl…
akiraonstarknet 251f4a1
audit-fix: Subscribe function allows subscribing NFTs from already se…
akiraonstarknet 595896b
audit-fix: Wrong mapping used in epoch settlement calculation leading…
akiraonstarknet 74ade7d
audit-fix: Unsubscribing doesnt decrease the accumulated nominal of t…
akiraonstarknet 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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| {"class_hashes":{"Vault":"0x5f3e4d3a6f6ea274d0288b7320428e9960298b9db1f6848b7805d14ace6413e","VaultAllocator":"0x7608b7b98f28a18841285367907f2c8bb924949e9f610f370b190e106cd3c3f","RedeemRequest":"0x7421d403cf73830acc41ebc9646c74f4a931f747ac275e32d82fc3a7c7a9aef","Manager":"0x7dbf4bc6ebf73952e77d60a7da8b1ec1523cfd3477ed99253403a3e0cab40d0","SimpleDecoderAndSanitizer":"0x19c38fa79f607d0935596802bcee103b88bc81dfa4b9f2d8bf0e398b19ec3c8"},"contracts":{"Vault":"0x6a346bda4e723d3f4763513007d4b8ef0029f491ed0a1e0626db6d7f3af3c01","RedeemRequest":"0x66c5f84e5fc6c20545737cc187289adccacfeb9829da6fd4ddf6121b32573dc","VaultAllocator":"0x292503a0bff97ad8818481cca50f5f9298537d0e0e9dc6a7ac9bbb8a93f71a3","Manager":"0x2d7822d1616f5e0b556c0f7467eb968bd2acd0f2b2b8623adff96a51e5516db","SimpleDecoderAndSanitizer":"0x7b6f98311af8aa425278570e62abf523e6462eaa01a38c1feab9b2f416492e2","aum_oracle":"0x149298ade3e79ec6cbdac6cfad289c57504eaf54e590939136ed1ceca60c345"}} | ||
| {"class_hashes":{"Vault":"0x5f3e4d3a6f6ea274d0288b7320428e9960298b9db1f6848b7805d14ace6413e","VaultAllocator":"0x7608b7b98f28a18841285367907f2c8bb924949e9f610f370b190e106cd3c3f","RedeemRequest":"0x7421d403cf73830acc41ebc9646c74f4a931f747ac275e32d82fc3a7c7a9aef","Manager":"0x7dbf4bc6ebf73952e77d60a7da8b1ec1523cfd3477ed99253403a3e0cab40d0","SimpleDecoderAndSanitizer":"0x19c38fa79f607d0935596802bcee103b88bc81dfa4b9f2d8bf0e398b19ec3c8","UsdtFixer":"0x19b362ba0e70d94185ebb986ea80039ec19ffca410f200f971fe5731ffd5a21","RedemptionRouter":"0x5a11a86291a4f64583bda5c9706535253d842bd5a391f6481bcce38f24351b2"},"contracts":{"Vault":"0x6a346bda4e723d3f4763513007d4b8ef0029f491ed0a1e0626db6d7f3af3c01","RedeemRequest":"0x66c5f84e5fc6c20545737cc187289adccacfeb9829da6fd4ddf6121b32573dc","VaultAllocator":"0x292503a0bff97ad8818481cca50f5f9298537d0e0e9dc6a7ac9bbb8a93f71a3","Manager":"0x2d7822d1616f5e0b556c0f7467eb968bd2acd0f2b2b8623adff96a51e5516db","SimpleDecoderAndSanitizer":"0x7b6f98311af8aa425278570e62abf523e6462eaa01a38c1feab9b2f416492e2","aum_oracle":"0x149298ade3e79ec6cbdac6cfad289c57504eaf54e590939136ed1ceca60c345","UsdtFixer":"0x7954afaca4c706f9f30658777e55b7f8e264c8974b8a2638d5ebb359280816","RedemptionRouter":"0x3de9c409d1e357e25778fb7a3e2e2393666956846a5c2caa607296fa8e76b5d"}} |
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 | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -316,6 +316,38 @@ async function pause(strategy: UniversalStrategy<UniversalStrategySettings>) { | |||||||||||||||||||||||||||||||||||||||||||
| await Deployer.executeTransactions([pauseCall], acc, provider, 'Pause'); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| async function deployUsdtFixer() { | ||||||||||||||||||||||||||||||||||||||||||||
| const provider = config.provider; | ||||||||||||||||||||||||||||||||||||||||||||
| const calls = await Deployer.prepareMultiDeployContracts([{ | ||||||||||||||||||||||||||||||||||||||||||||
| contract_name: 'UsdtFixer', | ||||||||||||||||||||||||||||||||||||||||||||
| package_name: VAULT_PACKAGE, | ||||||||||||||||||||||||||||||||||||||||||||
| constructorData: [] | ||||||||||||||||||||||||||||||||||||||||||||
| }], config, acc); | ||||||||||||||||||||||||||||||||||||||||||||
| await Deployer.executeDeployCalls(calls, acc, provider); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| async function deployRedemptionRouter() { | ||||||||||||||||||||||||||||||||||||||||||||
| const provider = config.provider; | ||||||||||||||||||||||||||||||||||||||||||||
| // ! set strategy | ||||||||||||||||||||||||||||||||||||||||||||
| const strategy = HyperLSTStrategies.find(u => u.name.includes('xtBTC'))!; | ||||||||||||||||||||||||||||||||||||||||||||
| const calls = await Deployer.prepareMultiDeployContracts([{ | ||||||||||||||||||||||||||||||||||||||||||||
| contract_name: 'RedemptionRouter', | ||||||||||||||||||||||||||||||||||||||||||||
| package_name: VAULT_PACKAGE, | ||||||||||||||||||||||||||||||||||||||||||||
| constructorData: [ | ||||||||||||||||||||||||||||||||||||||||||||
| OWNER, | ||||||||||||||||||||||||||||||||||||||||||||
| strategy.additionalInfo.vaultAddress.address, | ||||||||||||||||||||||||||||||||||||||||||||
| strategy.additionalInfo.redeemRequestNFT.address, | ||||||||||||||||||||||||||||||||||||||||||||
| // ! set to_asset | ||||||||||||||||||||||||||||||||||||||||||||
| Global.getDefaultTokens().find(t => t.symbol === 'tBTC')?.address!, | ||||||||||||||||||||||||||||||||||||||||||||
| "0x04270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f", // avnu exchange | ||||||||||||||||||||||||||||||||||||||||||||
| OWNER, | ||||||||||||||||||||||||||||||||||||||||||||
| "0", | ||||||||||||||||||||||||||||||||||||||||||||
| uint256.bnToUint256(0) // min subscribe amount | ||||||||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||||||||
| }], config, acc); | ||||||||||||||||||||||||||||||||||||||||||||
| await Deployer.executeDeployCalls(calls, acc, provider); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
329
to
350
|
||||||||||||||||||||||||||||||||||||||||||||
| async function deployRedemptionRouter() { | |
| const provider = config.provider; | |
| // ! set strategy | |
| const strategy = HyperLSTStrategies.find(u => u.name.includes('xWBTC'))!; | |
| const calls = await Deployer.prepareMultiDeployContracts([{ | |
| contract_name: 'RedemptionRouter', | |
| package_name: VAULT_PACKAGE, | |
| constructorData: [ | |
| OWNER, | |
| strategy.additionalInfo.vaultAddress.address, | |
| strategy.additionalInfo.redeemRequestNFT.address, | |
| // ! set to_asset | |
| Global.getDefaultTokens().find(t => t.symbol === 'WBTC')?.address!, | |
| "0x04270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f", | |
| OWNER, | |
| "0", | |
| uint256.bnToUint256(0) // min subscribe amount | |
| ] | |
| }], config, acc); | |
| await Deployer.executeDeployCalls(calls, acc, provider); | |
| } |
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
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.
Unused function deployUsdtFixer.