After store code proposal success, the state does not get updated with it
implement hook in instantiate/migrate to check prroposal result
implement beaker wasm proposal sync-state
Without this, contract instantiate/migrate will never use code stored via proposal unless manually update the state file
Investigation
According to this line of code, at EndBlocker if proposal is passed and get executed, it should re-emit events (and hopefully contextualized with the proposal).
So potential execution plan to get code_id from proposal_id is:
find proposal with proposal_id
if the proposal is passed, find the block height that it is passed, else end
After store code proposal success, the state does not get updated with it
beaker wasm proposal sync-state
Without this, contract instantiate/migrate will never use code stored via proposal unless manually update the state file
Investigation
According to this line of code, at
EndBlocker
if proposal is passed and get executed, it should re-emit events (and hopefully contextualized with the proposal).So potential execution plan to get
code_id
fromproposal_id
is:proposal_id
code_id
from store codeTodo
[x] move code to wasm.rs
[x] implement
cosmos.rs
in client function to perform the code extraction[x] add tests
[x] hook
[x] implement prompt
-y
,--yes
to skip the prompt, still log