diff --git a/scripts/SetupDeployedTransmuter.s.sol b/scripts/SetupDeployedTransmuter.s.sol index ca7b211c..c9accb42 100644 --- a/scripts/SetupDeployedTransmuter.s.sol +++ b/scripts/SetupDeployedTransmuter.s.sol @@ -166,8 +166,7 @@ contract SetupDeployedTransmuter is Utils { bytes memory oracleConfig; { - // TODO: replace with Morpho steakUSDC/USD oracle address - bytes memory readData = abi.encode(0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6, BASE_18); + bytes memory readData = abi.encode(0x025106374196586E8BC91eE8818dD7B0Efd2B78B, BASE_18); // Current price is 1.012534 -> we take a small margin uint256 startPrice = IERC4626(STEAK_USDC).previewRedeem(1e30); bytes memory targetData = abi.encode( @@ -211,11 +210,13 @@ contract SetupDeployedTransmuter is Utils { // Set whitelist status for bIB01 bytes memory whitelistData = abi.encode( Storage.WhitelistType.BACKED, - // TODO: Keyring whitelist check abi.encode(address(0x9391B14dB2d43687Ea1f6E546390ED4b20766c46)) ); usdaTransmuter.setWhitelistStatus(BIB01, 1, whitelistData); + usdaTransmuter.toggleTrusted(NEW_DEPLOYER, Storage.TrustedType.Seller); + usdaTransmuter.toggleTrusted(NEW_KEEPER, Storage.TrustedType.Seller); + console.log("Transmuter setup"); vm.stopBroadcast(); } diff --git a/test/scripts/UpdateTransmuterFacetsUSDATest.t.sol b/test/scripts/UpdateTransmuterFacetsUSDATest.t.sol index dc967c49..93a288db 100644 --- a/test/scripts/UpdateTransmuterFacetsUSDATest.t.sol +++ b/test/scripts/UpdateTransmuterFacetsUSDATest.t.sol @@ -266,9 +266,7 @@ contract UpdateTransmuterFacetsUSDATest is Helpers, Test { bytes memory oracleConfig; { - // TODO: replace with Morpho steakUSDC/USD oracle address - MockMorphoOracle morphoOracle = new MockMorphoOracle(1013000000000000000); - bytes memory readData = abi.encode(address(morphoOracle), 1); + bytes memory readData = abi.encode(0x025106374196586E8BC91eE8818dD7B0Efd2B78B, BASE_18); // Current price is 1.012534 -> we take a small margin bytes memory targetData = abi.encode( 1013000000000000000, @@ -313,11 +311,14 @@ contract UpdateTransmuterFacetsUSDATest is Helpers, Test { bytes memory whitelistData = abi.encode( WhitelistType.BACKED, // Keyring whitelist check - abi.encode(address(0x4954c61984180868495D1a7Fb193b05a2cbd9dE3)) + abi.encode(address(0x9391B14dB2d43687Ea1f6E546390ED4b20766c46)) ); transmuter.setWhitelistStatus(BIB01, 1, whitelistData); transmuter.toggleWhitelist(Storage.WhitelistType.BACKED, WHALE_USDA); + transmuter.toggleTrusted(NEW_DEPLOYER, Storage.TrustedType.Seller); + transmuter.toggleTrusted(NEW_KEEPER, Storage.TrustedType.Seller); + vm.stopPrank(); } @@ -459,11 +460,11 @@ contract UpdateTransmuterFacetsUSDATest is Helpers, Test { assertEq(transmuter.isTrusted(DEPLOYER), false); assertEq(transmuter.isTrustedSeller(DEPLOYER), false); assertEq(transmuter.isTrusted(NEW_DEPLOYER), false); - assertEq(transmuter.isTrustedSeller(NEW_DEPLOYER), false); + assertEq(transmuter.isTrustedSeller(NEW_DEPLOYER), true); assertEq(transmuter.isTrusted(KEEPER), false); assertEq(transmuter.isTrustedSeller(KEEPER), false); assertEq(transmuter.isTrusted(NEW_KEEPER), false); - assertEq(transmuter.isTrustedSeller(NEW_KEEPER), false); + assertEq(transmuter.isTrustedSeller(NEW_KEEPER), true); } function testUnit_UpgradeUSDA_IsWhitelistedForCollateral() external {