From 70eb5e0094b1472038431efae4225fef353a5f5a Mon Sep 17 00:00:00 2001 From: Flocqst Date: Fri, 22 Nov 2024 16:30:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=F0=9F=9A=80=20fix=20zap=20usdc=20d?= =?UTF-8?q?ecimals=20+=20deploy=20test=20engine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployments/Base.json | 10 +++++----- script/utils/parameters/BaseParameters.sol | 2 +- src/utils/MulticallerWithSender.sol | 2 +- src/utils/zap/Zap.sol | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deployments/Base.json b/deployments/Base.json index d2a8ae68..4837101c 100644 --- a/deployments/Base.json +++ b/deployments/Base.json @@ -9,10 +9,10 @@ "MulticallerWithSender": "0x45316C04257bA9bd8CA00587Fe74eCD74938C3a2", "Zap": "0xaEd5977ed65d340b4B8e58Ec3EC3b04b19308f21" }, - "UnwindUSDC Fix": { - "EngineImplementation": "0x2d77EA3d3D7dc5D1F337b2c928Bf37ba465155e9", - "EngineProxy": "0x15Dd9d58F0b0A1b90CD6bc24C89625B8f5199699", - "MulticallerWithSender": "0x8bbbF9d71536A2f4cBb69faAEb5BF66867da60F9", - "Zap": "0x74D3dD7736fc57975B1b921286872ad5CD5e1715" + "Unwind USDC": { + "EngineImplementation": "0x48102a5ad542A676f1373F9cb48A1A0d9B32239D", + "EngineProxy": "0xa5D8b733108D798d8faAf78eE1CaF9fE335cE233", + "MulticallerWithSender": "0xabcA02D1B960399D7D65EBF4047E80391af5d6A2", + "Zap": "0x64b6Ae998Fbba6d24dD7a2469842119A014835CD" } } \ No newline at end of file diff --git a/script/utils/parameters/BaseParameters.sol b/script/utils/parameters/BaseParameters.sol index 38a84990..0c883e37 100644 --- a/script/utils/parameters/BaseParameters.sol +++ b/script/utils/parameters/BaseParameters.sol @@ -31,5 +31,5 @@ contract BaseParameters { // https://usecannon.com/packages/synthetix-spot-market/3.3.5/84531-andromeda uint128 public constant SUSDC_SPOT_MARKET_ID = 1; - address public constant ZAP = 0x74D3dD7736fc57975B1b921286872ad5CD5e1715; + address public constant ZAP = 0x64b6Ae998Fbba6d24dD7a2469842119A014835CD; } diff --git a/src/utils/MulticallerWithSender.sol b/src/utils/MulticallerWithSender.sol index 495cb973..eb29f441 100644 --- a/src/utils/MulticallerWithSender.sol +++ b/src/utils/MulticallerWithSender.sol @@ -116,7 +116,7 @@ contract MulticallerWithSender { if iszero( call( gas(), // Remaining gas. - 0x15Dd9d58F0b0A1b90CD6bc24C89625B8f5199699, // Engine Proxy address. + 0xa5D8b733108D798d8faAf78eE1CaF9fE335cE233, // Engine Proxy address. calldataload(values.offset), // ETH to send. memPtr, // Start of input calldata in memory. calldataload(o), // Size of input calldata. diff --git a/src/utils/zap/Zap.sol b/src/utils/zap/Zap.sol index 383ac578..1eba0200 100644 --- a/src/utils/zap/Zap.sol +++ b/src/utils/zap/Zap.sol @@ -438,7 +438,7 @@ contract Zap is Reentrancy, Errors, Flush(msg.sender) { _withdraw(_collateralId, _collateralAmount, _accountId); if (_collateral == USDC) { - unwound = _zapOut(_collateralAmount, _collateralAmount); + unwound = _zapOut(_collateralAmount, _collateralAmount / 1e12); } else { // unwrap withdrawn synthetix perp position collateral; // i.e., sETH -> WETH, sUSDe -> USDe, sUSDC -> USDC (...)