Skip to content

Commit

Permalink
refactor(katana-rpc): move API implementations from Sequencer to th…
Browse files Browse the repository at this point in the history
…eir dedicated server struct (#2209)
  • Loading branch information
kariy authored Jul 25, 2024
1 parent 0e14071 commit 27580f6
Show file tree
Hide file tree
Showing 20 changed files with 755 additions and 819 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions crates/dojo-test-utils/src/sequencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl TestSequencer {

let url = Url::parse(&format!("http://{}", handle.addr)).expect("Failed to parse URL");

let account = sequencer.backend.config.genesis.accounts().next().unwrap();
let account = sequencer.backend().config.genesis.accounts().next().unwrap();
let account = TestAccount {
private_key: Felt::from_bytes_be(&account.1.private_key().unwrap().to_bytes_be()),
account_address: Felt::from_bytes_be(&account.0.to_bytes_be()),
Expand Down Expand Up @@ -114,7 +114,7 @@ impl TestSequencer {
&self,
index: usize,
) -> SingleOwnerAccount<JsonRpcClient<HttpTransport>, LocalWallet> {
let accounts: Vec<_> = self.sequencer.backend.config.genesis.accounts().collect::<_>();
let accounts: Vec<_> = self.sequencer.backend().config.genesis.accounts().collect::<_>();

let account = accounts[index];
let private_key = Felt::from_bytes_be(&account.1.private_key().unwrap().to_bytes_be());
Expand Down
2 changes: 0 additions & 2 deletions crates/katana/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ pub mod pool;
pub mod sequencer;
pub mod service;
pub mod utils;

pub mod sequencer_error;
Loading

0 comments on commit 27580f6

Please sign in to comment.