-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
319 additions
and
230 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Code generated by scarb DO NOT EDIT. | ||
version = 1 | ||
|
||
[[package]] | ||
name = "dojo" | ||
version = "0.3.1" | ||
dependencies = [ | ||
"dojo_plugin", | ||
] | ||
|
||
[[package]] | ||
name = "dojo_plugin" | ||
version = "0.3.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Code generated by scarb DO NOT EDIT. | ||
version = 1 | ||
|
||
[[package]] | ||
name = "dojo" | ||
version = "0.3.1" | ||
dependencies = [ | ||
"dojo_plugin", | ||
] | ||
|
||
[[package]] | ||
name = "dojo_plugin" | ||
version = "0.3.1" | ||
|
||
[[package]] | ||
name = "dojo_primitives" | ||
version = "0.3.1" | ||
dependencies = [ | ||
"dojo", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use anyhow::{Error, Ok, Result}; | ||
use async_trait::async_trait; | ||
use starknet::core::types::{BlockWithTxs, InvokeTransactionReceipt, InvokeTransactionV1}; | ||
use starknet::providers::Provider; | ||
|
||
use super::TransactionProcessor; | ||
use crate::sql::Sql; | ||
|
||
#[derive(Default)] | ||
pub struct StoreTransactionProcessor; | ||
|
||
#[async_trait] | ||
impl<P: Provider + Sync> TransactionProcessor<P> for StoreTransactionProcessor { | ||
async fn process( | ||
&self, | ||
db: &mut Sql, | ||
_provider: &P, | ||
_block: &BlockWithTxs, | ||
_receipt: &InvokeTransactionReceipt, | ||
transaction: &InvokeTransactionV1, | ||
transaction_id: &str, | ||
) -> Result<(), Error> { | ||
db.store_transaction(transaction, transaction_id); | ||
|
||
Ok(()) | ||
} | ||
} |
Oops, something went wrong.