Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

feat: event extraction util #353

Merged
merged 9 commits into from
Nov 10, 2022

Conversation

harrysolovay
Copy link
Contributor

@harrysolovay harrysolovay commented Nov 2, 2022

Addresses functionality described in #272 (not necessarily the API design though).

const events = C
  .events(extrinsic, hash)
  .bind(env)();

One noteworthy change:

No longer decoding block extrinsics by default –– this behavior is opt / one must pass the hexes to the extrinsicsDecoded effect. Aka.

const extrinsicsRaw = C.chain.getBlock(C.polkadot)()
  .access("block")
  .access("extrinsics");
const root = C.extrinsicsDecoded(T.polkadot, extrinsicsRaw);

We'll simplify this once we can attach methods to zones. Ie., this is our north star:

- const extrinsicsRaw = C.chain.getBlock(C.polkadot)()
-   .access("block")
-   .access("extrinsics");
- const root = C.extrinsicsDecoded(T.polkadot, extrinsicsRaw);
+ const root = C.chain.getBlock(C.polkadot)().extrinsics

@harrysolovay harrysolovay force-pushed the block-digest-and-event-extraction-util branch from 5d1f33b to 15fbb13 Compare November 9, 2022 13:11
@harrysolovay harrysolovay force-pushed the block-digest-and-event-extraction-util branch from abd2e24 to 47481d5 Compare November 10, 2022 19:20
@harrysolovay harrysolovay marked this pull request as ready for review November 10, 2022 20:00
@harrysolovay harrysolovay changed the title feat: digest decoding and event extraction util beginnings feat: event extraction util beginnings Nov 10, 2022
@harrysolovay harrysolovay changed the title feat: event extraction util beginnings feat: event extraction util Nov 10, 2022
@harrysolovay harrysolovay merged commit bb6f3a9 into main Nov 10, 2022
@harrysolovay harrysolovay deleted the block-digest-and-event-extraction-util branch November 10, 2022 20:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants