@hyperlane-xyz/registry 10.11.1 → 10.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deployments/warp_routes/GPS/base-bsc-config.d.ts +2 -0
- package/dist/deployments/warp_routes/GPS/base-bsc-config.js +34 -0
- package/dist/deployments/warp_routes/GPS/base-bsc-config.json +34 -0
- package/dist/deployments/warp_routes/GPS/base-bsc-config.yaml +21 -0
- package/dist/deployments/warp_routes/USDT/base-celo-fraxtal-ink-lisk-mode-optimism-soneium-superseed-unichain-worldchain-config.js +1 -1
- package/dist/deployments/warp_routes/USDT/base-celo-fraxtal-ink-lisk-mode-optimism-soneium-superseed-unichain-worldchain-config.json +1 -1
- package/dist/deployments/warp_routes/USDT/base-celo-fraxtal-ink-lisk-mode-optimism-soneium-superseed-unichain-worldchain-config.yaml +1 -1
- package/dist/registry/GithubRegistry.js +8 -8
- package/dist/registry/registry-utils.d.ts +18 -1
- package/dist/registry/registry-utils.js +15 -6
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +16 -1
- package/dist/warpRouteConfigs.js +35 -1
- package/package.json +3 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const warpRouteConfig = {
|
|
2
|
+
"tokens": [
|
|
3
|
+
{
|
|
4
|
+
"addressOrDenom": "0x0f318DDd7b7af11dE1335B55dc5528b79cc4E0aE",
|
|
5
|
+
"chainName": "base",
|
|
6
|
+
"coinGeckoId": "goplus-security",
|
|
7
|
+
"collateralAddressOrDenom": "0x0c1dc73159e30c4b06170f2593d3118968a0dca5",
|
|
8
|
+
"connections": [
|
|
9
|
+
{
|
|
10
|
+
"token": "ethereum|bsc|0xFF0948a6e1aAFfB7131844cC3944a11e969543d0"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"decimals": 18,
|
|
14
|
+
"logoURI": "/deployments/warp_routes/GPS/logo.svg",
|
|
15
|
+
"name": "GoPlus Security",
|
|
16
|
+
"standard": "EvmHypCollateral",
|
|
17
|
+
"symbol": "GPS"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"addressOrDenom": "0xFF0948a6e1aAFfB7131844cC3944a11e969543d0",
|
|
21
|
+
"chainName": "bsc",
|
|
22
|
+
"connections": [
|
|
23
|
+
{
|
|
24
|
+
"token": "ethereum|base|0x0f318DDd7b7af11dE1335B55dc5528b79cc4E0aE"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"decimals": 18,
|
|
28
|
+
"logoURI": "/deployments/warp_routes/GPS/logo.svg",
|
|
29
|
+
"name": "GoPlus Security",
|
|
30
|
+
"standard": "EvmHypSynthetic",
|
|
31
|
+
"symbol": "GPS"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tokens": [
|
|
3
|
+
{
|
|
4
|
+
"addressOrDenom": "0x0f318DDd7b7af11dE1335B55dc5528b79cc4E0aE",
|
|
5
|
+
"chainName": "base",
|
|
6
|
+
"coinGeckoId": "goplus-security",
|
|
7
|
+
"collateralAddressOrDenom": "0x0c1dc73159e30c4b06170f2593d3118968a0dca5",
|
|
8
|
+
"connections": [
|
|
9
|
+
{
|
|
10
|
+
"token": "ethereum|bsc|0xFF0948a6e1aAFfB7131844cC3944a11e969543d0"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"decimals": 18,
|
|
14
|
+
"logoURI": "/deployments/warp_routes/GPS/logo.svg",
|
|
15
|
+
"name": "GoPlus Security",
|
|
16
|
+
"standard": "EvmHypCollateral",
|
|
17
|
+
"symbol": "GPS"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"addressOrDenom": "0xFF0948a6e1aAFfB7131844cC3944a11e969543d0",
|
|
21
|
+
"chainName": "bsc",
|
|
22
|
+
"connections": [
|
|
23
|
+
{
|
|
24
|
+
"token": "ethereum|base|0x0f318DDd7b7af11dE1335B55dc5528b79cc4E0aE"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"decimals": 18,
|
|
28
|
+
"logoURI": "/deployments/warp_routes/GPS/logo.svg",
|
|
29
|
+
"name": "GoPlus Security",
|
|
30
|
+
"standard": "EvmHypSynthetic",
|
|
31
|
+
"symbol": "GPS"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
tokens:
|
|
2
|
+
- addressOrDenom: "0x0f318DDd7b7af11dE1335B55dc5528b79cc4E0aE"
|
|
3
|
+
chainName: base
|
|
4
|
+
coinGeckoId: goplus-security
|
|
5
|
+
collateralAddressOrDenom: "0x0c1dc73159e30c4b06170f2593d3118968a0dca5"
|
|
6
|
+
connections:
|
|
7
|
+
- token: ethereum|bsc|0xFF0948a6e1aAFfB7131844cC3944a11e969543d0
|
|
8
|
+
decimals: 18
|
|
9
|
+
logoURI: /deployments/warp_routes/GPS/logo.svg
|
|
10
|
+
name: GoPlus Security
|
|
11
|
+
standard: EvmHypCollateral
|
|
12
|
+
symbol: GPS
|
|
13
|
+
- addressOrDenom: "0xFF0948a6e1aAFfB7131844cC3944a11e969543d0"
|
|
14
|
+
chainName: bsc
|
|
15
|
+
connections:
|
|
16
|
+
- token: ethereum|base|0x0f318DDd7b7af11dE1335B55dc5528b79cc4E0aE
|
|
17
|
+
decimals: 18
|
|
18
|
+
logoURI: /deployments/warp_routes/GPS/logo.svg
|
|
19
|
+
name: GoPlus Security
|
|
20
|
+
standard: EvmHypSynthetic
|
|
21
|
+
symbol: GPS
|
|
@@ -82,7 +82,7 @@ export const warpRouteConfig = {
|
|
|
82
82
|
"logoURI": "/deployments/warp_routes/USDT/logo.svg",
|
|
83
83
|
"name": "USDT",
|
|
84
84
|
"standard": "EvmHypXERC20Lockbox",
|
|
85
|
-
"symbol": "
|
|
85
|
+
"symbol": "oUSDT"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"addressOrDenom": "0xa0bD9e96556E27e6FfF0cC0F77496390d9844E1e",
|
|
@@ -37,7 +37,7 @@ tokens:
|
|
|
37
37
|
logoURI: /deployments/warp_routes/USDT/logo.svg
|
|
38
38
|
name: USDT
|
|
39
39
|
standard: EvmHypXERC20Lockbox
|
|
40
|
-
symbol:
|
|
40
|
+
symbol: oUSDT
|
|
41
41
|
- addressOrDenom: "0xa0bD9e96556E27e6FfF0cC0F77496390d9844E1e"
|
|
42
42
|
chainName: fraxtal
|
|
43
43
|
collateralAddressOrDenom: "0x1217BfE6c773EEC6cc4A38b5Dc45B92292B6E189"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { parse as yamlParse } from 'yaml';
|
|
2
2
|
import { CHAIN_FILE_REGEX, DEFAULT_GITHUB_REGISTRY, GITHUB_FETCH_CONCURRENCY_LIMIT, WARP_ROUTE_CONFIG_FILE_REGEX, WARP_ROUTE_DEPLOY_FILE_REGEX, } from '../consts.js';
|
|
3
|
-
import { concurrentMap, stripLeadingSlash } from '../utils.js';
|
|
3
|
+
import { concurrentMap, parseGitHubPath, stripLeadingSlash } from '../utils.js';
|
|
4
4
|
import { BaseRegistry } from './BaseRegistry.js';
|
|
5
5
|
import { RegistryType, } from './IRegistry.js';
|
|
6
|
-
import { filterWarpRoutesIds, warpRouteConfigPathToId, warpRouteDeployConfigPathToId } from './warp-utils.js';
|
|
6
|
+
import { filterWarpRoutesIds, warpRouteConfigPathToId, warpRouteDeployConfigPathToId, } from './warp-utils.js';
|
|
7
7
|
export const GITHUB_API_URL = 'https://api.github.com';
|
|
8
8
|
/**
|
|
9
9
|
* A registry that uses a github repository as its data source.
|
|
@@ -20,12 +20,12 @@ export class GithubRegistry extends BaseRegistry {
|
|
|
20
20
|
constructor(options = {}) {
|
|
21
21
|
super({ uri: options.uri ?? DEFAULT_GITHUB_REGISTRY, logger: options.logger });
|
|
22
22
|
this.url = new URL(this.uri);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.
|
|
23
|
+
const { repoOwner, repoName, repoBranch } = parseGitHubPath(this.uri);
|
|
24
|
+
this.repoOwner = repoOwner;
|
|
25
|
+
this.repoName = repoName;
|
|
26
|
+
if (options.branch && repoBranch)
|
|
27
|
+
throw new Error('Branch is set in both options and url.');
|
|
28
|
+
this.branch = options.branch ?? repoBranch ?? 'main';
|
|
29
29
|
this.proxyUrl = options.proxyUrl;
|
|
30
30
|
}
|
|
31
31
|
getUri(itemPath) {
|
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
import type { Logger } from 'pino';
|
|
2
2
|
import { IRegistry } from './IRegistry.js';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves a registry instance based on the provided registry URIs.
|
|
5
|
+
* The registry can be either a GitHub registry or a file system registry,
|
|
6
|
+
* and the returned instance is a `MergedRegistry` that combines all the
|
|
7
|
+
* specified registries.
|
|
8
|
+
*
|
|
9
|
+
* @param registryUris - An array of registry URIs to use for creating the registry.
|
|
10
|
+
* @param enableProxy - If enabled, forwards all requests to Hyperlane Registry, with higher read limits.
|
|
11
|
+
* @param branch - An optional branch name to use for the GitHub registry.
|
|
12
|
+
* @param logger - An optional logger instance to use for logging.
|
|
13
|
+
* @returns An `IRegistry` instance that combines the specified registries.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getRegistry({ registryUris, enableProxy, branch, logger, }: {
|
|
16
|
+
registryUris: string[];
|
|
17
|
+
enableProxy: boolean;
|
|
18
|
+
branch?: string;
|
|
19
|
+
logger?: Logger;
|
|
20
|
+
}): IRegistry;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GithubRegistry } from './GithubRegistry.js';
|
|
2
2
|
import { FileSystemRegistry } from './FileSystemRegistry.js';
|
|
3
|
-
import {
|
|
3
|
+
import { PROXY_DEPLOYED_URL } from '../consts.js';
|
|
4
4
|
import { MergedRegistry } from './MergedRegistry.js';
|
|
5
5
|
const isHttpsUrl = (value) => {
|
|
6
6
|
try {
|
|
@@ -13,9 +13,6 @@ const isHttpsUrl = (value) => {
|
|
|
13
13
|
return false;
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
const isCanonicalRepoUrl = (url) => {
|
|
17
|
-
return url === DEFAULT_GITHUB_REGISTRY;
|
|
18
|
-
};
|
|
19
16
|
const isValidFilePath = (path) => {
|
|
20
17
|
try {
|
|
21
18
|
// Check for control characters (0-31) and DEL (127) without using regex
|
|
@@ -41,7 +38,19 @@ const isValidFilePath = (path) => {
|
|
|
41
38
|
return false;
|
|
42
39
|
}
|
|
43
40
|
};
|
|
44
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves a registry instance based on the provided registry URIs.
|
|
43
|
+
* The registry can be either a GitHub registry or a file system registry,
|
|
44
|
+
* and the returned instance is a `MergedRegistry` that combines all the
|
|
45
|
+
* specified registries.
|
|
46
|
+
*
|
|
47
|
+
* @param registryUris - An array of registry URIs to use for creating the registry.
|
|
48
|
+
* @param enableProxy - If enabled, forwards all requests to Hyperlane Registry, with higher read limits.
|
|
49
|
+
* @param branch - An optional branch name to use for the GitHub registry.
|
|
50
|
+
* @param logger - An optional logger instance to use for logging.
|
|
51
|
+
* @returns An `IRegistry` instance that combines the specified registries.
|
|
52
|
+
*/
|
|
53
|
+
export function getRegistry({ registryUris, enableProxy, branch, logger, }) {
|
|
45
54
|
const registryLogger = logger?.child({ module: 'MergedRegistry' });
|
|
46
55
|
const registries = registryUris
|
|
47
56
|
.map((uri) => uri.trim())
|
|
@@ -53,7 +62,7 @@ export function getRegistry(registryUris, enableProxy, branch, logger) {
|
|
|
53
62
|
uri,
|
|
54
63
|
branch,
|
|
55
64
|
logger: childLogger,
|
|
56
|
-
proxyUrl: enableProxy
|
|
65
|
+
proxyUrl: enableProxy ? PROXY_DEPLOYED_URL : undefined,
|
|
57
66
|
});
|
|
58
67
|
}
|
|
59
68
|
else {
|
package/dist/utils.d.ts
CHANGED
|
@@ -5,3 +5,8 @@ export declare function concurrentMap<A, B>(concurrency: number, xs: A[], mapFn:
|
|
|
5
5
|
export declare function isObject(item: any): any;
|
|
6
6
|
export declare function objMerge(a: Record<string, any>, b: Record<string, any>, max_depth?: number): any;
|
|
7
7
|
export declare function isAbacusWorksChain(metadata: ChainMetadata): boolean;
|
|
8
|
+
export declare function parseGitHubPath(uri: string): {
|
|
9
|
+
repoOwner: string;
|
|
10
|
+
repoName: string;
|
|
11
|
+
repoBranch: string | undefined;
|
|
12
|
+
};
|
package/dist/utils.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { stringify } from 'yaml';
|
|
2
2
|
import { ABACUS_WORKS_DEPLOYER_NAME } from './consts.js';
|
|
3
3
|
export function toYamlString(data, prefix) {
|
|
4
|
-
const yamlString = stringify(data, {
|
|
4
|
+
const yamlString = stringify(data, {
|
|
5
|
+
indent: 2,
|
|
6
|
+
sortMapEntries: true,
|
|
7
|
+
aliasDuplicateObjects: false,
|
|
8
|
+
});
|
|
5
9
|
return prefix ? `${prefix}\n${yamlString}` : yamlString;
|
|
6
10
|
}
|
|
7
11
|
export function stripLeadingSlash(path) {
|
|
@@ -51,3 +55,14 @@ export function objMerge(a, b, max_depth = 10) {
|
|
|
51
55
|
export function isAbacusWorksChain(metadata) {
|
|
52
56
|
return metadata.deployer?.name?.toLowerCase() === ABACUS_WORKS_DEPLOYER_NAME.toLowerCase();
|
|
53
57
|
}
|
|
58
|
+
export function parseGitHubPath(uri) {
|
|
59
|
+
const { pathname } = new URL(uri);
|
|
60
|
+
// Intended pattern: /{user}/{repo}/tree/{branch}
|
|
61
|
+
const regex = /\/([^/]+)\/([^/]+)(?:\/tree\/(.*))?/;
|
|
62
|
+
const match = pathname.match(regex);
|
|
63
|
+
if (!match) {
|
|
64
|
+
throw new Error('Invalid github url');
|
|
65
|
+
}
|
|
66
|
+
const [, repoOwner, repoName, repoBranch] = match;
|
|
67
|
+
return { repoOwner, repoName, repoBranch };
|
|
68
|
+
}
|
package/dist/warpRouteConfigs.js
CHANGED
|
@@ -3545,6 +3545,40 @@ export const warpRouteConfigs = {
|
|
|
3545
3545
|
}
|
|
3546
3546
|
]
|
|
3547
3547
|
},
|
|
3548
|
+
"GPS/base-bsc": {
|
|
3549
|
+
"tokens": [
|
|
3550
|
+
{
|
|
3551
|
+
"addressOrDenom": "0x0f318DDd7b7af11dE1335B55dc5528b79cc4E0aE",
|
|
3552
|
+
"chainName": "base",
|
|
3553
|
+
"coinGeckoId": "goplus-security",
|
|
3554
|
+
"collateralAddressOrDenom": "0x0c1dc73159e30c4b06170f2593d3118968a0dca5",
|
|
3555
|
+
"connections": [
|
|
3556
|
+
{
|
|
3557
|
+
"token": "ethereum|bsc|0xFF0948a6e1aAFfB7131844cC3944a11e969543d0"
|
|
3558
|
+
}
|
|
3559
|
+
],
|
|
3560
|
+
"decimals": 18,
|
|
3561
|
+
"logoURI": "/deployments/warp_routes/GPS/logo.svg",
|
|
3562
|
+
"name": "GoPlus Security",
|
|
3563
|
+
"standard": "EvmHypCollateral",
|
|
3564
|
+
"symbol": "GPS"
|
|
3565
|
+
},
|
|
3566
|
+
{
|
|
3567
|
+
"addressOrDenom": "0xFF0948a6e1aAFfB7131844cC3944a11e969543d0",
|
|
3568
|
+
"chainName": "bsc",
|
|
3569
|
+
"connections": [
|
|
3570
|
+
{
|
|
3571
|
+
"token": "ethereum|base|0x0f318DDd7b7af11dE1335B55dc5528b79cc4E0aE"
|
|
3572
|
+
}
|
|
3573
|
+
],
|
|
3574
|
+
"decimals": 18,
|
|
3575
|
+
"logoURI": "/deployments/warp_routes/GPS/logo.svg",
|
|
3576
|
+
"name": "GoPlus Security",
|
|
3577
|
+
"standard": "EvmHypSynthetic",
|
|
3578
|
+
"symbol": "GPS"
|
|
3579
|
+
}
|
|
3580
|
+
]
|
|
3581
|
+
},
|
|
3548
3582
|
"INJ/inevm-injective": {
|
|
3549
3583
|
"options": {
|
|
3550
3584
|
"interchainFeeConstants": [
|
|
@@ -7122,7 +7156,7 @@ export const warpRouteConfigs = {
|
|
|
7122
7156
|
"logoURI": "/deployments/warp_routes/USDT/logo.svg",
|
|
7123
7157
|
"name": "USDT",
|
|
7124
7158
|
"standard": "EvmHypXERC20Lockbox",
|
|
7125
|
-
"symbol": "
|
|
7159
|
+
"symbol": "oUSDT"
|
|
7126
7160
|
},
|
|
7127
7161
|
{
|
|
7128
7162
|
"addressOrDenom": "0xa0bD9e96556E27e6FfF0cC0F77496390d9844E1e",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperlane-xyz/registry",
|
|
3
3
|
"description": "A collection of configs, artifacts, and schemas for Hyperlane",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.13.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"yaml": "2.4.5",
|
|
7
7
|
"zod": "^3.21.2"
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@changesets/cli": "^2.26.2",
|
|
11
11
|
"@eslint/js": "^9.1.1",
|
|
12
|
-
"@
|
|
12
|
+
"@faker-js/faker": "^9.6.0",
|
|
13
|
+
"@hyperlane-xyz/sdk": "8.9.0",
|
|
13
14
|
"@types/mocha": "^10.0.1",
|
|
14
15
|
"@types/node": "^16.9.1",
|
|
15
16
|
"@typescript-eslint/parser": "^7.7.0",
|