Skip to content

Commit

Permalink
test(token): add additional testcase(mint, burn, modify) (#1130)
Browse files Browse the repository at this point in the history
* chore(token): add additional testcase(mint, burn, modify)

* chore: update CHANGELOG

* chore(token): remove unnecessary test suite

* chore(token): chore re-group imports

* chore(token): fix for conflict

* chore(token): reorder imports, remove unnecessary space

* chore(token): reorder imports

* chore(token): group positive and negative cases per tx
  • Loading branch information
jaeseung-bae authored Sep 27, 2023
1 parent 6f75458 commit e625d3d
Show file tree
Hide file tree
Showing 4 changed files with 344 additions and 132 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (refactor) [\#1114](https://github.com/Finschia/finschia-sdk/pull/1114) Check statistics and balance on x/collection mint and burn operations
* (x/token) [\#1128](https://github.com/Finschia/finschia-sdk/pull/1128) add more unittest for MsgIssue of x/token
* (x/token) [\#1129](https://github.com/Finschia/finschia-sdk/pull/1129) add more unittest for `MsgGrantPermission` and `MsgRevokePermission` of x/token
* (x/token) [\#1130](https://github.com/Finschia/finschia-sdk/pull/1130) Add more unittest for MsgMint, MsgBurn, MsgOperatorBurn, MsgModify of x/token

### Bug Fixes
* (ledger) [\#1040](https://github.com/Finschia/finschia-sdk/pull/1040) Fix a bug(unable to connect nano S plus ledger on ubuntu)
Expand Down
14 changes: 7 additions & 7 deletions x/token/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ const tokenCodespace = ModuleName

var (
ErrTokenNotExist = sdkerrors.Register(tokenCodespace, 2, "token does not exist")
ErrTokenNotMintable = sdkerrors.Register(tokenCodespace, 3, "token is not mintable")
ErrTokenNotMintable = sdkerrors.Register(tokenCodespace, 3, "token is not mintable") // Currently never used
ErrInvalidTokenName = sdkerrors.Register(tokenCodespace, 4, "token name should not be empty")
ErrInvalidTokenDecimals = sdkerrors.Register(tokenCodespace, 5, "token decimals should be within the range in 0 ~ 18")
ErrInvalidAmount = sdkerrors.Register(tokenCodespace, 6, "invalid token amount")
ErrInvalidImageURILength = sdkerrors.Register(tokenCodespace, 7, "invalid token uri length")
ErrInvalidNameLength = sdkerrors.Register(tokenCodespace, 8, "invalid name length")
ErrInvalidTokenSymbol = sdkerrors.Register(tokenCodespace, 9, "invalid token symbol")
ErrTokenNoPermission = sdkerrors.Register(tokenCodespace, 10, "account does not have the permission")
ErrAccountExist = sdkerrors.Register(tokenCodespace, 11, "account already exists")
ErrAccountNotExist = sdkerrors.Register(tokenCodespace, 12, "account does not exists")
ErrAccountExist = sdkerrors.Register(tokenCodespace, 11, "account already exists") // Currently never used
ErrAccountNotExist = sdkerrors.Register(tokenCodespace, 12, "account does not exists") // Currently never used
ErrInsufficientBalance = sdkerrors.Register(tokenCodespace, 13, "insufficient balance")
ErrSupplyExist = sdkerrors.Register(tokenCodespace, 14, "supply for token already exists")
ErrInsufficientSupply = sdkerrors.Register(tokenCodespace, 15, "insufficient supply")
ErrInvalidChangesFieldCount = sdkerrors.Register(tokenCodespace, 16, "invalid count of field changes")
ErrSupplyExist = sdkerrors.Register(tokenCodespace, 14, "supply for token already exists") // Currently never used
ErrInsufficientSupply = sdkerrors.Register(tokenCodespace, 15, "insufficient supply") // Currently never used
ErrInvalidChangesFieldCount = sdkerrors.Register(tokenCodespace, 16, "invalid count of field changes") // Currently never used
ErrEmptyChanges = sdkerrors.Register(tokenCodespace, 17, "changes is empty")
ErrInvalidChangesField = sdkerrors.Register(tokenCodespace, 18, "invalid field of changes")
ErrDuplicateChangesField = sdkerrors.Register(tokenCodespace, 19, "invalid field of changes")
ErrInvalidMetaLength = sdkerrors.Register(tokenCodespace, 20, "invalid meta length")
ErrSupplyOverflow = sdkerrors.Register(tokenCodespace, 21, "supply for token reached maximum")
ErrSupplyOverflow = sdkerrors.Register(tokenCodespace, 21, "supply for token reached maximum") // Currently never used
ErrApproverProxySame = sdkerrors.Register(tokenCodespace, 22, "approver is same with proxy")
ErrTokenNotApproved = sdkerrors.Register(tokenCodespace, 23, "proxy is not approved on the token")
ErrTokenAlreadyApproved = sdkerrors.Register(tokenCodespace, 24, "proxy is already approved on the token")
Expand Down
Loading

0 comments on commit e625d3d

Please sign in to comment.