Add native_token encoding support #35

Merged
uwiger merged 2 commits from uw-native_tokens into master 2024-07-26 20:36:13 +09:00
2 changed files with 14 additions and 0 deletions
Showing only changes of commit 5139f130f5 - Show all commits

View File

@ -105,6 +105,12 @@ tag(micro_block) -> 101;
tag(light_micro_block) -> 102; tag(light_micro_block) -> 102;
tag(testimony) -> 110; tag(testimony) -> 110;
tag(testimony_tx) -> 111; tag(testimony_tx) -> 111;
tag(nt_native_token) -> 120;
tag(nt_create_tx) -> 121;
tag(nt_mint_tx) -> 122;
tag(nt_finalize_tx) -> 123;
tag(nt_trade_tx) -> 124;
tag(nt_burn_tx) -> 125;
tag(pof) -> 200. tag(pof) -> 200.
rev_tag(10) -> account; rev_tag(10) -> account;
@ -176,4 +182,10 @@ rev_tag(101) -> micro_block;
rev_tag(102) -> light_micro_block; rev_tag(102) -> light_micro_block;
rev_tag(110) -> testimony; rev_tag(110) -> testimony;
rev_tag(111) -> testimony_tx; rev_tag(111) -> testimony_tx;
rev_tag(120) -> nt_native_token;
rev_tag(121) -> nt_create_tx;
rev_tag(122) -> nt_mint_tx;
rev_tag(123) -> nt_finalize_tx;
rev_tag(124) -> nt_trade_tx;
rev_tag(125) -> nt_burn_tx;
rev_tag(200) -> pof. rev_tag(200) -> pof.

View File

@ -103,6 +103,7 @@ encode_tag(oracle) -> 4;
encode_tag(contract) -> 5; encode_tag(contract) -> 5;
encode_tag(channel) -> 6; encode_tag(channel) -> 6;
encode_tag(associate_chain) -> 7; encode_tag(associate_chain) -> 7;
encode_tag(native_token) -> 8;
encode_tag(Other) -> error({illegal_id_tag_name, Other}). encode_tag(Other) -> error({illegal_id_tag_name, Other}).
decode_tag(1) -> account; decode_tag(1) -> account;
@ -112,4 +113,5 @@ decode_tag(4) -> oracle;
decode_tag(5) -> contract; decode_tag(5) -> contract;
decode_tag(6) -> channel; decode_tag(6) -> channel;
decode_tag(7) -> associate_chain; decode_tag(7) -> associate_chain;
decode_tag(8) -> native_token;
decode_tag(X) -> error({illegal_id_tag, X}). decode_tag(X) -> error({illegal_id_tag, X}).