Skip to content

Commit

Permalink
✅ change fork block number
Browse files Browse the repository at this point in the history
  • Loading branch information
Flocqst committed Nov 1, 2024
1 parent ff40961 commit 08bfe28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions test/Unwind.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ 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 = 2_904_906_141_298_364_509;
uint256 public constant INITIAL_DEBT = 3_476_723_239_659_051_520;

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

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

bytes swapPath;
string pathId;

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

Expand All @@ -51,7 +52,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"504e41550100000003b801000000040d00dc854c59882b895d2eb769d2559b81a64093cd33b44a1b20fe41ef7866b118ac6bd20770017013ede5e129d7e562b91f32909538a395c5a253c4fffd306f6d5801023a79d8e30e6bd4417813571cb4eb53de79858ef9bcc98027ada84f141a28f4113b445a98c0e57f8e787e0c6ae8f3e8de7dd9397005826bb7069d25f8614e62010004171720e1d6d75a0c6f82e178f60d482ada337a5ba0f0abfafee05f7d999df73c3e7c71945e62b6f46482f9df6f71752fb04b28d92cd3b3af47dca04ea0367a940006b18df51b50f97c401347bb7eb5928244ae709ef083ede52c28afcd2c4dbc39c10327681a58c0f74855d8518fa69f44de6471d288761d61927e1b51011e28c7e60008a22bfb8b4e67800ee1c54f36f17a1facdb175260e557a9b0fc1fd61926fafa680558a1b29aba7fb4da3746c77dde777fb205a38b253c25305938edb5cfac8251000aa34599bf78d4c06e395df0ccf2a4ea9b71c2df4ed94a3d1113919a90d767a87e48d0d8e978585ccebb7edf658ab8269d711b4ade95cbe9e59e789e3e991165a6010bae42b5249bd26eb21a322f6a20ff07e773d73a3e0a6804c17ed0d59c04ab996f076183f8b7286ef7f4609e3fd3170c0375cf2c4ce4d310bf23ce96a37240d7ab010c684832ce08eeca8a45b1d730c6a4839480ff912f58e6d7717a6559d8b17551af4fce73b988c77baf7650acf8276eb4a4707c01ec7260329abee71438cad90d33010d962a8280687cf3028b1ee9bdd07987e371a85a944a1e2d3dc85bc36213d948cf634b182b7a063ea4ddc80fe9fac099eb819f561cd8327a2ec25261a37fab20e0000e42c83cf7511c16c44fe9f098abb588f83bd4a301a5fbfb24dfdf7be62cd7405307a748593c5b70b9196cf3f60b5711264e6054729dbbdfcb539f86f760d19999000f5f73476ea4037daab49b1b5bc81ff258b797cad6ee10ece23055869a0a6d1656684dca9d9e9cebb886ec5c9746ba0c06dc8ad6e25c703630c31a1a98941cc10e001109a7e439174bf54bf081553872ebc178a9991123299a6982f3bb8148389c937f29d17327f43e01dfa3562e138620063fd448914d2756c20a80cff21e29d5cb640012e2cc21e7baa30c116548770443983c854061858fb0a49344ed47a4f53ebc5753521d2eadfbf701eef518ca80b13581a63817167bd89bf3ff6902388332bd4e75016724e55c00000000001ae101faedac5851e32b9b23b5f9411a8c2bac4aae3ed4dd7b811dd1a72ea4aa710000000005632fd3014155575600000000000a6ffa1400002710f308eea15cf1b00498b2e14f0678841431e664be01005500eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a0000000005f5d40300000000000136ddfffffff8000000006724e55c000000006724e55b0000000005f5d5d600000000000170c50a0e13d5dac884f1244bb5ff8607ca017197c70fa74b4ca9959b5fcb7291e0df1d0e28aa53277e03b8ec12159dc1698fca5aca93b12f40b85f80a6579417cd88e645241fe9d12b46141116be7dfa8eba3d9939a69f7b3fc4df243ba7da496137a132a6b9240bcf63034a8bb14625fc2b5c9dc840e1cdc36b5ebc736a8d4e82a617da80db66e03a30d95a09a33976f10348187e3d99162b179ddfd418df929139f4aa76b2020622c682f938dfa3629ce9473338fce9e9cc76170caf92b307893c30bfaa9f8ec077cee2";
hex"504e41550100000003b801000000040d001f911549a7a42d309d3843688e51d5b9b6c5c230b881c5ea10d581f4f5fb9dc034b7a4d720977ebb23d73464b3f20dfb86e7247f6d40ef64607c7705ace7d9100103105c8e6139881c163c207f5ce97bc085287ad3478d3e7fc18a34ac8ca5e123965b2c4a02a2b40f25ac648406fbfd3909bc8afe071504157fde4025fb419c271700042a8db53799cc1e7b0077839f3db90e968c4551e29db56184c0cba1b42c574dda0140d9ed330d810d7d88d57ce12a7eeefab20c657077c54753bd1926aece427a00068dc50aee0f692d483d0956dae6d33362a3e8b638d753de31fefe0c49d79a08d83d752912bb632ad6840221c7712c521fee6895a6efe8906d7e05cff84436a405010824e28ae6227e2996f43685e4e0627e74a3cbb83d1976a9cf83f264e85491c8b47731ef415fb2a6f4aec39aa949b4962fde49e59d39c1baa07c79f2a9c0ee2aa7000a02290a4d4ab221747e13b948e5557d4af70abe5deb86c9ff5c85336bbe7015cf458a44933a2d8483b60f4e84c01136a10495e6dc16997fee21784d6881758013000cbc00a65025e54954cffe3a0d198072a6d6c00cd8b1c8d6de320569830adf0eff6263e5faf67bd5710de9f2697727dc39e04c07d90fb88a7fde6339d1e30c490c000da02ceecf3294b31d60cadc7e6f34b60fcb6c9dbec9e5e560d0d9268240c57e497ca6ce35b389d28d580e42a4c8ca4271c0f788a983a66ec2fc6fef1495b78ab0000e22ab527f8ffa1de4c72a43e08533785ceefe564226ae740dcd5b722288b3c32874c3af15d8b693dea0122095d787d84de43e8a35c1cdc26f950405b29c25bfac000ffb1dae60878c8f740080827816f1e184fa2cfa6c21079402d1c9485a6cce541658f511c8bdc6b1500f7adc2c8bf7334243af1d5b10cbb8659822dd634ffc316c001095504651aec239a0f65a6999801bfe477aa60cecfd34358cfba36be35548357b641b2e0a073c9e09e2cd7799ba42a8ed976c715d43c4d9244ea5b99ef0dfb8560111377924dcaba0deaa97fb683fda1da22742d37c4dd2aba24f25d3a1f31f21651f64250c3d48e6801783abf0c03fbfce4cccecb540bc442b94637556f05e5cdb790112daff1ac205840bd65d97c6f939e7e0c91d7c12b4f2d2981da4688d909c793287679cd8ba1ea16007a60bd4e7125e45b7a58278d8d16d425a2acc6c24c171c89701672501c600000000001ae101faedac5851e32b9b23b5f9411a8c2bac4aae3ed4dd7b811dd1a72ea4aa71000000000563771b014155575600000000000a7041600000271040db12dad32cacbf3eab08562f8886303fb3cfdb01005500eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a0000000005f5e12500000000000118b7fffffff800000000672501c600000000672501c50000000005f5c85500000000000119520afd50d1b06c773e3d4cfb305f6094a62f4598af7bdc391d4a165511ebfd94f19cae1ccecee0b77b19e5b73ccc7f0f5f33f71acfacdbe33be615c7a8f4345eb3f5f027d6077e3bd0cddca11f6e8c40b7abe418cf37e66406eeae267af42f63d9fa6afac62e257ea758a778f23098b54c0cf07f3e3cb52c5f78be7e3511032e90ca52e46ac2310e28e7003b5b23244794619cc3ec4e3eee2f57c494638c743b4c7f7adffb702e24a40303177c461a2306ce99df7780ce380849efda772f065caa02820d2d1437ccc0ae";

vm.deal(address(this), 100);
// Update the prices
Expand Down Expand Up @@ -98,10 +99,10 @@ contract UnwindTest is Bootstrap {
engine.unwindCollateral({
_accountId: ACCOUNT_ID,
_collateralId: 4,
_collateralAmount: 34_357_000_000_000_000,
_collateralAmount: 39_000_000_000_000_000,
_collateral: WETH_ADDR,
_zapMinAmountOut: 2_732_065_100_000_000_000,
_unwrapMinAmountOut: 32_606_510_850_000_000,
_zapMinAmountOut: 3_441_957_000_000_000_000,
_unwrapMinAmountOut: 38_961_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_940_900;
uint256 public constant ARBITRUM_BLOCK_NUMBER = 269_969_820;

address internal constant OWNER = address(0x01);

Expand Down

0 comments on commit 08bfe28

Please sign in to comment.