-
Notifications
You must be signed in to change notification settings - Fork 40
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
BEP8 Mini-BEP2 token features #725
Conversation
7963ebf
to
34ba52d
Compare
34ba52d
to
d92a2ca
Compare
dc17212
to
da397b1
Compare
e43cf1e
to
b4ac188
Compare
plugins/tokens/route.go
Outdated
routes[issue.Route] = issue.NewHandler(tokenMapper, keeper) | ||
routes[burn.BurnRoute] = burn.NewHandler(tokenMapper, keeper) | ||
routes[freeze.FreezeRoute] = freeze.NewHandler(tokenMapper, accKeeper, keeper) | ||
routes[issue.Route] = issue.NewHandler(tokenMapper, miniTokenMapper, keeper) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a TokenKeeper including all these mappers and other related keepers
plugins/tokens/swap/handler.go
Outdated
@@ -27,6 +29,10 @@ func NewHandler(kp Keeper) sdk.Handler { | |||
} | |||
|
|||
func handleHashTimerLockedTransfer(ctx sdk.Context, kp Keeper, msg HTLTMsg) sdk.Result { | |||
symbolError := types.ValidateMapperTokenCoins(msg.Amount) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to add this check for existing bep2 tokens
go.mod
Outdated
@@ -29,7 +29,7 @@ require ( | |||
) | |||
|
|||
replace ( | |||
github.com/cosmos/cosmos-sdk => github.com/binance-chain/bnc-cosmos-sdk v0.25.0-binance.20 | |||
github.com/cosmos/cosmos-sdk => github.com/binance-chain/bnc-cosmos-sdk v0.19.1-0.20200529110602-b9a19ff527bf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we moving backwards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will merge to the lastest cosmos sdk
|
||
"github.com/binance-chain/node/common/types" | ||
"github.com/binance-chain/node/common/upgrade" | ||
tokenStore "github.com/binance-chain/node/plugins/tokens/store" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do not reference the token plugin in list
plugin
plugins/dex/list/msg_mini.go
Outdated
InitPrice int64 `json:"init_price"` | ||
} | ||
|
||
func NewMiniMsg(from sdk.AccAddress, baseAssetSymbol string, quoteAssetSymbol string, initPrice int64) ListMiniMsg { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NewListMiniMsg
err = cdc.UnmarshalBinaryLengthPrefixed(bz, &tokens) | ||
if err != nil { | ||
fmt.Println(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger
good project |
Description
Similar to SME board in the traditional stock markets, introducing Mini-BEP2 Tokens is to benefit the below scenarios in which the normal BEP2 tokens are expensive and not convenient to issue/list:
Rationale
Different from the normal BEP2, using a mini-token system is good at:
Example
Changes
Notable changes:
New Transactions for Mini token
bnbcli token issue-tiny
bnbcli token issue-mini
bnbcli token set-uri-mini
bnbcli dex list-mini
Existing Transactions supporting Mini token
burn
mint
freeze
unfreeze
new order
cancel order
delist
New RPC API for mini token
/mini-tokens/info
/mini-tokens/list
/dex-mini/pairs
Existing RPC API supporting mini token
/dex/orderbook
/dex/openorders
Preflight checks
make build
)make test
)make integration_test
)Already reviewed by
...
Related issues
bnb-chain/BEPs#69