Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ancient8 #150

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 29 additions & 24 deletions src/consts/chains.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
import { ChainMap, ChainMetadata } from '@hyperlane-xyz/sdk';
import { ChainMap, ChainMetadata, ChainTechnicalStack, ExplorerFamily } from '@hyperlane-xyz/sdk';
import { etherToken } from '@hyperlane-xyz/sdk/dist/consts/chainMetadata';
import { ProtocolType } from '@hyperlane-xyz/utils';

// A map of chain names to ChainMetadata
// Chains can be defined here, in chains.json, or in chains.yaml
// Chains already in the SDK need not be included here unless you want to override some fields
// Schema here: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/sdk/src/metadata/chainMetadataTypes.ts
export const chains: ChainMap<ChainMetadata & { mailbox?: Address }> = {
// mycustomchain: {
// protocol: ProtocolType.Ethereum,
// chainId: 123123,
// domainId: 123123,
// name: 'mycustomchain',
// displayName: 'My Chain',
// nativeToken: { name: 'Ether', symbol: 'ETH', decimals: 18 },
// rpcUrls: [{ http: 'https://mycustomchain-rpc.com' }],
// blockExplorers: [
// {
// name: 'MyCustomScan',
// url: 'https://mycustomchain-scan.com',
// apiUrl: 'https://api.mycustomchain-scan.com/api',
// family: ExplorerFamily.Etherscan,
// },
// ],
// blocks: {
// confirmations: 1,
// reorgPeriod: 1,
// estimateBlockTime: 10,
// },
// logoURI: '/logo.svg',
// },
ancient8: {
blockExplorers: [
{
apiUrl: 'https://scan.ancient8.gg/api',
family: ExplorerFamily.Blockscout,
name: 'Ancient8 Explorer',
url: 'https://scan.ancient8.gg',
},
],
blocks: {
confirmations: 1,
estimateBlockTime: 2,
reorgPeriod: 0,
},
chainId: 888888888,
displayName: 'Ancient8',
domainId: 888888888,
isTestnet: false,
name: 'ancient8',
nativeToken: etherToken,
gasCurrencyCoinGeckoId: 'ethereum',
protocol: ProtocolType.Ethereum,
rpcUrls: [{ http: 'https://rpc.ancient8.gg' }],
technicalStack: ChainTechnicalStack.Other,
mailbox: '0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7',
},
};
32 changes: 30 additions & 2 deletions src/consts/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
import { WarpCoreConfig } from '@hyperlane-xyz/sdk';
import { TokenStandard, WarpCoreConfig } from '@hyperlane-xyz/sdk';

// A list of Warp UI token configs
// Tokens can be defined here, in tokens.json, or in tokens.yaml
// The input here is typically the output of the Hyperlane CLI warp deploy command
export const tokenConfigs: WarpCoreConfig = {
tokens: [],
tokens: [
{
name: 'USD Coin',
symbol: 'USDC',
decimals: 6,
chainName: 'ethereum',
standard: TokenStandard.EvmHypCollateral,
addressOrDenom: '0x8b4192B9Ad1fCa440A5808641261e5289e6de95D',
collateralAddressOrDenom: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
connections: [
{
token: 'ethereum|ancient8|0x97423A68BAe94b5De52d767a17aBCc54c157c0E5',
},
],
},
{
name: 'USD Coin',
symbol: 'USDC',
decimals: 6,
chainName: 'ancient8',
standard: TokenStandard.EvmHypSynthetic,
addressOrDenom: '0x97423A68BAe94b5De52d767a17aBCc54c157c0E5',
connections: [
{
token: 'ethereum|ethereum|0x8b4192B9Ad1fCa440A5808641261e5289e6de95D',
},
],
},
],
options: {},
};
21 changes: 1 addition & 20 deletions src/consts/tokens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,4 @@
# Configs can be defined here, in tokens.json, or in tokens.ts
# The input here is typically the output of the Hyperlane CLI warp deploy command
---
tokens:
# Eth Mainnet HypNative token
- chainName: sepolia
standard: EvmHypNative
decimals: 18
symbol: ETH
name: Ether
addressOrDenom: '0x767C51a91CC9dEF2F24C35c340649411D6390320'
logoURI: '/logos/weth.png'
connections:
- { token: ethereum|alfajores|0x8bF6Ca2Dca1DF703Cb9144cef6A4d86abA7776C4 }
- chainName: alfajores
standard: EvmHypSynthetic
decimals: 18
symbol: ETH
name: Ether
addressOrDenom: '0x8bF6Ca2Dca1DF703Cb9144cef6A4d86abA7776C4'
logoURI: '/logos/weth.png'
connections:
- { token: ethereum|sepolia|0x767C51a91CC9dEF2F24C35c340649411D6390320 }
tokens: []
Loading