Skip to content
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

Token type altered account #305

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
164 changes: 111 additions & 53 deletions data/alteredAccount/alteredAccount.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions data/alteredAccount/alteredAccount.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ message AccountTokenData {
string Properties = 4 [(gogoproto.jsontag) = "properties"];
TokenMetaData MetaData = 5 [(gogoproto.jsontag) = "metaData,omitempty"];
AdditionalAccountTokenData AdditionalData = 6 [(gogoproto.jsontag) = "additionalData,omitempty"];
string Type = 7 [(gogoproto.jsontag) = "type,omitempty"];
}

message TokenMetaData {
Expand Down
Loading