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

brc20 -> version16 #164

Merged
merged 2 commits into from
Mar 7, 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
5 changes: 4 additions & 1 deletion types/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const (
TokenVersionV13 TokenVersion = 13
TokenVersionV14 TokenVersion = 14
TokenVersionV15 TokenVersion = 15
TokenVersionV16 TokenVersion = 16
TokenVersionUndefined TokenVersion = -1
)

Expand Down Expand Up @@ -388,7 +389,9 @@ func GetTokenVersion(tokenType string) (TokenVersion, error) {
case KAVAEVM, BOBA, METIS, NEON, LINEA, ACA, ACALAEVM, CONFLUX, IOTEXEVM, KLAYTN, MOONRIVER, MOONBEAM, MANTLE,
NATIVEINJECTIVE, MANTA, ZETACHAIN, ZETAEVM:
return TokenVersionV14, nil
case BRC20, ERC721, ERC1155, EOS, NEP5, VET, ONTOLOGY, THETA, TOMO, POA, OASIS, ALGORAND, METER, EVMOS_ERC20,
case BRC20:
return TokenVersionV16, nil
case ERC721, ERC1155, EOS, NEP5, VET, ONTOLOGY, THETA, TOMO, POA, OASIS, ALGORAND, METER, EVMOS_ERC20,
KIP20, STRIDE, NEUTRON, FA2, CARDANO, NATIVEEVMOS, CRYPTOORG, COSMOS, OSMOSIS, STARGAZE:
return TokenVersionUndefined, nil
default:
Expand Down
7 changes: 6 additions & 1 deletion types/token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,13 +561,18 @@ func TestGetTokenVersion(t *testing.T) {
TokenVersionV14,
nil,
},

{
"ZetaEVM token version",
args{t: string(ZETAEVM)},
TokenVersionV14,
nil,
},
{
"BRC20 token version",
args{t: string(BRC20)},
TokenVersionV16,
nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
Loading