Skip to content

Commit

Permalink
Deploy viction core and warp routes (hyperlane-xyz#3067)
Browse files Browse the repository at this point in the history
### Description

Deploys core and warp to viction

### Related issues

- Fixes hyperlane-xyz/issues#850
- Fixes hyperlane-xyz/issues#859


### Backward compatibility

Yes

### Testing

Fork tests

---------

Co-authored-by: J M Rossy <[email protected]>
Co-authored-by: Trevor Porter <[email protected]>
Co-authored-by: Daniel Savu <[email protected]>
Co-authored-by: Nam Chu Hoai <[email protected]>
  • Loading branch information
5 people authored and ltyu committed Mar 13, 2024
1 parent edf3eb2 commit 2d4b4d1
Show file tree
Hide file tree
Showing 40 changed files with 675 additions and 224 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ jobs:
chain: sepolia
- environment: mainnet3
chain: arbitrum
- environment: mainnet3
chain: viction
module: core

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"build": "yarn workspaces foreach --all --parallel --topological run build",
"clean": "yarn workspaces foreach --all --parallel run clean",
"prettier": "yarn workspaces foreach --since --parallel run prettier",
"lint": "yarn workspaces foreach --since --parallel run lint",
"lint": "yarn workspaces foreach --all --parallel run lint",
"test": "yarn workspaces foreach --all --parallel run test",
"test:ci": "yarn workspaces foreach --all --parallel run test:ci",
"coverage": "yarn workspaces foreach --all --parallel run coverage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ const DOMAINS: &[RawDomain] = &[
is_test_net: false,
is_deprecated: false,
},
RawDomain {
name: "base",
token: "ETH",
domain: 8453,
chain_id: 8453,
is_test_net: false,
is_deprecated: false,
},
RawDomain {
name: "basegoerli",
token: "ETH",
Expand Down Expand Up @@ -94,6 +102,14 @@ const DOMAINS: &[RawDomain] = &[
is_test_net: true,
is_deprecated: false,
},
RawDomain {
name: "gnosis",
token: "xDAI",
domain: 100,
chain_id: 100,
is_test_net: false,
is_deprecated: false,
},
RawDomain {
name: "goerli",
token: "ETH",
Expand All @@ -103,10 +119,10 @@ const DOMAINS: &[RawDomain] = &[
is_deprecated: false,
},
RawDomain {
name: "gnosis",
token: "xDAI",
domain: 100,
chain_id: 100,
name: "mantapacific",
token: "ETH",
domain: 169,
chain_id: 169,
is_test_net: false,
is_deprecated: false,
},
Expand Down Expand Up @@ -159,19 +175,11 @@ const DOMAINS: &[RawDomain] = &[
is_deprecated: false,
},
RawDomain {
name: "scrollsepolia",
token: "ETH",
domain: 534351,
chain_id: 534351,
is_test_net: true,
is_deprecated: false,
},
RawDomain {
name: "sepolia",
name: "polygonzkevm",
token: "ETH",
domain: 11155111,
chain_id: 11155111,
is_test_net: true,
domain: 1101,
chain_id: 1101,
is_test_net: false,
is_deprecated: false,
},
RawDomain {
Expand All @@ -183,26 +191,34 @@ const DOMAINS: &[RawDomain] = &[
is_deprecated: false,
},
RawDomain {
name: "polygonzkevm",
name: "scroll",
token: "ETH",
domain: 1101,
chain_id: 1101,
domain: 534352,
chain_id: 534352,
is_test_net: false,
is_deprecated: false,
},
RawDomain {
name: "base",
name: "scrollsepolia",
token: "ETH",
domain: 8453,
chain_id: 8453,
is_test_net: false,
domain: 534351,
chain_id: 534351,
is_test_net: true,
is_deprecated: false,
},
RawDomain {
name: "scroll",
name: "sepolia",
token: "ETH",
domain: 534352,
chain_id: 534352,
domain: 11155111,
chain_id: 11155111,
is_test_net: true,
is_deprecated: false,
},
RawDomain {
name: "viction",
token: "VIC",
domain: 88,
chain_id: 88,
is_test_net: false,
is_deprecated: false,
},
Expand Down
40 changes: 40 additions & 0 deletions rust/config/mainnet3_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,46 @@
"index": {
"from": 271840
}
},
"viction": {
"blocks": {
"confirmations": 1,
"estimateBlockTime": 2,
"reorgPeriod": 0
},
"blockExplorers": [],
"chainId": 88,
"domainId": 88,
"displayName": "Viction",
"name": "viction",
"nativeToken": {
"decimals": 18,
"name": "Viction",
"symbol": "VIC"
},
"protocol": "ethereum",
"rpcUrls": [
{
"http": "https://viction.blockpi.network/v1/rpc/public"
}
],
"merkleRootMultisigIsmFactory": "0x2C1FAbEcd7bFBdEBF27CcdB67baADB38b6Df90fC",
"messageIdMultisigIsmFactory": "0x8b83fefd896fAa52057798f6426E9f0B080FCCcE",
"aggregationIsmFactory": "0x8F7454AC98228f3504Bb91eA3D8Adafe6406110A",
"aggregationHookFactory": "0xEb9FcFDC9EfDC17c1EC5E1dc085B98485da213D6",
"routingIsmFactory": "0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908",
"mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7",
"proxyAdmin": "0x0761b0827849abbf7b0cC09CE14e1C93D87f5004",
"validatorAnnounce": "0x2fa5F5C96419C222cDbCeC797D696e6cE428A7A9",
"interchainSecurityModule": "0xBD70Ea9D599a0FC8158B026797177773C3445730",
"merkleTreeHook": "0x149db7afD694722747035d5AEC7007ccb6F8f112",
"storageGasOracle": "0x19dc38aeae620380430C200a6E990D5Af5480117",
"interchainGasPaymaster": "0x0D63128D887159d63De29497dfa45AFc7C699AE4",
"protocolFee": "0xd83A4F747fE80Ed98839e05079B1B7Fe037b1638",
"index": {
"from": 73573878,
"chunk": 1000
}
}
},
"defaultRpcConsensusType": "fallback"
Expand Down
41 changes: 20 additions & 21 deletions rust/config/testnet4_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,36 +102,36 @@
}
},
"arbitrumgoerli": {
"blockExplorers": [
{
"apiUrl": "https://api-goerli.arbiscan.io/api",
"family": "etherscan",
"name": "Arbiscan",
"url": "https://goerli.arbiscan.io"
}
],
"blocks": {
"confirmations": 1,
"estimateBlockTime": 3,
"reorgPeriod": 1
},
"chainId": 421613,
"domainId": 421613,
"name": "arbitrumgoerli",
"protocol": "ethereum",
"displayName": "Arbitrum Goerli",
"displayNameShort": "Arb. Goerli",
"domainId": 421613,
"isTestnet": true,
"name": "arbitrumgoerli",
"nativeToken": {
"decimals": 18,
"name": "Ether",
"symbol": "ETH",
"decimals": 18
"symbol": "ETH"
},
"protocol": "ethereum",
"rpcUrls": [
{
"http": "https://goerli-rollup.arbitrum.io/rpc"
}
],
"blockExplorers": [
{
"name": "Arbiscan",
"url": "https://goerli.arbiscan.io",
"apiUrl": "https://api-goerli.arbiscan.io/api",
"family": "etherscan"
}
],
"blocks": {
"confirmations": 1,
"reorgPeriod": 1,
"estimateBlockTime": 3
},
"isTestnet": true,
"merkleRootMultisigIsmFactory": "0x17D58eBb5Ea0E2d360c877E119FAef4C4052e6B9",
"messageIdMultisigIsmFactory": "0x922CeEe9e8832a047e6aD68Df4F079F271b73Ac3",
"aggregationIsmFactory": "0xC5Bb8CDD44B6c56695df45c7AA8012a97dD6ED13",
Expand All @@ -140,13 +140,12 @@
"proxyAdmin": "0x00DFB81Bfc45fa03060b605273147F274ea807E5",
"mailbox": "0x13dABc0351407d5aAa0A50003a166A73b4febfDc",
"validatorAnnounce": "0x4a01EEBa1CC20F47A2e60aE4ec932051601FcB9e",
"defaultIsm": "0x8C841784947dEa42f78263D54bec15c0cF65fA22",
"merkleTreeHook": "0xf0A38e1eEA49dAc7968F470c3aA0BDE2565A5d80",
"storageGasOracle": "0xFc8229ADB46D96056A6e451Fb3c55d60FFeD056f",
"interchainGasPaymaster": "0x76189acFA212298d7022624a4633411eE0d2f26F",
"aggregationHook": "0xf852EB6b98d84A4296754043a56759a0Ae0E06df",
"protocolFee": "0x0358ba0D90ED2d90fB8cBb610F27C274D8077a0B",
"fallbackRoutingHook": "0x3Ce607F6FcE5Dfb9821f33504d86E04A4CD0C75f",
"fallbackRoutingHook": "0xEdA6f85f4761A1f9e42FD40CA5a4E8Ce1C764015",
"index": {
"from": 50669378
}
Expand Down
41 changes: 25 additions & 16 deletions typescript/infra/config/environments/mainnet3/chains.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
import { ChainMap, ChainMetadata, chainMetadata } from '@hyperlane-xyz/sdk';
import {
ChainMap,
ChainMetadata,
Chains,
Mainnets,
chainMetadata,
} from '@hyperlane-xyz/sdk';
import { ProtocolType } from '@hyperlane-xyz/utils';

import { AgentChainNames, Role } from '../../../src/roles';

const defaultEthereumMainnetConfigs = Object.fromEntries(
Mainnets.map((chain) => chainMetadata[chain])
.filter((metadata) => metadata.protocol === ProtocolType.Ethereum)
.map((metadata) => [metadata.name, metadata]),
);

export const ethereumMainnetConfigs: ChainMap<ChainMetadata> = {
...defaultEthereumMainnetConfigs,
bsc: {
...chainMetadata.bsc,
transactionOverrides: {
gasPrice: 7 * 10 ** 9, // 7 gwei
},
},
avalanche: chainMetadata.avalanche,
base: chainMetadata.base,
polygon: {
...chainMetadata.polygon,
blocks: {
Expand All @@ -23,11 +35,6 @@ export const ethereumMainnetConfigs: ChainMap<ChainMetadata> = {
// gasPrice: 50 * 10 ** 9, // 50 gwei
},
},
polygonzkevm: chainMetadata.polygonzkevm,
scroll: chainMetadata.scroll,
celo: chainMetadata.celo,
arbitrum: chainMetadata.arbitrum,
optimism: chainMetadata.optimism,
ethereum: {
...chainMetadata.ethereum,
blocks: {
Expand All @@ -39,14 +46,11 @@ export const ethereumMainnetConfigs: ChainMap<ChainMetadata> = {
maxPriorityFeePerGas: 5 * 10 ** 9, // gwei
},
},
moonbeam: chainMetadata.moonbeam,
gnosis: chainMetadata.gnosis,
mantapacific: chainMetadata.mantapacific,
};

// Blessed non-Ethereum chains.
export const nonEthereumMainnetConfigs: ChainMap<ChainMetadata> = {
// solana: chainMetadata.solana,
solana: chainMetadata.solana,
neutron: chainMetadata.neutron,
};

Expand All @@ -66,16 +70,21 @@ export const ethereumChainNames = Object.keys(
) as MainnetChains[];

// Remove mantapacific, as it's not considered a "blessed"
// chain. It's not included in the scraper domains table,
// and we don't relay to mantapacific on the Hyperlane or RC contexts.
// chain - we don't relay to mantapacific on the Hyperlane or RC contexts.
const hyperlaneContextRelayChains = ethereumChainNames.filter(
(chainName) => chainName !== chainMetadata.mantapacific.name,
(chainName) => chainName !== Chains.mantapacific,
);

// Skip viction, as it returns incorrect block hashes for eth_getLogs RPCs,
// which breaks the scraper.
const scraperChains = ethereumChainNames.filter(
(chainName) => chainName !== Chains.viction,
);

// Hyperlane & RC context agent chain names.
export const agentChainNames: AgentChainNames = {
// Run validators for all chains.
[Role.Validator]: supportedChainNames,
[Role.Relayer]: hyperlaneContextRelayChains,
[Role.Scraper]: hyperlaneContextRelayChains,
[Role.Scraper]: scraperChains,
};
Loading

0 comments on commit 2d4b4d1

Please sign in to comment.