Skip to content

Commit

Permalink
✅ change fork block number + debt setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Flocqst committed Nov 2, 2024
1 parent ec296b1 commit 9b955ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions test/Unwind.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,17 @@ contract UnwindTest is Bootstrap {
address(0x72A8EA777f5Aa58a1E5a405931e2ccb455B60088);
uint128 public constant ACCOUNT_ID =
170_141_183_460_469_231_731_687_303_715_884_105_766;
uint256 public constant INITIAL_DEBT = 3_476_723_239_659_051_520;
uint256 public constant INITIAL_DEBT = 2_244_714_058_540_271_627;

address constant USDC_ADDR = 0xaf88d065e77c8cC2239327C5EDb3A432268e5831;
address constant WETH_ADDR = 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1;

// 1600104571620674
uint256 SWAP_AMOUNT = 1_863_937_271_005_953;
uint256 SWAP_AMOUNT = 1_352_346_556_314_334;

bytes swapPath;
string pathId;

function setUp() public {
// block 269969820
vm.rollFork(ARBITRUM_BLOCK_NUMBER);
initializeArbitrum();

Expand All @@ -52,7 +50,7 @@ contract UnwindTest is Bootstrap {
// update data corresponding to the USDC price feed at block.timestamp
bytes[] memory updateData = new bytes[](1);
updateData[0] =
hex"504e41550100000003b801000000040d001f911549a7a42d309d3843688e51d5b9b6c5c230b881c5ea10d581f4f5fb9dc034b7a4d720977ebb23d73464b3f20dfb86e7247f6d40ef64607c7705ace7d9100103105c8e6139881c163c207f5ce97bc085287ad3478d3e7fc18a34ac8ca5e123965b2c4a02a2b40f25ac648406fbfd3909bc8afe071504157fde4025fb419c271700042a8db53799cc1e7b0077839f3db90e968c4551e29db56184c0cba1b42c574dda0140d9ed330d810d7d88d57ce12a7eeefab20c657077c54753bd1926aece427a00068dc50aee0f692d483d0956dae6d33362a3e8b638d753de31fefe0c49d79a08d83d752912bb632ad6840221c7712c521fee6895a6efe8906d7e05cff84436a405010824e28ae6227e2996f43685e4e0627e74a3cbb83d1976a9cf83f264e85491c8b47731ef415fb2a6f4aec39aa949b4962fde49e59d39c1baa07c79f2a9c0ee2aa7000a02290a4d4ab221747e13b948e5557d4af70abe5deb86c9ff5c85336bbe7015cf458a44933a2d8483b60f4e84c01136a10495e6dc16997fee21784d6881758013000cbc00a65025e54954cffe3a0d198072a6d6c00cd8b1c8d6de320569830adf0eff6263e5faf67bd5710de9f2697727dc39e04c07d90fb88a7fde6339d1e30c490c000da02ceecf3294b31d60cadc7e6f34b60fcb6c9dbec9e5e560d0d9268240c57e497ca6ce35b389d28d580e42a4c8ca4271c0f788a983a66ec2fc6fef1495b78ab0000e22ab527f8ffa1de4c72a43e08533785ceefe564226ae740dcd5b722288b3c32874c3af15d8b693dea0122095d787d84de43e8a35c1cdc26f950405b29c25bfac000ffb1dae60878c8f740080827816f1e184fa2cfa6c21079402d1c9485a6cce541658f511c8bdc6b1500f7adc2c8bf7334243af1d5b10cbb8659822dd634ffc316c001095504651aec239a0f65a6999801bfe477aa60cecfd34358cfba36be35548357b641b2e0a073c9e09e2cd7799ba42a8ed976c715d43c4d9244ea5b99ef0dfb8560111377924dcaba0deaa97fb683fda1da22742d37c4dd2aba24f25d3a1f31f21651f64250c3d48e6801783abf0c03fbfce4cccecb540bc442b94637556f05e5cdb790112daff1ac205840bd65d97c6f939e7e0c91d7c12b4f2d2981da4688d909c793287679cd8ba1ea16007a60bd4e7125e45b7a58278d8d16d425a2acc6c24c171c89701672501c600000000001ae101faedac5851e32b9b23b5f9411a8c2bac4aae3ed4dd7b811dd1a72ea4aa71000000000563771b014155575600000000000a7041600000271040db12dad32cacbf3eab08562f8886303fb3cfdb01005500eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a0000000005f5e12500000000000118b7fffffff800000000672501c600000000672501c50000000005f5c85500000000000119520afd50d1b06c773e3d4cfb305f6094a62f4598af7bdc391d4a165511ebfd94f19cae1ccecee0b77b19e5b73ccc7f0f5f33f71acfacdbe33be615c7a8f4345eb3f5f027d6077e3bd0cddca11f6e8c40b7abe418cf37e66406eeae267af42f63d9fa6afac62e257ea758a778f23098b54c0cf07f3e3cb52c5f78be7e3511032e90ca52e46ac2310e28e7003b5b23244794619cc3ec4e3eee2f57c494638c743b4c7f7adffb702e24a40303177c461a2306ce99df7780ce380849efda772f065caa02820d2d1437ccc0ae";
hex"504e41550100000003b801000000040d00a8f4b75b298056eec7c850b063a86e662469f2dcba5b2dece3800ad96a7e58b53a341951f9bdb90e3be69316f0f3943db4fca7daaa312e665dd8649f637b17340103b87fdacf139b256d1b9be2295a192285f425c7fdbc00374fe16e6cbd211c17df55cf0b3d1bc82c1f4e4af50882f6e1e817c9c0d8115220381bb9db3cf98ce4590104868ff10154e07cd5879b04b34dfdd0ce39a309e51105aa3b8826cb7aa53fdbbc1dc07f4537a6d2cd2407ae34d679b8ff04fcafecb70b422c79adbb39e10ebfef0006c9a8afefeaeb75de5220ad8f90c47e3c27f0cbdf8b7a7032deb71b29abf3672c1f2ed9aa661dde492407bb87a0b2f9fcb3ee9e8216d87074d41683c5d88548290008714b96d791878d33f000ea4203f84f00f054313a612927a4350463b34ef75b9720f6e6bd35cb562990c80e896e162a6bd40ac5cc6b6a8e7b31088e266477eb37010ba577fb747fb1ea1a2e2518f86e6a82966c93eff675a15f57d6ac9aa0c6822ae70f6b2cd47bfcbb97061ed2a68ef1351a0ec488b9e379e5565dc9299cd17dbfaa000cc7a13d14f93d64d41fed0ec8220c509cdadcee117f549316c99770f46f4181697a447fa434dd9eb6e844283d3958bc3894f7f319918c624fa8ad8aa303de5d3d000d3f2de428664bf2b1d7eadf45975c836f314fbb4a2555bdc6b44173aaeb296a87096cb2901c01fa728c311e3a1850ea059dd6d7078a304af0f41e08b0de512341010ec4d0573d38497ac40d9907bfd719fe8e1dad361df52705705505b0d36fa11d6a7c0e5d0e104a869c0d2a9efb3c7950990867388f0d5c38118f367b3f02af1404000f9b310d14de9c9aa94d9333af826fd86e42eca2d31a8b05a60341e2a67fed0d2443251998d7d20560b49454c8ab04ed2c57897253a5eb8ca57eb14c9881e03e6b0110197c27d83381978f0f59d7ab0d6e220f0819f69c29194f873e8174f51dfdb1841d3cd1dc4e51e07708036f278c60ad9f8261ea65eb01475f9256a85c7382f0c201111ea40f41e4b524f425691fb83dfa36e9797d5294ce0580810d0b1afdb017e26e33c340138c79d56d32d189e97a4aba0d5f65539d26d986e5085ffa2cab6fc04d01124f9272dda70e019fb8e9b2db5a1f8183b13b4f68a4514fb3a23a730e794ad27162698908a116904635fcc736031bf0513a78dec73fc0d6247c26503222878ded0067258cf700000000001ae101faedac5851e32b9b23b5f9411a8c2bac4aae3ed4dd7b811dd1a72ea4aa71000000000564d5b4014155575600000000000a719ff90000271078a9ea58b123a752febe0b3aee38a09a1f4a8bff01005500eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a0000000005f5c6bc000000000000f8edfffffff80000000067258cf70000000067258cf60000000005f5c743000000000000fe050a1da36d5d990b156209effe9e5f63c7b2b42f4c5823ee5b4339eac7c840f0f125614e0199743e70251c2e05d61c506bfbc2e6c35bdcba82e2d8a29976667167062e9be9d49d361f0ee7ba15b327d1be67925f3547b826e1fe4c8fa002534d62acfb1bc167138c45b0bae1a81e0d8bda8e2e5471945c48f53b5b8b6ab80e4b892aa601662427827aaca03b35374e35c799f3bcbc8868ef45fb28cd5f0a34f33e462f5b91841f86d0c86621de1f7c9f0c10f02931cd0cc06d6becb4d476e1d2e1b328c04674f11dd641";

vm.deal(address(this), 100);
// Update the prices
Expand Down Expand Up @@ -99,10 +97,10 @@ contract UnwindTest is Bootstrap {
engine.unwindCollateral({
_accountId: ACCOUNT_ID,
_collateralId: 4,
_collateralAmount: 39_000_000_000_000_000,
_collateralAmount: 36_000_000_000_000_000,
_collateral: WETH_ADDR,
_zapMinAmountOut: 3_441_957_000_000_000_000,
_unwrapMinAmountOut: 38_961_000_000_000_000,
_zapMinAmountOut: 2_222_267_000_000_000_000,
_unwrapMinAmountOut: 35_964_000_000_000_000,
_swapMaxAmountIn: SWAP_AMOUNT,
_path: swapPath
});
Expand Down
2 changes: 1 addition & 1 deletion test/utils/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity 0.8.27;
/// @title Contract for defining constants used in testing
/// @author JaredBorders ([email protected])
contract Constants {
uint256 public constant ARBITRUM_BLOCK_NUMBER = 269_969_820;
uint256 public constant ARBITRUM_BLOCK_NUMBER = 270_111_400;

address internal constant OWNER = address(0x01);

Expand Down

0 comments on commit 9b955ad

Please sign in to comment.