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

Only send unlocked tokens upon address association #1737

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

codchen
Copy link
Collaborator

@codchen codchen commented Jun 19, 2024

Describe your changes and provide context

It is possible for a cast address to hold locked tokens since anyone (e.g. an attacker) can create vesting account for anyone before the account is first referenced on chain. So when consolidating balances we should only transfer the unlocked part. Any locked tokens under cast addresses will be frozen, since there is no real use case for creating vesting account for cast addresses.

Testing performed to validate your change

unit tests

@codchen codchen force-pushed the only-consolidate-unlocked-tokens branch from 633bfe6 to d899017 Compare June 19, 2024 07:17
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 60.66%. Comparing base (e8e4b3b) to head (ac26511).
Report is 86 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1737      +/-   ##
==========================================
- Coverage   61.64%   60.66%   -0.99%     
==========================================
  Files         365      372       +7     
  Lines       26178    27024     +846     
==========================================
+ Hits        16138    16393     +255     
- Misses       8967     9532     +565     
- Partials     1073     1099      +26     
Files Coverage Δ
x/evm/ante/preprocess.go 75.17% <85.71%> (-2.52%) ⬇️

... and 39 files with indirect coverage changes

@codchen codchen force-pushed the only-consolidate-unlocked-tokens branch from d899017 to ac26511 Compare June 24, 2024 01:23
@codchen codchen enabled auto-merge (squash) June 24, 2024 01:57
@codchen codchen disabled auto-merge June 24, 2024 02:07
@codchen codchen merged commit 4f2d742 into main Jun 24, 2024
49 checks passed
@codchen codchen deleted the only-consolidate-unlocked-tokens branch June 24, 2024 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant