Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 9 additions & 9 deletions Cargo.lock

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

82 changes: 56 additions & 26 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ members = [
"crates/client",
"crates/messaging",
"crates/server",
"crates/sqlite/types",
"crates/sqlite/types",
"xtask/generate-test-db",
"crates/task-network", "crates/storage", "crates/cache", "crates/math", "crates/controllers",
"crates/task-network",
"crates/storage",
"crates/cache",
"crates/math",
"crates/controllers",
]

[workspace.package]
Expand All @@ -35,11 +39,11 @@ cainome = { git = "https://github.com/Larkooo/cainome", branch = "patch-1" }
cainome-cairo-serde = { git = "https://github.com/Larkooo/cainome", branch = "patch-1" }
cainome-cairo-serde-derive = { git = "https://github.com/Larkooo/cainome", branch = "patch-1" }

dojo-utils = { git = "https://github.com/dojoengine/dojo", rev = "054623b" }
dojo-types = { git = "https://github.com/dojoengine/dojo", rev = "054623b" }
dojo-world = { git = "https://github.com/dojoengine/dojo", rev = "054623b" }
dojo-test-utils = { git = "https://github.com/dojoengine/dojo", rev = "054623b" }
dojo-metrics = { git = "https://github.com/dojoengine/dojo", rev = "054623b" }
dojo-utils = { git = "https://github.com/bengineer42/dojo", branch = "add-write-schema-1.5" }
dojo-types = { git = "https://github.com/bengineer42/dojo", branch = "add-write-schema-1.5" }
dojo-world = { git = "https://github.com/bengineer42/dojo", branch = "add-write-schema-1.5" }
dojo-test-utils = { git = "https://github.com/bengineer42/dojo", branch = "add-write-schema-1.5" }
dojo-metrics = { git = "https://github.com/bengineer42/dojo", branch = "add-write-schema-1.5" }

# torii
torii-broker = { path = "crates/broker" }
Expand All @@ -66,18 +70,18 @@ torii-cache = { path = "crates/cache" }
torii-controllers = { path = "crates/controllers" }

# macros
merge-options = { git = "https://github.com/dojoengine/dojo", rev = "82fe9bd" }
merge-options = { git = "https://github.com/bengineer42/dojo", branch = "add-write-schema-1.5" }

bitflags = "2.9.1"

anyhow = "1.0.89"
assert_matches = "1.5.0"
async-trait = "0.1.82"
base64 = "0.21.2"
camino = { version = "1.1.2", features = [ "serde1" ] }
chrono = { version = "0.4.24", features = [ "serde" ] }
clap = { version = "4.5.16", features = [ "derive", "env" ] }
crypto-bigint = { version = "0.5.3", features = [ "serde" ] }
camino = { version = "1.1.2", features = ["serde1"] }
chrono = { version = "0.4.24", features = ["serde"] }
clap = { version = "4.5.16", features = ["derive", "env"] }
crypto-bigint = { version = "0.5.3", features = ["serde"] }
data-url = "0.3"
flate2 = "1.0.35"
futures = "0.3.30"
Expand All @@ -94,34 +98,49 @@ parking_lot = "0.12.1"
rand = "0.8.5"
rayon = "1.8.0"
regex = "1.10.3"
reqwest = { version = "0.11.27", features = [ "json", "rustls-tls", "stream" ], default-features = false }
serde = { version = "1.0", features = [ "derive" ] }
serde_json = { version = "1.0", features = [ "arbitrary_precision" ] }
sqlx = { version = "0.8.2", features = [ "chrono", "macros", "regexp", "runtime-async-std", "runtime-tokio", "sqlite", "uuid" ] }
reqwest = { version = "0.11.27", features = [
"json",
"rustls-tls",
"stream",
], default-features = false }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
sqlx = { version = "0.8.2", features = [
"chrono",
"macros",
"regexp",
"runtime-async-std",
"runtime-tokio",
"sqlite",
"uuid",
] }
strum = "0.25"
strum_macros = "0.25"
tempfile = "3.9.0"
thiserror = "1.0.32"
tokio = { version = "1.39.2", features = [ "full" ] }
tokio = { version = "1.39.2", features = ["full"] }
tokio-util = "0.7.12"
toml = "0.8"
tower = "0.4.13"
tower-http = "0.4.4"
tracing = { version = "0.1.38", features = [ "log" ], default-features = false }
tracing-subscriber = { version = "0.3.16", features = [ "env-filter", "json" ] }
tracing = { version = "0.1.38", features = ["log"], default-features = false }
tracing-subscriber = { version = "0.3.16", features = ["env-filter", "json"] }
# indicatif
tracing-indicatif = "0.3.9"
indicatif = "0.17.9"
terminal_size = "0.3.0"

url = { version = "2.4.0", features = [ "serde" ] }
url = { version = "2.4.0", features = ["serde"] }
# TODO: see if we still need the git version
ipfs-api-backend-hyper = { git = "https://github.com/ferristseng/rust-ipfs-api", rev = "af2c17f7b19ef5b9898f458d97a90055c3605633", features = [ "with-hyper-rustls", "with-send-sync" ] }
ipfs-api-backend-hyper = { git = "https://github.com/ferristseng/rust-ipfs-api", rev = "af2c17f7b19ef5b9898f458d97a90055c3605633", features = [
"with-hyper-rustls",
"with-send-sync",
] }
mime_guess = "2.0"

sozo-scarbext = { git = "https://github.com/dojoengine/dojo", rev = "054623b" }
sozo-scarbext = { git = "https://github.com/bengineer42/dojo", branch = "add-write-schema-1.5" }
scarb = { git = "https://github.com/dojoengine/scarb", rev = "38f13cb6f9f33836a61b231f7e00c5c4dc5cafd6" }
sozo-ops = { git = "https://github.com/dojoengine/dojo", rev = "054623b" }
sozo-ops = { git = "https://github.com/bengineer42/dojo", branch = "add-write-schema-1.5" }
katana-runner = { git = "https://github.com/dojoengine/katana", rev = "f472095" }


Expand All @@ -131,16 +150,27 @@ warp = "0.3"

# gRPC
prost = "0.12"
tonic = { version = "0.11", features = [ "gzip", "tls", "tls-roots", "tls-webpki-roots" ] }
tonic = { version = "0.11", features = [
"gzip",
"tls",
"tls-roots",
"tls-webpki-roots",
] }
tonic-build = "0.11"
tonic-reflection = "0.11"
tonic-web = "0.11"

# WASM-compatible gRPC deps
tonic-web-wasm-client = "0.6.0"
wasm-prost = { version = "0.13", package = "prost" }
wasm-tonic = { version = "0.12", default-features = false, features = [ "codegen", "gzip", "prost" ], package = "tonic" }
wasm-tonic-build = { version = "0.12", default-features = false, features = [ "prost" ], package = "tonic-build" }
wasm-tonic = { version = "0.12", default-features = false, features = [
"codegen",
"gzip",
"prost",
], package = "tonic" }
wasm-tonic-build = { version = "0.12", default-features = false, features = [
"prost",
], package = "tonic-build" }

starknet-core = "0.12.3"
starknet = "0.14.0"
Expand Down
28 changes: 28 additions & 0 deletions crates/indexer/engine/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,34 @@ async fn test_load_from_remote_update(sequencer: &RunnerCtx) {
.await
.unwrap();

let res = account
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might wanna make multiple updates and verify that the latest state is the latest one.

.execute_v3(vec![Call {
to: actions_address,
selector: get_selector_from_name("update_player_config_items").unwrap(),
calldata: vec![Felt::ZERO],
}])
.send_with_cfg(&TxnConfig::init_wait())
.await
.unwrap();

TransactionWaiter::new(res.transaction_hash, &provider)
.await
.unwrap();

let res = account
.execute_v3(vec![Call {
to: actions_address,
selector: get_selector_from_name("update_player_config_items").unwrap(),
calldata: vec![Felt::from(1), Felt::from(1), Felt::from(20), Felt::from(12)],
}])
.send_with_cfg(&TxnConfig::init_wait())
.await
.unwrap();

TransactionWaiter::new(res.transaction_hash, &provider)
.await
.unwrap();

let world_reader = WorldContractReader::new(world_address, Arc::clone(&provider));

let tempfile = NamedTempFile::new().unwrap();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check that the state of the model from the DB is the correct one

Expand Down
3 changes: 3 additions & 0 deletions crates/processors/src/processors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use store_del_record::StoreDelRecordProcessor;
use store_set_record::StoreSetRecordProcessor;
use store_transaction::StoreTransactionProcessor;
use store_update_member::StoreUpdateMemberProcessor;
use store_update_members::StoreUpdateMembersProcessor;
use store_update_record::StoreUpdateRecordProcessor;
use torii_storage::types::ContractType;
use upgrade_event::UpgradeEventProcessor;
Expand All @@ -45,6 +46,7 @@ mod store_del_record;
mod store_set_record;
mod store_transaction;
mod store_update_member;
mod store_update_members;
mod store_update_record;
mod upgrade_event;
mod upgrade_model;
Expand Down Expand Up @@ -88,6 +90,7 @@ impl<P: Provider + Send + Sync + std::fmt::Debug + 'static> Processors<P> {
Box::new(StoreSetRecordProcessor),
Box::new(StoreDelRecordProcessor),
Box::new(StoreUpdateRecordProcessor),
Box::new(StoreUpdateMembersProcessor),
Box::new(StoreUpdateMemberProcessor),
Box::new(MetadataUpdateProcessor),
Box::new(EventMessageProcessor),
Expand Down
Loading
Loading