Skip to content

Commit

Permalink
Add ESDT and SFT token types (#33)
Browse files Browse the repository at this point in the history
* Add ESDT and SFT token types

* Add prefix for SFT
  • Loading branch information
unanoc authored Jan 20, 2022
1 parent e0c1f46 commit b8561dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ func GetChainFromAssetType(assetType string) (coin.Coin, error) {
return coin.Harmony(), nil
case CLO20:
return coin.Callisto(), nil
case ESDT, ESFT:
return coin.Elrond(), nil
}

return coin.Coin{}, errors.New("unknown asset type: " + assetType)
Expand Down
4 changes: 4 additions & 0 deletions types/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ const (
WAVES TokenType = "WAVES"
POA TokenType = "POA"
CELO TokenType = "CELO"
ESDT TokenType = "ESDT"
ESFT TokenType = "ESFT"
)

func GetTokenTypes() []TokenType {
Expand Down Expand Up @@ -102,6 +104,8 @@ func GetTokenTypes() []TokenType {
WAVES,
POA,
CELO,
ESDT,
ESFT,
}
}

Expand Down

0 comments on commit b8561dd

Please sign in to comment.