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
2 changes: 1 addition & 1 deletion my_scripts/contracts.json
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"}}
59 changes: 47 additions & 12 deletions my_scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Comment on lines +319 to +328
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

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

Unused function deployUsdtFixer.

Suggested change
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);
}

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

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

Unused function deployRedemptionRouter.

Suggested change
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);
}

Copilot uses AI. Check for mistakes.
async function unpause(strategy: UniversalStrategy<UniversalStrategySettings>) {
const provider = config.provider;
const cls = await provider.getClassAt(strategy.address.address.toString());
Expand Down Expand Up @@ -371,7 +403,7 @@ if (require.main === module) {

// deployStrategy();
// deployAUMOracle("0x437ef1e7d0f100b2e070b7a65cafec0b2be31b0290776da8b4112f5473d8d9")
const strategy = HyperLSTStrategies.find(u => u.name.includes('xsBTC'))!;
const strategy = HyperLSTStrategies.find(u => u.name.includes('xSTRK'))!;
// const vaultStrategy = new UniversalStrategy(config, pricer, strategy);
const vaultStrategy = new UniversalLstMultiplierStrategy(config, pricer, strategy);
const vaultContracts = {
Expand All @@ -380,27 +412,30 @@ if (require.main === module) {
vaultAllocator: strategy.additionalInfo.vaultAllocator,
manager: strategy.additionalInfo.manager
}

// deployUsdtFixer();
// deployRedemptionRouter();

async function setConfig() {
await upgrade('Vault', VAULT_PACKAGE, vaultContracts.vault.toString());
await upgrade('VaultAllocator', VAULT_ALLOCATOR_PACKAGE, vaultContracts.vaultAllocator.toString());
await upgrade('Manager', VAULT_ALLOCATOR_PACKAGE, vaultContracts.manager.toString());
await upgrade('RedeemRequest', VAULT_PACKAGE, vaultContracts.redeemRequest.toString());
// await upgrade('Vault', VAULT_PACKAGE, vaultContracts.vault.toString());
// await upgrade('VaultAllocator', VAULT_ALLOCATOR_PACKAGE, vaultContracts.vaultAllocator.toString());
// await upgrade('Manager', VAULT_ALLOCATOR_PACKAGE, vaultContracts.manager.toString());
// await upgrade('RedeemRequest', VAULT_PACKAGE, vaultContracts.redeemRequest.toString());
// await configureSettings(vaultContracts);
// await setManagerRoot(vaultStrategy, ContractAddr.from(RELAYER));
// await grantRole(vaultStrategy, hash.getSelectorFromName('ORACLE_ROLE'), strategy.additionalInfo.aumOracle.address);
// await setMaxDelta(vaultStrategy, getMaxDelta(200, CommonSettings.vault.default_settings.report_delay * 6));

// for (let i=0; i < UniversalStrategies.length; i++) {
// const u = UniversalStrategies[i];
// const strategy = new UniversalStrategy(config, pricer, u);
// await setManagerRoot(strategy, ContractAddr.from(RELAYER));
for (let i=0; i < HyperLSTStrategies.length; i++) {
const u = HyperLSTStrategies[i];
const strategy = new UniversalLstMultiplierStrategy(config, pricer, u);
await setManagerRoot(strategy, ContractAddr.from(RELAYER));
// await setMaxDelta(strategy, getMaxDelta(200, CommonSettings.vault.default_settings.report_delay * 24));
// await grantRole(u, hash.getSelectorFromName('ORACLE_ROLE'), strategy.additionalInfo.aumOracle.address);
// await setFeesConfig(strategy);
// await pause(strategy);
// await unpause(strategy);
// }
// await unpause(strategy);
}

// const netAPY = await vaultStrategy.netAPY();
// console.log(netAPY);
Expand All @@ -415,7 +450,7 @@ if (require.main === module) {
// asset: u.depositTokens[0].address.address
// })))
// deploySanitizer();
// upgrade('Vault', VAULT_PACKAGE, vaultContracts.vault.toString());
// upgrade('RedemptionRouter', VAULT_PACKAGE, '0x6ea649f402898f69baf775c1afdd08522c071c640b9c4460192070ec2b96417');
// grantRole(vaultStrategy, hash.getSelectorFromName('ORACLE_ROLE'), '0x2edf4edbed3f839e7f07dcd913e92299898ff4cf0ba532f8c572c66c5b331b2')
// setMaxDelta(vaultStrategy, getMaxDelta(15, CommonSettings.vault.default_settings.report_delay * 24));
}
2 changes: 1 addition & 1 deletion my_scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"axios": "^1.12.2",
"dotenv": "^17.2.1",
"react": "^19.1.1",
"starknet": "8.5.3"
"starknet": "9.2.1"
},
"devDependencies": {
"@types/node": "^24.3.1",
Expand Down
Loading