sei-protocol / sei-chain

Apache License 2.0
2.67k stars 797 forks source link

Allow bank precompile to use the unassociated casted address for receiving balances #1718

Closed udpatil closed 3 weeks ago

udpatil commented 3 weeks ago

Describe your changes and provide context

This modifies bank precompile behavior to allow receiving native tokens to an unassociated address in a casted way such that they will be migrated in migrate_balance upon association.

Testing performed to validate your change

Need to add unit tests + integration tests, have performed some local chain testing but need to perform more for thoroughness.

codecov[bot] commented 3 weeks ago

Codecov Report

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

Project coverage is 60.79%. Comparing base (1c7253b) to head (e781fd9).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1718/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/1718?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 #1718 +/- ## ========================================== - Coverage 60.80% 60.79% -0.01% ========================================== Files 370 370 Lines 27435 27436 +1 ========================================== - Hits 16683 16681 -2 Misses 9612 9612 - Partials 1140 1143 +3 ``` | [Files](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1718?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol) | Coverage Δ | | |---|---|---| | [precompiles/bank/bank.go](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1718?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) | `59.67% <100.00%> (+2.99%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/sei-protocol/sei-chain/pull/1718/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol)