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

feat: WarpModule with create() #3838

Merged
merged 80 commits into from
Jun 6, 2024
Merged

feat: WarpModule with create() #3838

merged 80 commits into from
Jun 6, 2024

Conversation

ltyu
Copy link
Contributor

@ltyu ltyu commented May 22, 2024

Description

  • Adds WarpModule with create logic.
  • Updates logic to WarpModuleReader

Drive by

Related issues

Backward compatibility

Yes

Testing

Unit Tests

ltyu and others added 30 commits April 29, 2024 17:28
### Description
Add Reader to derive WarpConfig from TokenRouter address

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

- Fixes #3579 

### Backward compatibility
Yes

### Testing

Unit Tests
Signed-off-by: Paul Balaji <paul@hyperlane.xyz>
### Description
Add Reader to derive WarpConfig from TokenRouter address

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

- Fixes #3579 

### Backward compatibility
Yes

### Testing

Unit Tests
Add Reader to derive WarpConfig from TokenRouter address

<!--
Are there any minor or drive-by changes also included?
-->

- Fixes #3579

Yes

Unit Tests
### Description

Fixes owner config to be safes

### Backward compatibility

Yes
- Remove most consts from SDK
- Refactor tests that relied on chainMetadata
- Remove JSON imports/exports in the SDK
- Update the HelloWorld package to read metadata from the registry lib
- Update the Infra package to read/write to a LocalRegistry
- Update the CLI to read and write from registries

- Fix typo in `EvmHypCollateralVault` token standard
- Use consistent, newest yaml lib version

Fixes hyperlane-xyz/issues#917
Fixes #2810

No:
- Several SDK exports like `chainMetadata` have been removed
- Common args for the CLI like `--chain` have been replaced with `--registry` and `--overrides`
@ltyu ltyu force-pushed the warpCrudModule_createOnly branch from 04349e2 to a910681 Compare May 24, 2024 21:18
Copy link
Member

@yorhodes yorhodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need zero address to derive to ism: undefined
otherwise

module=create(config)
derived = module.read()
assert(derived === config)

will throw

typescript/sdk/src/token/EvmERC20WarpModule.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/EvmERC20WarpModule.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/EvmERC20WarpRouteReader.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/EvmERC20WarpRouteReader.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/EvmERC20WarpRouteReader.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/EvmERC20WarpRouteReader.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/EvmERC20WarpRouteReader.ts Outdated Show resolved Hide resolved
typescript/sdk/src/router/schemas.ts Outdated Show resolved Hide resolved
@ltyu ltyu force-pushed the warpCrudModule_createOnly branch 2 times, most recently from fa2ad20 to 65e4ed5 Compare May 28, 2024 18:58
@ltyu ltyu force-pushed the warpCrudModule_createOnly branch from 65e4ed5 to 9bd4308 Compare May 28, 2024 19:01
@ltyu ltyu force-pushed the warpCrudModule_createOnly branch from 1aa8cfc to 0470ad0 Compare June 5, 2024 17:49
@ltyu ltyu force-pushed the warpCrudModule_createOnly branch from 0470ad0 to 7b40cca Compare June 5, 2024 17:54
@ltyu ltyu force-pushed the warpCrudModule_createOnly branch from 0c54b9c to b43bdd4 Compare June 5, 2024 19:08
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (cli-2.0@cc65ee8). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             cli-2.0    #3838   +/-   ##
==========================================
  Coverage           ?   62.76%           
==========================================
  Files              ?      125           
  Lines              ?     1579           
  Branches           ?      175           
==========================================
  Hits               ?      991           
  Misses             ?      561           
  Partials           ?       27           
Components Coverage Δ
core 84.61% <0.00%> (?)
hooks 67.50% <0.00%> (?)
isms 39.52% <0.00%> (?)
token 60.83% <0.00%> (?)
middlewares 77.05% <0.00%> (?)

typescript/sdk/src/token/EvmERC20WarpRouteReader.ts Outdated Show resolved Hide resolved
typescript/sdk/src/hook/types.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/EvmERC20WarpModule.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/EvmERC20WarpModule.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/EvmERC20WarpRouteReader.ts Outdated Show resolved Hide resolved
@ltyu ltyu force-pushed the warpCrudModule_createOnly branch from 72b7ae4 to a971db9 Compare June 6, 2024 00:11
@ltyu ltyu force-pushed the warpCrudModule_createOnly branch from a971db9 to d28ab7d Compare June 6, 2024 00:13
@ltyu ltyu enabled auto-merge (squash) June 6, 2024 00:14
@ltyu ltyu merged commit bdcbe1d into cli-2.0 Jun 6, 2024
32 checks passed
@ltyu ltyu deleted the warpCrudModule_createOnly branch June 6, 2024 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants