chore: .gitignore and README updates
Made-with: Cursor
This commit is contained in:
@@ -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