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: feegrant module #380

Merged
merged 8 commits into from
Nov 16, 2021
Merged

feat: feegrant module #380

merged 8 commits into from
Nov 16, 2021

Conversation

egonspace
Copy link

@egonspace egonspace commented Nov 15, 2021

Description

  • porting Add fee grant module cosmos/cosmos-sdk#8061
  • porting method
    • migrate x/feegrant of cosmos-sdk(bb70dca)(Wed Nov 10 17:18:57 2021, master branch, v0.44.x)
    • modify AccAddress releated code
    • modify cosmos to lbm from proto files
    • integrate fee module with legacy interface

How to test

zsh init_node.sh sim 1
simd start --home ~/.simapp/simapp0/

simd keys add egon --keyring-backend test --home ~/.simapp/simapp0/
# generated: link148s220k2nv9q2jkxn8f5m9zy3t94nxf698eaal
simd keys add tom --keyring-backend test --home ~/.simapp/simapp0/
# generated: link1e2gd7yvweudresuetle6rqa6ymk6jvemfq7fuk

simd tx feegrant grant link146asaycmtydq45kxc8evntqfgepagygelel00h link148s220k2nv9q2jkxn8f5m9zy3t94nxf698eaal --keyring-backend test --home ~/.simapp/simapp0/ --chain-id sim

simd query feegrant  grants link148s220k2nv9q2jkxn8f5m9zy3t94nxf698eaal --home ~/.simapp/simapp0/ --chain-id sim
allowances:
- allowance:
    '@type': /lbm.feegrant.v1.BasicAllowance
    expiration: null
    spend_limit: []
  grantee: link148s220k2nv9q2jkxn8f5m9zy3t94nxf698eaal
  granter: link146asaycmtydq45kxc8evntqfgepagygelel00h
pagination:
  next_key: null
  total: "0"

simd query feegrant grant link146asaycmtydq45kxc8evntqfgepagygelel00h link148s220k2nv9q2jkxn8f5m9zy3t94nxf698eaal 
allowance:
  '@type': /lbm.feegrant.v1.BasicAllowance
  expiration: null
  spend_limit: []
grantee: link148s220k2nv9q2jkxn8f5m9zy3t94nxf698eaal
granter: link146asaycmtydq45kxc8evntqfgepagygelel00h

simd tx feegrant revoke link146asaycmtydq45kxc8evntqfgepagygelel00h link148s220k2nv9q2jkxn8f5m9zy3t94nxf698eaal --keyring-backend test --home ~/.simapp/simapp0/ --chain-id sim

simd tx bank send link148s220k2nv9q2jkxn8f5m9zy3t94nxf698eaal link1e2gd7yvweudresuetle6rqa6ymk6jvemfq7fuk 1stake --keyring-backend test --home ~/.simapp/simapp0/ --chain-id sim --fee-account link146asaycmtydq45kxc8evntqfgepagygelel00h

closes: #374


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@egonspace egonspace self-assigned this Nov 15, 2021
@codecov
Copy link

codecov bot commented Nov 16, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@6d3d2f1). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #380   +/-   ##
=======================================
  Coverage        ?   53.77%           
=======================================
  Files           ?      674           
  Lines           ?    69654           
  Branches        ?        0           
=======================================
  Hits            ?    37458           
  Misses          ?    29195           
  Partials        ?     3001           

Copy link
Contributor

@dudong2 dudong2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@0Tech 0Tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@egonspace egonspace merged commit bc28e49 into Finschia:main Nov 16, 2021
@zemyblue zemyblue mentioned this pull request Jan 26, 2022
5 tasks
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.

Implement feegrant feature
3 participants