Skip to content

Commit

Permalink
Merge branch 'main' into pb/mar5
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalaji authored Mar 6, 2025
2 parents 65287e2 + 471664e commit fb2b739
Show file tree
Hide file tree
Showing 11 changed files with 1,186 additions and 811 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# @hyperlane-xyz/registry

## 10.10.0

### Minor Changes

- c093d06: Add `branch` to getRegistry to allow reading of specific commit/branches. Also up the SDK version

## 10.9.0

### Minor Changes

- 6031ff9: Add getRegistry function

### Patch Changes

- dedd673: Update REZ logo

## 10.8.1

### Patch Changes

- 967fb84: Reverts PR #643 due to not exporting to index-fs.ts

## 10.8.0

### Minor Changes

- b71797b: Add REZ configs
- cfba620: Add getRegistry function

## 10.7.0

### Minor Changes
Expand Down
49 changes: 49 additions & 0 deletions chains/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,55 @@
"hyperlaneChainMetadata": {
"type": "object",
"properties": {
"availability": {
"anyOf": [
{
"type": "object",
"properties": {
"status": {
"type": "string",
"const": "disabled",
"description": "The status that represents the chain availability. See ChainStatus for valid values."
},
"reasons": {
"type": "array",
"items": {
"type": "string",
"enum": [
"badrpc",
"deprecated",
"private",
"unavailable",
"other"
]
},
"minItems": 1,
"description": "List of reasons explaining why the chain is disabled."
}
},
"required": [
"status",
"reasons"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"status": {
"type": "string",
"const": "live",
"description": "The status that represents the chain availability. See ChainStatus for valid values."
}
},
"required": [
"status"
],
"additionalProperties": false
}
],
"description": "Specifies if the chain is available and the reasons why it is disabled."
},
"bech32Prefix": {
"type": "string",
"description": "The human readable address prefix for the chains using bech32."
Expand Down
1 change: 1 addition & 0 deletions deployments/warp_routes/REZ/REZ-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions deployments/warp_routes/REZ/base-ethereum-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# yaml-language-server: $schema=../schema.json
tokens:
- addressOrDenom: "0xF4eae2f139D8032b8410Fef46f6873cD71A0FD76"
chainName: base
collateralAddressOrDenom: "0xf757c9804cF2EE8d8Ed64e0A8936293Fe43a7252"
connections:
- token: ethereum|ethereum|0xc32848c38Dd5A5098Cd53d33e425c1013a4E06A8
decimals: 18
logoURI: /deployments/warp_routes/REZ/REZ-logo.svg
name: Renzo
standard: EvmHypXERC20
symbol: REZ
- addressOrDenom: "0xc32848c38Dd5A5098Cd53d33e425c1013a4E06A8"
chainName: ethereum
coinGeckoId: renzo
collateralAddressOrDenom: "0xd8B543fEac4EEcEF5a46a926e10D6f4a72de6fE0"
connections:
- token: ethereum|base|0xF4eae2f139D8032b8410Fef46f6873cD71A0FD76
decimals: 18
logoURI: /deployments/warp_routes/REZ/REZ-logo.svg
name: Renzo
standard: EvmHypXERC20Lockbox
symbol: REZ
80 changes: 80 additions & 0 deletions deployments/warp_routes/REZ/base-ethereum-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
base:
gas: 200000
hook:
hooks:
- "0x4Eb82Ee35b0a1c1d776E3a3B547f9A9bA6FCC9f2"
- beneficiary: "0x8410927C286A38883BC23721e640F31D3E3E79F8"
maxProtocolFee: "100000000000000000000"
owner: "0x8410927C286A38883BC23721e640F31D3E3E79F8"
protocolFee: "158365200000000"
type: protocolFee
type: aggregationHook
interchainSecurityModule:
modules:
- domains:
ethereum:
modules:
- threshold: 1
type: messageIdMultisigIsm
validators:
- "0x1fd889337f60986aa57166bc5ac121efd13e4fdd"
- "0xc7f7b94a6baf2fffa54dfe1dde6e5fcbb749e04f"
- threshold: 1
type: merkleRootMultisigIsm
validators:
- "0x1fd889337f60986aa57166bc5ac121efd13e4fdd"
- "0xc7f7b94a6baf2fffa54dfe1dde6e5fcbb749e04f"
threshold: 1
type: staticAggregationIsm
owner: "0x8410927C286A38883BC23721e640F31D3E3E79F8"
type: domainRoutingIsm
- domains: {}
owner: "0x8410927C286A38883BC23721e640F31D3E3E79F8"
type: defaultFallbackRoutingIsm
threshold: 2
type: staticAggregationIsm
isNft: false
mailbox: "0xeA87ae93Fa0019a82A727bfd3eBd1cFCa8f64f1D"
owner: "0x8410927C286A38883BC23721e640F31D3E3E79F8"
token: "0xf757c9804cF2EE8d8Ed64e0A8936293Fe43a7252"
type: xERC20
ethereum:
gas: 200000
hook:
hooks:
- "0x571f1435613381208477ac5d6974310d88AC7cB7"
- beneficiary: "0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A"
maxProtocolFee: "100000000000000000000"
owner: "0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A"
protocolFee: "158365200000000"
type: protocolFee
type: aggregationHook
interchainSecurityModule:
modules:
- domains:
base:
modules:
- threshold: 1
type: messageIdMultisigIsm
validators:
- "0x25ba4ee5268cbfb8d69bac531aa10368778702bd"
- "0x9ec803b503e9c7d2611e231521ef3fde73f7a21c"
- threshold: 1
type: merkleRootMultisigIsm
validators:
- "0x25ba4ee5268cbfb8d69bac531aa10368778702bd"
- "0x9ec803b503e9c7d2611e231521ef3fde73f7a21c"
threshold: 1
type: staticAggregationIsm
owner: "0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A"
type: domainRoutingIsm
- domains: {}
owner: "0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A"
type: defaultFallbackRoutingIsm
threshold: 2
type: staticAggregationIsm
isNft: false
mailbox: "0xc005dc82818d67AF737725bD4bf75435d065D239"
owner: "0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A"
token: "0xd8B543fEac4EEcEF5a46a926e10D6f4a72de6fE0"
type: xERC20Lockbox
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@hyperlane-xyz/registry",
"description": "A collection of configs, artifacts, and schemas for Hyperlane",
"version": "10.7.0",
"version": "10.10.0",
"dependencies": {
"yaml": "2.4.5",
"zod": "^3.21.2"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@eslint/js": "^9.1.1",
"@hyperlane-xyz/sdk": "7.0.0",
"@hyperlane-xyz/sdk": "8.8.1",
"@types/mocha": "^10.0.1",
"@types/node": "^16.9.1",
"@typescript-eslint/parser": "^7.7.0",
Expand Down
1 change: 1 addition & 0 deletions src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export const WARP_ROUTE_CONFIG_FILE_REGEX = /warp_routes\/([a-zA-Z0-9]+)\/([a-z0
export const WARP_ROUTE_DEPLOY_FILE_REGEX = /warp_routes\/([a-zA-Z0-9]+)\/([a-z0-9-]+)-deploy.yaml/;

export const ABACUS_WORKS_DEPLOYER_NAME = 'Abacus Works';
export const PROXY_DEPLOYED_URL = 'https://proxy.hyperlane.xyz';
1 change: 1 addition & 0 deletions src/index-fs.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// Exports for utilities that require fs access and are not suitable for browser use
export { FileSystemRegistry } from './registry/FileSystemRegistry.js';
export { getRegistry } from './registry/registry-utils.js';
52 changes: 52 additions & 0 deletions src/registry/registry-utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import type { Logger } from 'pino';
import { GithubRegistry } from './GithubRegistry.js';
import { FileSystemRegistry } from './FileSystemRegistry.js';
import { IRegistry } from './IRegistry.js';
import { DEFAULT_GITHUB_REGISTRY, PROXY_DEPLOYED_URL } from '../consts.js';
import { MergedRegistry } from './MergedRegistry.js';

const isHttpsUrl = (value: string): boolean => {
try {
if (!value) return false;
const url = new URL(value);
return url.protocol === 'https:';
} catch {
return false;
}
};

const isCanonicalRepoUrl = (url: string): boolean => {
return url === DEFAULT_GITHUB_REGISTRY;
};

export function getRegistry(
registryUris: string[],
enableProxy: boolean,
branch?: string,
logger?: Logger,
): IRegistry {
const registryLogger = logger?.child({ module: 'MergedRegistry' });
const registries = registryUris
.map((uri) => uri.trim())
.filter((uri) => !!uri)
.map((uri, index) => {
const childLogger = registryLogger?.child({ uri, index });
if (isHttpsUrl(uri)) {
return new GithubRegistry({
uri,
branch,
logger: childLogger,
proxyUrl: enableProxy && isCanonicalRepoUrl(uri) ? PROXY_DEPLOYED_URL : undefined,
});
} else {
return new FileSystemRegistry({
uri,
logger: childLogger,
});
}
});
return new MergedRegistry({
registries,
logger,
});
}
Loading

0 comments on commit fb2b739

Please sign in to comment.