Skip to content

Commit

Permalink
brc20 -> version16 (#164)
Browse files Browse the repository at this point in the history
* brc20 -> version16

* include in test
  • Loading branch information
nikoskarakostas committed Mar 7, 2024
1 parent 4ee51ea commit d8c5d11
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
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

0 comments on commit d8c5d11

Please sign in to comment.