Export developer-relevant addresses as hyperlaneCoreAddresses (#1142)

pull/1147/head
Nam Chu Hoai 2 years ago committed by GitHub
parent 9962c969e1
commit eb0e89ae7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      typescript/sdk/src/consts/environments/index.ts
  2. 5
      typescript/sdk/src/index.ts

@ -1,3 +1,5 @@
import { objMap } from '../../utils/objects';
import mainnet from './mainnet.json';
import test from './test.json';
import testnet2 from './testnet2.json';
@ -7,3 +9,18 @@ export const environments = {
testnet2,
mainnet,
};
// Export developer-relevant addresses
export const hyperlaneCoreAddresses = objMap(
{ ...testnet2, ...mainnet },
(_chain, addresses) => ({
outbox: addresses.outbox.proxy,
connectionManager: addresses.connectionManager,
interchainGasPaymaster: addresses.interchainGasPaymaster.proxy,
inboxes: objMap(
// @ts-ignore
addresses.inboxes,
(_remoteChain, inboxAddresses) => inboxAddresses.inbox.proxy,
),
}),
);

@ -4,7 +4,10 @@ export {
chainConnectionConfigs,
testChainConnectionConfigs,
} from './consts/chainConnectionConfigs';
export { environments as coreEnvironments } from './consts/environments';
export {
environments as coreEnvironments,
hyperlaneCoreAddresses,
} from './consts/environments';
export {
ChainMap,

Loading…
Cancel
Save