Skip to content

Commit

Permalink
fix formatting and casing for wallet requests
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm authored and remiroyc committed Nov 7, 2023
1 parent b135018 commit 32bc847
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/blockchain/ethereum/script/ERC721.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ contract Deploy is Script {
bytes memory dataInit = abi.encodeWithSelector(
ERC721Bridgeable.initialize.selector,
abi.encode(
"glihm_123",
"GLM_123"
"everai_123",
"EVR_123"
)
);

Expand Down
Empty file.
4 changes: 4 additions & 0 deletions apps/indexer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ stop_local_devnodes:

db_reset:
sudo docker-compose -f ./docker-compose.yml down
docker volume rm indexer_starklane_testnet -f
sudo docker-compose -f ./docker-compose.yml up -d

run_dev:
cargo build
@make db_reset
RUST_LOG=debug cargo run -- --config-file local.config --mongodb mongodb://localhost:27017/starklane

run_server:
RUST_LOG=starklane_indexer=debug cargo run -- --config-file testnet.config --mongodb mongodb://localhost:27017/starklane_testnet --api-server-ip 127.0.0.1:7890
7 changes: 6 additions & 1 deletion apps/indexer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ version: '3.1'

services:

db:
starklane_db:
# TODO: add volume for persistence when alpha is ready.
container_name: starklane_db
image: mongo
restart: always
ports:
- 27017:27017
volumes:
- starklane_testnet:/data/db

volumes:
starklane_testnet:
1 change: 1 addition & 0 deletions apps/indexer/src/starknet_indexer/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,6 @@ impl StarknetClient {
calldata: vec![felt!("1"), felt!("0")],
};
self.client.invoke_tx(vec![call]).await;
*/
}
5 changes: 5 additions & 0 deletions apps/indexer/src/starknet_indexer/events.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use anyhow::{anyhow, Result};
use serde_json::{json, Value};
use starknet::core::{types::FieldElement, types::*};
use starknet::macros::selector;

use crate::storage::{BridgeChain, CrossChainTx, CrossChainTxKind, Event, EventLabel, Request};

Expand All @@ -20,6 +21,10 @@ pub fn get_store_data(
// keys[0] -> selector.
// keys[1,2] -> req hash.
// keys[3] -> timestamp.
if event.keys[0] == selector!("CollectionDeployedFromL1") {
return Ok((None, None, None));
}

let hash = u256_to_hex(&event.keys[1..])?;
let block_timestamp = event.keys[3];
let request_header = event.data[0];
Expand Down
1 change: 0 additions & 1 deletion apps/indexer/src/storage/mongo/request_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ impl RequestStore for MongoStore {
async fn reqs_by_wallet(&self, address: &str) -> Result<Vec<Request>> {
let filter = doc! {
"$or": [
{"from": address},
{"to": address},
]
};
Expand Down

0 comments on commit 32bc847

Please sign in to comment.