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:
@@ -10,6 +10,8 @@
|
||||
|
||||
This guide shows how to extend the Universal Bridge to support a new asset type without modifying core contracts.
|
||||
|
||||
> Note: This plugin-handler flow is historical reference material. The original `IAssetTypeHandler` and `PluginRegistry` sources were archived under `archive/solidity/contracts/registry/interfaces/` and `archive/solidity/contracts/plugins/` to keep them out of the active Forge compile graph.
|
||||
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
@@ -28,7 +30,7 @@ This guide shows how to extend the Universal Bridge to support a new asset type
|
||||
Implement `IAssetTypeHandler` interface:
|
||||
|
||||
```solidity
|
||||
// contracts/registry/handlers/MyAssetHandler.sol
|
||||
// Historical reference: archive/solidity/contracts/registry/handlers/MyAssetHandler.sol
|
||||
import "../interfaces/IAssetTypeHandler.sol";
|
||||
|
||||
contract MyAssetHandler is IAssetTypeHandler {
|
||||
@@ -64,7 +66,7 @@ forge create contracts/registry/handlers/MyAssetHandler.sol:MyAssetHandler \
|
||||
--private-key $PRIVATE_KEY
|
||||
```
|
||||
|
||||
### Step 3: Register with PluginRegistry
|
||||
### Step 3: Historical PluginRegistry Registration
|
||||
|
||||
```solidity
|
||||
// Register handler as plugin
|
||||
|
||||
@@ -54,7 +54,7 @@ This document provides a comprehensive inventory of all contracts in the project
|
||||
- Status: ✅ Production-ready
|
||||
- Dependencies: None
|
||||
|
||||
- **IAggregator.sol** (`contracts/interfaces/IAggregator.sol`)
|
||||
- **IAggregator.sol** (`contracts/oracle/IAggregator.sol`)
|
||||
- Status: ✅ Production-ready
|
||||
- Dependencies: None
|
||||
|
||||
@@ -91,8 +91,8 @@ This document provides a comprehensive inventory of all contracts in the project
|
||||
- Refactoring: Can be refactored to use minimal IERC20 interface
|
||||
- Tests: `test/ccip/CCIPIntegration.t.sol`
|
||||
|
||||
- **CCIPRouterOptimized.sol** (`contracts/ccip/CCIPRouterOptimized.sol`)
|
||||
- Status: ⚠️ Requires OpenZeppelin
|
||||
- **CCIPRouterOptimized.sol** (`archive/solidity/contracts/ccip/CCIPRouterOptimized.sol`)
|
||||
- Status: Historical archived contract
|
||||
- Dependencies: `SafeERC20`, `IERC20` from OpenZeppelin
|
||||
- Usage: SafeERC20 for fee token handling
|
||||
- Refactoring: Can be refactored to use minimal IERC20 interface
|
||||
@@ -122,7 +122,7 @@ This document provides a comprehensive inventory of all contracts in the project
|
||||
|----------|-----------|--------|---------|-------------------|
|
||||
| CCIPSender | ✅ | ✅ | ❌ | Low (similar to CCIPWETH9Bridge) |
|
||||
| CCIPRouter | ✅ | ✅ | ❌ | Low (similar to CCIPWETH9Bridge) |
|
||||
| CCIPRouterOptimized | ✅ | ✅ | ❌ | Low (similar to CCIPWETH9Bridge) |
|
||||
| CCIPRouterOptimized | Archived | Archived | Archived | Historical reference only |
|
||||
| MultiSig | ❌ | ❌ | ✅ | Medium (custom admin pattern) |
|
||||
| Voting | ❌ | ❌ | ✅ | Medium (custom admin pattern) |
|
||||
|
||||
@@ -160,7 +160,7 @@ This document provides a comprehensive inventory of all contracts in the project
|
||||
### ⚠️ Contracts Requiring OpenZeppelin
|
||||
- CCIPSender.sol
|
||||
- CCIPRouter.sol
|
||||
- CCIPRouterOptimized.sol
|
||||
- CCIPRouterOptimized.sol (historical, archived)
|
||||
- MultiSig.sol
|
||||
- Voting.sol
|
||||
|
||||
@@ -233,7 +233,7 @@ forge test
|
||||
### Phase 2: Refactor Contracts (Long-term)
|
||||
1. Refactor CCIPSender.sol → Use minimal IERC20 interface
|
||||
2. Refactor CCIPRouter.sol → Use minimal IERC20 interface
|
||||
3. Refactor CCIPRouterOptimized.sol → Use minimal IERC20 interface
|
||||
3. Historical reference: CCIPRouterOptimized.sol was archived instead of keeping it in the active compile graph
|
||||
4. Refactor MultiSig.sol → Use custom admin pattern
|
||||
5. Refactor Voting.sol → Use custom admin pattern
|
||||
|
||||
@@ -274,4 +274,3 @@ forge test
|
||||
- [OpenZeppelin Dependency Assessment](./OPENZEPPELIN_DEPENDENCY_ASSESSMENT.md)
|
||||
- [OpenZeppelin Tasks Checklist](./OPENZEPPELIN_TASKS_CHECKLIST.md)
|
||||
- [WETH CCIP Deployment Guide](./WETH_CCIP_DEPLOYMENT.md)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ This document outlines tasks to assess and resolve OpenZeppelin dependencies in
|
||||
- [ ] List contracts using OpenZeppelin:
|
||||
- [ ] `contracts/ccip/CCIPSender.sol` - Uses `SafeERC20`, `IERC20`
|
||||
- [ ] `contracts/ccip/CCIPRouter.sol` - Uses `SafeERC20`, `IERC20`
|
||||
- [ ] `contracts/ccip/CCIPRouterOptimized.sol` - Uses `SafeERC20`, `IERC20`
|
||||
- [ ] `archive/solidity/contracts/ccip/CCIPRouterOptimized.sol` - Uses `SafeERC20`, `IERC20`
|
||||
- [ ] `contracts/governance/MultiSig.sol` - Uses `Ownable`
|
||||
- [ ] `contracts/governance/Voting.sol` - Uses `Ownable`
|
||||
- [ ] Document which OpenZeppelin contracts are used:
|
||||
@@ -65,7 +65,7 @@ This document outlines tasks to assess and resolve OpenZeppelin dependencies in
|
||||
- [ ] Test compilation of existing CCIP contracts:
|
||||
- [ ] `contracts/ccip/CCIPSender.sol`
|
||||
- [ ] `contracts/ccip/CCIPRouter.sol`
|
||||
- [ ] `contracts/ccip/CCIPRouterOptimized.sol`
|
||||
- [ ] `archive/solidity/contracts/ccip/CCIPRouterOptimized.sol`
|
||||
- [ ] Test compilation of governance contracts:
|
||||
- [ ] `contracts/governance/MultiSig.sol`
|
||||
- [ ] `contracts/governance/Voting.sol`
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
- [x] Found 5 contracts using OpenZeppelin:
|
||||
- `contracts/ccip/CCIPSender.sol`
|
||||
- `contracts/ccip/CCIPRouter.sol`
|
||||
- `contracts/ccip/CCIPRouterOptimized.sol`
|
||||
- `archive/solidity/contracts/ccip/CCIPRouterOptimized.sol`
|
||||
- `contracts/governance/MultiSig.sol`
|
||||
- `contracts/governance/Voting.sol`
|
||||
- [x] OpenZeppelin imports identified:
|
||||
@@ -179,7 +179,7 @@ forge test
|
||||
### Contracts with OpenZeppelin Dependencies
|
||||
1. `contracts/ccip/CCIPSender.sol` - Needs SafeERC20, IERC20
|
||||
2. `contracts/ccip/CCIPRouter.sol` - Needs SafeERC20, IERC20
|
||||
3. `contracts/ccip/CCIPRouterOptimized.sol` - Needs SafeERC20, IERC20
|
||||
3. `archive/solidity/contracts/ccip/CCIPRouterOptimized.sol` - Needs SafeERC20, IERC20
|
||||
4. `contracts/governance/MultiSig.sol` - Needs Ownable
|
||||
5. `contracts/governance/Voting.sol` - Needs Ownable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user