By using /txs endpoint on LCD we can directly query transaction that has specific event without need to query every past block from RPC.
- handler: handleEvent
kind: cosmos/EventHandler
filter:
type: execute
messageFilter:
type: "/cosmwasm.wasm.v1.MsgExecuteContract"
contractCall:
contract: "juno1v99ehkuetkpf0yxdry8ce92yeqaeaa7lyxr2aagkesrw67wcsn8qxpxay0"
Filter above with start block at 3062001 can be translated to
lcd.endpoint/cosmos/tx/v1beta1/txs?events=message.action=/cosmwasm.wasm.v1.MsgExecuteContract&events=execute._contract_address=juno1v99ehkuetkpf0yxdry8ce92yeqaeaa7lyxr2aagkesrw67wcsn8qxpxay0&events=tx.height>=3062001
By using
/txsendpoint on LCD we can directly query transaction that has specific event without need to query every past block from RPC.Filter above with start block at 3062001 can be translated to
lcd.endpoint/cosmos/tx/v1beta1/txs?events=message.action=/cosmwasm.wasm.v1.MsgExecuteContract&events=execute._contract_address=juno1v99ehkuetkpf0yxdry8ce92yeqaeaa7lyxr2aagkesrw67wcsn8qxpxay0&events=tx.height>=3062001