Finschia/cosmwasm

Add a New Way To Issue Events/Attribute To x/wasm

Closed this issue · 3 comments

This issue add a new way to issue events/attributes to x/wasm. The aim of it is mainly

  • add a new way to issue events/attributes as same as lbm-sdk's way (issuing to context)
  • enable dynamic linked function (callable point) issues events/attributes
  • unify how to issue events/attributes between dynamic linked functions and other functions

This issue will be solved with some PRs. These changes is done in dynamic link branch and merged into main with dynamic link branch.

Add Event Manager To Context Data of Instance Environment

Add EventManager to context_data of instance.env and enable issing events/attributes to it via Deps.api

(#266)

Use The Event Manager's Infomation In x/wasm

  • remove events and attributes fields from the Response (the returning value of instantiate, execute, migrate, and etc...)
  • add events/attributes fields to API of wasmvm (for x/wasm) and use it from x/wasm
  • pass EventManager's information to above field

(Finschia/wasmvm#88)

Copy the EventManager Between Dynamic Link Callee/Caller

  • copy (caller -> callee) on instantiate
  • copy (callee -> caller) on destruct
  • solve in CallCallablePoint (#273)

(#269 and Finschia/wasmvm#89)

In this case, can we use default event way in the contract?
And is it backwards compatible?

In this case, can we use default event way in the contract?
And is it backwards compatible?

Thank you for your comment. In the 2nd part, the backward compatibility of contracts was broken. I reconsidered and found we should keep the backward compatibility with v1.0.0 contracts, so I changed the 2nd part of this issue.