-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Neutron warp route configs fixes and tests (#56)
### Description - Fix warp route file names not matching IDs - Add missing token def for neutron-manta route - Remove dupe chain names in warp route IDs - Add unit test to validate all warp configs #### Other notes ### Backward compatibility Yes ### Testing Added new unit tests
- Loading branch information
Showing
8 changed files
with
37 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@hyperlane-xyz/registry': patch | ||
--- | ||
|
||
Fixes for some neutron warp route configs |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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,21 @@ | ||
import { expect } from 'chai'; | ||
|
||
import { MultiProtocolProvider, WarpCore } from '@hyperlane-xyz/sdk'; | ||
import { FileSystemRegistry } from '../../src/registry/FileSystemRegistry.js'; | ||
|
||
describe('Warp Route Configs', () => { | ||
const localRegistry = new FileSystemRegistry({ uri: './' }); | ||
const chainMetadata = localRegistry.getMetadata(); | ||
const multiProvider = new MultiProtocolProvider(chainMetadata); | ||
const routes = localRegistry.getWarpRoutes(); | ||
|
||
for (const id of Object.keys(routes)) { | ||
it(`Route ${id} is valid`, async () => { | ||
const config = routes[id]; | ||
// WarpCore will validate the config | ||
const warpCore = WarpCore.FromConfig(multiProvider, config); | ||
expect(warpCore).to.be.an.instanceOf(WarpCore); | ||
expect(warpCore.tokens.length).to.be.greaterThan(0); | ||
}); | ||
} | ||
}); |