Skip to content

Commit

Permalink
string method
Browse files Browse the repository at this point in the history
  • Loading branch information
miiu96 committed May 30, 2024
1 parent f6c188a commit 4587051
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions core/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,30 @@ const (
DynamicMeta
)

// String will convert number type in string
func (t ESDTType) String() string {
switch t {
case Fungible:
return FungibleESDT
case NonFungible:
return NonFungibleESDT
case NonFungibleV2:
return NonFungibleESDTv2
case SemiFungible:
return SemiFungibleESDT
case MetaFungible:
return MetaESDT
case DynamicNFT:
return DynamicNFTESDT
case DynamicSFT:
return DynamicSFTESDT
case DynamicMeta:
return DynamicMetaESDT
default:
return "Unknown"
}
}

// FungibleESDT defines the string for the token type of fungible ESDT
const FungibleESDT = "FungibleESDT"

Expand Down

0 comments on commit 4587051

Please sign in to comment.