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

feat: add module feeburn #156

Merged
merged 12 commits into from
Dec 28, 2022
Merged

feat: add module feeburn #156

merged 12 commits into from
Dec 28, 2022

Conversation

hoanguyenkh
Copy link
Collaborator

Description

Closes: #XXX

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • confirmed that this PR does not change production code

x/feeburn/client/cli/tx.go Fixed Show fixed Hide fixed
x/feeburn/module_simulation.go Fixed Show fixed Hide fixed

fmt.Println("total fee", totalFees)
fmt.Println("total fee burn", feeBurn)
addr, _ := sdk.AccAddressFromBech32("astra17xpfvakm2amg962yls6f84z3kell8c5lnnwrnp")

Check warning

Code scanning / gosec

Returned error is not propagated up the stack.

Returned error is not propagated up the stack.
x/feeburn/handler.go Fixed Show fixed Hide fixed
@@ -221,7 +236,14 @@
encodingConfig := encoding.MakeConfig(app.ModuleBasics)
suite.clientCtx = client.Context{}.WithTxConfig(encodingConfig.TxConfig)
suite.ethSigner = ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID())

err = suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, sdk.Coins{{Denom: config.BaseDenom, Amount: sdk.NewInt(int64(math.Pow10(18) * 1))}})

Check notice

Code scanning / CodeQL

Floating point arithmetic

Floating point arithmetic operations are not associative and a possible source of non-determinism
tests/helper.go Fixed Show fixed Hide fixed
@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2022

Codecov Report

Merging #156 (50c50f3) into main (ebfe740) will decrease coverage by 1.81%.
The diff coverage is 93.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #156      +/-   ##
==========================================
- Coverage   74.79%   72.98%   -1.82%     
==========================================
  Files          22       17       -5     
  Lines        1857     1573     -284     
==========================================
- Hits         1389     1148     -241     
+ Misses        428      402      -26     
+ Partials       40       23      -17     
Impacted Files Coverage Δ
x/feeburn/keeper/msg_server.go 0.00% <0.00%> (ø)
x/feeburn/ante/ante.go 81.25% <81.25%> (ø)
x/feeburn/keeper/evm_hooks.go 83.33% <83.33%> (ø)
x/feeburn/keeper/keeper.go 85.71% <85.71%> (ø)
tests/helper.go 76.23% <94.59%> (-0.35%) ⬇️
app/app.go 84.83% <100.00%> (-0.06%) ⬇️
x/feeburn/genesis.go 100.00% <100.00%> (ø)
x/feeburn/keeper/fee_burn.go 100.00% <100.00%> (ø)
x/feeburn/keeper/grpc_query_params.go 100.00% <100.00%> (ø)
x/feeburn/keeper/params.go 100.00% <100.00%> (ø)
... and 1 more

err = suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, sdk.Coins{{Denom: config.BaseDenom, Amount: sdk.NewInt(int64(math.Pow10(18) * 1))}})
require.NoError(t, err)
suite.Commit()
feePoolBalance := sdk.Coins{{Denom: config.BaseDenom, Amount: sdk.NewInt(int64(math.Pow10(18) * 1))}}

Check notice

Code scanning / CodeQL

Floating point arithmetic

Floating point arithmetic operations are not associative and a possible source of non-determinism
@hoanguyenkh hoanguyenkh changed the base branch from main to astra December 28, 2022 09:59
@hoanguyenkh hoanguyenkh merged commit e9dea88 into astra Dec 28, 2022
@hoanguyenkh hoanguyenkh deleted the module/feeburn branch March 17, 2023 07:59
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.

2 participants