Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add smartContractUpdate and smartContractLogUpdate to PgWriteStore event emitter #1462

Merged
merged 7 commits into from
Dec 6, 2022

Conversation

rafaelcr
Copy link
Collaborator

@rafaelcr rafaelcr commented Nov 30, 2022

Adds internal events (event emitter and postgres NOTIFY) for when:

  1. A smart contract is deployed
  2. A smart contract log event is produced

These events will be emitted in blocks and microblocks.

Also, tweak some event interfaces so we get more type safety when emitting events.

Fixes #1460

@github-actions github-actions bot temporarily deployed to commit November 30, 2022 16:38 Inactive
@github-actions
Copy link

github-actions bot commented Nov 30, 2022

@github-actions github-actions bot temporarily deployed to pull request November 30, 2022 16:41 Inactive
@codecov-commenter
Copy link

codecov-commenter commented Nov 30, 2022

Codecov Report

Merging #1462 (e890df0) into beta (ad386d3) will increase coverage by 0.11%.
The diff coverage is 95.34%.

@@            Coverage Diff             @@
##             beta    #1462      +/-   ##
==========================================
+ Coverage   77.82%   77.93%   +0.11%     
==========================================
  Files         104      104              
  Lines       10403    10421      +18     
  Branches     2238     2240       +2     
==========================================
+ Hits         8096     8122      +26     
+ Misses       2198     2191       -7     
+ Partials      109      108       -1     
Impacted Files Coverage Δ
src/datastore/common.ts 100.00% <ø> (ø)
src/datastore/pg-store-event-emitter.ts 100.00% <ø> (ø)
src/datastore/pg-write-store.ts 92.04% <90.00%> (+0.03%) ⬆️
src/datastore/helpers.ts 74.80% <100.00%> (ø)
src/datastore/pg-notifier.ts 93.02% <100.00%> (+0.71%) ⬆️
src/datastore/pg-store.ts 93.31% <100.00%> (-0.02%) ⬇️
src/helpers.ts 68.33% <0.00%> (+0.77%) ⬆️
src/event-stream/event-server.ts 79.81% <0.00%> (+1.55%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions github-actions bot temporarily deployed to commit November 30, 2022 16:48 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 30, 2022 16:49 Inactive
Base automatically changed from beta to master December 6, 2022 16:04
Copy link
Member

@zone117x zone117x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rafaelcr rafaelcr changed the base branch from master to beta December 6, 2022 17:02
@rafaelcr rafaelcr merged commit bce0ef9 into beta Dec 6, 2022
@rafaelcr rafaelcr deleted the feat/contract-events branch December 6, 2022 17:03
blockstack-devops pushed a commit that referenced this pull request Dec 6, 2022
## [6.3.0-beta.1](v6.2.2...v6.3.0-beta.1) (2022-12-06)

### Features

* add `smartContractUpdate` and `smartContractLogUpdate` to `PgWriteStore` event emitter ([#1462](#1462)) ([bce0ef9](bce0ef9))
@blockstack-devops
Copy link

🎉 This PR is included in version 6.3.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

blockstack-devops pushed a commit that referenced this pull request Jan 10, 2023
## [6.3.0](v6.2.3...v6.3.0) (2023-01-10)

### Features

* add `smartContractUpdate` and `smartContractLogUpdate` to `PgWriteStore` event emitter ([#1462](#1462)) ([bce0ef9](bce0ef9))
@blockstack-devops
Copy link

🎉 This PR is included in version 6.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

blockstack-devops pushed a commit that referenced this pull request Feb 3, 2023
## [7.0.0-beta.4](v7.0.0-beta.3...v7.0.0-beta.4) (2023-02-03)

### Features

* add `smartContractUpdate` and `smartContractLogUpdate` to `PgWriteStore` event emitter ([#1462](#1462)) ([bce0ef9](bce0ef9))

### Bug Fixes

* add block_height index to contract_logs ([#1534](#1534)) ([dc53af2](dc53af2))
* add contract_identifier index on contract_logs table ([#1523](#1523)) ([1f16513](1f16513))
* avoid selecting `raw_tx` column on read queries ([#1453](#1453)) ([5acfc96](5acfc96))
* build rosetta with node 16 ([654b64f](654b64f))
* datastore tests ([bb96507](bb96507))
* is_unanchored property on /extended/v1/tx/:tx_id ([#1487](#1487)) ([4b85058](4b85058))
* lint docs ci dependencies ([#1458](#1458)) ([19c3a0d](19c3a0d))
* stop resolving revoked BNS names ([#1519](#1519)) ([095c4fc](095c4fc))
* test tx types ([11b9013](11b9013))
* update total STX supply to the year 2050 projected amount ([#1531](#1531)) ([0689f60](0689f60))
@blockstack-devops
Copy link

🎉 This PR is included in version 7.0.0-beta.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants