Skip to content

Commit

Permalink
release: starknet, sink-{console, mongo, parquet, postgres, webhook} (#…
Browse files Browse the repository at this point in the history
…373)

### Summary

starknet: 1.6.1
sink-console: 0.6.1
sink-mongo: 0.9.1
sink-parquet: 0.7.1
sink-postgres: 0.8.1
sink-webhook: 0.7.1
  • Loading branch information
fracek authored Jul 31, 2024
2 parents cd17bf3 + 6f83821 commit 513b3fc
Show file tree
Hide file tree
Showing 15 changed files with 124 additions and 13 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion core/proto/starknet/v1alpha2/filter.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ message TransactionFilter {
DeclareTransactionFilter declare = 4;
L1HandlerTransactionFilter l1_handler = 5;
DeployAccountTransactionFilter deploy_account = 6;
InvokeTransactionV3Filter invoke_v3 = 8;
}

// Include reverted transactions.
Expand All @@ -59,6 +60,14 @@ message InvokeTransactionV1Filter {
repeated FieldElement calldata = 3;
}

// Receive invoke transactions, v3
message InvokeTransactionV3Filter {
// Filter by sender address.
FieldElement sender_address = 1;
// Filter by calldata prefix.
repeated FieldElement calldata = 2;
}

// Receive deploy transactions.
message DeployTransactionFilter {
// Filter by contract address salt.
Expand Down Expand Up @@ -119,7 +128,8 @@ message EventFilter {
optional bool include_reverted = 4;
// Include the transaction that emitted the event. Defaults to true.
optional bool include_transaction = 5;
// Include the receipt of the transaction that emitted the event. Defaults to true.
// Include the receipt of the transaction that emitted the event. Defaults to
// true.
optional bool include_receipt = 6;
}

Expand Down
13 changes: 13 additions & 0 deletions core/src/starknet/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ impl TransactionFilter {
None => true,
Some(transaction_filter::Filter::InvokeV0(filter)) => filter.matches(tx),
Some(transaction_filter::Filter::InvokeV1(filter)) => filter.matches(tx),
Some(transaction_filter::Filter::InvokeV3(filter)) => filter.matches(tx),
Some(transaction_filter::Filter::Deploy(filter)) => filter.matches(tx),
Some(transaction_filter::Filter::Declare(filter)) => filter.matches(tx),
Some(transaction_filter::Filter::L1Handler(filter)) => filter.matches(tx),
Expand Down Expand Up @@ -445,6 +446,18 @@ impl InvokeTransactionV1Filter {
}
}

impl InvokeTransactionV3Filter {
pub fn matches(&self, tx: &Transaction) -> bool {
match tx.transaction.as_ref() {
Some(transaction::Transaction::InvokeV3(tx)) => {
self.sender_address.matches(&tx.sender_address)
&& self.calldata.prefix_matches(&tx.calldata)
}
_ => false,
}
}
}

impl DeployTransactionFilter {
pub fn matches(&self, tx: &Transaction) -> bool {
match tx.transaction.as_ref() {
Expand Down
16 changes: 16 additions & 0 deletions sinks/sink-console/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ The format is based on [Common Changelog](https://common-changelog.org/), and
this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.1] - 2024-07-31

_Add support for filtering invoke transactions v3._

### Added

- Add support for filtering invoke transactions v3. For example:

```ts
export const config = {
filter: {
transactions: [{ invokeV3: { senderAddress: "0x123...F" } }],
}
}
```

## [0.6.0] - 2024-06-10

_Simplify access to all environment variables._
Expand Down
2 changes: 1 addition & 1 deletion sinks/sink-console/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apibara-sink-console"
version = "0.6.0"
version = "0.6.1"
edition.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
16 changes: 16 additions & 0 deletions sinks/sink-mongo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ The format is based on [Common Changelog](https://common-changelog.org/), and
this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.1] - 2024-07-31

_Add support for filtering invoke transactions v3._

### Added

- Add support for filtering invoke transactions v3. For example:

```ts
export const config = {
filter: {
transactions: [{ invokeV3: { senderAddress: "0x123...F" } }],
}
}
```

## [0.9.0] - 2024-06-10

_Simplify access to all environment variables._
Expand Down
2 changes: 1 addition & 1 deletion sinks/sink-mongo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apibara-sink-mongo"
version = "0.9.0"
version = "0.9.1"
edition.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
16 changes: 16 additions & 0 deletions sinks/sink-parquet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ The format is based on [Common Changelog](https://common-changelog.org/), and
this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.1] - 2024-07-31

_Add support for filtering invoke transactions v3._

### Added

- Add support for filtering invoke transactions v3. For example:

```ts
export const config = {
filter: {
transactions: [{ invokeV3: { senderAddress: "0x123...F" } }],
}
}
```

## [0.7.0] - 2024-06-10

_Simplify access to all environment variables._
Expand Down
2 changes: 1 addition & 1 deletion sinks/sink-parquet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apibara-sink-parquet"
version = "0.7.0"
version = "0.7.1"
edition.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
16 changes: 16 additions & 0 deletions sinks/sink-postgres/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ The format is based on [Common Changelog](https://common-changelog.org/), and
this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.1] - 2024-07-31

_Add support for filtering invoke transactions v3._

### Added

- Add support for filtering invoke transactions v3. For example:

```ts
export const config = {
filter: {
transactions: [{ invokeV3: { senderAddress: "0x123...F" } }],
}
}
```

## [0.8.0] - 2024-06-10

_Simplify access to all environment variables._
Expand Down
2 changes: 1 addition & 1 deletion sinks/sink-postgres/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apibara-sink-postgres"
version = "0.8.0"
version = "0.8.1"
edition.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
16 changes: 16 additions & 0 deletions sinks/sink-webhook/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ The format is based on [Common Changelog](https://common-changelog.org/), and
this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.1] - 2024-07-31

_Add support for filtering invoke transactions v3._

### Added

- Add support for filtering invoke transactions v3. For example:

```ts
export const config = {
filter: {
transactions: [{ invokeV3: { senderAddress: "0x123...F" } }],
}
}
```

## [0.7.0] - 2024-06-10

_Simplify access to all environment variables._
Expand Down
2 changes: 1 addition & 1 deletion sinks/sink-webhook/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apibara-sink-webhook"
version = "0.7.0"
version = "0.7.1"
edition.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down
8 changes: 8 additions & 0 deletions starknet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Common Changelog](https://common-changelog.org/), and
this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.6.1] - 2024-07-31

_Support filtering invoke transactions v3._

### Added

- Add support for filtering invoke transactions v3.

## [1.6.0] - 2024-04-09

_Add support for RPC v0.7.1._
Expand Down
2 changes: 1 addition & 1 deletion starknet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apibara-starknet"
version = "1.6.0"
version = "1.6.1"
edition.workspace = true
authors.workspace = true
repository.workspace = true
Expand Down

0 comments on commit 513b3fc

Please sign in to comment.