chore: .gitignore and README updates
Made-with: Cursor
This commit is contained in:
@@ -3,12 +3,12 @@ pragma solidity ^0.8.20;
|
||||
|
||||
/**
|
||||
* @title Chain2138TestnetConfig
|
||||
* @notice Configuration constants for Chain ID 2138 (Defi Oracle Meta Testnet) tests.
|
||||
* @notice Configuration constants for Chain ID 2138 (DeFi Oracle Meta Testnet) tests.
|
||||
* @dev Mirror of Chain138Config pattern; override RPC via env in off-chain runners.
|
||||
*/
|
||||
library Chain2138TestnetConfig {
|
||||
uint256 public constant CHAIN_ID = 2138;
|
||||
string public constant NETWORK_NAME = "Defi Oracle Meta Testnet";
|
||||
string public constant NETWORK_NAME = "DeFi Oracle Meta Testnet";
|
||||
/// @dev Default public RPC from pr-workspace/chains/_data/chains/eip155-2138.json; use LAN/staging in CI as needed.
|
||||
string public constant RPC_URL = "https://rpc.public-2138.defi-oracle.io";
|
||||
string public constant EXPLORER_URL = "https://public-2138.defi-oracle.io";
|
||||
|
||||
@@ -6,8 +6,65 @@ import "../../contracts/registry/UniversalAssetRegistry.sol";
|
||||
import "../../contracts/bridge/UniversalCCIPBridge.sol";
|
||||
import "../../contracts/bridge/BridgeOrchestrator.sol";
|
||||
import "../../contracts/governance/GovernanceController.sol";
|
||||
import "../../contracts/interfaces/IRegulatedAssetMetadata.sol";
|
||||
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
|
||||
|
||||
/// @dev Minimal `IRegulatedAssetMetadata` so `_syncAssetMetadata` ABI-decodes cleanly
|
||||
/// (Solidity try/catch does not catch return-data decode panics for empty/wrong-length returndata).
|
||||
contract MockRegulatedAsset is IRegulatedAssetMetadata {
|
||||
function assetId() external pure override returns (bytes32) {
|
||||
return keccak256("MOCK_ASSET");
|
||||
}
|
||||
|
||||
function assetVersionId() external pure override returns (bytes32) {
|
||||
return keccak256("MOCK_VER");
|
||||
}
|
||||
|
||||
function governanceProfileId() external pure override returns (bytes32) {
|
||||
return bytes32(0);
|
||||
}
|
||||
|
||||
function supervisionProfileId() external pure override returns (bytes32) {
|
||||
return bytes32(0);
|
||||
}
|
||||
|
||||
function storageNamespace() external pure override returns (bytes32) {
|
||||
return bytes32(0);
|
||||
}
|
||||
|
||||
function primaryJurisdiction() external pure override returns (string memory) {
|
||||
return "";
|
||||
}
|
||||
|
||||
function regulatoryDisclosureURI() external pure override returns (string memory) {
|
||||
return "";
|
||||
}
|
||||
|
||||
function reportingURI() external pure override returns (string memory) {
|
||||
return "";
|
||||
}
|
||||
|
||||
function canonicalUnderlyingAsset() external pure override returns (address) {
|
||||
return address(0);
|
||||
}
|
||||
|
||||
function supervisionRequired() external pure override returns (bool) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function governmentApprovalRequired() external pure override returns (bool) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function minimumUpgradeNoticePeriod() external pure override returns (uint256) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function wrappedTransport() external pure override returns (bool) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title UniversalBridge Integration Tests
|
||||
* @notice Comprehensive tests for all asset types through full bridge flow.
|
||||
@@ -86,10 +143,9 @@ contract UniversalBridgeTest is Test {
|
||||
// Add validator
|
||||
registry.addValidator(user1);
|
||||
|
||||
// Create proposal
|
||||
address mockToken = makeAddr("mockToken2");
|
||||
vm.etch(mockToken, hex"00");
|
||||
|
||||
// Create proposal (real contract: metadata sync ABI-decodes return data; empty etch breaks execute)
|
||||
address mockToken = address(new MockRegulatedAsset());
|
||||
|
||||
bytes32 proposalId = registry.proposeAsset(
|
||||
mockToken,
|
||||
UniversalAssetRegistry.AssetType.Stablecoin,
|
||||
|
||||
Reference in New Issue
Block a user