diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a01131d856..8b7a4170ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,11 +18,13 @@ jobs: - uses: Swatinem/rust-cache@v2 - run: | cargo build -r --bin katana + cargo build -r --bin sozo mkdir -p bins cp ./target/release/katana bins/ + cp ./target/release/sozo bins/ - uses: actions/upload-artifact@v4 with: - name: katana-binary + name: dojo-bins path: bins test: @@ -35,7 +37,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - uses: actions/download-artifact@v4 with: - name: katana-binary + name: dojo-bins path: /tmp/bins - run: | chmod +x /tmp/bins/katana @@ -83,7 +85,7 @@ jobs: steps: - uses: actions/download-artifact@v4 with: - name: katana-binary + name: dojo-bins - run: | chmod +x ./katana ./katana & @@ -107,22 +109,34 @@ jobs: scarb --manifest-path crates/dojo-core/Scarb.toml fmt --check dojo-core-test: + needs: build runs-on: ubuntu-latest container: image: ghcr.io/dojoengine/dojo-dev:v0.7.2 steps: + - uses: actions/download-artifact@v4 + with: + name: dojo-bins + path: /tmp/bins - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2 - - run: cargo run --bin sozo -- --manifest-path crates/dojo-core/Scarb.toml test + - run: | + chmod +x /tmp/bins/sozo + /tmp/bins/sozo --manifest-path crates/dojo-core/Scarb.toml test dojo-spawn-and-move-example-test: + needs: build runs-on: ubuntu-latest container: image: ghcr.io/dojoengine/dojo-dev:v0.7.2 steps: + - uses: actions/download-artifact@v4 + with: + name: dojo-bins + path: /tmp/bins - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2 - - run: cargo run --bin sozo -- --manifest-path examples/spawn-and-move/Scarb.toml test + - run: | + chmod +x /tmp/bins/sozo + /tmp/bins/sozo --manifest-path examples/spawn-and-move/Scarb.toml test dojo-world-bindings-check: runs-on: ubuntu-latest @@ -134,7 +148,7 @@ jobs: - run: cargo run --bin dojo-world-abigen -- --check clippy: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-4-cores container: image: ghcr.io/dojoengine/dojo-dev:v0.7.2 steps: @@ -162,17 +176,17 @@ jobs: scripts/docs.sh test-hurl: + needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@master + - uses: actions/download-artifact@v4 with: - toolchain: ${{ env.RUST_VERSION }} - - uses: Swatinem/rust-cache@v2 + name: dojo-bins + path: /tmp/bins + - uses: actions/checkout@v3 - run: | curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/3.0.0/hurl_3.0.0_amd64.deb sudo apt update && sudo apt install ./hurl_3.0.0_amd64.deb - - run: | - cargo build --bin katana - nohup target/debug/katana --accounts 2 --disable-fee & + chmod +x /tmp/bins/katana + nohup /tmp/bins/katana --accounts 2 --disable-fee & - run: hurl --test examples/rpc/**/*.hurl diff --git a/Cargo.lock b/Cargo.lock index 12305480f3..b59d7e9ba4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -141,15 +141,60 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +[[package]] +name = "alloy" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-consensus 0.1.2", + "alloy-contract 0.1.2", + "alloy-core", + "alloy-eips 0.1.2", + "alloy-genesis 0.1.2", + "alloy-network 0.1.2", + "alloy-node-bindings", + "alloy-provider 0.1.2", + "alloy-rpc-client 0.1.2", + "alloy-serde 0.1.2", + "alloy-signer 0.1.2", + "alloy-signer-local", + "alloy-transport 0.1.2", + "alloy-transport-http 0.1.2", + "reqwest 0.12.4", +] + +[[package]] +name = "alloy-chains" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e9a1892803b02f53e25bea3e414ddd0501f12d97456c9d5ade4edf88f9516f" +dependencies = [ + "num_enum", + "strum 0.26.3", +] + [[package]] name = "alloy-consensus" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60c3912902ee64#4655f8e4372ecc0b056e83abbc60c3912902ee64" dependencies = [ - "alloy-eips", + "alloy-eips 0.1.0", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.1.0", + "c-kzg", + "serde", +] + +[[package]] +name = "alloy-consensus" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-eips 0.1.2", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.1.2", "c-kzg", "serde", ] @@ -161,22 +206,52 @@ source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60 dependencies = [ "alloy-dyn-abi", "alloy-json-abi", - "alloy-network", + "alloy-network 0.1.0", "alloy-primitives", - "alloy-provider", + "alloy-provider 0.1.0", "alloy-rpc-types", "alloy-sol-types", - "alloy-transport", + "alloy-transport 0.1.0", + "futures", + "futures-util", + "thiserror", +] + +[[package]] +name = "alloy-contract" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network 0.1.2", + "alloy-primitives", + "alloy-provider 0.1.2", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport 0.1.2", "futures", "futures-util", "thiserror", ] +[[package]] +name = "alloy-core" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5af3faff14c12c8b11037e0a093dd157c3702becb8435577a2408534d0758315" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-types", +] + [[package]] name = "alloy-dyn-abi" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8425a283510106b1a6ad25dd4bb648ecde7da3fd2baeb9400a85ad62f51ec90b" +checksum = "cb6e6436a9530f25010d13653e206fab4c9feddacf21a54de8d7311b275bc56b" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -196,7 +271,21 @@ source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60 dependencies = [ "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.1.0", + "c-kzg", + "once_cell", + "serde", + "sha2 0.10.8", +] + +[[package]] +name = "alloy-eips" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.1.2", "c-kzg", "once_cell", "serde", @@ -209,16 +298,26 @@ version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60c3912902ee64#4655f8e4372ecc0b056e83abbc60c3912902ee64" dependencies = [ "alloy-primitives", - "alloy-serde", + "alloy-serde 0.1.0", "serde", "serde_json", ] +[[package]] +name = "alloy-genesis" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-primitives", + "alloy-serde 0.1.2", + "serde", +] + [[package]] name = "alloy-json-abi" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e30946aa6173020259055a44971f5cf40a7d76c931d209caeb51b333263df4f" +checksum = "aaeaccd50238126e3a0ff9387c7c568837726ad4f4e399b528ca88104d6c25ef" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -238,28 +337,74 @@ dependencies = [ "tracing", ] +[[package]] +name = "alloy-json-rpc" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", + "thiserror", + "tracing", +] + [[package]] name = "alloy-network" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60c3912902ee64#4655f8e4372ecc0b056e83abbc60c3912902ee64" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", + "alloy-consensus 0.1.0", + "alloy-eips 0.1.0", + "alloy-json-rpc 0.1.0", "alloy-primitives", "alloy-rpc-types", - "alloy-signer", + "alloy-signer 0.1.0", "alloy-sol-types", "async-trait", "futures-utils-wasm", "thiserror", ] +[[package]] +name = "alloy-network" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-consensus 0.1.2", + "alloy-eips 0.1.2", + "alloy-json-rpc 0.1.2", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde 0.1.2", + "alloy-signer 0.1.2", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + +[[package]] +name = "alloy-node-bindings" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-genesis 0.1.2", + "alloy-primitives", + "k256", + "serde_json", + "tempfile", + "thiserror", + "tracing", + "url", +] + [[package]] name = "alloy-primitives" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8aa973e647ec336810a9356af8aea787249c9d00b1525359f3db29a68d231b" +checksum = "f783611babedbbe90db3478c120fb5f5daacceffc210b39adc0af4fe0da70bad" dependencies = [ "alloy-rlp", "bytes", @@ -282,15 +427,15 @@ name = "alloy-provider" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60c3912902ee64#4655f8e4372ecc0b056e83abbc60c3912902ee64" dependencies = [ - "alloy-eips", - "alloy-json-rpc", - "alloy-network", + "alloy-eips 0.1.0", + "alloy-json-rpc 0.1.0", + "alloy-network 0.1.0", "alloy-primitives", - "alloy-rpc-client", + "alloy-rpc-client 0.1.0", "alloy-rpc-types", "alloy-rpc-types-trace", - "alloy-transport", - "alloy-transport-http", + "alloy-transport 0.1.0", + "alloy-transport-http 0.1.0", "async-stream", "async-trait", "auto_impl", @@ -306,6 +451,40 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-provider" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.1.2", + "alloy-eips 0.1.2", + "alloy-json-rpc 0.1.2", + "alloy-network 0.1.2", + "alloy-node-bindings", + "alloy-primitives", + "alloy-rpc-client 0.1.2", + "alloy-rpc-types-anvil", + "alloy-rpc-types-eth", + "alloy-signer-local", + "alloy-transport 0.1.2", + "alloy-transport-http 0.1.2", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru", + "pin-project", + "reqwest 0.12.4", + "serde", + "serde_json", + "tokio", + "tracing", + "url", +] + [[package]] name = "alloy-rlp" version = "0.3.4" @@ -333,9 +512,29 @@ name = "alloy-rpc-client" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60c3912902ee64#4655f8e4372ecc0b056e83abbc60c3912902ee64" dependencies = [ - "alloy-json-rpc", - "alloy-transport", - "alloy-transport-http", + "alloy-json-rpc 0.1.0", + "alloy-transport 0.1.0", + "alloy-transport-http 0.1.0", + "futures", + "pin-project", + "reqwest 0.12.4", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-json-rpc 0.1.2", + "alloy-transport 0.1.2", + "alloy-transport-http 0.1.2", "futures", "pin-project", "reqwest 0.12.4", @@ -353,12 +552,12 @@ name = "alloy-rpc-types" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60c3912902ee64#4655f8e4372ecc0b056e83abbc60c3912902ee64" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-genesis", + "alloy-consensus 0.1.0", + "alloy-eips 0.1.0", + "alloy-genesis 0.1.0", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.1.0", "alloy-sol-types", "itertools 0.12.1", "serde", @@ -366,6 +565,33 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-rpc-types-anvil" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-primitives", + "alloy-serde 0.1.2", + "serde", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-consensus 0.1.2", + "alloy-eips 0.1.2", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.1.2", + "alloy-sol-types", + "itertools 0.13.0", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "alloy-rpc-types-trace" version = "0.1.0" @@ -373,7 +599,7 @@ source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60 dependencies = [ "alloy-primitives", "alloy-rpc-types", - "alloy-serde", + "alloy-serde 0.1.0", "serde", "serde_json", ] @@ -388,6 +614,16 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-serde" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + [[package]] name = "alloy-signer" version = "0.1.0" @@ -401,15 +637,43 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-signer" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer-local" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-consensus 0.1.2", + "alloy-network 0.1.2", + "alloy-primitives", + "alloy-signer 0.1.2", + "async-trait", + "k256", + "rand", + "thiserror", +] + [[package]] name = "alloy-signer-wallet" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60c3912902ee64#4655f8e4372ecc0b056e83abbc60c3912902ee64" dependencies = [ - "alloy-consensus", - "alloy-network", + "alloy-consensus 0.1.0", + "alloy-network 0.1.0", "alloy-primitives", - "alloy-signer", + "alloy-signer 0.1.0", "async-trait", "k256", "rand", @@ -418,9 +682,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dbd17d67f3e89478c8a634416358e539e577899666c927bc3d2b1328ee9b6ca" +checksum = "4bad41a7c19498e3f6079f7744656328699f8ea3e783bdd10d85788cd439f572" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -432,14 +696,14 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6da95adcf4760bb4b108fefa51d50096c5e5fdd29ee72fed3e86ee414f2e34" +checksum = "fd9899da7d011b4fe4c406a524ed3e3f963797dbc93b45479d60341d3a27b252" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", "const-hex", - "heck 0.4.1", + "heck 0.5.0", "indexmap 2.2.6", "proc-macro-error", "proc-macro2", @@ -451,9 +715,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32c8da04c1343871fb6ce5a489218f9c85323c8340a36e9106b5fc98d4dd59d5" +checksum = "d32d595768fdc61331a132b6f65db41afae41b9b97d36c21eb1b955c422a7e60" dependencies = [ "alloy-json-abi", "const-hex", @@ -468,18 +732,18 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368cae4dc052cad1d8f72eb2ae0c38027116933eeb49213c200a9e9875f208d7" +checksum = "baa2fbd22d353d8685bd9fee11ba2d8b5c3b1d11e56adb3265fcf1f32bfdf404" dependencies = [ "winnow 0.6.8", ] [[package]] name = "alloy-sol-types" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a64d2d2395c1ac636b62419a7b17ec39031d6b2367e66e9acbf566e6055e9c" +checksum = "a49042c6d3b66a9fe6b2b5a8bf0d39fc2ae1ee0310a2a26ffedd79fb097878dd" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -493,7 +757,7 @@ name = "alloy-transport" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60c3912902ee64#4655f8e4372ecc0b056e83abbc60c3912902ee64" dependencies = [ - "alloy-json-rpc", + "alloy-json-rpc 0.1.0", "base64 0.22.1", "futures-util", "futures-utils-wasm", @@ -506,13 +770,44 @@ dependencies = [ "wasm-bindgen-futures", ] +[[package]] +name = "alloy-transport" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-json-rpc 0.1.2", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", +] + [[package]] name = "alloy-transport-http" version = "0.1.0" source = "git+https://github.com/alloy-rs/alloy?rev=4655f8e4372ecc0b056e83abbc60c3912902ee64#4655f8e4372ecc0b056e83abbc60c3912902ee64" dependencies = [ - "alloy-json-rpc", - "alloy-transport", + "alloy-json-rpc 0.1.0", + "alloy-transport 0.1.0", + "reqwest 0.12.4", + "serde_json", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-http" +version = "0.1.2" +source = "git+https://github.com/alloy-rs/alloy#2d26b057c64cbcc77654f4691141c308d63b286f" +dependencies = [ + "alloy-json-rpc 0.1.2", + "alloy-transport 0.1.2", "reqwest 0.12.4", "serde_json", "tower", @@ -7177,6 +7472,22 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.3" @@ -7665,6 +7976,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -8105,15 +8425,15 @@ dependencies = [ name = "katana-core" version = "0.7.2" dependencies = [ - "alloy-contract", - "alloy-network", + "alloy-contract 0.1.0", + "alloy-network 0.1.0", "alloy-primitives", - "alloy-provider", + "alloy-provider 0.1.0", "alloy-rpc-types", - "alloy-signer", + "alloy-signer 0.1.0", "alloy-signer-wallet", "alloy-sol-types", - "alloy-transport", + "alloy-transport 0.1.0", "anyhow", "assert_matches", "async-trait", @@ -8253,8 +8573,10 @@ dependencies = [ name = "katana-rpc" version = "0.7.2" dependencies = [ + "alloy", "anyhow", "assert_matches", + "cainome 0.2.3 (git+https://github.com/cartridge-gg/cainome?rev=ec18eea5)", "cairo-lang-starknet 2.6.3 (git+https://github.com/starkware-libs/cairo?rev=d9984ef58e2f704909e271f2f01327f520ded632)", "cairo-lang-starknet-classes 2.6.3 (git+https://github.com/starkware-libs/cairo?rev=d9984ef58e2f704909e271f2f01327f520ded632)", "dojo-metrics", @@ -8272,13 +8594,16 @@ dependencies = [ "katana-rpc-api", "katana-rpc-types", "katana-rpc-types-builder", + "katana-runner", "katana-tasks", "metrics", + "rand", "serde", "serde_json", "serde_with 2.3.3", "starknet", "starknet_api", + "tempfile", "thiserror", "tokio", "tower", @@ -9932,6 +10257,26 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.64", +] + [[package]] name = "num_threads" version = "0.1.7" @@ -11331,7 +11676,7 @@ dependencies = [ "http-body 0.4.6", "hyper 0.14.28", "hyper-rustls 0.24.2", - "hyper-tls", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -11380,11 +11725,13 @@ dependencies = [ "http-body-util", "hyper 1.3.1", "hyper-rustls 0.26.0", + "hyper-tls 0.6.0", "hyper-util", "ipnet", "js-sys", "log", "mime", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -11396,6 +11743,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper", "tokio", + "tokio-native-tls", "tokio-rustls 0.25.0", "tower-service", "url", @@ -11706,9 +12054,9 @@ dependencies = [ [[package]] name = "ruint" -version = "1.12.1" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", @@ -11730,9 +12078,9 @@ dependencies = [ [[package]] name = "ruint-macro" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "runner-macro" @@ -13610,6 +13958,15 @@ dependencies = [ "strum_macros 0.25.3", ] +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros 0.26.4", +] + [[package]] name = "strum_macros" version = "0.24.3" @@ -13636,6 +13993,19 @@ dependencies = [ "syn 2.0.64", ] +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.64", +] + [[package]] name = "stun" version = "0.5.1" @@ -13732,9 +14102,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8db114c44cf843a8bacd37a146e37987a0b823a0e8bc4fdc610c9c72ab397a5" +checksum = "8d71e19bca02c807c9faa67b5a47673ff231b6e7449b251695188522f1dc44b2" dependencies = [ "paste", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 7048dcf5ad..2093a60c3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -210,8 +210,8 @@ wasm-prost = { version = "0.11.9", package = "prost" } wasm-tonic = { version = "0.9.2", default-features = false, features = [ "codegen", "gzip", "prost" ], package = "tonic" } wasm-tonic-build = { version = "0.9.2", default-features = false, features = [ "prost" ], package = "tonic-build" } -alloy-primitives = { version = "0.7.2", default-features = false } -alloy-sol-types = { version = "0.7.2", default-features = false } +alloy-primitives = { version = "0.7.6", default-features = false } +alloy-sol-types = { version = "0.7.6", default-features = false } criterion = "0.5.1" diff --git a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/Scarb.lock b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/Scarb.lock index 440bb61dbe..815d300273 100644 --- a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/Scarb.lock +++ b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/Scarb.lock @@ -10,12 +10,12 @@ dependencies = [ [[package]] name = "dojo" -version = "0.7.0" +version = "0.7.2" dependencies = [ "dojo_plugin", ] [[package]] name = "dojo_plugin" -version = "0.3.11" -source = "git+https://github.com/dojoengine/dojo?tag=v0.3.11#1e651b5d4d3b79b14a7d8aa29a92062fcb9e6659" +version = "0.4.1" +source = "git+https://github.com/dojoengine/dojo?tag=v0.7.2#3da5cad9fdd39b81551e0668015d88262e6c5fc4" diff --git a/crates/katana/core/src/service/messaging/ethereum.rs b/crates/katana/core/src/service/messaging/ethereum.rs index 8a6cf4d733..40990876dc 100644 --- a/crates/katana/core/src/service/messaging/ethereum.rs +++ b/crates/katana/core/src/service/messaging/ethereum.rs @@ -86,6 +86,9 @@ impl EthereumMessaging { address: FilterSet::
::from(self.messaging_contract_address), topics: [ Topic::from( + // LogMessageToL2 (index_topic_1 address fromAddress, index_topic_2 uint256 + // toAddress, index_topic_3 uint256 selector, uint256[] + // payload, uint256 nonce, uint256 fee) "0xdb80dd488acf86d17c747445b0eabb5d57c541d3bd7b6b87af987858e5066b2b" .parse::() .unwrap(), @@ -125,6 +128,7 @@ impl Messenger for EthereumMessaging { chain_id: ChainId, ) -> MessengerResult<(u64, Vec)> { let chain_latest_block: u64 = self.provider.get_block_number().await?; + trace!(target: LOG_TARGET, from_block, max_blocks, ?chain_id, latest_block = chain_latest_block, "Gathering messages ethereum."); // +1 as the from_block counts as 1 block fetched. let to_block = if from_block + max_blocks + 1 < chain_latest_block { @@ -135,6 +139,7 @@ impl Messenger for EthereumMessaging { let mut l1_handler_txs = vec![]; + trace!(target: LOG_TARGET, from_block, to_block, "Fetching logs from {from_block} to {to_block}."); self.fetch_logs(from_block, to_block).await?.into_iter().for_each( |(block_number, block_logs)| { debug!( diff --git a/crates/katana/primitives/src/utils/transaction.rs b/crates/katana/primitives/src/utils/transaction.rs index 752c6a7fd4..0157c3a15c 100644 --- a/crates/katana/primitives/src/utils/transaction.rs +++ b/crates/katana/primitives/src/utils/transaction.rs @@ -241,6 +241,15 @@ pub fn compute_invoke_v3_tx_hash( /// Computes the hash of a L1 handler transaction /// from the fields involved in the computation, /// as felts values. +/// +/// The [Starknet docs] seem to be different than how it's implemented by Starknet node client +/// implementations - [Juno], [Pathfinder], and [Deoxys]. So, we follow those implementations +/// instead. +/// +/// [Juno]: https://github.com/NethermindEth/juno/blob/d9e64106a3a6d81d217d3c8baf28749f4f0bdd71/core/transaction.go#L561-L569 +/// [Pathfinder]: https://github.com/eqlabs/pathfinder/blob/677fd40fbae7b5b659bf169e56f055c59cbb3f52/crates/common/src/transaction.rs#L556 +/// [Deoxys]: https://github.com/KasarLabs/deoxys/blob/82c49acdaa1167bc8dc67a3f6ad3d6856c6c7e89/crates/primitives/transactions/src/compute_hash.rs#L142-L151 +/// [Starknet docs]: https://docs.starknet.io/architecture-and-concepts/network-architecture/messaging-mechanism/#hashing_l1-l2 pub fn compute_l1_handler_tx_hash( version: FieldElement, contract_address: FieldElement, diff --git a/crates/katana/rpc/rpc/Cargo.toml b/crates/katana/rpc/rpc/Cargo.toml index b455d5c465..0b0ef25f66 100644 --- a/crates/katana/rpc/rpc/Cargo.toml +++ b/crates/katana/rpc/rpc/Cargo.toml @@ -7,6 +7,7 @@ repository.workspace = true version.workspace = true [dependencies] +dojo-world = { workspace = true } dojo-metrics.workspace = true katana-core.workspace = true katana-executor.workspace = true @@ -16,7 +17,7 @@ katana-rpc-api.workspace = true katana-rpc-types-builder.workspace = true katana-rpc-types.workspace = true katana-tasks.workspace = true - +tempfile = "3.8.1" anyhow.workspace = true flate2.workspace = true futures.workspace = true @@ -24,6 +25,7 @@ hex = { workspace = true } hyper.workspace = true jsonrpsee = { workspace = true, features = [ "server" ] } metrics.workspace = true +rand.workspace = true serde.workspace = true serde_json.workspace = true serde_with.workspace = true @@ -34,6 +36,7 @@ tokio.workspace = true tower = { workspace = true, features = [ "full" ] } tower-http = { workspace = true, features = [ "full" ] } tracing.workspace = true +cainome.workspace = true [dev-dependencies] assert_matches.workspace = true @@ -43,4 +46,13 @@ dojo-test-utils.workspace = true dojo-world.workspace = true jsonrpsee = { workspace = true, features = [ "client" ] } katana-rpc-api = { workspace = true, features = [ "client" ] } +katana-runner.workspace = true url.workspace = true +alloy = { git = "https://github.com/alloy-rs/alloy", features = [ + "contract", + "network", + "providers", + "signer-local", + "provider-http", + "node-bindings" +] } \ No newline at end of file diff --git a/crates/katana/rpc/rpc/tests/messaging.rs b/crates/katana/rpc/rpc/tests/messaging.rs new file mode 100644 index 0000000000..a2dffb8538 --- /dev/null +++ b/crates/katana/rpc/rpc/tests/messaging.rs @@ -0,0 +1,313 @@ +use std::path::PathBuf; +use std::str::FromStr; +use std::time::Duration; + +use alloy::primitives::{Uint, U256}; +use alloy::providers::{ProviderBuilder, WalletProvider}; +use alloy::sol; +use cainome::cairo_serde::EthAddress; +use cainome::rs::abigen; +use dojo_world::utils::TransactionWaiter; +use katana_primitives::utils::transaction::{ + compute_l1_handler_tx_hash, compute_l1_to_l2_message_hash, compute_l2_to_l1_message_hash, +}; +use katana_runner::{KatanaRunner, KatanaRunnerConfig}; +use rand::Rng; +use serde_json::json; +use starknet::accounts::{Account, ConnectedAccount}; +use starknet::contract::ContractFactory; +use starknet::core::types::{ + BlockId, BlockTag, ContractClass, FieldElement, Hash256, MaybePendingTransactionReceipt, + Transaction, TransactionFinalityStatus, TransactionReceipt, +}; +use starknet::core::utils::get_contract_address; +use starknet::macros::selector; +use starknet::providers::Provider; +use tempfile::tempdir; + +mod common; + +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + StarknetContract, + "tests/test_data/solidity/StarknetMessagingLocalCompiled.json" +); + +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + Contract1, + "tests/test_data/solidity/Contract1Compiled.json" +); + +abigen!(CairoMessagingContract, "crates/katana/rpc/rpc/tests/test_data/cairo_l1_msg_contract.json"); + +#[tokio::test(flavor = "multi_thread")] +async fn test_messaging() { + // TODO: If there's a way to get the endpoint of anvil from the `l1_provider`, we could + // remove that and use default anvil to let the OS assign the port. + let port: u16 = rand::thread_rng().gen_range(35000..65000); + + let l1_provider = { + ProviderBuilder::new() + .with_recommended_fillers() + .on_anvil_with_wallet_and_config(|anvil| anvil.port(port)) + }; + + // Deploy the core messaging contract on L1 + let core_contract = StarknetContract::deploy(&l1_provider).await.unwrap(); + + // Deploy test contract on L1 used to send/receive messages to/from L2 + let l1_test_contract = Contract1::deploy(&l1_provider, *core_contract.address()).await.unwrap(); + + // Prepare Katana + Messaging Contract + let messaging_config = json!({ + "chain": "ethereum", + "rpc_url": format!("http://localhost:{}", port), + "contract_address": core_contract.address().to_string(), + "sender_address": l1_provider.default_signer_address(), + "private_key": "", + "interval": 2, + "from_block": 0 + }) + .to_string(); + + let dir = tempdir().expect("failed creating temp dir"); + let path = dir.path().join("temp-anvil-messaging.json"); + std::fs::write(&path, messaging_config.as_bytes()).expect("failed to write config to file"); + + let katana_runner = KatanaRunner::new_with_config(KatanaRunnerConfig { + n_accounts: 2, + messaging: Some(path.to_str().unwrap().to_string()), + ..Default::default() + }) + .unwrap(); + + let katana_account = katana_runner.account(0); + + // Deploy test L2 contract that can send/receive messages to/from L1 + let l2_test_contract = { + // Prepare contract declaration params + let path = PathBuf::from("tests/test_data/cairo_l1_msg_contract.json"); + let (contract, compiled_hash) = common::prepare_contract_declaration_params(&path).unwrap(); + + // Declare the contract + let class_hash = contract.class_hash(); + let res = katana_account.declare(contract.into(), compiled_hash).send().await.unwrap(); + + // The waiter already checks that the transaction is accepted and succeeded on L2. + TransactionWaiter::new(res.transaction_hash, katana_account.provider()) + .await + .expect("declare tx failed"); + + // Checks that the class was indeed declared + let block_id = BlockId::Tag(BlockTag::Latest); + let actual_class = katana_account.provider().get_class(block_id, class_hash).await.unwrap(); + + let ContractClass::Sierra(class) = actual_class else { panic!("Invalid class type") }; + assert_eq!(class.class_hash(), class_hash, "invalid declared class"); // just to make sure the rpc returns the correct class + + // Compute the contract address + let address = get_contract_address(FieldElement::ZERO, class_hash, &[], FieldElement::ZERO); + + // Deploy the contract using UDC + let res = ContractFactory::new(class_hash, &katana_account) + .deploy(Vec::new(), FieldElement::ZERO, false) + .send() + .await + .expect("Unable to deploy contract"); + + // The waiter already checks that the transaction is accepted and succeeded on L2. + TransactionWaiter::new(res.transaction_hash, katana_account.provider()) + .await + .expect("deploy tx failed"); + + // Checks that the class was indeed deployed with the correct class + let actual_class_hash = katana_account + .provider() + .get_class_hash_at(block_id, address) + .await + .expect("failed to get class hash at address"); + + assert_eq!(actual_class_hash, class_hash, "invalid deployed class"); + + address + }; + + // Send message from L1 to L2 + { + // The L1 sender address + let sender = l1_test_contract.address(); + // The L2 contract address to send the message to + let recipient = l2_test_contract; + // The L2 contract function to call + let selector = selector!("msg_handler_value"); + // The L2 contract function arguments + let calldata = [123u8]; + // Get the current L1 -> L2 message nonce + let nonce = core_contract.l1ToL2MessageNonce().call().await.expect("get nonce")._0; + + // Send message to L2 + let call = l1_test_contract + .sendMessage( + U256::from_str(&recipient.to_string()).unwrap(), + U256::from_str(&selector.to_string()).unwrap(), + calldata.iter().map(|x| U256::from(*x)).collect::>(), + ) + .gas(12000000) + .value(Uint::from(1)); + + let receipt = call + .send() + .await + .expect("failed to send tx") + .get_receipt() + .await + .expect("error getting transaction receipt"); + + assert!(receipt.status(), "failed to send L1 -> L2 message"); + + // Wait for the tx to be mined on L2 (Katana) + tokio::time::sleep(Duration::from_secs(5)).await; + + // In an l1_handler transaction, the first element of the calldata is always the Ethereum + // address of the sender (msg.sender). + let mut l1_tx_calldata = vec![FieldElement::from_byte_slice_be(sender.as_slice()).unwrap()]; + l1_tx_calldata.extend(calldata.iter().map(|x| FieldElement::from(*x))); + + // Compute transaction hash + let tx_hash = compute_l1_handler_tx_hash( + FieldElement::ZERO, + recipient, + selector, + &l1_tx_calldata, + katana_runner.provider().chain_id().await.unwrap(), + nonce.to::().into(), + ); + + // fetch the transaction + let tx = katana_account + .provider() + .get_transaction_by_hash(tx_hash) + .await + .expect("failed to get l1 handler tx"); + + let Transaction::L1Handler(ref tx) = tx else { + panic!("invalid transaction type"); + }; + + // Assert the transaction fields + assert_eq!(tx.contract_address, recipient); + assert_eq!(tx.entry_point_selector, selector); + assert_eq!(tx.calldata, l1_tx_calldata); + + // fetch the receipt + let receipt = katana_account + .provider() + .get_transaction_receipt(tx.transaction_hash) + .await + .expect("failed to get receipt"); + + match receipt { + MaybePendingTransactionReceipt::Receipt(receipt) => { + let TransactionReceipt::L1Handler(receipt) = receipt else { + panic!("invalid receipt type"); + }; + + let msg_hash = compute_l1_to_l2_message_hash( + sender.as_slice().try_into().unwrap(), + recipient, + selector, + &calldata.iter().map(|x| FieldElement::from(*x)).collect::>(), + nonce.to::(), + ); + + let msg_fee = core_contract + .l1ToL2Messages(msg_hash) + .call() + .await + .expect("failed to get msg fee"); + + assert_ne!(msg_fee._0, U256::ZERO, "msg fee must be non-zero if exist"); + assert_eq!(receipt.message_hash, Hash256::from_bytes(msg_hash.0)); + } + + _ => { + panic!("Error, No Receipt TransactionReceipt") + } + } + } + + // Send message from L2 to L1 + { + // The L1 contract address to send the message to + let l1_contract_address = l1_test_contract.address(); + let l1_contract_address = FieldElement::from_str(&l1_contract_address.to_string()).unwrap(); + + let l2_contract = CairoMessagingContract::new(l2_test_contract, &katana_account); + + // Send message to L1 + let res = l2_contract + .send_message_value(&EthAddress::from(l1_contract_address), &FieldElement::TWO) + .send() + .await + .expect("Call to send_message_value failed"); + + TransactionWaiter::new(res.transaction_hash, katana_account.provider()) + .with_tx_status(TransactionFinalityStatus::AcceptedOnL2) + .await + .expect("send message to l1 tx failed"); + + // Wait for the tx to be mined on L1 (Anvil) + tokio::time::sleep(Duration::from_secs(3)).await; + + // Query the core messaging contract to check that the l2 -> l1 message hash have been + // registered. If the message is registered, calling `l2ToL1Messages` of the L1 core + // contract with the message hash should return a non-zero value. + + let l2_l1_msg_hash = compute_l2_to_l1_message_hash( + l2_test_contract, + l1_contract_address, + &[FieldElement::TWO], + ); + + let msg_fee = core_contract + .l2ToL1Messages(l2_l1_msg_hash) + .call() + .await + .expect("failed to get msg fee"); + + assert_ne!(msg_fee._0, U256::ZERO, "msg fee must be non-zero if exist"); + + // We then consume the message. + // Upon consuming the message, the value returned by `l2ToL1Messages` should be zeroed. + + // The L2 contract address that sent the message + let from_address = U256::from_str(&l2_test_contract.to_string()).unwrap(); + // The message payload + let payload = vec![U256::from(2)]; + + let receipt = l1_test_contract + .consumeMessage(from_address, payload) + .gas(12000000) + .nonce(4) + .send() + .await + .expect("failed to send tx") + .get_receipt() + .await + .expect("error getting transaction receipt"); + + assert!(receipt.status(), "failed to consume L2 message from L1"); + + // Check that the message fee is zero after consuming the message. + let msg_fee = core_contract + .l2ToL1Messages(l2_l1_msg_hash) + .call() + .await + .expect("failed to get msg fee"); + + assert_eq!(msg_fee._0, U256::ZERO, "msg fee must be zero after consuming"); + } +} diff --git a/crates/katana/rpc/rpc/tests/test_data/cairo_l1_msg_contract.json b/crates/katana/rpc/rpc/tests/test_data/cairo_l1_msg_contract.json new file mode 100644 index 0000000000..f786472b2e --- /dev/null +++ b/crates/katana/rpc/rpc/tests/test_data/cairo_l1_msg_contract.json @@ -0,0 +1,1470 @@ +{ + "sierra_program": [ + "0x1", + "0x3", + "0x0", + "0x2", + "0x3", + "0x1", + "0x117", + "0xe9", + "0x1f", + "0x52616e6765436865636b", + "0x800000000000000100000000000000000000000000000000", + "0x537472756374", + "0x800000000000000f00000000000000000000000000000001", + "0x0", + "0x2ee1e2b1b89f8c495f200e4956278a4d47395fe262f27b52e5865c9524c08c3", + "0x456e756d", + "0x800000000000000700000000000000000000000000000003", + "0x3288d594b9a45d15bb2fcb7903f06cdb06b27f0ba88186ec4cfaa98307cb972", + "0x1", + "0x75313238", + "0x800000000000000700000000000000000000000000000000", + "0x25e2ca4b84968c2d8b83ef476ca8549410346b00836ce79beaf538155990bb2", + "0x3", + "0x66656c74323532", + "0x4e6f6e5a65726f", + "0x800000000000000700000000000000000000000000000001", + "0x5", + "0x800000000000000f00000000000000000000000000000002", + "0x16a4c8d7c05909052238a862d8cc3e7975bf05a07b3a69c6b28951083a6d672", + "0x4172726179", + "0x800000000000000300000000000000000000000000000001", + "0x800000000000000300000000000000000000000000000003", + "0x8", + "0x9", + "0xcc5e86243f861d2d64b08c35db21013e773ac5cf10097946fe0011304886d5", + "0x7", + "0xa", + "0x101dc0399934cc08fa0d6f6f2daead4e4a38cabeea1c743e1fc28d2d6e58e99", + "0x426f78", + "0x29d7d57c04a880978e7b3689f6218e507f3be17588744b58dc17762447ad0e7", + "0xd", + "0x11768e87c7f29225e23c46e30970edb33966ba325a7d2df7260c3cdb94d3f78", + "0x299f0c4933082841c64290acfbe838708dc2dc846019e755118fa1c060cdfec", + "0xf", + "0x536e617073686f74", + "0x800000000000000700000000000000000000000000000002", + "0x1baeba72e79e9db2587cf44fedb2f3700b2075a5e8e39a562584862c4b71f62", + "0x11", + "0x12", + "0xa36ef284c59d4c2496d87a0fe05fee3cff63de196cbbe95c938850566623c5", + "0x800000000000000f00000000000000000000000000000003", + "0x14", + "0x234dfb0689b56ce38e8b6ebca818da25abc7465d761179bbffdc52129c51d4", + "0x15", + "0x4275696c74696e436f737473", + "0x53797374656d", + "0x9931c641b913035ae674b400b61a51476d506bbe8bba2ff8a6272790aba9e6", + "0x13", + "0x753332", + "0x11c6d8087e00642489f92d2821ad6ebd6532ad1a3b6d12833da6d6810391511", + "0x3233063c5dc6197e9bf4ddc53b925e10907665cf58255b7899f8212442d4605", + "0x24d668d7ede46c87d2cddfbcf73195c96f0ca8075ae10c8a468054b80120d78", + "0x1c", + "0x4761734275696c74696e", + "0x8a", + "0x7265766f6b655f61705f747261636b696e67", + "0x77697468647261775f676173", + "0x6272616e63685f616c69676e", + "0x73746f72655f74656d70", + "0x66756e6374696f6e5f63616c6c", + "0x4", + "0x656e756d5f6d61746368", + "0x1d", + "0x1b", + "0x7374727563745f6465636f6e737472756374", + "0x61727261795f6c656e", + "0x736e617073686f745f74616b65", + "0x1a", + "0x64726f70", + "0x7533325f636f6e7374", + "0x2", + "0x72656e616d65", + "0x7533325f6571", + "0x61727261795f6e6577", + "0x66656c743235325f636f6e7374", + "0x496e70757420746f6f206c6f6e6720666f7220617267756d656e7473", + "0x61727261795f617070656e64", + "0x7374727563745f636f6e737472756374", + "0x656e756d5f696e6974", + "0x19", + "0x1e", + "0x18", + "0x6765745f6275696c74696e5f636f737473", + "0x17", + "0x77697468647261775f6761735f616c6c", + "0x6", + "0x16", + "0x4f7574206f6620676173", + "0x4661696c656420746f20646573657269616c697a6520706172616d202332", + "0x4661696c656420746f20646573657269616c697a6520706172616d202331", + "0x10", + "0xb", + "0x61727261795f736e617073686f745f706f705f66726f6e74", + "0xe", + "0x6a756d70", + "0x756e626f78", + "0xc", + "0x73656e645f6d6573736167655f746f5f6c315f73797363616c6c", + "0x7b", + "0x66656c743235325f737562", + "0x66656c743235325f69735f7a65726f", + "0x496e76616c69642076616c7565", + "0x646174612e6220697320696e76616c6964", + "0x646174612e6120697320696e76616c6964", + "0x647570", + "0x753132385f636f6e7374", + "0x100000000", + "0x75313238735f66726f6d5f66656c74323532", + "0x753132385f6f766572666c6f77696e675f737562", + "0x753132385f6571", + "0x37f", + "0xffffffffffffffff", + "0x76", + "0x67", + "0x57", + "0x26", + "0x20", + "0x21", + "0x22", + "0x23", + "0x24", + "0x25", + "0x27", + "0x28", + "0x29", + "0x48", + "0x2a", + "0x2b", + "0x2c", + "0x30", + "0x31", + "0x32", + "0x33", + "0x34", + "0x2d", + "0x2e", + "0x2f", + "0x35", + "0x41", + "0x36", + "0x37", + "0x38", + "0x39", + "0x3a", + "0x3b", + "0x3c", + "0x3d", + "0x3e", + "0x3f", + "0x40", + "0x42", + "0x43", + "0x44", + "0x45", + "0x46", + "0x47", + "0x49", + "0x4a", + "0x4b", + "0x4c", + "0x4d", + "0x4e", + "0x4f", + "0x50", + "0x51", + "0x52", + "0x53", + "0x54", + "0x55", + "0x56", + "0x58", + "0x59", + "0x5a", + "0x5b", + "0x5c", + "0x5d", + "0x5e", + "0x5f", + "0x60", + "0x61", + "0x62", + "0x63", + "0x64", + "0x65", + "0x66", + "0x68", + "0x69", + "0x6a", + "0x6b", + "0x6c", + "0x6d", + "0xfa", + "0xeb", + "0xdb", + "0xaa", + "0xcc", + "0xc5", + "0x17c", + "0x16d", + "0x15d", + "0x12e", + "0x14e", + "0x147", + "0x1fe", + "0x1ef", + "0x1df", + "0x1b0", + "0x1d0", + "0x1c9", + "0x217", + "0x224", + "0x229", + "0x233", + "0x24a", + "0x24f", + "0x25b", + "0x275", + "0x26f", + "0x28f", + "0x294", + "0x2a0", + "0x2b8", + "0x2ed", + "0x2e1", + "0x6e", + "0x6f", + "0x70", + "0x30d", + "0x312", + "0x71", + "0x72", + "0x73", + "0x74", + "0x31e", + "0x75", + "0x77", + "0x78", + "0x79", + "0x7a", + "0x7c", + "0x7d", + "0x33a", + "0x33e", + "0x7e", + "0x7f", + "0x80", + "0x36c", + "0x81", + "0x82", + "0x83", + "0x84", + "0x358", + "0x85", + "0x86", + "0x369", + "0x361", + "0x367", + "0x87", + "0x88", + "0x376", + "0x89", + "0x108", + "0x18a", + "0x20c", + "0x21d", + "0x23a", + "0x262", + "0x27a", + "0x2a7", + "0x2c4", + "0x2fa", + "0x315", + "0x318", + "0x324", + "0x333", + "0x341", + "0x379", + "0x1ea5", + "0x301e0e05038140d02820060c05828140a050240a08038180a04018080200", + "0x1c320a0c0280c050b80c240a0b05428050200c140a030142603090282210", + "0x2814200507c0a080384814110f064140a050740a1703870141b050680a17", + "0xc4e0a130144a030c828222405028460a11014100709028240a108141003", + "0x305c1c050b4142c0285c0e0a050ac1406028a80629028100628050180a25", + "0x1c240a1a0144a0305028240a198141007060c8380a1882860050b81c042f", + "0x38143d14028143c02828143c028ec0a3a028e470021b8281436050d40a08", + "0x288c45050288812050288628050288441050287e12070287a40050287e3e", + "0x28144b1b0281446090281446029288a0a050f08a0a051240a480511c8a0a", + "0x28905105120a01c050289e18050289e12050289c1205028784d240289812", + "0x28143c15828144f02958aa0a050f00a5428828143c29828143c29028143c", + "0x289e19050288c1905028882d050288c58050287e57070287a3605028782b", + "0x120144c1402814460502814462c920144c02920a20a24140620a0513c500a", + "0x287a18070287a23050287823050288c5c050287e1b070287a5b24028985a", + "0x28905009028145e05120800a24140800a050f0ba0e050f4380e050f4320e", + "0x17c140a1f828905f05120a00a050289e053017c140a1e09c140a1e014905f", + "0x38143d05120820a24140820a050f00a48208289050090281449090281461", + "0x801c0a1e988140a24828906205120a06205028780524188144828014c662", + "0x140560a05118b00a050f00a482c028905016828144f0d82814462e828143f", + "0x28880a24170144828170140a1e014905c05120a023050289e0a241601448", + "0x130ae0a051180a6602994c84805130240a05110be0e050f4320a050f0460a", + "0x48140a351a4900a261a0900a26120900a26028900a2608c140a2119c900a", + "0x28143c1f02814490282814491f028144f36120146b02920146b11838143d", + "0x188140a1f8d8140a21014904005120a036050289e48050287e5c070287a3e", + "0x38143d11828146a05120ba0a24140ba0a050f00a482e82890500d828144f", + "0x28880e050288c0537038140a350f8140a21014da0a050289219050289227", + "0x28144905120900a24140900a050f00a48240289050029bc1c0a051241c0a", + "0x143657241c8243e241c4900a029201405029c4140502814e00a050287848", + "0x28c45d240480a62051c4140e050f80a5d051c4143e050380a05388280a48", + "0x28320a1f0140a710501490052f828e620051c4901c0515c0a1c0c8601c71", + "0x280a48028c4147414028e2482e02830052e08c90710509c141b0289c1471", + "0x154b048388285a0a2e8145a0a38828560a0e014560a38828460a0c8140a71", + "0x144146202914a24838828a60a2e814a60a388280a2002814e20a2c028c405", + "0x1041471051041423028d8147105114145f02904147105154145f02814e20a", + "0x80142802814e20a140284e05029c41405240140a75029c4903620920b805", + "0x1600a52051c41452050b40a52051c4140515814800a388280a3102814e20a", + "0x1dc1451029dc147105000ec4829814ec0a388280a55028001471051488048", + "0x28e20a2402882053d028e20a090288a053c828e20a0c0281c053c028e20a", + "0x28e20a029000a05388280a48029d4f67a3c8f81475051c41478050d80a7b", + "0x14900540a00907f3f1f49071241f02418070000a7c051c4147c051480a7c", + "0x15080a38828900a20815060a38828fc0a22815040a388280a7602814e20a", + "0x20c247902a1c1471050a0142d02a18147105080147802a141471052081477", + "0x231160a38921140a3d014fa0a38828fa0a07015148944038e20a43a190a84", + "0x291c0a3a8151c0a388280a3102814e20a45828f605029c41405240151a0a", + "0x248147105244147e02a44147105240147d02814e20a47828f8054823c9071", + "0x2882054a828e20a440288a054a028e20a3e8281c0549828e20a490290005", + "0x1440a05388280a4802a5d2c954a0f81497051c41493050d80a96051c41489", + "0x29120a20815320a38829100a22815300a38828fa0a07015180a388291a0a", + "0xa0142702814e20a029200a9b4d265303e0526c147105230143602a681471", + "0x285a054e828e20a02a040a9c051c41405188140a7105080142802814e20a", + "0x28fe9e2414c0a9e051c414052a814fe0a388293a9c241600a9d051c4149d", + "0x288147105204144502a84147105200140e02a8014710527c145102a7c1471", + "0x1c414052401548a3512847c0a52028e20a500286c0551828e20a240288205", + "0x1c41405188140a7105080142802814e20a118291005029c41431052080a05", + "0x154e0a388294ca5241600aa6051c414a6050b40aa6051c41405448154a0a", + "0x60140e02aa81471052a4145102aa414710529d504829815500a388280a55", + "0x28e20a550286c0556028e20a2402882053a028e20a090288a0555828e20a", + "0x14e20a0c8291005029c4145f052080a05388280a4802ab55874558f814ad", + "0x2bd5c482c0155e0a388295e0a168155e0a388280a8a02ab81471050146205", + "0x28e20a59028a20559028e20a582c4905302ac4147105014aa0558028e20a", + "0xd80ab6051c41448051040ab5051c41412051140ab4051c41418050380ab3", + "0xc40a05388281c0a440140a710501490055bad96ab41f0296e0a38829660a", + "0x1c414b95c120b0055c828e20a5c8285a055c828e20a02a040ab8051c41405", + "0x15780a38829760a28815760a3882974732414c0a73051c414052a815740a", + "0x2f0143602afc147105120144102af814710506c144502af414710515c140e", + "0x304243e241c4900a029201405029c414050281580bf5f2f47c0a60028e20a", + "0x480a62051c4140e050f80a5d051c4143e050380a05388280a480286cae48", + "0x140a710501490052f8298420051c4901c0515c0a1c0c8601c7105188ba48", + "0xc414c314028e2482e02908052e08c90710509c14830289c147105064143e", + "0x285a0a2e8145a0a38828560a0e014560a38828460a0c8140a71050149005", + "0x114a24838828a60a2e814a60a388280a2002814e20a2c028c4052a9609071", + "0x1041423028d8147105114145f02904147105154145f02814e20a28828c405", + "0x14e20a140290a05029c41405240140ac4029c4903620920b80520828e20a", + "0x1c41452050b40a52051c4140515814800a388280a3102814e20a100285005", + "0x1dc147105000ec4829814ec0a388280a550280014710514880482c014a40a", + "0x2882053d028e20a090288a053c828e20a0c0281c053c028e20a3b828a205", + "0x1000a05388280a48029d4f67a3c8f81475051c41478050d80a7b051c41448", + "0x20090c53f1f49071241f02418070000a7c051c4147c051480a7c051c41405", + "0x28900a20815060a38828fc0a22815040a388280a7602814e20a029200a81", + "0x21c1471050a0148602a18147105080147802a14147105208147702a101471", + "0x121140a3d014fa0a38828fa0a07015148944038e20a43a190a84418490e05", + "0x151c0a388280a3102814e20a45828f605029c41405240151a0a6322c1471", + "0x244147e02a44147105240147d02814e20a47828f8054823c9071052381475", + "0x28e20a440288a054a028e20a3e8281c0549828e20a49029000549028e20a", + "0x280a4802a5d2c954a0f81497051c41493050d80a96051c41489051040a95", + "0x15320a38829100a22815300a38828fa0a07015180a388291a0a288140a71", + "0x14e20a029200a9b4d265303e0526c147105230143602a681471052241441", + "0x28e20a02a040a9c051c41405188140a7105080142802814e20a140290a05", + "0x14c0a9e051c414052a814fe0a388293a9c241600a9d051c4149d050b40a9d", + "0x204144502a84147105200140e02a8014710527c145102a7c1471051fd3c48", + "0x1548a3512847c0a52028e20a500286c0551828e20a24028820551028e20a", + "0x140a7105080142802814e20a118291005029c41431052080a05388280a48", + "0x294ca5241600aa6051c414a6050b40aa6051c41405448154a0a388280a31", + "0x2a81471052a4145102aa414710529d504829815500a388280a5502a9c1471", + "0x286c0556028e20a2402882053a028e20a090288a0555828e20a0c0281c05", + "0x291005029c4145f052080a05388280a4802ab55874558f814ad051c414aa", + "0x155e0a388295e0a168155e0a388280a8a02ab81471050146205029c41419", + "0x28a20559028e20a582c4905302ac4147105014aa0558028e20a57ab89058", + "0x1c41448051040ab5051c41412051140ab4051c41418050380ab3051c414b2", + "0x281c0a440140a710501490055bad96ab41f0296e0a38829660a1b0156c0a", + "0x120b0055c828e20a5c8285a055c828e20a02a040ab8051c41405188140a71", + "0x29760a28815760a3882974732414c0a73051c414052a815740a3882972b8", + "0x2fc147105120144102af814710506c144502af414710515c140e02af01471", + "0x1c4900a029201405029c414050281580bf5f2f47c0a60028e20a5e0286c05", + "0x1c4141c0506c0a1c051c4140e050f80a05388280a480286cae48638487c48", + "0x1c4140524014c40a641741471240641418028f81471050f8140e028643048", + "0x324b80a38920be0a0c014be20241c414230506c0a23051c41418050f80a05", + "0x28ba0518828e20a14028380514028e20a100283205029c41405240144e0a", + "0x120e20a2c028ba052c028e20a028800a0538828560a310145a2b241c41431", + "0x8c0a45051c414530517c0a51051c4142d0517c0a0538828aa0a31014a655", + "0x28ba0a138140a7105014900502b280a7124114a2482e014a20a38828a20a", + "0xd8142d028d8147105014560520828e20a028c40a0538828b80a138140a71", + "0x1c4144029120a60529028e20a029540a40051c4143620920b0051b028e20a", + "0x14f00a38828240a22814ee0a388287c0a07014ec0a38828000a28814000a", + "0x14e20a029200a7a3c9e0ee3e051e81471051d81436029e41471051201441", + "0x32cf875241c4907b090f81c00029ec1471051ec1452029ec1471050148005", + "0x285a0541028e20a40028ee0540028e20a029d80a05388280a48029f8fa48", + "0x1d4140e02a0414710522510820722c0a89051c4145c050b40a88051c4145d", + "0x1c4148a051ec0a05388280a4802a0c14cc45028e24840828f4053a828e20a", + "0x28fa05029c41485051f00a8642920e20a42028ea0542028e20a028c40a05", + "0x1c41475050380a8d051c4148b052000a8b051c41487051f80a87051c41486", + "0x29220a388291a0a1b015200a38828900a208151e0a38828f80a228151c0a", + "0x24c1471051d4140e02a4814710520c145102814e20a029200a914823d1c3e", + "0x24c7c0a4b028e20a490286c054a828e20a2402882054a028e20a3e0288a05", + "0x280a3102814e20a2e0284e05029c4145d0509c0a05388280a4802a592a94", + "0x2601471052312e482c015180a38829180a16815180a388280a8102a5c1471", + "0x281c054d828e20a4d028a2054d028e20a4c264905302a64147105014aa05", + "0x1c4149b050d80a7f051c41448051040a9d051c4147e051140a9c051c4147d", + "0x1c4145d0509c0a05388284e0a410140a710501490054f1fd3a9c1f0293c0a", + "0x29400a16815400a388280a8902a7c1471050146205029c41420052200a05", + "0x28e20a50a88905302a88147105014aa0550828e20a5027c905802a801471", + "0x1040aa6051c41412051140aa5051c4143e050380aa4051c414a3051440aa3", + "0x140a710501490055429d4ca51f029500a38829480a1b0154e0a38828900a", + "0x2a8147105015140554828e20a028c40a0538828300a440140a71051881482", + "0x120a6053a028e20a029540aab051c414aa54920b00555028e20a550285a05", + "0x28240a228155c0a388287c0a070155a0a38829580a28815580a388295674", + "0x1200ab1582bd5c3e052c41471052b4143602ac0147105120144102abc1471", + "0xb40ab3051c4140540815640a388280a3102814e20a070291005029c41405", + "0x2d16a48298156a0a388280a5502ad01471052cd64482c015660a38829660a", + "0x28e20a0d8288a055c028e20a2b8281c055b828e20a5b028a2055b028e20a", + "0x280a05029cd74b95c0f81473051c414b7050d80aba051c41448051040ab9", + "0x281c0a1f0140a710501490050d95c90cd090f89071240280a48050140a71", + "0x28e2480c82830051f028e20a1f0281c050c860907105070141b028701471", + "0x17c404838828460a41814460a38828300a1f0140a71050149005310299c5d", + "0x700a28051c41420050640a05388280a480289c14cf2e028e2482f8290805", + "0x1c41405100140a71050ac1462028b4564838828620a2e814620a38828500a", + "0x14a20a388285a0a2f8140a710515414620294caa4838828b00a2e814b00a", + "0x1200a0568014e24822944905c0294414710514414230291414710514c145f", + "0xac0a41051c41405188140a7105170148502814e20a2e8284e05029c41405", + "0x1c414052a814800a388286c41241600a36051c41436050b40a36051c41405", + "0x1dc1471050f8140e029d8147105000145102800147105100a44829814a40a", + "0x1dc7c0a3d028e20a3b0286c053c828e20a2402882053c028e20a090288a05", + "0x3800053d828e20a3d828a4053d828e20a029000a05388280a48029e8f278", + "0x1dc0a80051c414053b0140a710501490053f1f490d13e1d49071241ec243e", + "0x221040e46815120a38828b80a43015100a38828ba0a16815040a38829000a", + "0x14900541829a48a051c49081051e80a75051c41475050380a81051c41489", + "0x150c85241c41484051d40a84051c41405188140a7105228147b02814e20a", + "0x29160a40015160a388290e0a3f0150e0a388290c0a3e8140a7105214147c", + "0x240147105120144102a3c1471051f0144502a381471051d4140e02a341471", + "0x28e20a41828a205029c4140524015229047a387c0a48828e20a468286c05", + "0xd80a95051c41448051040a94051c4147c051140a93051c41475050380a92", + "0x2140a0538828ba0a138140a710501490054b25528931f0292c0a38829240a", + "0x230147105230142d02a3014710501502054b828e20a028c40a0538828b80a", + "0x1440a9a051c414984c920a6054c828e20a029540a98051c4148c4b920b005", + "0x28900a208153a0a38828fc0a22815380a38828fa0a07015360a38829340a", + "0x9c148202814e20a029200a9e3fa75383e0527814710526c1436029fc1471", + "0x1512054f828e20a028c40a0538828400a440140a7105174142702814e20a", + "0x28e20a029540aa1051c414a04f920b00550028e20a500285a0550028e20a", + "0x154a0a388287c0a07015480a38829460a28815460a3882942a22414c0aa2", + "0x2994a3e052a0147105290143602a9c147105120144102a981471050481445", + "0x1c41405188140a7105060148802814e20a310290405029c414052401550a7", + "0x15560a3882954a9241600aaa051c414aa050b40aaa051c4140545015520a", + "0xf8140e02ab41471052b0145102ab01471052ace84829814e80a388280a55", + "0x28e20a568286c0558028e20a24028820557828e20a090288a0557028e20a", + "0x2c81471050146205029c4140e052200a05388280a4802ac560af570f814b1", + "0x14aa055a028e20a59ac8905802acc1471052cc142d02acc1471050150205", + "0x1c41457050380ab7051c414b6051440ab6051c414b45a920a6055a828e20a", + "0x28e60a388296e0a1b015740a38828900a20815720a38828360a22815700a", + "0x1201c0a0c0141c48241c4143e0506c0a3e051c4140a050f80a735d2e5703e", + "0x28e20a090285a050c828e20a028281c05029c4140524014ae0a698481471", + "0x188147105120143e0297414710506c140e028603648388283819242380a1c", + "0x17c14710515c149002814e20a029200a20311741c0a10028e20a0c0291e05", + "0x8c1c0a13828e20a2f8291e052e028e20a240287c0511828e20a028281c05", + "0x1c41405240147c0a6a038904838920140a48814140a388280a0a0c8144e5c", + "0x2540a1b051c41412052500a57051c414480524c0a12051c4140e052480a05", + "0x24c0a19051c414180525c0a18051c414054b0140a7105014900502b541405", + "0x28380a1f014380a38828ae0a3e814360a38828320a4a014ae0a388287c0a", + "0x28e20a2e8293005029c4140524014c40a6b17414712406c148c028701471", + "0x26c0a5c051c4141c050f80a23051c4145f052680a5f051c41420052640a20", + "0x280a9602814e20a310290405029c41405240144e5c240284e0a38828460a", + "0xb41471050c4149b028ac147105070143e028c41471050a0149c028a01471", + "0x6c147105014620509028e20a2b8293a052b828e20a07028f005168ac900a", + "0x1f40a0538828320a3e0143819241c41418051d40a18051c4143e0d920b005", + "0x35c4062241c4905d090280a3e3f814ba0a38828ba0a1f014ba0a38828380a", + "0x1140a28051c41427052780a27051c414054b0140a710501490052e08cbe0e", + "0x36014054a8145a0a38828500a4f814560a38828400a20814620a38828c40a", + "0x8c1441028c414710517c14450296014710517014a002814e20a029200a05", + "0x28e20a29829440529828e20a16829420516828e20a2c0293e0515828e20a", + "0x2580a0538828a20a520140a7105014900522829b251051c490550528c0a55", + "0x28620a22814800a388286c0a530146c0a388288248242940a41051c41405", + "0x1490053b000a40e051d814710510014a7028001471050ac1441029481471", + "0x14f00a38828620a22814ee0a388288a0a548140a710512014a802814e20a", + "0x28e20a028287c053d1e4f00e051e81471051dc14a7029e41471050ac1441", + "0x14e20a029200a12053687c0a38920900a0c014900a241c4140e0506c0a0e", + "0x29b619051c4901b050600a1b2b920e20a0c02836050c028e20a050287c05", + "0x287c0531028e20a2e82956052e828e20a0c8f890aa02814e20a029200a1c", + "0xf8142702814e20a029200a5f10120145f051c41462051d00a20051c41457", + "0x9c14710508c14740297014710515c143e0288c14710507014ac02814e20a", + "0x14620a38828140a1f014500a38828240a560140a7105014900513970900a", + "0x6cae48388287c0a56814240a388280a31028ac6248050ac1471050a01474", + "0x7090af0297414710504814ae0287014710506c148602814e20a2b8290a05", + "0x1c41420052740a20051c4140e051e00a0538828320a410143218241c4145d", + "0x14b80a38828460a3e8140a710517c147c0288cbe4838828300a3a814c40a", + "0x149005168ac620e6e0a04e4838920b862050147c7f02970147105170143e", + "0x14a60a388284e0a22814aa0a38828b00a4f014b00a388280a9602814e20a", + "0x14e20a029200a056e8280a9502914147105154149f029441471050a01441", + "0x293e0528828e20a15828820529828e20a188288a0520828e20a168294005", + "0x1c490360528c0a36051c41440052880a40051c41445052840a45051c41441", + "0x2940a76051c414054b0140a710514814a402814e20a029200a0005378a40a", + "0x1441441029e414710514c1445029e01471051dc14a6029dc1471051d89048", + "0x12014a802814e20a029200a7b3d1e41c0a3d828e20a3c0294e053d028e20a", + "0x1f41471051441441029f014710514c1445029d414710500014a902814e20a", + "0x120e20a240296005029c4140a0509c0a7e3e9f01c0a3f028e20a3a8294e05", + "0x9c0a1b2b920e20a09029600509028e20a02ac40a05388281c0a138147c0e", + "0x283218242c80a19051c4141b052640a18051c4143e052640a0538828ae0a", + "0x14e20a029200a5d0537c0a712407014b302870147105070142d028701471", + "0x294e052f828e20a100294c0510028e20a3101490a5029881471050152c05", + "0x1c41405052a00a0538828ba0a5a0140a71050149005118281423051c4145f", + "0x17090580289c14710509c142d0289c1471050156a052e028e20a028c40a05", + "0x1c4142b052a40a2b051c4142818920a60518828e20a029540a28051c41427", + "0x120e20a240296c05029c4140a0509c0a5805028b00a388285a0a538145a0a", + "0x2c00a1b051c414055b8140a710504814270295c2448388281c0a580147c0e", + "0x28320a4c814380a38828ae0a4c8140a7105060142702864304838828360a", + "0x14e24831029660531028e20a310285a0531028e20a2e87090b2029741471", + "0x2e00a0538828be0a13814465f241c4143e052c00a05388280a480288014e0", + "0x1c41423052640a05388284e0a138145027241c4145c052c00a5c051c41405", + "0xb41471050b4142d028b41471050ac624859014560a38828500a4c814620a", + "0x1490a5029541471050152c05029c4140524014b00a70814e248168296605", + "0x149005228281445051c414510529c0a51051c41453052980a53051c41455", + "0x15720520828e20a028c40a05388280a0a540140a710516014b402814e20a", + "0x28e20a029540a40051c4143620920b0051b028e20a1b0285a051b028e20a", + "0x28ee0a38828ec0a53814ec0a38828000a54814000a3882880522414c0a52", + "0x287c0a138140a710501414a802814e20a100296805029c4140524014ee0a", + "0x120b0053c828e20a3c8285a053c828e20a02ae80a78051c41405188140a71", + "0x28ea0a54814ea0a38828f47b2414c0a7b051c414052a814f40a38828f278", + "0x28140a398147c0a388280a0a07014fa0a051f41471051f014a7029f01471", + "0x1c414055e0141c48241c414121f121760509028e20a090285a05090289071", + "0x14ba0a38828900a5f814300a388283657242f80a1b051c414055e814ae0a", + "0x143819241c41420311741ce30288014710506014e20298814710503814c0", + "0x28142702814e20a2f8290405029c4140524014460a7297c14712407014e4", + "0x14500a388284e0a478144e0a38828b80a48014b80a388280a9602814e20a", + "0x14620a38828140a738140a710508c148202814e20a029200a05730280a95", + "0xa0148f028b4147105064140e028a01471050ac148f028ac1471050c414e8", + "0x120140a24028e20a050285a0505028e20a02829d2052c0b4900a2c028e20a", + "0x1c80a0e051c4140a053b00a05388280a480292014eb05028e24802829d405", + "0x280a5502814e20a029200a1205028240a388287c0a768147c0a388281c0a", + "0x28e20a0c029da050c028e20a0d829dc050d828e20a2415c90530295c1471", + "0x287c0a138147c0e241c41448052d80a4802920e20a02829de050c8281419", + "0x48907105060364878014300a38828140a57014360a388281c0a168140a71", + "0x285a05029c414190509c0a1c0c920e20a028296c05029c41457052080a57", + "0x174146402988ba4838828be20243c00a5f051c41412052b80a20051c4141c", + "0x3cc1c48241c4900a02921e4052e08c900a2e028e20a31029e20511828e20a", + "0x14300a38828360e242f80a1b051c414055e0140a710501490052b8487c0e", + "0x14e20a029200a057a0280a950287014710506014e202864147105120140e", + "0x2fc0a1c051c4145d053880a19051c4143e050380a5d051c414122b9217c05", + "0xf81c4838828140a7a814406224028400a38828380a60014c40a38828320a", + "0x60ae4838828ae0a7b014363e241c4143e053d80a5709120e20a24029ea05", + "0x1c4141c053e40a05388280a4802988ba487c070324838920301b02839ee05", + "0x14b823241c41457053e80a0538828400a7c814be20241c4143e053e80a05", + "0x28320a07014500a38828b80a7d8144e0a38828be0a7d8140a710508c14f9", + "0x140a710504814f902814e20a029200a057e814e2481409c90fc028641471", + "0x1c41419050380a2b051c41431053f80a31051c414054b0140a710503814f9", + "0x38320e7b8140a7105014900502c0014054a814b00a38828560a7f8145a0a", + "0x280a9602814e20a29829f205029c41405240148a5124404a655241c49012", + "0x1481471050d814ff02900147105154140e028d814710510414fe029041471", + "0x14000a388280a9602814e20a22829f205029c41405240140b02050152a05", + "0x10014bf029481471051d814ff02900147105144140e029d81471050001503", + "0x28e20a2c02a08053b828e20a168297e052c028e20a2902a080516828e20a", + "0x14e20a1f029f205029c41462053e40a05388280a48028160a0a02a540a78", + "0x28e20a02a580a0538828ae0a7c8140a710503814f902814e20a09029f205", + "0x2fc0a78051c4147a053fc0a77051c4145d050380a7a051c414790540c0a79", + "0x14900a388280a0a4c814ea7b24028ea0a38828f00a82014f60a38828ee0a", + "0xf815060284814710503814ae028f81471050152c0507028e20a240289058", + "0x1480a3e02838900a02944a652028f85053290147c282b848900a2b828e20a", + "0x41c1c4805014a253290147c28299480a3e7e038900a02944a652028f85053", + "0xa01509050148028028385005244201c4805014a253290147c28299480a3e", + "0x14b828240a0150b1f038900a02960a652070486c2b29948250a029045048", + "0x438900a029601412090ac1d0d1f038900a02960a6520708c6c2b29948250c", + "0x1881511028481436054401405200149012029221e4805014b00a11848560e", + "0x1207c3e0283a280a028f80a4809014911305014141924064464889014ba0a", + "0x4581405050649019091222a48050149005" + ], + "sierra_program_debug_info": { + "type_names": [ + [ + 0, + "RangeCheck" + ], + [ + 1, + "Unit" + ], + [ + 2, + "core::bool" + ], + [ + 3, + "u128" + ], + [ + 4, + "core::integer::u256" + ], + [ + 5, + "felt252" + ], + [ + 6, + "NonZero" + ], + [ + 7, + "Tuple" + ], + [ + 8, + "core::panics::Panic" + ], + [ + 9, + "Array" + ], + [ + 10, + "Tuple>" + ], + [ + 11, + "core::panics::PanicResult::<((),)>" + ], + [ + 12, + "core::result::Result::<(), core::array::Array::>" + ], + [ + 13, + "Box" + ], + [ + 14, + "core::option::Option::>" + ], + [ + 15, + "katana_messaging::contract_msg_l1::MyData" + ], + [ + 16, + "core::option::Option::" + ], + [ + 17, + "Snapshot>" + ], + [ + 18, + "core::array::Span::" + ], + [ + 19, + "Tuple>" + ], + [ + 20, + "katana_messaging::contract_msg_l1::contract_msg_l1::ContractState" + ], + [ + 21, + "Tuple" + ], + [ + 22, + "core::panics::PanicResult::<(katana_messaging::contract_msg_l1::contract_msg_l1::ContractState, ())>" + ], + [ + 23, + "BuiltinCosts" + ], + [ + 24, + "System" + ], + [ + 25, + "core::panics::PanicResult::<(core::array::Span::,)>" + ], + [ + 26, + "u32" + ], + [ + 27, + "core::option::Option::" + ], + [ + 28, + "core::starknet::eth_address::EthAddress" + ], + [ + 29, + "core::option::Option::" + ], + [ + 30, + "GasBuiltin" + ] + ], + "libfunc_names": [ + [ + 0, + "revoke_ap_tracking" + ], + [ + 1, + "withdraw_gas" + ], + [ + 2, + "branch_align" + ], + [ + 3, + "store_temp" + ], + [ + 4, + "store_temp>" + ], + [ + 5, + "function_call" + ], + [ + 6, + "enum_match>" + ], + [ + 7, + "function_call" + ], + [ + 8, + "enum_match>" + ], + [ + 9, + "struct_deconstruct>" + ], + [ + 10, + "array_len" + ], + [ + 11, + "snapshot_take" + ], + [ + 12, + "drop" + ], + [ + 13, + "u32_const<0>" + ], + [ + 14, + "rename" + ], + [ + 15, + "store_temp" + ], + [ + 16, + "u32_eq" + ], + [ + 17, + "drop" + ], + [ + 18, + "drop" + ], + [ + 19, + "array_new" + ], + [ + 20, + "felt252_const<7733229381460288120802334208475838166080759535023995805565484692595>" + ], + [ + 21, + "store_temp" + ], + [ + 22, + "array_append" + ], + [ + 23, + "struct_construct" + ], + [ + 24, + "struct_construct>>" + ], + [ + 25, + "enum_init,)>, 1>" + ], + [ + 26, + "store_temp" + ], + [ + 27, + "store_temp" + ], + [ + 28, + "store_temp,)>>" + ], + [ + 29, + "get_builtin_costs" + ], + [ + 30, + "store_temp" + ], + [ + 31, + "withdraw_gas_all" + ], + [ + 32, + "struct_construct" + ], + [ + 33, + "store_temp" + ], + [ + 34, + "store_temp" + ], + [ + 35, + "function_call" + ], + [ + 36, + "enum_match>" + ], + [ + 37, + "drop>" + ], + [ + 38, + "snapshot_take>" + ], + [ + 39, + "drop>" + ], + [ + 40, + "struct_construct>" + ], + [ + 41, + "struct_construct>>" + ], + [ + 42, + "enum_init,)>, 0>" + ], + [ + 43, + "felt252_const<375233589013918064796019>" + ], + [ + 44, + "drop" + ], + [ + 45, + "drop>" + ], + [ + 46, + "felt252_const<485748461484230571791265682659113160264223489397539653310998840191492914>" + ], + [ + 47, + "felt252_const<485748461484230571791265682659113160264223489397539653310998840191492913>" + ], + [ + 48, + "function_call" + ], + [ + 49, + "enum_match>" + ], + [ + 50, + "drop" + ], + [ + 51, + "store_temp" + ], + [ + 52, + "function_call" + ], + [ + 53, + "function_call" + ], + [ + 54, + "function_call" + ], + [ + 55, + "function_call" + ], + [ + 56, + "store_temp>" + ], + [ + 57, + "enum_init, 1>" + ], + [ + 58, + "array_snapshot_pop_front" + ], + [ + 59, + "enum_init>, 0>" + ], + [ + 60, + "store_temp>>" + ], + [ + 61, + "store_temp>>" + ], + [ + 62, + "jump" + ], + [ + 63, + "struct_construct" + ], + [ + 64, + "enum_init>, 1>" + ], + [ + 65, + "enum_match>>" + ], + [ + 66, + "unbox" + ], + [ + 67, + "rename" + ], + [ + 68, + "enum_init, 0>" + ], + [ + 69, + "store_temp>" + ], + [ + 70, + "enum_init, 1>" + ], + [ + 71, + "function_call" + ], + [ + 72, + "send_message_to_l1_syscall" + ], + [ + 73, + "enum_init>, 0>" + ], + [ + 74, + "store_temp>>" + ], + [ + 75, + "enum_init>, 1>" + ], + [ + 76, + "rename>>" + ], + [ + 77, + "function_call::unwrap_syscall>" + ], + [ + 78, + "enum_match>" + ], + [ + 79, + "drop>" + ], + [ + 80, + "struct_construct>" + ], + [ + 81, + "enum_init, 0>" + ], + [ + 82, + "store_temp>" + ], + [ + 83, + "drop" + ], + [ + 84, + "enum_init, 1>" + ], + [ + 85, + "struct_construct" + ], + [ + 86, + "enum_init, 0>" + ], + [ + 87, + "store_temp>" + ], + [ + 88, + "enum_init, 1>" + ], + [ + 89, + "snapshot_take" + ], + [ + 90, + "store_temp>" + ], + [ + 91, + "function_call" + ], + [ + 92, + "snapshot_take" + ], + [ + 93, + "felt252_const<123>" + ], + [ + 94, + "felt252_sub" + ], + [ + 95, + "felt252_is_zero" + ], + [ + 96, + "drop>" + ], + [ + 97, + "felt252_const<5817842327937750557011733149029>" + ], + [ + 98, + "struct_deconstruct" + ], + [ + 99, + "felt252_const<1>" + ], + [ + 100, + "felt252_const<2>" + ], + [ + 101, + "felt252_const<34157776085189168970443141491779053578596>" + ], + [ + 102, + "felt252_const<34157776085188859485433320146710328797540>" + ], + [ + 103, + "dup" + ], + [ + 104, + "function_call" + ], + [ + 105, + "u128_const<0>" + ], + [ + 106, + "u128_const<4294967296>" + ], + [ + 107, + "struct_construct" + ], + [ + 108, + "rename" + ], + [ + 109, + "rename" + ], + [ + 110, + "store_temp" + ], + [ + 111, + "function_call" + ], + [ + 112, + "enum_match" + ], + [ + 113, + "struct_construct" + ], + [ + 114, + "enum_init, 0>" + ], + [ + 115, + "struct_deconstruct" + ], + [ + 116, + "enum_match>>" + ], + [ + 117, + "struct_construct>" + ], + [ + 118, + "enum_init, 0>" + ], + [ + 119, + "store_temp>" + ], + [ + 120, + "enum_init, 1>" + ], + [ + 121, + "dup" + ], + [ + 122, + "function_call" + ], + [ + 123, + "rename>" + ], + [ + 124, + "rename" + ], + [ + 125, + "u128s_from_felt252" + ], + [ + 126, + "struct_deconstruct" + ], + [ + 127, + "dup" + ], + [ + 128, + "u128_overflowing_sub" + ], + [ + 129, + "drop" + ], + [ + 130, + "snapshot_take" + ], + [ + 131, + "rename" + ], + [ + 132, + "u128_eq" + ], + [ + 133, + "enum_init" + ], + [ + 134, + "store_temp" + ], + [ + 135, + "enum_init" + ], + [ + 136, + "rename" + ], + [ + 137, + "store_temp" + ] + ], + "user_func_names": [ + [ + 0, + "katana_messaging::contract_msg_l1::contract_msg_l1::__wrapper__ContractL1Impl__send_message_value" + ], + [ + 1, + "katana_messaging::contract_msg_l1::contract_msg_l1::__wrapper__ContractL1Impl__send_message_struct" + ], + [ + 2, + "katana_messaging::contract_msg_l1::contract_msg_l1::__wrapper__msg_handler_value" + ], + [ + 3, + "katana_messaging::contract_msg_l1::contract_msg_l1::__wrapper__msg_handler_struct" + ], + [ + 4, + "core::starknet::eth_address::EthAddressSerde::deserialize" + ], + [ + 5, + "core::Felt252Serde::deserialize" + ], + [ + 6, + "katana_messaging::contract_msg_l1::contract_msg_l1::ContractL1Impl::send_message_value" + ], + [ + 7, + "katana_messaging::contract_msg_l1::MyDataSerde::deserialize" + ], + [ + 8, + "katana_messaging::contract_msg_l1::contract_msg_l1::ContractL1Impl::send_message_struct" + ], + [ + 9, + "katana_messaging::contract_msg_l1::contract_msg_l1::msg_handler_value" + ], + [ + 10, + "katana_messaging::contract_msg_l1::contract_msg_l1::msg_handler_struct" + ], + [ + 11, + "core::starknet::eth_address::Felt252TryIntoEthAddress::try_into" + ], + [ + 12, + "core::starknet::eth_address::EthAddressIntoFelt252::into" + ], + [ + 13, + "core::starknet::SyscallResultTraitImpl::<()>::unwrap_syscall" + ], + [ + 14, + "katana_messaging::contract_msg_l1::MyDataSerde::serialize" + ], + [ + 15, + "core::integer::u256_from_felt252" + ], + [ + 16, + "core::integer::U256PartialOrd::lt" + ], + [ + 17, + "core::Felt252Serde::serialize" + ] + ] + }, + "contract_class_version": "0.1.0", + "entry_points_by_type": { + "EXTERNAL": [ + { + "selector": "0x212a93940157a93c8f87d5c6d42475635ec6fa7e74bdcae09e26b162e3c3c8c", + "function_idx": 1 + }, + { + "selector": "0x38db96c707bc8d18f82750a60fb341e4e99c1ea20e3e902770a3b24bb039683", + "function_idx": 0 + } + ], + "L1_HANDLER": [ + { + "selector": "0x5421de947699472df434466845d68528f221a52fce7ad2934c5dae2e1f1cdc", + "function_idx": 2 + }, + { + "selector": "0xf1149cade9d692862ad41df96b108aa2c20af34f640457e781d166c98dc6b0", + "function_idx": 3 + } + ], + "CONSTRUCTOR": [] + }, + "abi": [ + { + "type": "impl", + "name": "ContractL1Impl", + "interface_name": "katana_messaging::contract_msg_l1::IContractL1" + }, + { + "type": "struct", + "name": "core::starknet::eth_address::EthAddress", + "members": [ + { + "name": "address", + "type": "core::felt252" + } + ] + }, + { + "type": "struct", + "name": "katana_messaging::contract_msg_l1::MyData", + "members": [ + { + "name": "a", + "type": "core::felt252" + }, + { + "name": "b", + "type": "core::felt252" + } + ] + }, + { + "type": "interface", + "name": "katana_messaging::contract_msg_l1::IContractL1", + "items": [ + { + "type": "function", + "name": "send_message_value", + "inputs": [ + { + "name": "to_address", + "type": "core::starknet::eth_address::EthAddress" + }, + { + "name": "value", + "type": "core::felt252" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "send_message_struct", + "inputs": [ + { + "name": "to_address", + "type": "core::starknet::eth_address::EthAddress" + }, + { + "name": "data", + "type": "katana_messaging::contract_msg_l1::MyData" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "l1_handler", + "name": "msg_handler_value", + "inputs": [ + { + "name": "from_address", + "type": "core::felt252" + }, + { + "name": "value", + "type": "core::felt252" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "l1_handler", + "name": "msg_handler_struct", + "inputs": [ + { + "name": "from_address", + "type": "core::felt252" + }, + { + "name": "data", + "type": "katana_messaging::contract_msg_l1::MyData" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "event", + "name": "katana_messaging::contract_msg_l1::contract_msg_l1::Event", + "kind": "enum", + "variants": [] + } + ] +} \ No newline at end of file diff --git a/crates/katana/rpc/rpc/tests/test_data/solidity/Contract1Compiled.json b/crates/katana/rpc/rpc/tests/test_data/solidity/Contract1Compiled.json new file mode 100644 index 0000000000..53d83462a6 --- /dev/null +++ b/crates/katana/rpc/rpc/tests/test_data/solidity/Contract1Compiled.json @@ -0,0 +1,76 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "snMessaging", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "hash1", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "hash2", + "type": "uint256" + } + ], + "name": "DebugEvent", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fromAddress", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + } + ], + "name": "consumeMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "contractAddress", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selector", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "bin": "608060405234801561001057600080fd5b5060405161047238038061047283398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b6103e1806100916000396000f3fe6080604052600436106100295760003560e01c8063b66438381461002e578063c5780d6214610043575b600080fd5b61004161003c366004610230565b610063565b005b34801561004f57600080fd5b5061004161005e3660046101b7565b6100f1565b600054604051633e3aa6c560e01b81526001600160a01b0390911690633e3aa6c590349061009990879087908790600401610341565b60408051808303818588803b1580156100b157600080fd5b505af11580156100c5573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906100ea9190610194565b5050505050565b60005460405162b2775760e61b81526001600160a01b0390911690632c9dd5c090610124908690869086906004016102ff565b602060405180830381600087803b15801561013e57600080fd5b505af1158015610152573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610176919061017c565b50505050565b60006020828403121561018d578081fd5b5051919050565b600080604083850312156101a6578081fd5b505080516020909101519092909150565b6000806000604084860312156101cb578081fd5b83359250602084013567ffffffffffffffff808211156101e9578283fd5b818601915086601f8301126101fc578283fd5b81358181111561020a578384fd5b876020808302850101111561021d578384fd5b6020830194508093505050509250925092565b600080600060608486031215610244578283fd5b833592506020808501359250604085013567ffffffffffffffff8082111561026a578384fd5b818701915087601f83011261027d578384fd5b81358181111561028f5761028f610395565b838102604051858282010181811085821117156102ae576102ae610395565b604052828152858101935084860182860187018c10156102cc578788fd5b8795505b838610156102ee5780358552600195909501949386019386016102d0565b508096505050505050509250925092565b838152604060208201819052810182905260006001600160fb1b03831115610325578081fd5b6020830280856060850137919091016060019081529392505050565b60006060820185835260208581850152606060408501528185518084526080860191508287019350845b818110156103875784518352938301939183019160010161036b565b509098975050505050505050565b634e487b7160e01b600052604160045260246000fdfea264697066735822122092633a92c2eddc5dbc1f785f0fac25951b54e95fc7ac3e6c11f2c0dc4173348f64736f6c63430008000033" +} \ No newline at end of file diff --git a/crates/katana/rpc/rpc/tests/test_data/solidity/StarknetMessagingLocalCompiled.json b/crates/katana/rpc/rpc/tests/test_data/solidity/StarknetMessagingLocalCompiled.json new file mode 100644 index 0000000000..9b56fa941f --- /dev/null +++ b/crates/katana/rpc/rpc/tests/test_data/solidity/StarknetMessagingLocalCompiled.json @@ -0,0 +1,457 @@ +{ + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fromAddress", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + } + ], + "name": "ConsumedMessageToL1", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "toAddress", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "selector", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "ConsumedMessageToL2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fromAddress", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + } + ], + "name": "LogMessageToL1", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "toAddress", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "selector", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "LogMessageToL2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "hashes", + "type": "uint256[]" + } + ], + "name": "MessageHashesAddedFromL2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "toAddress", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "selector", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "MessageToL2Canceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "toAddress", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "selector", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "MessageToL2CancellationStarted", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "msgHashes", + "type": "uint256[]" + } + ], + "name": "addMessageHashesFromL2", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "toAddress", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selector", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "cancelL1ToL2Message", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "fromAddress", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + } + ], + "name": "consumeMessageFromL2", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxL1MsgFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "l1ToL2MessageCancellations", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l1ToL2MessageNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "l1ToL2Messages", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "l2ToL1Messages", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messageCancellationDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "toAddress", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selector", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + } + ], + "name": "sendMessageToL2", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "toAddress", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selector", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "payload", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "startL1ToL2MessageCancellation", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bin": "608060405234801561001057600080fd5b50610e89806100206000396000f3fe60806040526004361061009c5760003560e01c806377c7d7a91161006457806377c7d7a9146101425780637a98660b146101625780638303bd8a146101825780639be446bf14610197578063a46efaf3146101b7578063db3c5270146101d75761009c565b8063018cccdf146100a15780632c9dd5c0146100cc5780633e3aa6c5146100ec57806354eccba41461010d5780636170ff1b14610122575b600080fd5b3480156100ad57600080fd5b506100b66101ec565b6040516100c39190610b9c565b60405180910390f35b3480156100d857600080fd5b506100b66100e7366004610947565b610231565b6100ff6100fa366004610991565b610323565b6040516100c3929190610ba5565b34801561011957600080fd5b506100b661044d565b34801561012e57600080fd5b506100b661013d3660046109e2565b610459565b34801561014e57600080fd5b506100b661015d36600461092f565b6105a3565b34801561016e57600080fd5b506100b661017d3660046109e2565b6105be565b34801561018e57600080fd5b506100b6610675565b3480156101a357600080fd5b506100b66101b236600461092f565b610698565b3480156101c357600080fd5b506100b66101d236600461092f565b6106a2565b6101ea6101e53660046108ef565b6106ac565b005b600061022c6040518060400160405280602081526020017f535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f4e4f4e4345815250610766565b905090565b604051600090819061024f9086903390869088908290602001610ad3565b604051602081830303815290604052805190602001209050600061027161079a565b60008381526020919091526040902054116102a75760405162461bcd60e51b815260040161029e90610c93565b60405180910390fd5b336001600160a01b0316857f7a06c571aa77f34d9706c51e5d8122b5595aebeaa34233bfe866f22befb973b186866040516102e3929190610b35565b60405180910390a360016102f561079a565b600083815260200190815260200160002060008282546103159190610d65565b909155509095945050505050565b600080600034116103465760405162461bcd60e51b815260040161029e90610d0c565b61034e61044d565b34111561036d5760405162461bcd60e51b815260040161029e90610c2e565b60006103776101ec565b90506103c46040518060400160405280602081526020017f535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f4e4f4e43458152508260016103bf9190610d4d565b6107bd565b8587336001600160a01b03167fdb80dd488acf86d17c747445b0eabb5d57c541d3bd7b6b87af987858e5066b2b888886346040516104059493929190610b75565b60405180910390a4600061041c88888888866107f0565b9050610429346001610d4d565b610431610831565b6000838152602091909152604090205597909650945050505050565b670de0b6b3a764000090565b60008486336001600160a01b03167f8abd2ec2e0a10c82f5b60ea00455fa96c41fd144f225fcc52b8d83d94f803ed887878760405161049a93929190610b51565b60405180910390a460006104b187878787876107f0565b905060006104bd610831565b600083815260209190915260409020549050806104ec5760405162461bcd60e51b815260040161029e90610c65565b60006104f6610854565b600084815260209190915260409020549050806105255760405162461bcd60e51b815260040161029e90610cca565b600061052f610675565b6105399083610d4d565b90508181101561055b5760405162461bcd60e51b815260040161029e90610bb3565b8042101561057b5760405162461bcd60e51b815260040161029e90610bea565b6000610585610831565b60008681526020919091526040902055509198975050505050505050565b60006105ad610831565b600092835260205250604090205490565b60008486336001600160a01b03167f2e00dccd686fd6823ec7dc3e125582aa82881b6ff5f6b5a73856e1ea8338a3be8787876040516105ff93929190610b51565b60405180910390a4600061061687878787876107f0565b90506000610622610831565b600083815260209190915260409020549050806106515760405162461bcd60e51b815260040161029e90610c65565b4261065a610854565b60008481526020919091526040902055509695505050505050565b600061022c6040518060600160405280602d8152602001610dde602d9139610766565b60006105ad610854565b60006105ad61079a565b60005b818110156107295760008383838181106106d957634e487b7160e01b600052603260045260246000fd5b9050602002013560001b905060016106ef61079a565b6000838152602001908152602001600020600082825461070f9190610d4d565b90915550829150610721905081610d7c565b9150506106af565b507e31e49c5c8cbb8204c84525dfc1a145e06e35f873b703ce44df65b9516fb17a828260405161075a929190610b35565b60405180910390a15050565b6000808260405160200161077a9190610a9a565b60408051601f198184030181529190528051602090910120549392505050565b600061022c604051806060016040528060238152602001610e0b60239139610873565b6000826040516020016107d09190610a9a565b604051602081830303815290604052805190602001209050818155505050565b60405160009061081090339088908590899088908a908290602001610afd565b60405160208183030381529060405280519060200120905095945050505050565b600061022c604051806060016040528060268152602001610e2e60269139610873565b600061022c604051806060016040528060308152602001610dae603091395b600080826040516020016108879190610a9a565b60408051601f1981840301815291905280516020909101209392505050565b60008083601f8401126108b7578182fd5b50813567ffffffffffffffff8111156108ce578182fd5b60208301915083602080830285010111156108e857600080fd5b9250929050565b60008060208385031215610901578182fd5b823567ffffffffffffffff811115610917578283fd5b610923858286016108a6565b90969095509350505050565b600060208284031215610940578081fd5b5035919050565b60008060006040848603121561095b578081fd5b83359250602084013567ffffffffffffffff811115610978578182fd5b610984868287016108a6565b9497909650939450505050565b600080600080606085870312156109a6578081fd5b8435935060208501359250604085013567ffffffffffffffff8111156109ca578182fd5b6109d6878288016108a6565b95989497509550505050565b6000806000806000608086880312156109f9578081fd5b8535945060208601359350604086013567ffffffffffffffff811115610a1d578182fd5b610a29888289016108a6565b96999598509660600135949350505050565b81835260006001600160fb1b03831115610a53578081fd5b6020830280836020870137939093016020019283525090919050565b60006001600160fb1b03831115610a84578081fd5b6020830280838637939093019283525090919050565b60008251815b81811015610aba5760208186018101518583015201610aa0565b81811115610ac85782828501525b509190910192915050565b6000868252856020830152846040830152610af2606083018486610a6f565b979650505050505050565b6000888252876020830152866040830152856060830152846080830152610b2860a083018486610a6f565b9998505050505050505050565b600060208252610b49602083018486610a3b565b949350505050565b600060408252610b65604083018587610a3b565b9050826020830152949350505050565b600060608252610b89606083018688610a3b565b6020830194909452506040015292915050565b90815260200190565b918252602082015260400190565b6020808252601c908201527f43414e43454c5f414c4c4f5745445f54494d455f4f564552464c4f5700000000604082015260600190565b60208082526024908201527f4d4553534147455f43414e43454c4c4154494f4e5f4e4f545f414c4c4f57454460408201526317d6515560e21b606082015260800190565b60208082526017908201527f4d41585f4c315f4d53475f4645455f4558434545444544000000000000000000604082015260600190565b6020808252601490820152731393d7d35154d4d051d157d513d7d0d05390d15360621b604082015260600190565b6020808252601a908201527f494e56414c49445f4d4553534147455f544f5f434f4e53554d45000000000000604082015260600190565b60208082526022908201527f4d4553534147455f43414e43454c4c4154494f4e5f4e4f545f52455155455354604082015261115160f21b606082015260800190565b60208082526021908201527f4c315f4d53475f4645455f4d5553545f42455f475245415445525f5448414e5f6040820152600360fc1b606082015260800190565b60008219821115610d6057610d60610d97565b500190565b600082821015610d7757610d77610d97565b500390565b6000600019821415610d9057610d90610d97565b5060010190565b634e487b7160e01b600052601160045260246000fdfe535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f43414e43454c4c4154494f4e5f4d41505050494e47535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f43414e43454c4c4154494f4e5f44454c4159535441524b4e45545f312e305f4d5347494e475f4c32544f4c315f4d41505050494e47535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f4d41505050494e475f5632a264697066735822122014c7f5b33d9918daf9f7f12968ce1557fe4f2b64638fa02df4c882c38651382064736f6c63430008000033" +} \ No newline at end of file diff --git a/crates/katana/runner/Cargo.toml b/crates/katana/runner/Cargo.toml index f0a6787556..6f911fbe32 100644 --- a/crates/katana/runner/Cargo.toml +++ b/crates/katana/runner/Cargo.toml @@ -18,4 +18,4 @@ serde.workspace = true serde_json.workspace = true starknet.workspace = true tokio.workspace = true -url.workspace = true +url.workspace = true \ No newline at end of file diff --git a/crates/katana/runner/src/lib.rs b/crates/katana/runner/src/lib.rs index 3ad87a63ef..342379f87a 100644 --- a/crates/katana/runner/src/lib.rs +++ b/crates/katana/runner/src/lib.rs @@ -47,6 +47,8 @@ pub struct KatanaRunnerConfig { pub port: Option, /// The path where to log info, if None, logs are stored in a temp dir. pub log_path: Option, + /// The messaging config file + pub messaging: Option, } impl Default for KatanaRunnerConfig { @@ -59,6 +61,7 @@ impl Default for KatanaRunnerConfig { program_name: None, run_name: None, log_path: None, + messaging: None, } } } @@ -100,6 +103,10 @@ impl KatanaRunner { command.args(["--disable-fee"]); } + if let Some(messaging_file) = config.messaging { + command.args(["--messaging", messaging_file.as_str()]); + } + let mut child = command.stdout(Stdio::piped()).spawn().context("failed to start subprocess")?; diff --git a/examples/spawn-and-move/Scarb.lock b/examples/spawn-and-move/Scarb.lock index e9a0b90f18..aeef927011 100644 --- a/examples/spawn-and-move/Scarb.lock +++ b/examples/spawn-and-move/Scarb.lock @@ -10,7 +10,7 @@ dependencies = [ [[package]] name = "dojo_examples" -version = "0.7.1" +version = "0.7.2" dependencies = [ "dojo", ]