From 9cb67eeb9815bcbc8ceb4174c9f7c7f0ffcc8603 Mon Sep 17 00:00:00 2001 From: Hans Svensson Date: Tue, 24 Sep 2024 09:47:10 +0200 Subject: [PATCH 1/3] Add data_extend_tx --- src/aeser_chain_objects.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/aeser_chain_objects.erl b/src/aeser_chain_objects.erl index 79e5e56..db49bef 100644 --- a/src/aeser_chain_objects.erl +++ b/src/aeser_chain_objects.erl @@ -39,6 +39,7 @@ deserialize(Type, Vsn, Template, Binary) -> tag(account) -> 10; tag(signed_tx) -> 11; tag(spend_tx) -> 12; +tag(data_extend_tx) -> 13; tag(oracle) -> 20; tag(oracle_query) -> 21; tag(oracle_register_tx) -> 22; @@ -121,6 +122,7 @@ tag(pof) -> 200. rev_tag(10) -> account; rev_tag(11) -> signed_tx; rev_tag(12) -> spend_tx; +rev_tag(13) -> data_extend_tx; rev_tag(20) -> oracle; rev_tag(21) -> oracle_query; rev_tag(22) -> oracle_register_tx; From b5929e4d2e5e45317acd4bcf2a56d4a31f62f4b4 Mon Sep 17 00:00:00 2001 From: Ulf Wiger Date: Mon, 14 Oct 2024 14:48:05 +0200 Subject: [PATCH 2/3] Define channel_delegates chain obj --- src/aeser_chain_objects.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/aeser_chain_objects.erl b/src/aeser_chain_objects.erl index db49bef..c974124 100644 --- a/src/aeser_chain_objects.erl +++ b/src/aeser_chain_objects.erl @@ -60,6 +60,7 @@ tag(contract_create_tx) -> 42; tag(contract_call_tx) -> 43; tag(channel_create_tx) -> 50; tag(channel_set_delegates_tx) -> 501; +tag(channel_delegates) -> 502; tag(channel_deposit_tx) -> 51; tag(channel_withdraw_tx) -> 52; tag(channel_force_progress_tx) -> 521; @@ -143,6 +144,7 @@ rev_tag(42) -> contract_create_tx; rev_tag(43) -> contract_call_tx; rev_tag(50) -> channel_create_tx; rev_tag(501) -> channel_set_delegates_tx; +rev_tag(502) -> channel_delegates; rev_tag(51) -> channel_deposit_tx; rev_tag(52) -> channel_withdraw_tx; rev_tag(521) -> channel_force_progress_tx; From d28e63693c61ad60bcfc3afde6f895363098d429 Mon Sep 17 00:00:00 2001 From: Ulf Wiger Date: Tue, 15 Oct 2024 08:07:24 +0200 Subject: [PATCH 3/3] Add contract source (cx) --- src/aeser_api_encoder.erl | 7 +++++++ src/aeser_chain_objects.erl | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/aeser_api_encoder.erl b/src/aeser_api_encoder.erl index 5e081df..9fc91f8 100644 --- a/src/aeser_api_encoder.erl +++ b/src/aeser_api_encoder.erl @@ -24,6 +24,7 @@ | contract_pubkey | contract_store_key | contract_store_value + | contract_source | transaction | tx_hash | oracle_pubkey @@ -171,6 +172,7 @@ id2type(associate_chain) -> associate_chain; id2type(channel) -> channel; id2type(commitment) -> commitment; id2type(contract) -> contract_pubkey; +id2type(contract_source) -> contract_source; id2type(name) -> name; id2type(native_token) -> native_token; id2type(entry) -> entry; @@ -181,6 +183,7 @@ type2id(associate_chain) -> associate_chain; type2id(channel) -> channel; type2id(commitment) -> commitment; type2id(contract_pubkey) -> contract; +type2id(contract_source) -> contract_source; type2id(name) -> name; type2id(native_token) -> native_token; type2id(entry) -> entry; @@ -197,6 +200,7 @@ type2enc(contract_pubkey) -> ?BASE58; type2enc(contract_bytearray) -> ?BASE64; type2enc(contract_store_key) -> ?BASE64; type2enc(contract_store_value) -> ?BASE64; +type2enc(contract_source) -> ?BASE64; type2enc(transaction) -> ?BASE64; type2enc(tx_hash) -> ?BASE58; type2enc(oracle_pubkey) -> ?BASE58; @@ -232,6 +236,7 @@ type2pfx(contract_pubkey) -> <<"ct">>; type2pfx(contract_bytearray) -> <<"cb">>; type2pfx(contract_store_key) -> <<"ck">>; type2pfx(contract_store_value) -> <<"cv">>; +type2pfx(contract_source) -> <<"cx">>; type2pfx(transaction) -> <<"tx">>; type2pfx(tx_hash) -> <<"th">>; type2pfx(oracle_pubkey) -> <<"ok">>; @@ -266,6 +271,7 @@ pfx2type(<<"cb">>) -> contract_bytearray; pfx2type(<<"ck">>) -> contract_store_key; pfx2type(<<"cv">>) -> contract_store_value; pfx2type(<<"ct">>) -> contract_pubkey; +pfx2type(<<"cx">>) -> contract_source; pfx2type(<<"tx">>) -> transaction; pfx2type(<<"th">>) -> tx_hash; pfx2type(<<"ok">>) -> oracle_pubkey; @@ -302,6 +308,7 @@ byte_size_for_type(contract_pubkey) -> 32; byte_size_for_type(contract_bytearray) -> not_applicable; byte_size_for_type(contract_store_key) -> not_applicable; byte_size_for_type(contract_store_value) -> not_applicable; +byte_size_for_type(contract_source) -> not_applicable; byte_size_for_type(transaction) -> not_applicable; byte_size_for_type(tx_hash) -> 32; byte_size_for_type(oracle_pubkey) -> 32; diff --git a/src/aeser_chain_objects.erl b/src/aeser_chain_objects.erl index c974124..48e416e 100644 --- a/src/aeser_chain_objects.erl +++ b/src/aeser_chain_objects.erl @@ -58,6 +58,7 @@ tag(contract) -> 40; tag(contract_call) -> 41; tag(contract_create_tx) -> 42; tag(contract_call_tx) -> 43; +tag(contract_source) -> 44; tag(channel_create_tx) -> 50; tag(channel_set_delegates_tx) -> 501; tag(channel_delegates) -> 502; @@ -142,6 +143,7 @@ rev_tag(40) -> contract; rev_tag(41) -> contract_call; rev_tag(42) -> contract_create_tx; rev_tag(43) -> contract_call_tx; +rev_tag(44) -> contract_source; rev_tag(50) -> channel_create_tx; rev_tag(501) -> channel_set_delegates_tx; rev_tag(502) -> channel_delegates;