refactor(archive): move historical contracts and adapters to archive directory

- Archived multiple non-EVM adapters (Algorand, Hedera, Tron, TON, Cosmos, Solana) and compliance contracts (IndyVerifier) to `archive/solidity/contracts/`.
- Updated documentation to reflect the historical status of archived components.
- Adjusted `foundry.toml` and `README.md` for clarity on historical dependencies and configurations.
- Enhanced Makefile and package.json scripts for improved contract testing and building processes.
- Removed obsolete contracts (AlltraCustomBridge, CommodityCCIPBridge, ISO4217WCCIPBridge, VaultBridgeAdapter) from the main directory.
- Updated implementation reports to indicate archived status for various components.
This commit is contained in:
defiQUG
2026-04-12 18:21:05 -07:00
parent 8ec6af94d5
commit 2b52cc6e32
146 changed files with 2010 additions and 423 deletions

View File

@@ -67,7 +67,7 @@ contract AaveQuotePushFlashReceiverMainnetForkTest is Test {
return;
}
receiver = new AaveQuotePushFlashReceiver(AAVE_POOL_MAINNET);
receiver = new AaveQuotePushFlashReceiver(AAVE_POOL_MAINNET, address(this));
unwinder = new AaveForkMockExternalUnwinder(IERC20(CWUSDC), IERC20(USDC), 112, 100);
// PMM + unwind sizing can require materially more than 100 USDC on a live reserve snapshot.
deal(USDC, address(unwinder), 50_000_000_000); // 50k USDC (6 decimals) for mock unwind payouts
@@ -113,4 +113,47 @@ contract AaveQuotePushFlashReceiverMainnetForkTest is Test {
assertLt(poolBaseAfter, poolBaseBefore, "pool base decreased via quote push");
assertGt(poolQuoteAfter, poolQuoteBefore, "pool quote increased via quote push");
}
function testFork_ownerCanSweepRetainedQuoteSurplus() public skipIfNoFork {
uint256 amount = 2_964_298;
address recipient = address(0xBEEF);
AaveQuotePushFlashReceiver.QuotePushParams memory p = AaveQuotePushFlashReceiver.QuotePushParams({
integration: DODO_PMM_INTEGRATION_MAINNET,
pmmPool: POOL_CWUSDC_USDC,
baseToken: CWUSDC,
externalUnwinder: address(unwinder),
minOutPmm: 2_800_000,
minOutUnwind: amount + 1_483,
unwindData: bytes(""),
atomicBridge: AaveQuotePushFlashReceiver.AtomicBridgeParams({
coordinator: address(0),
sourceChain: 0,
destinationChain: 0,
destinationAsset: address(0),
bridgeAmount: 0,
minDestinationAmount: 0,
destinationRecipient: address(0),
destinationDeadline: 0,
routeId: bytes32(0),
settlementMode: bytes32(0),
submitCommitment: false
})
});
receiver.flashQuotePush(USDC, amount, p);
uint256 retainedBeforeSweep = IERC20(USDC).balanceOf(address(receiver));
uint256 reserveRetained = 10_000;
uint256 expectedSweep = retainedBeforeSweep - reserveRetained;
uint256 sweepable = receiver.quoteSurplusBalance(USDC, reserveRetained);
assertEq(sweepable, expectedSweep, "sweepable balance excludes retained reserve");
uint256 recipientBefore = IERC20(USDC).balanceOf(recipient);
receiver.sweepQuoteSurplus(USDC, recipient, reserveRetained);
assertEq(IERC20(USDC).balanceOf(address(receiver)), reserveRetained, "receiver keeps configured reserve");
assertEq(IERC20(USDC).balanceOf(recipient), recipientBefore + expectedSweep, "recipient receives swept surplus");
}
}