diff --git a/cadence/contracts/mocks/MockStrategies.cdc b/cadence/contracts/mocks/MockStrategies.cdc index 0ec49b14..530a3555 100644 --- a/cadence/contracts/mocks/MockStrategies.cdc +++ b/cadence/contracts/mocks/MockStrategies.cdc @@ -495,7 +495,7 @@ access(all) contract MockStrategies { } init() { - self.IssuerStoragePath = StoragePath(identifier: "FlowYieldVaultsStrategyComposerIssuer_\(self.account.address)")! + self.IssuerStoragePath = StoragePath(identifier: "MockStrategiesComposerIssuer_\(self.account.address)")! let initialCollateralType = Type<@FlowToken.Vault>() diff --git a/cadence/tests/PMStrategiesV1_syWFLOWv_test.cdc b/cadence/tests/PMStrategiesV1_syWFLOWv_test.cdc index 7a181a20..6de7cdfa 100644 --- a/cadence/tests/PMStrategiesV1_syWFLOWv_test.cdc +++ b/cadence/tests/PMStrategiesV1_syWFLOWv_test.cdc @@ -8,8 +8,6 @@ import "FlowYieldVaults" import "PMStrategiesV1" import "FlowYieldVaultsClosedBeta" -import "test_helpers.cdc" - /// Fork test for PMStrategiesV1 syWFLOWv strategy — validates the full YieldVault lifecycle /// (create, deposit, withdraw, close) against real mainnet state. /// @@ -55,6 +53,11 @@ access(all) var syWFLOWvYieldVaultID: UInt64 = 0 /* --- Test Helpers --- */ +access(all) +fun _executeScript(_ path: String, _ args: [AnyStruct]): Test.ScriptResult { + return Test.executeScript(Test.readFile(path), args) +} + access(all) fun _executeTransactionFile(_ path: String, _ args: [AnyStruct], _ signers: [Test.TestAccount]): Test.TransactionResult { let txn = Test.Transaction( @@ -66,6 +69,14 @@ fun _executeTransactionFile(_ path: String, _ args: [AnyStruct], _ signers: [Tes return Test.executeTransaction(txn) } +access(all) +fun equalAmounts(a: UFix64, b: UFix64, tolerance: UFix64): Bool { + if a > b { + return a - b <= tolerance + } + return b - a <= tolerance +} + /* --- Setup --- */ access(all) fun setup() { diff --git a/cadence/tests/rebalance_scenario1_test.cdc b/cadence/tests/rebalance_scenario1_test.cdc index c604fb0e..267e9169 100644 --- a/cadence/tests/rebalance_scenario1_test.cdc +++ b/cadence/tests/rebalance_scenario1_test.cdc @@ -124,7 +124,6 @@ fun test_RebalanceYieldVaultScenario1() { log("[TEST] Initial yield vault balance: \(yieldVaultBalance ?? 0.0)") - rebalanceYieldVault(signer: flowYieldVaultsAccount, id: yieldVaultIDs![0], force: true, beFailed: false) rebalancePosition(signer: protocolAccount, pid: pid, force: true, beFailed: false) testSnapshot = getCurrentBlockHeight() @@ -147,7 +146,6 @@ fun test_RebalanceYieldVaultScenario1() { let yieldTokensBefore = getAutoBalancerBalance(id: yieldVaultIDs![0]) ?? 0.0 let currentValueBefore = getAutoBalancerCurrentValue(id: yieldVaultIDs![0]) ?? 0.0 - rebalanceYieldVault(signer: flowYieldVaultsAccount, id: yieldVaultIDs![0], force: false, beFailed: false) rebalancePosition(signer: protocolAccount, pid: pid, force: false, beFailed: false) yieldVaultBalance = getYieldVaultBalance(address: user.address, yieldVaultID: yieldVaultIDs![0]) diff --git a/cadence/tests/rebalance_scenario2_test.cdc b/cadence/tests/rebalance_scenario2_test.cdc index 51b48b47..06449882 100644 --- a/cadence/tests/rebalance_scenario2_test.cdc +++ b/cadence/tests/rebalance_scenario2_test.cdc @@ -188,7 +188,6 @@ fun test_RebalanceYieldVaultScenario2() { log("[TEST] Initial yield vault balance: \(yieldVaultBalance ?? 0.0)") - rebalanceYieldVault(signer: flowYieldVaultsAccount, id: yieldVaultIDs![0], force: true, beFailed: false) rebalancePosition(signer: protocolAccount, pid: pid, force: true, beFailed: false) for index, yieldTokenPrice in yieldPriceIncreases { diff --git a/cadence/tests/rebalance_scenario3a_test.cdc b/cadence/tests/rebalance_scenario3a_test.cdc index f111fb58..4a773049 100644 --- a/cadence/tests/rebalance_scenario3a_test.cdc +++ b/cadence/tests/rebalance_scenario3a_test.cdc @@ -153,7 +153,6 @@ fun test_RebalanceYieldVaultScenario3A() { message: "Expected MOET debt to be \(expectedDebtValues[0]) but got \(debtBefore)" ) - rebalanceYieldVault(signer: flowYieldVaultsAccount, id: yieldVaultIDs![0], force: true, beFailed: false) rebalancePosition(signer: protocolAccount, pid: pid, force: true, beFailed: false) // Debug: Log position details diff --git a/cadence/tests/rebalance_scenario3b_test.cdc b/cadence/tests/rebalance_scenario3b_test.cdc index 8a521dbc..8fe741fe 100644 --- a/cadence/tests/rebalance_scenario3b_test.cdc +++ b/cadence/tests/rebalance_scenario3b_test.cdc @@ -153,7 +153,6 @@ fun test_RebalanceYieldVaultScenario3B() { message: "Expected MOET debt to be \(expectedDebtValues[0]) but got \(debtBefore)" ) - rebalanceYieldVault(signer: flowYieldVaultsAccount, id: yieldVaultIDs![0], force: true, beFailed: false) rebalancePosition(signer: protocolAccount, pid: pid, force: true, beFailed: false) let yieldTokensAfterFlowPriceIncrease = getAutoBalancerBalance(id: yieldVaultIDs![0])! diff --git a/cadence/tests/rebalance_scenario3c_test.cdc b/cadence/tests/rebalance_scenario3c_test.cdc index 06514569..84e4a5a7 100644 --- a/cadence/tests/rebalance_scenario3c_test.cdc +++ b/cadence/tests/rebalance_scenario3c_test.cdc @@ -153,7 +153,6 @@ fun test_RebalanceYieldVaultScenario3C() { message: "Expected MOET debt to be \(expectedDebtValues[0]) but got \(debtBefore)" ) - rebalanceYieldVault(signer: flowYieldVaultsAccount, id: yieldVaultIDs![0], force: true, beFailed: false) rebalancePosition(signer: protocolAccount, pid: pid, force: true, beFailed: false) let yieldTokensAfterFlowPriceIncrease = getAutoBalancerBalance(id: yieldVaultIDs![0])! diff --git a/cadence/tests/rebalance_scenario3d_test.cdc b/cadence/tests/rebalance_scenario3d_test.cdc index 38fefdba..2def8b74 100644 --- a/cadence/tests/rebalance_scenario3d_test.cdc +++ b/cadence/tests/rebalance_scenario3d_test.cdc @@ -153,7 +153,6 @@ fun test_RebalanceYieldVaultScenario3D() { message: "Expected MOET debt to be \(expectedDebtValues[0]) but got \(debtBefore)" ) - rebalanceYieldVault(signer: flowYieldVaultsAccount, id: yieldVaultIDs![0], force: true, beFailed: false) rebalancePosition(signer: protocolAccount, pid: pid, force: true, beFailed: false) let yieldTokensAfterFlowPriceDecrease = getAutoBalancerBalance(id: yieldVaultIDs![0])! diff --git a/cadence/tests/rebalance_scenario4_test.cdc b/cadence/tests/rebalance_scenario4_test.cdc index b1a2000c..397b6d7e 100644 --- a/cadence/tests/rebalance_scenario4_test.cdc +++ b/cadence/tests/rebalance_scenario4_test.cdc @@ -133,7 +133,6 @@ fun test_RebalanceLowCollateralHighYieldPrices() { log(" FLOW collateral: \(collateralBefore) FLOW (value: \(collateralBefore * flowPriceDecrease) MOET @ $\(flowPriceDecrease)/FLOW)") log(" MOET debt: \(debtBefore) MOET") - rebalanceYieldVault(signer: flowYieldVaultsAccount, id: yieldVaultIDs![0], force: true, beFailed: false) rebalancePosition(signer: protocolAccount, pid: pid, force: true, beFailed: false) let ytAfterFlowDrop = getAutoBalancerBalance(id: yieldVaultIDs![0])! @@ -258,8 +257,7 @@ fun test_RebalanceHighCollateralLowYieldPrices() { message: "Expected health to remain above \(SOLVENT_HEALTH_FLOOR) after 20% FLOW price drop, got \(healthBeforeRebalance)") // Rebalance to restore health to the strategy target. - log("[Scenario5] Rebalancing position and yield vault...") - rebalanceYieldVault(signer: flowYieldVaultsAccount, id: yieldVaultIDs![0], force: true, beFailed: false) + log("[Scenario5] Rebalancing position...") rebalancePosition(signer: protocolAccount, pid: pid, force: true, beFailed: false) let ytAfterFlowDrop = getAutoBalancerBalance(id: yieldVaultIDs![0])! diff --git a/cadence/tests/rebalance_yield_test.cdc b/cadence/tests/rebalance_yield_test.cdc index aaac6fd5..3139f929 100644 --- a/cadence/tests/rebalance_yield_test.cdc +++ b/cadence/tests/rebalance_yield_test.cdc @@ -113,7 +113,6 @@ fun test_RebalanceYieldVaultScenario2() { log("[TEST] Initial yield vault balance: \(yieldVaultBalance ?? 0.0)") - rebalanceYieldVault(signer: flowYieldVaultsAccount, id: yieldVaultIDs![0], force: true, beFailed: false) rebalancePosition(signer: protocolAccount, pid: pid, force: true, beFailed: false) for index, yieldTokenPrice in yieldPriceIncreases { diff --git a/cadence/tests/tracer_strategy_test.cdc b/cadence/tests/tracer_strategy_test.cdc index 27d5a59d..3c497094 100644 --- a/cadence/tests/tracer_strategy_test.cdc +++ b/cadence/tests/tracer_strategy_test.cdc @@ -398,11 +398,8 @@ fun test_RebalanceYieldVaultSucceedsAfterCollateralPriceIncrease() { log("Yield token balance before rebalance: \(yieldTokensBefore)") - // Rebalance the YieldVault to adjust the Yield tokens based on the new collateral price - // Force both yield vault and position to rebalance - rebalanceYieldVault(signer: flowYieldVaultsAccount, id: yieldVaultIDs![0], force: true, beFailed: false) - - // Position ID is hardcoded to 1 here since this is the first yield vault created, + // Position health increased because FLOW collateral is worth more; drawDown brings it back to target. + // Position ID is hardcoded to 1 here since this is the first yield vault created, // if there is a better way to get the position ID, please let me know rebalancePosition(signer: protocolAccount, pid: positionID, force: true, beFailed: false) diff --git a/flow.json b/flow.json index 9bc8b02b..8c351dbc 100644 --- a/flow.json +++ b/flow.json @@ -19,7 +19,8 @@ "mainnet": "e36ef556b8b5d955", "mainnet-fork": "e36ef556b8b5d955", "testing": "0000000000000007", - "testnet": "bb76ea2f8aad74a0" + "testnet": "bb76ea2f8aad74a0", + "testnet-fork": "bb76ea2f8aad74a0" } }, "DeFiActions": { @@ -29,7 +30,8 @@ "mainnet": "6d888f175c158410", "mainnet-fork": "6d888f175c158410", "testing": "0000000000000007", - "testnet": "0b11b1848a8aa2c0" + "testnet": "0b11b1848a8aa2c0", + "testnet-fork": "0b11b1848a8aa2c0" } }, "DeFiActionsUtils": { @@ -39,7 +41,8 @@ "mainnet": "6d888f175c158410", "mainnet-fork": "6d888f175c158410", "testing": "0000000000000007", - "testnet": "0b11b1848a8aa2c0" + "testnet": "0b11b1848a8aa2c0", + "testnet-fork": "0b11b1848a8aa2c0" } }, "DummyConnectors": { @@ -47,7 +50,8 @@ "aliases": { "emulator": "045a1763c93006ca", "testing": "0000000000000008", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "ERC4626PriceOracles": { @@ -57,7 +61,8 @@ "mainnet": "04f5ae6bef48c1fc", "mainnet-fork": "04f5ae6bef48c1fc", "testing": "0000000000000009", - "testnet": "7014dcffa1f14186" + "testnet": "7014dcffa1f14186", + "testnet-fork": "7014dcffa1f14186" } }, "ERC4626SinkConnectors": { @@ -67,7 +72,8 @@ "mainnet": "04f5ae6bef48c1fc", "mainnet-fork": "04f5ae6bef48c1fc", "testing": "0000000000000009", - "testnet": "7014dcffa1f14186" + "testnet": "7014dcffa1f14186", + "testnet-fork": "7014dcffa1f14186" } }, "ERC4626SwapConnectors": { @@ -77,7 +83,8 @@ "mainnet": "04f5ae6bef48c1fc", "mainnet-fork": "04f5ae6bef48c1fc", "testing": "0000000000000009", - "testnet": "7014dcffa1f14186" + "testnet": "7014dcffa1f14186", + "testnet-fork": "7014dcffa1f14186" } }, "ERC4626Utils": { @@ -87,7 +94,8 @@ "mainnet": "04f5ae6bef48c1fc", "mainnet-fork": "04f5ae6bef48c1fc", "testing": "0000000000000009", - "testnet": "7014dcffa1f14186" + "testnet": "7014dcffa1f14186", + "testnet-fork": "7014dcffa1f14186" } }, "EVMAbiHelpers": { @@ -97,7 +105,8 @@ "mainnet": "a7825d405ac89518", "mainnet-fork": "a7825d405ac89518", "testing": "0000000000000007", - "testnet": "3ebb7d2595e97cd2" + "testnet": "3ebb7d2595e97cd2", + "testnet-fork": "3ebb7d2595e97cd2" } }, "EVMAmountUtils": { @@ -107,7 +116,8 @@ "mainnet": "43c9e8bfec507db4", "mainnet-fork": "43c9e8bfec507db4", "testing": "0000000000000009", - "testnet": "67402f29666f7b29" + "testnet": "67402f29666f7b29", + "testnet-fork": "67402f29666f7b29" } }, "EVMTokenConnectors": { @@ -117,7 +127,8 @@ "mainnet": "1a771b21fcceadc2", "mainnet-fork": "1a771b21fcceadc2", "testing": "0000000000000009", - "testnet": "b88ba0e976146cd1" + "testnet": "b88ba0e976146cd1", + "testnet-fork": "b88ba0e976146cd1" } }, "FlowALPMath": { @@ -127,7 +138,8 @@ "mainnet": "6b00ff876c299c61", "mainnet-fork": "6b00ff876c299c61", "testing": "0000000000000007", - "testnet": "426f0458ced60037" + "testnet": "426f0458ced60037", + "testnet-fork": "426f0458ced60037" } }, "FlowALPv0": { @@ -137,7 +149,8 @@ "mainnet": "6b00ff876c299c61", "mainnet-fork": "6b00ff876c299c61", "testing": "0000000000000008", - "testnet": "426f0458ced60037" + "testnet": "426f0458ced60037", + "testnet-fork": "426f0458ced60037" } }, "FlowYieldVaults": { @@ -147,7 +160,8 @@ "mainnet": "b1d63873c3cc9f79", "mainnet-fork": "b1d63873c3cc9f79", "testing": "0000000000000009", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "FlowYieldVaultsAutoBalancers": { @@ -157,7 +171,8 @@ "mainnet": "b1d63873c3cc9f79", "mainnet-fork": "b1d63873c3cc9f79", "testing": "0000000000000009", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "FlowYieldVaultsClosedBeta": { @@ -167,7 +182,8 @@ "mainnet": "b1d63873c3cc9f79", "mainnet-fork": "b1d63873c3cc9f79", "testing": "0000000000000009", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "FlowYieldVaultsSchedulerRegistry": { @@ -177,7 +193,8 @@ "mainnet": "b1d63873c3cc9f79", "mainnet-fork": "b1d63873c3cc9f79", "testing": "0000000000000009", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "FlowYieldVaultsSchedulerV1": { @@ -187,7 +204,8 @@ "mainnet": "b1d63873c3cc9f79", "mainnet-fork": "b1d63873c3cc9f79", "testing": "0000000000000009", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "FlowYieldVaultsStrategiesV2": { @@ -197,7 +215,8 @@ "mainnet": "b1d63873c3cc9f79", "mainnet-fork": "b1d63873c3cc9f79", "testing": "0000000000000009", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "FungibleTokenConnectors": { @@ -207,7 +226,8 @@ "mainnet": "0c237e1265caa7a3", "mainnet-fork": "0c237e1265caa7a3", "testing": "0000000000000007", - "testnet": "4cd02f8de4122c84" + "testnet": "4cd02f8de4122c84", + "testnet-fork": "4cd02f8de4122c84" } }, "MOET": { @@ -217,7 +237,8 @@ "mainnet": "6b00ff876c299c61", "mainnet-fork": "6b00ff876c299c61", "testing": "0000000000000008", - "testnet": "426f0458ced60037" + "testnet": "426f0458ced60037", + "testnet-fork": "426f0458ced60037" } }, "MockDexSwapper": { @@ -234,7 +255,8 @@ "mainnet": "b1d63873c3cc9f79", "mainnet-fork": "b1d63873c3cc9f79", "testing": "0000000000000009", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "MockStrategies": { @@ -244,7 +266,8 @@ "mainnet": "b1d63873c3cc9f79", "mainnet-fork": "b1d63873c3cc9f79", "testing": "0000000000000009", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "MockStrategy": { @@ -252,7 +275,8 @@ "aliases": { "emulator": "045a1763c93006ca", "testing": "0000000000000009", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "MockSwapper": { @@ -262,7 +286,8 @@ "mainnet": "b1d63873c3cc9f79", "mainnet-fork": "b1d63873c3cc9f79", "testing": "0000000000000009", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "MorphoERC4626SinkConnectors": { @@ -272,7 +297,8 @@ "mainnet": "251032a66e9700ef", "mainnet-fork": "251032a66e9700ef", "testing": "0000000000000009", - "testnet": "71144a1aff6b7148" + "testnet": "71144a1aff6b7148", + "testnet-fork": "71144a1aff6b7148" } }, "MorphoERC4626SwapConnectors": { @@ -282,7 +308,8 @@ "mainnet": "251032a66e9700ef", "mainnet-fork": "251032a66e9700ef", "testing": "0000000000000009", - "testnet": "71144a1aff6b7148" + "testnet": "71144a1aff6b7148", + "testnet-fork": "71144a1aff6b7148" } }, "PMStrategiesV1": { @@ -292,7 +319,8 @@ "mainnet": "b1d63873c3cc9f79", "mainnet-fork": "b1d63873c3cc9f79", "testing": "0000000000000009", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } }, "SwapConnectors": { @@ -302,7 +330,8 @@ "mainnet": "e1a479f0cb911df9", "mainnet-fork": "e1a479f0cb911df9", "testing": "0000000000000007", - "testnet": "ad228f1c13a97ec1" + "testnet": "ad228f1c13a97ec1", + "testnet-fork": "ad228f1c13a97ec1" } }, "UniswapV3SwapConnectors": { @@ -312,7 +341,8 @@ "mainnet": "a7825d405ac89518", "mainnet-fork": "a7825d405ac89518", "testing": "0000000000000007", - "testnet": "3ebb7d2595e97cd2" + "testnet": "3ebb7d2595e97cd2", + "testnet-fork": "3ebb7d2595e97cd2" } }, "YieldToken": { @@ -322,7 +352,8 @@ "mainnet": "b1d63873c3cc9f79", "mainnet-fork": "b1d63873c3cc9f79", "testing": "0000000000000010", - "testnet": "d2580caf2ef07c2f" + "testnet": "d2580caf2ef07c2f", + "testnet-fork": "d2580caf2ef07c2f" } } }, @@ -347,7 +378,8 @@ "mainnet": "6801a6222ebf784a", "mainnet-fork": "6801a6222ebf784a", "testing": "0000000000000007", - "testnet": "9fb6606c300b5051" + "testnet": "9fb6606c300b5051", + "testnet-fork": "9fb6606c300b5051" } }, "Burner": { @@ -358,7 +390,8 @@ "emulator": "f8d6e0586b0a20c7", "mainnet": "f233dcee88fe0abe", "mainnet-fork": "f233dcee88fe0abe", - "testnet": "9a0766d93b6608b7" + "testnet": "9a0766d93b6608b7", + "testnet-fork": "9a0766d93b6608b7" } }, "CrossVMMetadataViews": { @@ -369,7 +402,8 @@ "emulator": "f8d6e0586b0a20c7", "mainnet": "1d7e57aa55817448", "mainnet-fork": "1d7e57aa55817448", - "testnet": "631e88ae7f1d7c20" + "testnet": "631e88ae7f1d7c20", + "testnet-fork": "631e88ae7f1d7c20" } }, "CrossVMNFT": { @@ -392,7 +426,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "EVM": { @@ -403,7 +438,8 @@ "emulator": "f8d6e0586b0a20c7", "mainnet": "e467b9dd11fa00df", "mainnet-fork": "e467b9dd11fa00df", - "testnet": "8c5303eaa26202d6" + "testnet": "8c5303eaa26202d6", + "testnet-fork": "8c5303eaa26202d6" } }, "FlowEVMBridge": { @@ -415,7 +451,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowEVMBridgeAccessor": { @@ -427,7 +464,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowEVMBridgeConfig": { @@ -439,7 +477,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowEVMBridgeCustomAssociationTypes": { @@ -451,7 +490,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowEVMBridgeCustomAssociations": { @@ -463,7 +503,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowEVMBridgeHandlerInterfaces": { @@ -475,7 +516,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowEVMBridgeHandlers": { @@ -487,7 +529,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowEVMBridgeNFTEscrow": { @@ -499,7 +542,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowEVMBridgeResolver": { @@ -511,7 +555,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowEVMBridgeTemplates": { @@ -523,7 +568,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowEVMBridgeTokenEscrow": { @@ -535,7 +581,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowEVMBridgeUtils": { @@ -547,7 +594,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "FlowFees": { @@ -558,7 +606,8 @@ "emulator": "e5a8b7f23e8b548f", "mainnet": "f919ee77447b7497", "mainnet-fork": "f919ee77447b7497", - "testnet": "912d5440f7e3769e" + "testnet": "912d5440f7e3769e", + "testnet-fork": "912d5440f7e3769e" } }, "FlowStorageFees": { @@ -569,7 +618,8 @@ "emulator": "f8d6e0586b0a20c7", "mainnet": "e467b9dd11fa00df", "mainnet-fork": "e467b9dd11fa00df", - "testnet": "8c5303eaa26202d6" + "testnet": "8c5303eaa26202d6", + "testnet-fork": "8c5303eaa26202d6" } }, "FlowToken": { @@ -580,7 +630,8 @@ "emulator": "0ae53cb6e3f42a79", "mainnet": "1654653399040a61", "mainnet-fork": "1654653399040a61", - "testnet": "7e60df042a9c0868" + "testnet": "7e60df042a9c0868", + "testnet-fork": "7e60df042a9c0868" } }, "FlowTransactionScheduler": { @@ -591,7 +642,8 @@ "emulator": "f8d6e0586b0a20c7", "mainnet": "e467b9dd11fa00df", "mainnet-fork": "e467b9dd11fa00df", - "testnet": "8c5303eaa26202d6" + "testnet": "8c5303eaa26202d6", + "testnet-fork": "8c5303eaa26202d6" } }, "FlowTransactionSchedulerUtils": { @@ -602,7 +654,8 @@ "emulator": "f8d6e0586b0a20c7", "mainnet": "e467b9dd11fa00df", "mainnet-fork": "e467b9dd11fa00df", - "testnet": "8c5303eaa26202d6" + "testnet": "8c5303eaa26202d6", + "testnet-fork": "8c5303eaa26202d6" } }, "FungibleToken": { @@ -613,7 +666,8 @@ "emulator": "ee82856bf20e2aa6", "mainnet": "f233dcee88fe0abe", "mainnet-fork": "f233dcee88fe0abe", - "testnet": "9a0766d93b6608b7" + "testnet": "9a0766d93b6608b7", + "testnet-fork": "9a0766d93b6608b7" } }, "FungibleTokenMetadataViews": { @@ -624,7 +678,8 @@ "emulator": "ee82856bf20e2aa6", "mainnet": "f233dcee88fe0abe", "mainnet-fork": "f233dcee88fe0abe", - "testnet": "9a0766d93b6608b7" + "testnet": "9a0766d93b6608b7", + "testnet-fork": "9a0766d93b6608b7" } }, "IBridgePermissions": { @@ -635,7 +690,8 @@ "emulator": "f8d6e0586b0a20c7", "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "ICrossVM": { @@ -647,7 +703,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "ICrossVMAsset": { @@ -659,7 +716,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "IEVMBridgeNFTMinter": { @@ -671,7 +729,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "IEVMBridgeTokenMinter": { @@ -683,7 +742,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "IFlowEVMNFTBridge": { @@ -695,7 +755,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "IFlowEVMTokenBridge": { @@ -707,7 +768,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "MetadataViews": { @@ -718,7 +780,8 @@ "emulator": "f8d6e0586b0a20c7", "mainnet": "1d7e57aa55817448", "mainnet-fork": "1d7e57aa55817448", - "testnet": "631e88ae7f1d7c20" + "testnet": "631e88ae7f1d7c20", + "testnet-fork": "631e88ae7f1d7c20" } }, "NonFungibleToken": { @@ -729,7 +792,8 @@ "emulator": "f8d6e0586b0a20c7", "mainnet": "1d7e57aa55817448", "mainnet-fork": "1d7e57aa55817448", - "testnet": "631e88ae7f1d7c20" + "testnet": "631e88ae7f1d7c20", + "testnet-fork": "631e88ae7f1d7c20" } }, "ScopedFTProviders": { @@ -741,7 +805,8 @@ "mainnet": "1e4aa0b87d10b141", "mainnet-fork": "1e4aa0b87d10b141", "testing": "0000000000000001", - "testnet": "dfc20aee650fcbdf" + "testnet": "dfc20aee650fcbdf", + "testnet-fork": "dfc20aee650fcbdf" } }, "Serialize": { @@ -862,7 +927,8 @@ "emulator": "f8d6e0586b0a20c7", "mainnet": "1d7e57aa55817448", "mainnet-fork": "1d7e57aa55817448", - "testnet": "631e88ae7f1d7c20" + "testnet": "631e88ae7f1d7c20", + "testnet-fork": "631e88ae7f1d7c20" } } }, @@ -874,7 +940,11 @@ "fork": "mainnet" }, "testing": "127.0.0.1:3569", - "testnet": "access.devnet.nodes.onflow.org:9000" + "testnet": "access.devnet.nodes.onflow.org:9000", + "testnet-fork": { + "host": "127.0.0.1:3569", + "fork": "testnet" + } }, "accounts": { "emulator-account": { @@ -958,6 +1028,14 @@ "resourceID": "projects/dl-flow-devex-staging/locations/us-central1/keyRings/tidal-keyring/cryptoKeys/tidal_admin_pk/cryptoKeyVersions/1" } }, + "testnet-fork-admin": { + "address": "d2580caf2ef07c2f", + "key": { + "type": "file", + "location": "local/emulator-account.pkey" + } + + }, "testnet-flow-alp-deployer": { "address": "426f0458ced60037", "key": { @@ -1207,7 +1285,68 @@ "FlowYieldVaultsSchedulerV1", "FlowYieldVaultsClosedBeta", "FlowYieldVaults", - "MockStrategies", + { + "name": "FlowYieldVaultsStrategiesV2", + "args": [ + { + "value": "0x92657b195e22b69E4779BBD09Fa3CD46F0CF8e39", + "type": "String" + }, + { + "value": "0x2Db6468229F6fB1a77d248Dbb1c386760C257804", + "type": "String" + }, + { + "value": "0xA1e0E4CCACA34a738f03cFB1EAbAb16331FA3E2c", + "type": "String" + } + ] + }, + { + "name": "PMStrategiesV1", + "args": [ + { + "value": "0x92657b195e22b69E4779BBD09Fa3CD46F0CF8e39", + "type": "String" + }, + { + "value": "0x2Db6468229F6fB1a77d248Dbb1c386760C257804", + "type": "String" + }, + { + "value": "0xA1e0E4CCACA34a738f03cFB1EAbAb16331FA3E2c", + "type": "String" + } + ] + } + ] + }, + "testnet-fork": { + "testnet-fork-admin": [ + { + "name": "YieldToken", + "args": [ + { + "value": "1000000.00000000", + "type": "UFix64" + } + ] + }, + { + "name": "MockOracle", + "args": [ + { + "value": "A.426f0458ced60037.MOET.Vault", + "type": "String" + } + ] + }, + "MockSwapper", + "FlowYieldVaultsSchedulerRegistry", + "FlowYieldVaultsAutoBalancers", + "FlowYieldVaultsSchedulerV1", + "FlowYieldVaultsClosedBeta", + "FlowYieldVaults", { "name": "FlowYieldVaultsStrategiesV2", "args": [ @@ -1245,4 +1384,4 @@ ] } } -} \ No newline at end of file +} diff --git a/local/setup_emulator.sh b/local/setup_emulator.sh index 730950c2..d7d8f990 100755 --- a/local/setup_emulator.sh +++ b/local/setup_emulator.sh @@ -41,7 +41,7 @@ flow transactions send ./cadence/transactions/mocks/swapper/set_liquidity_connec flow transactions send ./cadence/transactions/flow-yield-vaults/admin/add_strategy_composer.cdc \ 'A.045a1763c93006ca.MockStrategies.TracerStrategy' \ 'A.045a1763c93006ca.MockStrategies.TracerStrategyComposer' \ - /storage/FlowYieldVaultsStrategyComposerIssuer_0x045a1763c93006ca \ + /storage/MockStrategiesComposerIssuer_0x045a1763c93006ca \ --signer emulator-flow-yield-vaults # flow transactions send ../cadence/transactions/flow-yield-vaults/admin/upsert_musdf_config.cdc \