From ad57c8fe4dadb19327c1826dd326422d11d5a879 Mon Sep 17 00:00:00 2001 From: jar-o Date: Mon, 12 Feb 2024 15:25:47 -0700 Subject: [PATCH] Remove offboarded assets --- src/MegaPoker.sol | 8 -------- src/MegaPoker.t.sol | 14 -------------- 2 files changed, 22 deletions(-) diff --git a/src/MegaPoker.sol b/src/MegaPoker.sol index 369ab13..405bc0e 100644 --- a/src/MegaPoker.sol +++ b/src/MegaPoker.sol @@ -22,10 +22,8 @@ contract PokingAddresses { // OSMs address constant btc = 0xf185d0682d50819263941e5f4EacC763CC5C6C42; address constant eth = 0x81FE72B5A8d1A857d176C3E7d5Bd2679A9B85763; - address constant reth = 0xeE7F0b350aA119b3d05DC733a4621a81972f7D47; address constant wsteth = 0xFe7a2aC0B945f12089aEEB6eCebf4F384D9f043F; - address constant crvv1ethsteth = 0xEa508F82728927454bd3ce853171b0e2705880D4; address constant guniv3daiusdc1 = 0x7F6d78CC0040c87943a0e0c140De3F77a273bd58; address constant guniv3daiusdc2 = 0xcCBa43231aC6eceBd1278B90c3a44711a00F4e93; address constant univ2daiusdc = 0x25D03C2C928ADE19ff9f4FFECc07d991d0df054B; @@ -44,14 +42,12 @@ contract MegaPoker is PokingAddresses { // poke() = 0x18178358 (ok,) = btc.call(abi.encodeWithSelector(0x18178358)); (ok,) = eth.call(abi.encodeWithSelector(0x18178358)); - (ok,) = reth.call(abi.encodeWithSelector(0x18178358)); (ok,) = wsteth.call(abi.encodeWithSelector(0x18178358)); // poke(bytes32) = 0x1504460f (ok,) = spotter.call(abi.encodeWithSelector(0x1504460f, bytes32("ETH-A"))); (ok,) = spotter.call(abi.encodeWithSelector(0x1504460f, bytes32("ETH-B"))); (ok,) = spotter.call(abi.encodeWithSelector(0x1504460f, bytes32("ETH-C"))); - (ok,) = spotter.call(abi.encodeWithSelector(0x1504460f, bytes32("RETH-A"))); (ok,) = spotter.call(abi.encodeWithSelector(0x1504460f, bytes32("WBTC-A"))); (ok,) = spotter.call(abi.encodeWithSelector(0x1504460f, bytes32("WBTC-B"))); (ok,) = spotter.call(abi.encodeWithSelector(0x1504460f, bytes32("WBTC-C"))); @@ -60,9 +56,6 @@ contract MegaPoker is PokingAddresses { // Daily pokes, i.e. reduced cost pokes if (last <= block.timestamp - 1 days) { - // Poke - (ok,) = crvv1ethsteth.call(abi.encodeWithSelector(0x18178358)); - // The GUINIV3DAIUSDCX Oracles are very expensive to poke, and the // price should not change frequently, so they are getting poked // only once a day. @@ -72,7 +65,6 @@ contract MegaPoker is PokingAddresses { (ok,) = univ2daiusdc.call(abi.encodeWithSelector(0x18178358)); // Spotter pokes - (ok,) = spotter.call(abi.encodeWithSelector(0x1504460f, bytes32("CRVV1ETHSTETH-A"))); (ok,) = spotter.call(abi.encodeWithSelector(0x1504460f, bytes32("GUNIV3DAIUSDC1-A"))); (ok,) = spotter.call(abi.encodeWithSelector(0x1504460f, bytes32("GUNIV3DAIUSDC2-A"))); (ok,) = spotter.call(abi.encodeWithSelector(0x1504460f, bytes32("UNIV2DAIUSDC-A"))); diff --git a/src/MegaPoker.t.sol b/src/MegaPoker.t.sol index 3aac469..e00d043 100644 --- a/src/MegaPoker.t.sol +++ b/src/MegaPoker.t.sol @@ -166,21 +166,17 @@ contract MegaPokerTest is DSTest, PokingAddresses { // Hacking nxt price to 0x123 (and making it valid) bytes32 hackedValue = 0x0000000000000000000000000000000100000000000000000000000000000123; hevm.store(btc, bytes32(uint256(4)), hackedValue); - hevm.store(crvv1ethsteth, bytes32(uint256(4)), hackedValue); hevm.store(eth, bytes32(uint256(4)), hackedValue); hevm.store(guniv3daiusdc1, bytes32(uint256(4)), hackedValue); hevm.store(guniv3daiusdc2, bytes32(uint256(4)), hackedValue); - hevm.store(reth, bytes32(uint256(4)), hackedValue); hevm.store(univ2daiusdc, bytes32(uint256(4)), hackedValue); hevm.store(wsteth, bytes32(uint256(4)), hackedValue); // Whitelisting tester address hevm.store(btc, keccak256(abi.encode(address(this), uint256(5))), bytes32(uint256(1))); - hevm.store(crvv1ethsteth, keccak256(abi.encode(address(this), uint256(2))), bytes32(uint256(1))); hevm.store(eth, keccak256(abi.encode(address(this), uint256(5))), bytes32(uint256(1))); hevm.store(guniv3daiusdc1, keccak256(abi.encode(address(this), uint256(2))), bytes32(uint256(1))); hevm.store(guniv3daiusdc2, keccak256(abi.encode(address(this), uint256(2))), bytes32(uint256(1))); - hevm.store(reth, keccak256(abi.encode(address(this), uint256(5))), bytes32(uint256(1))); hevm.store(univ2daiusdc, keccak256(abi.encode(address(this), uint256(2))), bytes32(uint256(1))); hevm.store(wsteth, keccak256(abi.encode(address(this), uint256(5))), bytes32(uint256(1))); @@ -189,10 +185,8 @@ contract MegaPokerTest is DSTest, PokingAddresses { assertTrue(OsmLike(btc).read() != hackedValue); assertTrue(OsmLike(eth).read() != hackedValue); - assertTrue(OsmLike(reth).read() != hackedValue); assertTrue(OsmLike(wsteth).read() != hackedValue); - assertTrue(OsmLike(crvv1ethsteth).read() != hackedValue); assertTrue(OsmLike(guniv3daiusdc1).read() != hackedValue); assertTrue(OsmLike(guniv3daiusdc2).read() != hackedValue); assertTrue(OsmLike(univ2daiusdc).read() != hackedValue); @@ -202,11 +196,9 @@ contract MegaPokerTest is DSTest, PokingAddresses { assertEq(OsmLike(btc).read(), hackedValue); assertEq(OsmLike(eth).read(), hackedValue); - assertEq(OsmLike(reth).read(), hackedValue); assertEq(OsmLike(wsteth).read(), hackedValue); // Daily OSM's are not updated after one hour - assertTrue(OsmLike(crvv1ethsteth).read() != hackedValue); assertTrue(OsmLike(guniv3daiusdc1).read() != hackedValue); assertTrue(OsmLike(guniv3daiusdc2).read() != hackedValue); assertTrue(OsmLike(univ2daiusdc).read() != hackedValue); @@ -240,14 +232,8 @@ contract MegaPokerTest is DSTest, PokingAddresses { (, mat) = SpotLike(spotter).ilks("WBTC-C"); (,, spot,,) = VatLike(vat).ilks("WBTC-C"); assertEq(spot, _rdiv(value, mat)); - (, mat) = SpotLike(spotter).ilks("RETH-A"); - (,, spot,,) = VatLike(vat).ilks("RETH-A"); - assertEq(spot, _rdiv(value, mat)); // These collateral types should not be updated after 1 hour - (, mat) = SpotLike(spotter).ilks("CRVV1ETHSTETH-A"); - (,, spot,,) = VatLike(vat).ilks("CRVV1ETHSTETH-A"); - assertTrue(spot != _rdiv(value, mat)); (, mat) = SpotLike(spotter).ilks("GUNIV3DAIUSDC1-A"); (,, spot,,) = VatLike(vat).ilks("GUNIV3DAIUSDC1-A"); assertTrue(spot != _rdiv(value, mat));