-
Notifications
You must be signed in to change notification settings - Fork 43
Test vaults #326
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
Test vaults #326
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "USDC": { | ||
| "strategy": "CCGM3FT4HKLXGTD5FZYSIWTOPR4REIEMTTC23GU6PHSLBXBADKFQPEKR", | ||
| "token": "CDWADWK2AYWWCZOZAHAPAKJDYXAST4VSDAPTIKQZRX7ZLN4YKP5U2G5A" | ||
| }, | ||
| "CETES": { | ||
| "strategy": "CBK3RBS6DTTUTXSCBE3B3WCSQ5XCFPLBIL3AGAZJGNI5PZNBZ66BIGMZ", | ||
| "token": "CCUT4XNXJ6H4BFUY7V2QVKLA7UIXH2GAEGCVVTOSQW4M3APHZ3SQTGPE" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛑 Gitleaks has detected a secret with rule-id If this secret is a false positive, you can add the fingerprint below to your |
||
| }, | ||
| "XLM": { | ||
| "strategy": "CCCJA2JLLODWPWEYBE6X77SAFY2ZLBHTP33PYLKKZON2LM5OPPNAJ5HB", | ||
| "token": "CDDA6LYKAJTUCB4NYS25BOUM7GRVK45ELKTB4KE3557EIHPRIHMELSTD" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛑 Gitleaks has detected a secret with rule-id If this secret is a false positive, you can add the fingerprint below to your |
||
| }, | ||
| "TESOURO": { | ||
| "strategy": "CATU5FLSDYXSAXOMXBWFKHPBWW3ZIKESQMR75YR6HUYE2LJJLDKH2QIX", | ||
| "token": "CDKEYTBUW6GTHZUWXBLSVCPMGISWHSB4IWETGWUTZMKXICEUGCW4EF7N" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛑 Gitleaks has detected a secret with rule-id If this secret is a false positive, you can add the fingerprint below to your |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,15 +98,57 @@ const MAINNET_VAULTS: VaultConfig[] = [ | |
| }, | ||
| ]; | ||
|
|
||
| // Testnet rehearsal vaults across the 4 reserves of the testnet Blend pool | ||
| // (XLM, USDC, CETES, TESOURO — USTRY does not exist on testnet, so TESOURO | ||
| // stands in for the 4th vault). vaultId/shareToken are filled post-deploy from | ||
| // deployed-vaults.testnet.json (see scripts/wire_testnet_vaults.ts). Config | ||
| // mirrors scripts/deploy_strategy_testnet.ts. | ||
| const TESTNET_VAULTS: VaultConfig[] = [ | ||
| { | ||
| vaultId: "CDOETIUHCETALQMBMYUXGFJFA34KDTV74AMHTWXJLY2XUVNZ23JDLJZA", | ||
| vaultId: "CCGM3FT4HKLXGTD5FZYSIWTOPR4REIEMTTC23GU6PHSLBXBADKFQPEKR", | ||
| shareToken: "CDWADWK2AYWWCZOZAHAPAKJDYXAST4VSDAPTIKQZRX7ZLN4YKP5U2G5A", // filled post-deploy | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛑 Gitleaks has detected a secret with rule-id If this secret is a false positive, you can add the fingerprint below to your |
||
| assetId: "CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA", // USDC | ||
| poolId: "CAPBMXIQTICKWFPWFDJWMAKBXBPJZUKLNONQH3MLPLLBKQ643CYN5PRW", | ||
| name: "Leveraged USDC (Testnet)", | ||
| assetSymbol: "USDC", | ||
| decimals: 7, | ||
| cFactor: 0.90, | ||
| targetLoops: 4, | ||
| minHf: 1.05, | ||
| }, | ||
| { | ||
| vaultId: "CBK3RBS6DTTUTXSCBE3B3WCSQ5XCFPLBIL3AGAZJGNI5PZNBZ66BIGMZ", | ||
| shareToken: "CCUT4XNXJ6H4BFUY7V2QVKLA7UIXH2GAEGCVVTOSQW4M3APHZ3SQTGPE", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛑 Gitleaks has detected a secret with rule-id If this secret is a false positive, you can add the fingerprint below to your |
||
| assetId: "CC72F57YTPX76HAA64JQOEGHQAPSADQWSY5DWVBR66JINPFDLNCQYHIC", // CETES | ||
| poolId: "CAPBMXIQTICKWFPWFDJWMAKBXBPJZUKLNONQH3MLPLLBKQ643CYN5PRW", | ||
| name: "Leveraged CETES (Testnet)", | ||
| assetSymbol: "CETES", | ||
| decimals: 7, | ||
| cFactor: 0.75, | ||
| targetLoops: 3, | ||
| minHf: 1.05, | ||
| }, | ||
| { | ||
| vaultId: "CCCJA2JLLODWPWEYBE6X77SAFY2ZLBHTP33PYLKKZON2LM5OPPNAJ5HB", | ||
| shareToken: "CDDA6LYKAJTUCB4NYS25BOUM7GRVK45ELKTB4KE3557EIHPRIHMELSTD", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛑 Gitleaks has detected a secret with rule-id If this secret is a false positive, you can add the fingerprint below to your |
||
| assetId: "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC", // XLM (native) | ||
| poolId: "CAPBMXIQTICKWFPWFDJWMAKBXBPJZUKLNONQH3MLPLLBKQ643CYN5PRW", | ||
| name: "Leveraged XLM (Testnet)", | ||
| assetSymbol: "XLM", | ||
| decimals: 7, | ||
| cFactor: 0.70, | ||
| targetLoops: 2, | ||
| minHf: 1.10, | ||
| }, | ||
| { | ||
| vaultId: "CATU5FLSDYXSAXOMXBWFKHPBWW3ZIKESQMR75YR6HUYE2LJJLDKH2QIX", | ||
| shareToken: "CDKEYTBUW6GTHZUWXBLSVCPMGISWHSB4IWETGWUTZMKXICEUGCW4EF7N", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛑 Gitleaks has detected a secret with rule-id If this secret is a false positive, you can add the fingerprint below to your |
||
| assetId: "CCKA3OUWLZPX3YT335UNHIFMKSYA37M66VKGD5XZOX4BA4IKTYP4WBEE", // TESOURO | ||
| poolId: "CAPBMXIQTICKWFPWFDJWMAKBXBPJZUKLNONQH3MLPLLBKQ643CYN5PRW", | ||
| name: "Leveraged TESOURO (Testnet)", | ||
| assetSymbol: "TESOURO", | ||
| decimals: 7, | ||
| cFactor: 0.80, | ||
| targetLoops: 3, | ||
| minHf: 1.05, | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /** | ||
| * Quick existence/symbol check for the testnet BLND token + Soroswap router used | ||
| * by the strategy constructor, so the testnet deploy doesn't surprise us. | ||
| * Read-only. Usage: npx tsx scripts/check_testnet_infra.ts | ||
| */ | ||
| import { | ||
| Account, | ||
| BASE_FEE, | ||
| Contract, | ||
| Networks, | ||
| rpc as SorobanRpc, | ||
| scValToNative, | ||
| TransactionBuilder, | ||
| xdr, | ||
| } from "@stellar/stellar-sdk"; | ||
|
|
||
| const RPC_URL = "https://soroban-testnet.stellar.org"; | ||
| const NETWORK = Networks.TESTNET; | ||
| const NULL_ACCOUNT = "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF"; | ||
| const server = new SorobanRpc.Server(RPC_URL); | ||
|
|
||
| const BLND = "CB22KRA3YZVCNCQI64JQ5WE7UY2VAV7WFLK6A2JN3HEX56T2EDAFO7QF"; | ||
| const ROUTER = "CCJUD55AG6W5HAI5LRVNKAE5WDP5XGZBUDS5WNTIVDU7O264UZZE7BRD"; | ||
|
|
||
| async function sim(op: xdr.Operation): Promise<any> { | ||
| const acc = new Account(NULL_ACCOUNT, "0"); | ||
| const tx = new TransactionBuilder(acc, { fee: BASE_FEE, networkPassphrase: NETWORK }) | ||
| .addOperation(op) | ||
| .setTimeout(30) | ||
| .build(); | ||
| const res = await server.simulateTransaction(tx); | ||
| if (!SorobanRpc.Api.isSimulationSuccess(res)) return { __error: true }; | ||
| return scValToNative(res.result!.retval); | ||
| } | ||
|
|
||
| async function main() { | ||
| const blndSym = await sim(new Contract(BLND).call("symbol")); | ||
| console.log(`BLND (${BLND}): symbol=${JSON.stringify(blndSym)}`); | ||
|
|
||
| // Soroswap router exposes get_pair / router_get_amounts_out etc.; just probe a | ||
| // cheap read that exists on the router to confirm the contract is live. | ||
| const routerProbe = await sim(new Contract(ROUTER).call("get_factory")); | ||
| console.log(`Router (${ROUTER}): get_factory=${JSON.stringify(routerProbe)}`); | ||
| } | ||
|
|
||
| main().catch((e) => { | ||
| console.error(e); | ||
| process.exit(1); | ||
| }); |
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.
🛑 Gitleaks has detected a secret with rule-id
generic-api-keyin commit 94d3d25.If this secret is a true positive, please rotate the secret ASAP.
If this secret is a false positive, you can add the fingerprint below to your
.gitleaksignorefile and commit the change to this branch.