From 3c12542c7cb27d0293ee045b22154955748a5203 Mon Sep 17 00:00:00 2001 From: shivam2320 Date: Fri, 23 Feb 2024 17:55:02 +0530 Subject: [PATCH 1/2] fix: lz_receive_types --- apps/counter/sources/counter.move | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/counter/sources/counter.move b/apps/counter/sources/counter.move index 2a4b409..a65b094 100644 --- a/apps/counter/sources/counter.move +++ b/apps/counter/sources/counter.move @@ -69,7 +69,8 @@ module counter::counter { lz_receive_internal(chain_id, src_address, payload); } - public entry fun lz_receive_types(_src_chain_id: u64, _src_address: vector, _payload: vector) : vector { + #[view] + public fun lz_receive_types(_src_chain_id: u64, _src_address: vector, _payload: vector) : vector { vector::empty() } From 01b10e13f39bd908f745d860ca9390023ba42b95 Mon Sep 17 00:00:00 2001 From: shivam2320 Date: Fri, 23 Feb 2024 17:57:02 +0530 Subject: [PATCH 2/2] fix: added counter resource to init_module --- apps/counter/sources/counter.move | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/counter/sources/counter.move b/apps/counter/sources/counter.move index a65b094..430e68d 100644 --- a/apps/counter/sources/counter.move +++ b/apps/counter/sources/counter.move @@ -28,7 +28,10 @@ module counter::counter { lzapp::init(account, cap); remote::init(account); + let i:u64 = 0; + move_to(account, Capabilities { cap }); + move_to(account, Counter { i }) } /// create_counter a `Counter` resource with value `i` under the given `account`