sei-protocol / sei-chain

Apache License 2.0
2.7k stars 805 forks source link

Add native associate tx type #1694

Closed codchen closed 4 months ago

codchen commented 4 months ago

Describe your changes and provide context

Add a cosmos TX type that allows forced address association for free. The condition is the same as EVM associate tx:

Usage:

seid tx evm native-associate <your custom msg> --from=<your key> --broadcast-mode=block

Testing performed to validate your change

local sei unit test

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 16.66667% with 40 lines in your changes are missing coverage. Please review.

Project coverage is 60.62%. Comparing base (e949a96) to head (62da821). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1694/graphs/tree.svg?width=650&height=150&src=pr&token=DG7ZZJ3PVV&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol)](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol) ```diff @@ Coverage Diff @@ ## main #1694 +/- ## ========================================== - Coverage 60.67% 60.62% -0.05% ========================================== Files 368 369 +1 Lines 26978 27034 +56 ========================================== + Hits 16369 16390 +21 - Misses 9493 9528 +35 Partials 1116 1116 ``` | [Files](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1694?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol) | Coverage Δ | | |---|---|---| | [app/ante.go](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1694?src=pr&el=tree&filepath=app%2Fante.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol#diff-YXBwL2FudGUuZ28=) | `54.11% <100.00%> (ø)` | | | [...pp/antedecorators/accesscontrol\_wasm\_dependency.go](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1694?src=pr&el=tree&filepath=app%2Fantedecorators%2Faccesscontrol_wasm_dependency.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol#diff-YXBwL2FudGVkZWNvcmF0b3JzL2FjY2Vzc2NvbnRyb2xfd2FzbV9kZXBlbmRlbmN5Lmdv) | `2.46% <ø> (+0.03%)` | :arrow_up: | | [app/app.go](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1694?src=pr&el=tree&filepath=app%2Fapp.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol#diff-YXBwL2FwcC5nbw==) | `65.02% <100.00%> (ø)` | | | [x/evm/keeper/msg\_server.go](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1694?src=pr&el=tree&filepath=x%2Fevm%2Fkeeper%2Fmsg_server.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol#diff-eC9ldm0va2VlcGVyL21zZ19zZXJ2ZXIuZ28=) | `76.44% <100.00%> (+0.17%)` | :arrow_up: | | [x/evm/ante/preprocess.go](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1694?src=pr&el=tree&filepath=x%2Fevm%2Fante%2Fpreprocess.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol#diff-eC9ldm0vYW50ZS9wcmVwcm9jZXNzLmdv) | `74.91% <0.00%> (-1.33%)` | :arrow_down: | | [app/antedecorators/gasless.go](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1694?src=pr&el=tree&filepath=app%2Fantedecorators%2Fgasless.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol#diff-YXBwL2FudGVkZWNvcmF0b3JzL2dhc2xlc3MuZ28=) | `78.16% <30.76%> (-5.29%)` | :arrow_down: | | [x/evm/types/message\_associate.go](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1694?src=pr&el=tree&filepath=x%2Fevm%2Ftypes%2Fmessage_associate.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol#diff-eC9ldm0vdHlwZXMvbWVzc2FnZV9hc3NvY2lhdGUuZ28=) | `0.00% <0.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1694/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol)