Skip to content

Commit

Permalink
Update to Hyperlane SDK 3.1.1 (#23)
Browse files Browse the repository at this point in the history
### Description

Update to Hyperlane SDK 3.1.1 and fix tests accordingly

#### Other notes

### Backward compatibility

Yes

### Testing

Locally
  • Loading branch information
jmrossy authored May 6, 2024
1 parent e6f5fe3 commit fb7bc0c
Show file tree
Hide file tree
Showing 6 changed files with 2,642 additions and 82 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-boats-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/registry': minor
---

Update to SDK 3.1.1
17 changes: 16 additions & 1 deletion chains/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"enum": [
"ethereum",
"sealevel",
"fuel",
"cosmos"
],
"description": "The type of protocol used by this chain. See ProtocolType for valid values."
Expand Down Expand Up @@ -91,6 +90,11 @@
"format": "uri",
"description": "The HTTP URL of the RPC endpoint (preferably HTTPS)."
},
"concurrency": {
"type": "integer",
"exclusiveMinimum": 0,
"description": "Maximum number of concurrent RPC requests."
},
"webSocket": {
"type": "string",
"description": "The WSS URL if the endpoint also supports websockets."
Expand Down Expand Up @@ -254,6 +258,17 @@
"isTestnet": {
"type": "boolean",
"description": "Whether the chain is considered a testnet or a mainnet."
},
"index": {
"type": "object",
"properties": {
"from": {
"type": "number",
"description": "The block to start any indexing from."
}
},
"additionalProperties": false,
"description": "Indexing settings for the chain."
}
},
"required": [
Expand Down
7 changes: 4 additions & 3 deletions deployments/warp_routes/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"EvmNative",
"EvmHypNative",
"EvmHypCollateral",
"EvmHypcollateralVault",
"EvmHypXERC20Collateral",
"EvmHypFiatCollateral",
"EvmHypCollateralVault",
"EvmHypSynthetic",
"SealevelSpl",
"SealevelSpl2022",
Expand All @@ -39,8 +41,7 @@
"CW721",
"CwHypNative",
"CwHypCollateral",
"CwHypSynthetic",
"FuelNative"
"CwHypSynthetic"
],
"description": "The type of token. See TokenStandard for valid values."
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@eslint/js": "^9.1.1",
"@hyperlane-xyz/sdk": "3.10.0",
"@hyperlane-xyz/sdk": "3.11.1",
"@types/mocha": "^10.0.1",
"@types/node": "^16.9.1",
"@typescript-eslint/parser": "^7.7.0",
Expand Down
11 changes: 5 additions & 6 deletions test/health/explorer-health.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { ChainMetadata } from '@hyperlane-xyz/sdk';
import { Address, ProtocolType, sleep } from '@hyperlane-xyz/utils';
import { expect } from 'chai';
import { chainMetadata } from '../../dist/index.js';
// TODO export these from the SDK
import {
getExplorerAddressUrl,
getExplorerBaseUrl,
getExplorerTxUrl,
} from '@hyperlane-xyz/sdk/dist/metadata/blockExplorer.js';
import { Address, ProtocolType, sleep } from '@hyperlane-xyz/utils';
import { expect } from 'chai';
import { chainMetadata } from '../../dist/index.js';
} from '../../node_modules/@hyperlane-xyz/sdk/dist/metadata/blockExplorer.js';

const HEALTH_CHECK_TIMEOUT = 10_000; // 10s
const HEALTH_CHECK_DELAY = 3_000; // 3s
Expand All @@ -15,15 +16,13 @@ const PROTOCOL_TO_ADDRESS: Record<ProtocolType, Address> = {
[ProtocolType.Ethereum]: '0x0000000000000000000000000000000000000000',
[ProtocolType.Sealevel]: '11111111111111111111111111111111',
[ProtocolType.Cosmos]: 'cosmos100000000000000000000000000000000000000',
[ProtocolType.Fuel]: '',
};

const PROTOCOL_TO_TX_HASH: Record<ProtocolType, Address> = {
[ProtocolType.Ethereum]: '0x0000000000000000000000000000000000000000000000000000000000000000',
[ProtocolType.Sealevel]:
'1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111',
[ProtocolType.Cosmos]: '0000000000000000000000000000000000000000000000000000000000000000',
[ProtocolType.Fuel]: '',
};

export async function isBlockExplorerHealthy(
Expand Down
Loading

0 comments on commit fb7bc0c

Please sign in to comment.