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

bootstrap router #76

Merged
merged 23 commits into from
Oct 23, 2024
Merged

bootstrap router #76

merged 23 commits into from
Oct 23, 2024

Conversation

shunjizhan
Copy link
Collaborator

@shunjizhan shunjizhan commented Oct 14, 2024

Change

Added endpoints for bootstrap router.

Bootstrap router is a little different than other routers that it won't destroy itself after routing for bootstrap, and it will only perform gas drop for the first route (AcalaNetwork/asset-router#62).

Tests

Added tests to make sure routing works as expected, especially that the behavior is different for the first and second route.

currently bootstrapping has not opened yet on mainnet, so in the test setup we need to manually do the necessary preparation and open it.

@shunjizhan shunjizhan requested a review from xlc October 22, 2024 12:49
@shunjizhan shunjizhan marked this pull request as ready for review October 22, 2024 12:49
@shunjizhan shunjizhan changed the title Bootstrap router bootstrap router Oct 23, 2024
@shunjizhan shunjizhan merged commit b6b184e into master Oct 23, 2024
3 of 4 checks passed
@shunjizhan shunjizhan deleted the bootstrap-router branch October 23, 2024 02:12
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 95.08197% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.25%. Comparing base (0a51269) to head (bfb295c).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/api/swapAndRoute.ts 33.33% 2 Missing ⚠️
src/api/dropAndBootstrap.ts 97.56% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   84.97%   82.25%   -2.73%     
==========================================
  Files          27       28       +1     
  Lines         619      665      +46     
  Branches       69       77       +8     
==========================================
+ Hits          526      547      +21     
- Misses         91       96       +5     
- Partials        2       22      +20     
Files with missing lines Coverage Δ
src/api/index.ts 100.00% <100.00%> (ø)
src/consts.ts 91.17% <100.00%> (-8.83%) ⬇️
src/middlewares/router.ts 100.00% <100.00%> (ø)
src/utils/configureEnv.ts 92.30% <ø> (-7.70%) ⬇️
src/utils/index.ts 100.00% <100.00%> (ø)
src/utils/validate.ts 95.65% <100.00%> (-4.35%) ⬇️
src/api/dropAndBootstrap.ts 97.56% <97.56%> (ø)
src/api/swapAndRoute.ts 27.77% <33.33%> (-5.56%) ⬇️

... and 9 files with indirect coverage changes

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.

2 participants