Skip to main content
added 1 character in body
Source Link
cmichi
  • 2.8k
  • 6
  • 32

To answer this question in the best possible way you would have to provide more details on which library/tool you are using to listen for events. Ideally with example code.

Generally though the answer is: Any library that I'm aware of does this if you‘re the one issuing the contract invocation.

For polkadot-js/api-contracts see here: https://polkadot.js.org/docs/api-contract/start/contract.tx/#events.

For subxt, example code like this will give you the events after submitting an extrinsic:

let tx_events = self
    .api
    .call(
        sp_runtime::MultiAddress::Id(message.account_id().clone()),
        value,
        dry_run.exec_result.gas_required,
        storage_deposit_limit,
        message.exec_input().to_vec(),
        signer,
    )
    .await;

To answer this question in the best possible way you would have to provide more details on which library/tool you are using to listen for events. Ideally with example code.

Generally though the answer is: Any library that I'm aware of does this if you‘re the one issuing the contract invocation.

For polkadot-js/api-contracts see here: https://polkadot.js.org/docs/api-contract/start/contract.tx/#events.

For subxt example code like this will give you the events after submitting an extrinsic:

let tx_events = self
    .api
    .call(
        sp_runtime::MultiAddress::Id(message.account_id().clone()),
        value,
        dry_run.exec_result.gas_required,
        storage_deposit_limit,
        message.exec_input().to_vec(),
        signer,
    )
    .await;

To answer this question in the best possible way you would have to provide more details on which library/tool you are using to listen for events. Ideally with example code.

Generally though the answer is: Any library that I'm aware of does this if you‘re the one issuing the contract invocation.

For polkadot-js/api-contracts see here: https://polkadot.js.org/docs/api-contract/start/contract.tx/#events.

For subxt, example code like this will give you the events after submitting an extrinsic:

let tx_events = self
    .api
    .call(
        sp_runtime::MultiAddress::Id(message.account_id().clone()),
        value,
        dry_run.exec_result.gas_required,
        storage_deposit_limit,
        message.exec_input().to_vec(),
        signer,
    )
    .await;
added 42 characters in body
Source Link
cmichi
  • 2.8k
  • 6
  • 32

To answer this question in the best possible way you would have to provide more details on which library/tool you are using to listen for events. Ideally with example code.

Generally though the answer is: Any library that I'm aware of does this for youif you‘re the one issuing the contract invocation.

For polkadot-js/api-contracts see here: https://polkadot.js.org/docs/api-contract/start/contract.tx/#events.

For subxt example code like this will give you the events after submitting an extrinsic:

let tx_events = self
    .api
    .call(
        sp_runtime::MultiAddress::Id(message.account_id().clone()),
        value,
        dry_run.exec_result.gas_required,
        storage_deposit_limit,
        message.exec_input().to_vec(),
        signer,
    )
    .await;

To answer this question in the best possible way you would have to provide more details on which library/tool you are using to listen for events. Ideally with example code.

Generally though the answer is: Any library that I'm aware of does this for you.

For polkadot-js/api-contracts see here: https://polkadot.js.org/docs/api-contract/start/contract.tx/#events.

For subxt example code like this will give you the events after submitting an extrinsic:

let tx_events = self
    .api
    .call(
        sp_runtime::MultiAddress::Id(message.account_id().clone()),
        value,
        dry_run.exec_result.gas_required,
        storage_deposit_limit,
        message.exec_input().to_vec(),
        signer,
    )
    .await;

To answer this question in the best possible way you would have to provide more details on which library/tool you are using to listen for events. Ideally with example code.

Generally though the answer is: Any library that I'm aware of does this if you‘re the one issuing the contract invocation.

For polkadot-js/api-contracts see here: https://polkadot.js.org/docs/api-contract/start/contract.tx/#events.

For subxt example code like this will give you the events after submitting an extrinsic:

let tx_events = self
    .api
    .call(
        sp_runtime::MultiAddress::Id(message.account_id().clone()),
        value,
        dry_run.exec_result.gas_required,
        storage_deposit_limit,
        message.exec_input().to_vec(),
        signer,
    )
    .await;
Source Link
cmichi
  • 2.8k
  • 6
  • 32

To answer this question in the best possible way you would have to provide more details on which library/tool you are using to listen for events. Ideally with example code.

Generally though the answer is: Any library that I'm aware of does this for you.

For polkadot-js/api-contracts see here: https://polkadot.js.org/docs/api-contract/start/contract.tx/#events.

For subxt example code like this will give you the events after submitting an extrinsic:

let tx_events = self
    .api
    .call(
        sp_runtime::MultiAddress::Id(message.account_id().clone()),
        value,
        dry_run.exec_result.gas_required,
        storage_deposit_limit,
        message.exec_input().to_vec(),
        signer,
    )
    .await;