Skip to content

Conversation

@yihuang
Copy link
Contributor

@yihuang yihuang commented Nov 5, 2025

Description

Closes: #505

Supersedes: #517

Use go-abi to simplify implementation, see: #789

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

Closes: cosmos#505

Supersedes: cosmos#517

Use go-abi to simplify implementation.

update erc20 source
@yihuang yihuang mentioned this pull request Nov 5, 2025
3 tasks
Comment on lines +62 to +64
for k, v := range generator.ParseExternalTuples(*extTuplesFlag) {
extTuples[k] = v
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
Comment on lines +112 to +117
for denom, amount := range m {
coin := sdk.NewCoin(denom, sdkmath.NewInt(amount))
if cb(coin) {
break
}
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
Comment on lines +122 to +127
for denom, amount := range k.supplies {
coin := sdk.NewCoin(denom, sdkmath.NewInt(amount))
if cb(coin) {
break
}
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 43.15113% with 884 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.63%. Comparing base (4cf3c3b) to head (38b39ac).

Files with missing lines Patch % Lines
precompiles/bank/bank.abi.go 44.41% 387 Missing and 66 partials ⚠️
precompiles/bank/erc20/abi.go 23.77% 367 Missing and 21 partials ⚠️
precompiles/bank/mock.go 79.01% 14 Missing and 3 partials ⚠️
precompiles/common/precompile.go 66.66% 6 Missing and 5 partials ⚠️
precompiles/bank/query.go 84.09% 3 Missing and 4 partials ⚠️
precompiles/bank/tx.go 75.00% 2 Missing and 2 partials ⚠️
precompiles/bank/bank.go 94.59% 2 Missing ⚠️
precompiles/bank/erc20.go 85.71% 1 Missing and 1 partial ⚠️

❌ Your project check has failed because the head coverage (63.63%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #804      +/-   ##
==========================================
- Coverage   65.17%   63.63%   -1.54%     
==========================================
  Files         317      322       +5     
  Lines       21600    23141    +1541     
==========================================
+ Hits        14078    14726     +648     
- Misses       6345     7150     +805     
- Partials     1177     1265      +88     
Files with missing lines Coverage Δ
precompiles/types/defaults.go 67.85% <100.00%> (+1.19%) ⬆️
precompiles/types/static_precompiles.go 88.63% <100.00%> (ø)
server/config/opendb.go 0.00% <ø> (ø)
x/vm/statedb/mockkeeper.go 40.74% <100.00%> (ø)
x/vm/types/config_testing.go 58.97% <ø> (ø)
x/vm/types/denom_config_testing.go 59.09% <ø> (ø)
precompiles/bank/bank.go 86.88% <94.59%> (+8.45%) ⬆️
precompiles/bank/erc20.go 85.71% <85.71%> (ø)
precompiles/bank/tx.go 75.00% <75.00%> (ø)
precompiles/bank/query.go 85.13% <84.09%> (-5.98%) ⬇️
... and 4 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Problem: dynamic erc20 precompiles are heavy

2 participants