Skip to content

[EVM] call SendCoinsAndWei to support 18-decimal point precision#1191

Merged
codchen merged 2 commits intoevmfrom
evm-18-decimals
Dec 29, 2023
Merged

[EVM] call SendCoinsAndWei to support 18-decimal point precision#1191
codchen merged 2 commits intoevmfrom
evm-18-decimals

Conversation

@codchen
Copy link
Collaborator

@codchen codchen commented Dec 28, 2023

Describe your changes and provide context

Previously we were truncating any amount after the sixth decimal point in balance operations, which could cause confusion to some developers or just outright render some applications unusable. This PR makes use of the new bank keeper functions introduced in sei-protocol/sei-cosmos#386 to handle amounts up to 18 decimal points properly.

Testing performed to validate your change

unit test
integrated with local sei

@codecov
Copy link

codecov bot commented Dec 28, 2023

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (0580149) 66.17% compared to head (2dbe32e) 66.06%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              evm    #1191      +/-   ##
==========================================
- Coverage   66.17%   66.06%   -0.12%     
==========================================
  Files         329      329              
  Lines       21536    21552      +16     
==========================================
- Hits        14252    14238      -14     
- Misses       6509     6540      +31     
+ Partials      775      774       -1     
Files Coverage Δ
aclmapping/evm/mappings.go 91.39% <100.00%> (+0.41%) ⬆️
app/app.go 75.04% <ø> (ø)
x/evm/state/utils.go 100.00% <100.00%> (ø)
x/evm/module.go 70.58% <77.77%> (+1.35%) ⬆️
x/evm/state/balance.go 77.55% <76.47%> (-0.45%) ⬇️
x/evm/state/statedb.go 38.66% <0.00%> (-1.62%) ⬇️

... and 2 files with indirect coverage changes

@codchen codchen merged commit fa4791d into evm Dec 29, 2023
@codchen codchen deleted the evm-18-decimals branch December 29, 2023 05:52
codchen added a commit that referenced this pull request Jan 5, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
codchen added a commit that referenced this pull request Jan 8, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Jan 31, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Feb 28, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Feb 28, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Feb 28, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Mar 4, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Mar 4, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Mar 11, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Mar 26, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Apr 17, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Apr 17, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Apr 17, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Apr 18, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Apr 19, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
udpatil pushed a commit that referenced this pull request Apr 19, 2024
* [EVM] call SendCoinsAndWei to support 18-decimal point precision

* add ACL type for wei balance
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.

1 participant