-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
1,186 additions
and
811 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}); | ||
} |
Oops, something went wrong.