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

Solis v0.7.0 alpha #11

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ab24518
feat(solis): update katana for solis
kwiss May 9, 2024
d550918
fix(hooker): update hooker & api
kwiss May 10, 2024
0a7113a
fix(config): pass config to solis api
kwiss May 10, 2024
bf7dfa6
feat(errors): add error handling for solis api & add optionnal hooker
kwiss May 10, 2024
519eab1
feat(solis): remove solis bin in favor of external impl
kwiss May 10, 2024
dfbc077
feat(solis): add solis bin
kwiss May 13, 2024
6c95e0e
feat(solis): remove feature flag & fix hooker impl errors
kwiss May 15, 2024
1648411
fix(hooker): update hooker remove useless new & fix typing
kwiss May 15, 2024
f882722
feat(solis): add hooker in solis bin & logs to starknet messaging
kwiss May 15, 2024
c41222b
fix(solis): update header
kwiss May 15, 2024
8ba6ead
feat(hooker): update hooker default impl for debug
kwiss May 16, 2024
b219de6
katana: hooker update BroadcastedInvokeTransactionV3
ybensacq May 21, 2024
0fb79ec
starknet: add call to verify_invoke_tx_before_pool
ybensacq May 22, 2024
f6705a4
update transaction type
ybensacq May 22, 2024
64538f8
feat(solis): update gather message to test only pending
kwiss May 28, 2024
44c2f03
feat(solis): update gather message add debug logs
kwiss May 28, 2024
85fe586
feat(solis): comment hooker
kwiss May 29, 2024
5d7b11a
feat(messaging): update gather message to handle latestblock
kwiss May 29, 2024
253af53
fix: hooker remove hooker from send message for testing
kwiss Jun 3, 2024
b08f796
hooker: generate json file with addresses
ybensacq Jun 10, 2024
3bcc9fa
katana: add service & starknet update
ybensacq Jun 10, 2024
0cd71a0
Merge pull request #13 from ArkProjectNFTs/feature/dev-495-new-solis_…
ybensacq Jun 10, 2024
8647b8e
starknet messaging: update log
ybensacq Jun 10, 2024
a8047fc
solis: add user & password
ybensacq Jun 10, 2024
1be79f6
solis: update gitignore
ybensacq Jun 10, 2024
de1c664
fix(solis): auth solis (#19)
ybensacq Aug 22, 2024
a4b4276
feat(katana): prevent sequencer to treat all block from start (#22)
ybensacq Aug 22, 2024
cd725f9
fix: katana message gathering
kwiss Oct 22, 2024
702b07f
fix: update hooker
kwiss Dec 6, 2024
2586493
fix: katana update gather message remove pending in favor of latest only
kwiss Dec 6, 2024
f7707b2
fix: update hooker & unused import
kwiss Dec 6, 2024
69a8d84
fix: update gather block (#44)
kwiss Dec 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(hooker): update hooker default impl for debug
  • Loading branch information
kwiss committed May 16, 2024
commit 8ba6ead22be545e0c20ea20f9ea79acfaef306ae
23 changes: 16 additions & 7 deletions crates/katana/core/src/hooker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use katana_executor::ExecutorFactory;
use starknet::accounts::Call;
use starknet::core::types::{BroadcastedInvokeTransaction, FieldElement};
use std::sync::Arc;
use tracing::{error, info};

#[derive(Debug, Clone, serde::Deserialize, serde::Serialize, Copy, PartialEq, Eq)]
pub struct HookerAddresses {
Expand Down Expand Up @@ -89,34 +90,42 @@ impl<EF: ExecutorFactory> DefaultKatanaHooker<EF> {
impl<EF: ExecutorFactory + 'static + Send + Sync> KatanaHooker<EF> for DefaultKatanaHooker<EF> {
fn set_sequencer(&mut self, sequencer: Arc<KatanaSequencer<EF>>) {
self.sequencer = Some(sequencer);
info!("HOOKER: Sequencer set for hooker");
}

async fn verify_message_to_appchain(
&self,
_from: FieldElement,
_to: FieldElement,
_selector: FieldElement,
from: FieldElement,
to: FieldElement,
selector: FieldElement,
) -> bool {
info!(
"HOOKER: verify_message_to_appchain called with from: {:?}, to: {:?}, selector: {:?}",
from, to, selector
);
true
}

async fn verify_invoke_tx_before_pool(
&self,
_transaction: BroadcastedInvokeTransaction,
transaction: BroadcastedInvokeTransaction,
) -> bool {
info!("HOOKER: verify_invoke_tx_before_pool called with transaction: {:?}", transaction);
true
}

async fn verify_tx_for_starknet(&self, _call: Call) -> bool {
async fn verify_tx_for_starknet(&self, call: Call) -> bool {
info!("HOOKER: verify_tx_for_starknet called with call: {:?}", call);
true
}

async fn on_starknet_tx_failed(&self, _call: Call) {
async fn on_starknet_tx_failed(&self, call: Call) {
// Log the failure or handle it according to your needs. No-op by default.
tracing::error!("Starknet transaction failed: {:?}", _call);
error!("HOOKER: Starknet transaction failed: {:?}", call);
}

fn set_addresses(&mut self, addresses: HookerAddresses) {
self.addresses = Some(addresses);
info!("HOOKER: Addresses set for hooker: {:?}", addresses);
}
}