From a148115497c7c86ae3c334fe25aeba4102bd84d6 Mon Sep 17 00:00:00 2001 From: Anshudhar Kumar Singh Date: Mon, 26 Feb 2024 12:28:34 +0530 Subject: [PATCH] Save current reply id --- README.md | 2 +- packages/controllers/src/replies.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 35132d9..4705d29 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ secretcli tx compute instantiate 5053 '{"members":[{"addr":"secret180yccha4kqex5 ## dao dao core -secretcli tx compute instantiate 5057 '{"name":"Test Dao","description":"Dao Testing for cross contract calls","automatically_add_snip20s":true,"automatically_add_snip721s":true,"voting_module_instantiate_info":{"code_id":5054,"code_hash":"6b723a3bc77613e35461b7453b7433656dc5ef7691fd1fa043db16f6dd380650","funds":[],"label":"dao-voting-test-tmp-0.0.1","msg":"eyJkYW9fY29kZV9oYXNoIjoiMjE0ZjJkM2RmOGJjNWZkMDRiZTdmNTMxODM2MWRiNGNmYzg5YjQ5MTgxMzJlZTRjNTEyZjliZGFhYjU3N2Q1OCIsImdyb3VwX2NvbnRyYWN0Ijp7Im5ldyI6eyJjdzRfZ3JvdXBfY29kZV9pZCI6NTA1MywiY3c0X2dyb3VwX2NvZGVfaGFzaCI6ImUwMWI0NzVlZTQzMDM1MGQ5Yzg3MWE4YmI1OTliZjRlM2IxYmViYTZmZmVkMDgxNmE1OWQ5YmJkOTNhYWRjMzIiLCJpbml0aWFsX21lbWJlcnMiOlt7ImFkZHIiOiJzZWNyZXQxODB5Y2NoYTRrcWV4NXdheTdtY3l4N3IyNWc4OW51OTJhZjhjZWUiLCJ3ZWlnaHQiOjF9LHsiYWRkciI6InNlY3JldDFlemo0dmtrZjU1Mm5zYXVxZnJsc3Y3OWMzN3U2eGVhcnRuczNqNyIsIndlaWdodCI6MX1dfX19"},"proposal_modules_instantiate_info":[{"code_id":5054,"code_hash":"6b723a3bc77613e35461b7453b7433656dc5ef7691fd1fa043db16f6dd380650","funds":[],"label":"dao-voting-test-tmp-0.0.2","msg":"eyJkYW9fY29kZV9oYXNoIjoiMjE0ZjJkM2RmOGJjNWZkMDRiZTdmNTMxODM2MWRiNGNmYzg5YjQ5MTgxMzJlZTRjNTEyZjliZGFhYjU3N2Q1OCIsImdyb3VwX2NvbnRyYWN0Ijp7Im5ldyI6eyJjdzRfZ3JvdXBfY29kZV9pZCI6NTA1MywiY3c0X2dyb3VwX2NvZGVfaGFzaCI6ImUwMWI0NzVlZTQzMDM1MGQ5Yzg3MWE4YmI1OTliZjRlM2IxYmViYTZmZmVkMDgxNmE1OWQ5YmJkOTNhYWRjMzIiLCJpbml0aWFsX21lbWJlcnMiOlt7ImFkZHIiOiJzZWNyZXQxODB5Y2NoYTRrcWV4NXdheTdtY3l4N3IyNWc4OW51OTJhZjhjZWUiLCJ3ZWlnaHQiOjF9LHsiYWRkciI6InNlY3JldDFlemo0dmtrZjU1Mm5zYXVxZnJsc3Y3OWMzN3U2eGVhcnRuczNqNyIsIndlaWdodCI6MX1dfX19"}],"snip20_code_hash":"","snip721_code_hash":""}' --from athena --label "dao-dao-core-test-tmp-0.0.1" +secretcli tx compute instantiate 5058 '{"name":"Test Dao","description":"Dao Testing for cross contract calls","automatically_add_snip20s":true,"automatically_add_snip721s":true,"voting_module_instantiate_info":{"code_id":5054,"code_hash":"6b723a3bc77613e35461b7453b7433656dc5ef7691fd1fa043db16f6dd380650","funds":[],"label":"dao-voting-test-tmp-0.0.3","msg":"eyJkYW9fY29kZV9oYXNoIjoiZDkzNjIzNWRiODMxOWM3NTIzNWNmNmE0MzgxN2VkNjE1NjkwMjEzYzQ5OTI0NzQxYjYyOTNhOTUxNGRmNGNhYyIsImdyb3VwX2NvbnRyYWN0Ijp7Im5ldyI6eyJjdzRfZ3JvdXBfY29kZV9pZCI6NTA1MywiY3c0X2dyb3VwX2NvZGVfaGFzaCI6ImUwMWI0NzVlZTQzMDM1MGQ5Yzg3MWE4YmI1OTliZjRlM2IxYmViYTZmZmVkMDgxNmE1OWQ5YmJkOTNhYWRjMzIiLCJpbml0aWFsX21lbWJlcnMiOlt7ImFkZHIiOiJzZWNyZXQxODB5Y2NoYTRrcWV4NXdheTdtY3l4N3IyNWc4OW51OTJhZjhjZWUiLCJ3ZWlnaHQiOjF9LHsiYWRkciI6InNlY3JldDFlemo0dmtrZjU1Mm5zYXVxZnJsc3Y3OWMzN3U2eGVhcnRuczNqNyIsIndlaWdodCI6MX1dfX19"},"proposal_modules_instantiate_info":[{"code_id":5054,"code_hash":"6b723a3bc77613e35461b7453b7433656dc5ef7691fd1fa043db16f6dd380650","funds":[],"label":"dao-voting-test-tmp-0.0.4","msg":"eyJkYW9fY29kZV9oYXNoIjoiZDkzNjIzNWRiODMxOWM3NTIzNWNmNmE0MzgxN2VkNjE1NjkwMjEzYzQ5OTI0NzQxYjYyOTNhOTUxNGRmNGNhYyIsImdyb3VwX2NvbnRyYWN0Ijp7Im5ldyI6eyJjdzRfZ3JvdXBfY29kZV9pZCI6NTA1MywiY3c0X2dyb3VwX2NvZGVfaGFzaCI6ImUwMWI0NzVlZTQzMDM1MGQ5Yzg3MWE4YmI1OTliZjRlM2IxYmViYTZmZmVkMDgxNmE1OWQ5YmJkOTNhYWRjMzIiLCJpbml0aWFsX21lbWJlcnMiOlt7ImFkZHIiOiJzZWNyZXQxODB5Y2NoYTRrcWV4NXdheTdtY3l4N3IyNWc4OW51OTJhZjhjZWUiLCJ3ZWlnaHQiOjF9LHsiYWRkciI6InNlY3JldDFlemo0dmtrZjU1Mm5zYXVxZnJsc3Y3OWMzN3U2eGVhcnRuczNqNyIsIndlaWdodCI6MX1dfX19"}],"snip20_code_hash":"","snip721_code_hash":""}' --from athena --label "dao-dao-core-test-tmp-0.0.2" ## dao dao core diff --git a/packages/controllers/src/replies.rs b/packages/controllers/src/replies.rs index a41d33c..46c9922 100644 --- a/packages/controllers/src/replies.rs +++ b/packages/controllers/src/replies.rs @@ -49,6 +49,7 @@ impl<'a> ReplyIds<'a> { .unwrap_or_default() .wrapping_add(1); self.keys.insert(storage, &next_id, &event)?; + self.curr_id.save(storage, &next_id)?; Ok(next_id) }