Skip to content

Commit

Permalink
Merge pull request #142 from binance-chain/token_info
Browse files Browse the repository at this point in the history
update token contract info
  • Loading branch information
forcodedancing authored Aug 31, 2020
2 parents 5316225 + f60ec60 commit fdeeb97
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Changelog

## 1.2.5
IMPROVEMENT
* [\#142](https://github.com/binance-chain/go-sdk/pull/142) [RPC] [API] add contract info for a token if there is any

## 1.2.4
CHAIN UPGRADE
* [\#132](https://github.com/binance-chain/go-sdk/pull/132) [RPC] [API] enable side chain governance transaction
Expand Down
32 changes: 18 additions & 14 deletions common/types/tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ package types

// Token definition
type Token struct {
Name string `json:"name"`
Symbol string `json:"symbol"`
OrigSymbol string `json:"original_symbol"`
TotalSupply Fixed8 `json:"total_supply"`
Owner AccAddress `json:"owner"`
Mintable bool `json:"mintable"`
Name string `json:"name"`
Symbol string `json:"symbol"`
OrigSymbol string `json:"original_symbol"`
TotalSupply Fixed8 `json:"total_supply"`
Owner AccAddress `json:"owner"`
Mintable bool `json:"mintable"`
ContractAddress string `json:"contract_address,omitempty"`
ContractDecimals int8 `json:"contract_decimals,omitempty"`
}

type TokenBalance struct {
Expand All @@ -19,12 +21,14 @@ type TokenBalance struct {

// MiniToken definition
type MiniToken struct {
Name string `json:"name"`
Symbol string `json:"symbol"`
OrigSymbol string `json:"original_symbol"`
TotalSupply Fixed8 `json:"total_supply"`
Owner AccAddress `json:"owner"`
Mintable bool `json:"mintable"`
TokenType int8 `json:"token_type"`
TokenURI string `json:"token_uri"`
Name string `json:"name"`
Symbol string `json:"symbol"`
OrigSymbol string `json:"original_symbol"`
TotalSupply Fixed8 `json:"total_supply"`
Owner AccAddress `json:"owner"`
Mintable bool `json:"mintable"`
TokenType int8 `json:"token_type"`
TokenURI string `json:"token_uri"`
ContractAddress string `json:"contract_address,omitempty"`
ContractDecimals int8 `json:"contract_decimals,omitempty"`
}

0 comments on commit fdeeb97

Please sign in to comment.