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

refactor: remove SetBalance and SetSupply #629

Conversation

dudong2
Copy link
Contributor

@dudong2 dudong2 commented Aug 7, 2022

Description

Remove unsafe balance changing methods from bank keeper such as SetBalance and SetSupply.
closes: #628

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

@dudong2 dudong2 self-assigned this Aug 7, 2022
@codecov
Copy link

codecov bot commented Aug 7, 2022

Codecov Report

Merging #629 (3a25a1b) into main (fed352c) will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #629      +/-   ##
==========================================
+ Coverage   60.18%   60.26%   +0.07%     
==========================================
  Files         817      817              
  Lines       94996    94967      -29     
==========================================
+ Hits        57178    57228      +50     
+ Misses      34359    34260      -99     
- Partials     3459     3479      +20     
Impacted Files Coverage Δ
store/listenkv/store.go 96.49% <ø> (ø)
x/bank/keeper/keeper.go 73.37% <ø> (+2.97%) ⬆️
x/bank/keeper/send.go 80.68% <ø> (+6.72%) ⬆️
x/token/validation.go 89.09% <0.00%> (-3.64%) ⬇️
x/foundation/msgs.go 38.94% <0.00%> (-1.45%) ⬇️
x/foundation/foundation.go 73.64% <0.00%> (+1.80%) ⬆️
x/token/msgs.go 36.54% <0.00%> (+6.09%) ⬆️
x/collection/msgs.go 43.88% <0.00%> (+7.03%) ⬆️

@dudong2 dudong2 requested review from zemyblue and 0Tech August 8, 2022 01:32
@dudong2 dudong2 changed the title feat: remove SetBalance and SetSupply refactor: remove SetBalance and SetSupply Aug 8, 2022
Copy link
Member

@zemyblue zemyblue 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.

LGTM

@zemyblue zemyblue merged commit ab4739e into Finschia:main Aug 10, 2022
@dudong2 dudong2 deleted the dudong2/refactor/remove-unsafe-balance-changing-methods branch August 16, 2022 00:07
zemyblue added a commit that referenced this pull request Sep 5, 2022
* main:
  fix: wasm module's FIXME in the snapshotter.go file (#649)
  chore(deps): Bump actions/setup-go from 3.2.1 to 3.3.0 (#650)
  chore(deps): Bump actions/cache from 3.0.7 to 3.0.8 (#648)
  fix: remove legacy codes of wasm (#640)
  chore(deps): Bump github.com/mattn/go-isatty from 0.0.14 to 0.0.16 (#643)
  chore(deps): Bump actions/cache from 3.0.6 to 3.0.7 (#642)
  chore: change some minor things that haven't been fixed in #549 (#635)
  refactor: rename x/collection events (#639)
  feat: add additional fields into x/collection events (#638)
  refactor: rename x/token events (#637)
  feat: add creator into x/token EventIssue (#636)
  chore(deps): Bump github.com/coinbase/rosetta-sdk-go (#641)
  chore: change `Keeper.space` type to be same with cosmos-sdk
  refactor: remove SetBalance and SetSupply (#629)
  refactor: revert changes in x/slashing proto (#627)
  chore(deps): Bump actions/cache from 3.0.5 to 3.0.6 (#631)
  chore(deps): Bump github.com/prometheus/client_golang (#632)
  chore(deps): Bump actions/setup-go from 2.1.4 to 3.2.1 (#624)
  feat: add Query/TokenClassTypeName (#622)
  feat: add additional information into EventXXXChanged (#621)

Signed-off-by: zemyblue <zemyblue@gmail.com>

# Conflicts:
#	CHANGELOG.md
#	client/docs/statik/statik.go
#	simapp/app.go
#	x/wasm/types/events.go
@zemyblue zemyblue mentioned this pull request Oct 27, 2022
5 tasks
@zemyblue zemyblue mentioned this pull request Nov 28, 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.

Remove unsafe balance changing methods from bank keeper such as SetBalance, SetSupply, etc.
3 participants