sei-protocol / sei-chain

Apache License 2.0
2.67k stars 797 forks source link

Create account for sendNative receiver #1736

Closed codchen closed 1 week ago

codchen commented 2 weeks ago

Describe your changes and provide context

Usually in EVM we don't create accounts for receiver because we don't want to create accounts for cast addresses to reduce storage footprint and make execution more parallelized. SendNative is unique in that the receiver is not expected to be (though not impossible) cast addresses, so we should treat account creation the same as regular bank sends.

Testing performed to validate your change

unit test

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 60.78%. Comparing base (d2f408b) to head (53d1c3f).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1736/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/1736?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 #1736 +/- ## ========================================== - Coverage 60.90% 60.78% -0.13% ========================================== Files 371 371 Lines 27472 27479 +7 ========================================== - Hits 16732 16702 -30 - Misses 9596 9635 +39 + Partials 1144 1142 -2 ``` | [Files](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1736?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/app.go](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1736?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==) | `66.22% <100.00%> (+0.02%)` | :arrow_up: | | [precompiles/bank/bank.go](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1736?src=pr&el=tree&filepath=precompiles%2Fbank%2Fbank.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol#diff-cHJlY29tcGlsZXMvYmFuay9iYW5rLmdv) | `60.62% <100.00%> (+0.95%)` | :arrow_up: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1736/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol)