From e518b1a173f4ea077b06fb9c194626d8d4752b67 Mon Sep 17 00:00:00 2001 From: stackdump Date: Sun, 15 Sep 2024 23:59:16 -0500 Subject: [PATCH] new bindings --- Cargo.lock | 1667 ++----- Cargo.toml | 4 +- Makefile | 4 +- README.md | 24 +- TODO.md | 9 +- app/Cargo.toml | 12 +- app/Makefile | 6 +- app/src/command.rs | 47 + app/src/lib.rs | 3 +- app/src/main.rs | 46 +- app/src/models.rs | 52 + app/src/server.rs | 51 +- crates/Cargo.toml | 10 - crates/bindings/Cargo.toml | 7 +- crates/bindings/src/ierc165.rs | 571 ++- crates/bindings/src/ierc20.rs | 3214 ++++++++++---- crates/bindings/src/ierc721.rs | 3898 ++++++++++++----- crates/bindings/src/ierc721_enumerable.rs | 1447 ------ crates/bindings/src/ierc721_metadata.rs | 1412 ------ crates/bindings/src/ierc721_token_receiver.rs | 177 - crates/bindings/src/ierc721enumerable.rs | 3438 +++++++++++++++ crates/bindings/src/ierc721metadata.rs | 3372 ++++++++++++++ crates/bindings/src/ierc721tokenreceiver.rs | 523 +++ crates/bindings/src/lib.rs | 23 +- crates/bindings/src/metamodel.rs | 3160 ++++++++++--- crates/bindings/src/mock_erc20.rs | 1443 ------ crates/bindings/src/mock_erc721.rs | 1529 ------- crates/bindings/src/mockerc20.rs | 3148 +++++++++++++ crates/bindings/src/mockerc721.rs | 3553 +++++++++++++++ crates/bindings/src/model.rs | 651 ++- crates/bindings/src/model_interface.rs | 385 -- crates/bindings/src/modelinterface.rs | 2042 +++++++++ crates/bindings/src/my_model_contract.rs | 706 --- crates/bindings/src/my_state_machine.rs | 757 ---- crates/bindings/src/mymodelcontract.rs | 2817 ++++++++++++ crates/bindings/src/mystatemachine.rs | 2817 ++++++++++++ crates/bindings/src/pflow_dsl.rs | 72 - crates/bindings/src/pflowdsl.rs | 218 + crates/bindings/src/shared_types.rs | 78 - crates/src/ierc165.rs | 143 - crates/src/ierc20.rs | 1027 ----- crates/src/ierc721.rs | 1177 ----- crates/src/ierc721_enumerable.rs | 1447 ------ crates/src/ierc721_metadata.rs | 1412 ------ crates/src/ierc721_token_receiver.rs | 177 - crates/src/lib.rs | 20 - crates/src/metamodel.rs | 623 --- crates/src/mock_erc20.rs | 1443 ------ crates/src/mock_erc721.rs | 1529 ------- crates/src/model.rs | 204 - crates/src/model_interface.rs | 385 -- crates/src/my_model_contract.rs | 706 --- crates/src/my_state_machine.rs | 757 ---- crates/src/pflow_dsl.rs | 72 - crates/src/shared_types.rs | 78 - 55 files changed, 31171 insertions(+), 23422 deletions(-) create mode 100644 app/src/command.rs create mode 100644 app/src/models.rs delete mode 100644 crates/Cargo.toml delete mode 100644 crates/bindings/src/ierc721_enumerable.rs delete mode 100644 crates/bindings/src/ierc721_metadata.rs delete mode 100644 crates/bindings/src/ierc721_token_receiver.rs create mode 100644 crates/bindings/src/ierc721enumerable.rs create mode 100644 crates/bindings/src/ierc721metadata.rs create mode 100644 crates/bindings/src/ierc721tokenreceiver.rs delete mode 100644 crates/bindings/src/mock_erc20.rs delete mode 100644 crates/bindings/src/mock_erc721.rs create mode 100644 crates/bindings/src/mockerc20.rs create mode 100644 crates/bindings/src/mockerc721.rs delete mode 100644 crates/bindings/src/model_interface.rs create mode 100644 crates/bindings/src/modelinterface.rs delete mode 100644 crates/bindings/src/my_model_contract.rs delete mode 100644 crates/bindings/src/my_state_machine.rs create mode 100644 crates/bindings/src/mymodelcontract.rs create mode 100644 crates/bindings/src/mystatemachine.rs delete mode 100644 crates/bindings/src/pflow_dsl.rs create mode 100644 crates/bindings/src/pflowdsl.rs delete mode 100644 crates/bindings/src/shared_types.rs delete mode 100644 crates/src/ierc165.rs delete mode 100644 crates/src/ierc20.rs delete mode 100644 crates/src/ierc721.rs delete mode 100644 crates/src/ierc721_enumerable.rs delete mode 100644 crates/src/ierc721_metadata.rs delete mode 100644 crates/src/ierc721_token_receiver.rs delete mode 100644 crates/src/lib.rs delete mode 100644 crates/src/metamodel.rs delete mode 100644 crates/src/mock_erc20.rs delete mode 100644 crates/src/mock_erc721.rs delete mode 100644 crates/src/model.rs delete mode 100644 crates/src/model_interface.rs delete mode 100644 crates/src/my_model_contract.rs delete mode 100644 crates/src/my_state_machine.rs delete mode 100644 crates/src/pflow_dsl.rs delete mode 100644 crates/src/shared_types.rs diff --git a/Cargo.lock b/Cargo.lock index e885065..5f4f76d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "addr2line" version = "0.24.1" @@ -27,17 +17,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - [[package]] name = "ahash" version = "0.8.11" @@ -80,22 +59,43 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +[[package]] +name = "alloy" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2683873c2744f6cd72d0db51bb74fee9ed310e0476a140bdc19e82b407d8a0a" +dependencies = [ + "alloy-consensus 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-contract 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-core", + "alloy-eips 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-genesis 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-network 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-provider 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-rpc-client 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-rpc-types", + "alloy-serde 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-signer 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-transport 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-transport-http 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "alloy" version = "0.3.5" source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" dependencies = [ - "alloy-consensus", + "alloy-consensus 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-contract 0.3.5 (git+https://github.com/alloy-rs/alloy)", "alloy-core", - "alloy-eips", - "alloy-genesis", - "alloy-network", - "alloy-node-bindings", - "alloy-provider", - "alloy-rpc-client", - "alloy-serde", - "alloy-transport", - "alloy-transport-http", + "alloy-eips 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-genesis 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-network 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-provider 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-rpc-client 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-serde 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-transport 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-transport-http 0.3.5 (git+https://github.com/alloy-rs/alloy)", ] [[package]] @@ -108,19 +108,72 @@ dependencies = [ "strum", ] +[[package]] +name = "alloy-consensus" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28ddd17ffb7e4d66ef3a84e7b179072a9320cdc4b26c7f6f44cbf1081631b36" +dependencies = [ + "alloy-eips 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "c-kzg", + "serde", +] + [[package]] name = "alloy-consensus" version = "0.3.5" source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" dependencies = [ - "alloy-eips", + "alloy-eips 0.3.5 (git+https://github.com/alloy-rs/alloy)", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.3.5 (git+https://github.com/alloy-rs/alloy)", "c-kzg", "serde", ] +[[package]] +name = "alloy-contract" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69257e2ffe1a9f15f20a89cd54d1ca758468c5b3e87979191b8b5fc24d39b37" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-network-primitives 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-primitives", + "alloy-provider 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-rpc-types-eth 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-sol-types", + "alloy-transport 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures", + "futures-util", + "thiserror", +] + +[[package]] +name = "alloy-contract" +version = "0.3.5" +source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-network-primitives 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-primitives", + "alloy-provider 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-rpc-types-eth 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-sol-types", + "alloy-transport 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "futures", + "futures-util", + "thiserror", +] + [[package]] name = "alloy-core" version = "0.8.3" @@ -172,6 +225,24 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-eips" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f6c5c0a383f14519531cf58d8440e74f10b938e289f803af870be6f79223110" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "c-kzg", + "derive_more", + "once_cell", + "serde", + "sha2", +] + [[package]] name = "alloy-eips" version = "0.3.5" @@ -181,21 +252,32 @@ dependencies = [ "alloy-eip7702", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.3.5 (git+https://github.com/alloy-rs/alloy)", "c-kzg", - "derive_more 1.0.0", + "derive_more", "once_cell", "serde", "sha2", ] +[[package]] +name = "alloy-genesis" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7db0ddc76399bb1a4010f630767f027cafe65ab406cfee8e6040128cd65e8325" +dependencies = [ + "alloy-primitives", + "alloy-serde 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", +] + [[package]] name = "alloy-genesis" version = "0.3.5" source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" dependencies = [ "alloy-primitives", - "alloy-serde", + "alloy-serde 0.3.5 (git+https://github.com/alloy-rs/alloy)", "serde", ] @@ -211,6 +293,20 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-json-rpc" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7111af869909275cffc5c84d16b6c892d6d512773e40cbe83187d0b9c5235e91" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror", + "tracing", +] + [[package]] name = "alloy-json-rpc" version = "0.3.5" @@ -224,19 +320,40 @@ dependencies = [ "tracing", ] +[[package]] +name = "alloy-network" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "342028392a2d5050b7b93dd32a0715d3b3b9ce30072ecb69a35dd4895c005495" +dependencies = [ + "alloy-consensus 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-eips 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-json-rpc 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-network-primitives 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-primitives", + "alloy-rpc-types-eth 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-serde 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-signer 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + [[package]] name = "alloy-network" version = "0.3.5" source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network-primitives", + "alloy-consensus 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-eips 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-json-rpc 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-network-primitives 0.3.5 (git+https://github.com/alloy-rs/alloy)", "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", - "alloy-signer", + "alloy-rpc-types-eth 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-serde 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-signer 0.3.5 (git+https://github.com/alloy-rs/alloy)", "alloy-sol-types", "async-trait", "auto_impl", @@ -247,28 +364,24 @@ dependencies = [ [[package]] name = "alloy-network-primitives" version = "0.3.5" -source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6e66d78c049dcadd065a926a9f2d9a9b2b10981a7889449e694fac7bccd2c6f" dependencies = [ - "alloy-eips", + "alloy-eips 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "alloy-primitives", - "alloy-serde", + "alloy-serde 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde", ] [[package]] -name = "alloy-node-bindings" +name = "alloy-network-primitives" version = "0.3.5" source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" dependencies = [ - "alloy-genesis", + "alloy-eips 0.3.5 (git+https://github.com/alloy-rs/alloy)", "alloy-primitives", - "k256", - "rand", - "serde_json", - "tempfile", - "thiserror", - "tracing", - "url", + "alloy-serde 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "serde", ] [[package]] @@ -281,7 +394,7 @@ dependencies = [ "bytes", "cfg-if", "const-hex", - "derive_more 1.0.0", + "derive_more", "hex-literal", "itoa 1.0.11", "k256", @@ -293,25 +406,56 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-provider" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79f14ccc2a3c575cb17b1b4af8c772cf9b5b93b7ce7047d6640e53954abb558d" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-eips 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-json-rpc 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-network 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-network-primitives 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-primitives", + "alloy-rpc-client 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-rpc-types-eth 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-transport 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-transport-http 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "url", +] + [[package]] name = "alloy-provider" version = "0.3.5" source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" dependencies = [ "alloy-chains", - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network", - "alloy-network-primitives", - "alloy-node-bindings", + "alloy-consensus 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-eips 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-json-rpc 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-network 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-network-primitives 0.3.5 (git+https://github.com/alloy-rs/alloy)", "alloy-primitives", - "alloy-rpc-client", - "alloy-rpc-types-anvil", - "alloy-rpc-types-eth", - "alloy-signer-local", - "alloy-transport", - "alloy-transport-http", + "alloy-rpc-client 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-rpc-types-eth 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-transport 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-transport-http 0.3.5 (git+https://github.com/alloy-rs/alloy)", "async-stream", "async-trait", "auto_impl", @@ -320,7 +464,7 @@ dependencies = [ "futures-utils-wasm", "lru", "pin-project", - "reqwest 0.12.7", + "reqwest", "serde", "serde_json", "thiserror", @@ -354,14 +498,15 @@ dependencies = [ [[package]] name = "alloy-rpc-client" version = "0.3.5" -source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dc79aeca84abb122a2fffbc1c91fdf958dca5c95be3875977bc99672bde0027" dependencies = [ - "alloy-json-rpc", - "alloy-transport", - "alloy-transport-http", + "alloy-json-rpc 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-transport 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-transport-http 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures", "pin-project", - "reqwest 0.12.7", + "reqwest", "serde", "serde_json", "tokio", @@ -372,13 +517,55 @@ dependencies = [ ] [[package]] -name = "alloy-rpc-types-anvil" +name = "alloy-rpc-client" version = "0.3.5" source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" dependencies = [ + "alloy-json-rpc 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-transport 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-transport-http 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "futures", + "pin-project", + "reqwest", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.1", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22045187a5ebf5b2af3f8b6831b66735b6556c5750ec5790aeeb45935260c1c2" +dependencies = [ + "alloy-rpc-types-eth 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-serde 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "238f494727ff861a803bd73b1274ef788a615bf8f8c4bfada4e6df42afa275d2" +dependencies = [ + "alloy-consensus 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-eips 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-network-primitives 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "alloy-primitives", - "alloy-serde", + "alloy-rlp", + "alloy-serde 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-sol-types", + "cfg-if", + "derive_more", + "hashbrown 0.14.5", + "itertools 0.13.0", "serde", + "serde_json", ] [[package]] @@ -386,21 +573,32 @@ name = "alloy-rpc-types-eth" version = "0.3.5" source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-network-primitives", + "alloy-consensus 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-eips 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-network-primitives 0.3.5 (git+https://github.com/alloy-rs/alloy)", "alloy-primitives", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.3.5 (git+https://github.com/alloy-rs/alloy)", "alloy-sol-types", "cfg-if", - "derive_more 1.0.0", + "derive_more", "hashbrown 0.14.5", "itertools 0.13.0", "serde", "serde_json", ] +[[package]] +name = "alloy-serde" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b95b6f024a558593dd3b8628af03f7df2ca50e4c56839293ad0a7546e471db0" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + [[package]] name = "alloy-serde" version = "0.3.5" @@ -414,7 +612,8 @@ dependencies = [ [[package]] name = "alloy-signer" version = "0.3.5" -source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da64740ff0518606c514eb0e03dd0a1daa8ff94d6d491a626fd8e50efd6c4f18" dependencies = [ "alloy-primitives", "async-trait", @@ -425,17 +624,15 @@ dependencies = [ ] [[package]] -name = "alloy-signer-local" +name = "alloy-signer" version = "0.3.5" source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" dependencies = [ - "alloy-consensus", - "alloy-network", "alloy-primitives", - "alloy-signer", "async-trait", + "auto_impl", + "elliptic-curve", "k256", - "rand", "thiserror", ] @@ -459,6 +656,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bc65475025fc1e84bf86fc840f04f63fcccdcf3cf12053c99918e4054dfbc69" dependencies = [ + "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck", @@ -477,11 +675,13 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ed10f0715a0b69fde3236ff3b9ae5f6f7c97db5a387747100070d3016b9266b" dependencies = [ + "alloy-json-abi", "const-hex", "dunce", "heck", "proc-macro2", "quote", + "serde_json", "syn 2.0.77", "syn-solidity", ] @@ -509,12 +709,31 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-transport" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c7a669caa427abe8802184c8776f5103302f9337bb30a5b36bdebc332946c14" +dependencies = [ + "alloy-json-rpc 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.5.1", + "tracing", + "url", +] + [[package]] name = "alloy-transport" version = "0.3.5" source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" dependencies = [ - "alloy-json-rpc", + "alloy-json-rpc 0.3.5 (git+https://github.com/alloy-rs/alloy)", "base64 0.22.1", "futures-util", "futures-utils-wasm", @@ -527,14 +746,29 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-transport-http" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4433ffa97aab6ae643de81c7bde9a2f043496f27368a607405a5c78a610caf74" +dependencies = [ + "alloy-json-rpc 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "alloy-transport 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest", + "serde_json", + "tower 0.5.1", + "tracing", + "url", +] + [[package]] name = "alloy-transport-http" version = "0.3.5" source = "git+https://github.com/alloy-rs/alloy#cbfe3d9111337b5d1d59e01d4b6d541335da4889" dependencies = [ - "alloy-json-rpc", - "alloy-transport", - "reqwest 0.12.7", + "alloy-json-rpc 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "alloy-transport 0.3.5 (git+https://github.com/alloy-rs/alloy)", + "reqwest", "serde_json", "tower 0.5.1", "tracing", @@ -592,9 +826,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "ark-ff" @@ -732,17 +966,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" -[[package]] -name = "async-recursion" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "async-stream" version = "0.3.5" @@ -776,17 +999,6 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" -dependencies = [ - "futures", - "pharos", - "rustc_version 0.4.1", -] - [[package]] name = "atomic-waker" version = "1.1.2" @@ -820,10 +1032,10 @@ dependencies = [ "axum-core", "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.4.1", + "hyper", "hyper-util", "itoa 1.0.11", "matchit", @@ -853,8 +1065,8 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -873,10 +1085,10 @@ checksum = "c1ad46c3ec4e12f4a4b6835e173ba21c25e484c9d02b49770bf006ce5367c036" dependencies = [ "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.4.1", + "hyper", "hyper-util", "pin-project-lite", "tokio", @@ -935,19 +1147,13 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - [[package]] name = "bindgen" version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cexpr", "clang-sys", "itertools 0.12.1", @@ -961,14 +1167,6 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "bindings" -version = "0.1.0" -dependencies = [ - "ethers", - "serde", -] - [[package]] name = "bit-set" version = "0.5.3" @@ -984,12 +1182,6 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.6.0" @@ -1085,16 +1277,6 @@ dependencies = [ "alloc-stdlib", ] -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "sha2", - "tinyvec", -] - [[package]] name = "bumpalo" version = "3.16.0" @@ -1148,43 +1330,11 @@ dependencies = [ "serde", ] -[[package]] -name = "camino" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.23", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "cc" -version = "1.1.18" +version = "1.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" +checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800" dependencies = [ "jobserver", "libc", @@ -1212,15 +1362,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "num-traits", -] - [[package]] name = "cid" version = "0.10.1" @@ -1234,16 +1375,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "cjson" version = "0.1.2" @@ -1307,58 +1438,6 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" -[[package]] -name = "coins-bip32" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" -dependencies = [ - "bs58", - "coins-core", - "digest 0.10.7", - "hmac", - "k256", - "serde", - "sha2", - "thiserror", -] - -[[package]] -name = "coins-bip39" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" -dependencies = [ - "bitvec", - "coins-bip32", - "hmac", - "once_cell", - "pbkdf2 0.12.2", - "rand", - "sha2", - "thiserror", -] - -[[package]] -name = "coins-core" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" -dependencies = [ - "base64 0.21.7", - "bech32", - "bs58", - "digest 0.10.7", - "generic-array", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2", - "sha3", - "thiserror", -] - [[package]] name = "colorchoice" version = "1.0.2" @@ -1468,15 +1547,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - [[package]] name = "dashmap" version = "6.1.0" @@ -1527,15 +1597,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - [[package]] name = "derivative" version = "2.2.0" @@ -1547,17 +1608,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_more" -version = "0.99.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "derive_more" version = "1.0.0" @@ -1636,332 +1686,50 @@ dependencies = [ "crypto-bigint", "digest 0.10.7", "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "embed-doc-image" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af36f591236d9d822425cb6896595658fa558fcebf5ee8accac1d4b92c47166e" -dependencies = [ - "base64 0.13.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "enr" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" -dependencies = [ - "base64 0.21.7", - "bytes", - "hex", - "k256", - "log", - "rand", - "rlp", - "serde", - "sha3", - "zeroize", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "eth-keystore" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" -dependencies = [ - "aes", - "ctr", - "digest 0.10.7", - "hex", - "hmac", - "pbkdf2 0.11.0", - "rand", - "scrypt", - "serde", - "serde_json", - "sha2", - "sha3", - "thiserror", - "uuid", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", -] - -[[package]] -name = "ethers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" -dependencies = [ - "ethers-addressbook", - "ethers-contract", - "ethers-core", - "ethers-middleware", - "ethers-providers", - "ethers-signers", -] - -[[package]] -name = "ethers-addressbook" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" -dependencies = [ - "ethers-core", - "once_cell", - "serde", - "serde_json", -] - -[[package]] -name = "ethers-contract" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" -dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "ethers-providers", - "futures-util", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "ethers-contract-abigen" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" -dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "eyre", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "serde", - "serde_json", - "syn 2.0.77", - "toml 0.8.19", - "walkdir", -] - -[[package]] -name = "ethers-contract-derive" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" -dependencies = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.77", -] - -[[package]] -name = "ethers-core" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" -dependencies = [ - "arrayvec", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array", - "k256", - "num_enum", - "once_cell", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum", - "syn 2.0.77", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", ] [[package]] -name = "ethers-middleware" -version = "2.0.14" +name = "embed-doc-image" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +checksum = "af36f591236d9d822425cb6896595658fa558fcebf5ee8accac1d4b92c47166e" dependencies = [ - "async-trait", - "auto_impl", - "ethers-contract", - "ethers-core", - "ethers-providers", - "ethers-signers", - "futures-channel", - "futures-locks", - "futures-util", - "instant", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-futures", - "url", + "base64 0.13.1", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "ethers-providers" -version = "2.0.14" +name = "encoding_rs" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http 0.2.12", - "instant", - "jsonwebtoken", - "once_cell", - "pin-project", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", + "cfg-if", ] [[package]] -name = "ethers-signers" -version = "2.0.14" +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", - "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand", - "sha2", - "thiserror", - "tracing", + "libc", + "windows-sys 0.52.0", ] [[package]] @@ -2055,6 +1823,13 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "foundry-contracts" +version = "0.1.0" +dependencies = [ + "alloy 0.3.5 (git+https://github.com/alloy-rs/alloy)", +] + [[package]] name = "funty" version = "2.0.0" @@ -2109,16 +1884,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-locks" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" -dependencies = [ - "futures-channel", - "futures-task", -] - [[package]] name = "futures-macro" version = "0.3.30" @@ -2142,16 +1907,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] - [[package]] name = "futures-util" version = "0.3.30" @@ -2176,15 +1931,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -2219,18 +1965,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "group" version = "0.13.0" @@ -2242,25 +1976,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.5.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.6" @@ -2272,7 +1987,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.1.0", + "http", "indexmap 2.5.0", "slab", "tokio", @@ -2297,15 +2012,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hashers" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" -dependencies = [ - "fxhash", -] - [[package]] name = "hashlink" version = "0.9.1" @@ -2370,17 +2076,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa 1.0.11", -] - [[package]] name = "http" version = "1.1.0" @@ -2392,17 +2087,6 @@ dependencies = [ "itoa 1.0.11", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -2410,7 +2094,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.1.0", + "http", ] [[package]] @@ -2421,8 +2105,8 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -2440,47 +2124,40 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.30" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", + "h2", + "http", + "http-body", "httparse", "httpdate", "itoa 1.0.11", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] -name = "hyper" -version = "1.4.1" +name = "hyper-rustls" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ - "bytes", - "futures-channel", "futures-util", - "h2 0.4.6", - "http 1.1.0", - "http-body 1.0.1", - "httparse", - "httpdate", - "itoa 1.0.11", - "pin-project-lite", - "smallvec", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", "tokio", - "want", + "tokio-rustls", + "tower-service", ] [[package]] @@ -2491,7 +2168,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.4.1", + "hyper", "hyper-util", "native-tls", "tokio", @@ -2508,9 +2185,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "hyper 1.4.1", + "http", + "http-body", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -2538,24 +2215,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -2617,24 +2276,6 @@ dependencies = [ "hashbrown 0.14.5", ] -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - [[package]] name = "ipnet" version = "2.10.0" @@ -2726,20 +2367,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.7", - "pem", - "ring", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "k256" version = "0.13.3" @@ -2751,7 +2378,6 @@ dependencies = [ "elliptic-curve", "once_cell", "sha2", - "signature", ] [[package]] @@ -3132,12 +2758,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - [[package]] name = "num-integer" version = "0.1.46" @@ -3182,7 +2802,6 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.77", @@ -3212,38 +2831,13 @@ version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ea5043e58958ee56f3e15a90aee535795cd7dfd319846288d93c5b57d85cbe" -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "openssl" version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -3342,34 +2936,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", - "hmac", -] - -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - [[package]] name = "percent-encoding" version = "2.3.1" @@ -3391,19 +2957,21 @@ dependencies = [ name = "pflow-cli" version = "0.1.0" dependencies = [ - "alloy", - "async-recursion", + "alloy 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "axum", "axum-server", "base64 0.21.7", "clap", "eyre", + "foundry-contracts", "futures-util", "include_dir", "lazy_static", "libipld", + "log", "multibase", "pflow-metamodel", + "reqwest", "rocksdb", "rusqlite", "serde", @@ -3427,20 +2995,10 @@ dependencies = [ "brotli", "cjson", "embed-doc-image", - "libipld", - "multibase", - "serde", - "serde_json", -] - -[[package]] -name = "pharos" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" -dependencies = [ - "futures", - "rustc_version 0.4.1", + "libipld", + "multibase", + "serde", + "serde_json", ] [[package]] @@ -3491,12 +3049,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" version = "0.2.20" @@ -3506,16 +3058,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "prettyplease" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" -dependencies = [ - "proc-macro2", - "syn 2.0.77", -] - [[package]] name = "primitive-types" version = "0.12.2" @@ -3524,9 +3066,6 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", "uint", ] @@ -3537,7 +3076,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ "thiserror", - "toml 0.5.11", + "toml", ] [[package]] @@ -3618,7 +3157,7 @@ checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.6.0", + "bitflags", "lazy_static", "num-traits", "rand", @@ -3711,7 +3250,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] @@ -3758,42 +3297,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", - "tokio", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - [[package]] name = "reqwest" version = "0.12.7" @@ -3802,12 +3305,15 @@ checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64 0.22.1", "bytes", + "encoding_rs", "futures-core", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.4.1", + "hyper", + "hyper-rustls", "hyper-tls", "hyper-util", "ipnet", @@ -3823,6 +3329,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "sync_wrapper 1.0.1", + "system-configuration", "tokio", "tokio-native-tls", "tower-service", @@ -3845,26 +3352,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.20" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", + "getrandom", "libc", - "once_cell", "spin", "untrusted", - "web-sys", - "winapi", -] - -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", + "windows-sys 0.52.0", ] [[package]] @@ -3874,21 +3372,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", - "rlp-derive", "rustc-hex", ] -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "rocksdb" version = "0.22.0" @@ -3935,7 +3421,7 @@ version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" dependencies = [ - "bitflags 2.6.0", + "bitflags", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -3985,13 +3471,26 @@ version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.23.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" version = "2.1.3" @@ -4008,6 +3507,17 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.17" @@ -4032,15 +3542,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher", -] - [[package]] name = "same-file" version = "1.0.6" @@ -4050,30 +3551,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scale-info" -version = "2.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" -dependencies = [ - "cfg-if", - "derive_more 0.99.18", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" -dependencies = [ - "proc-macro-crate 3.2.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "schannel" version = "0.1.24" @@ -4089,18 +3566,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scrypt" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" -dependencies = [ - "hmac", - "pbkdf2 0.11.0", - "salsa20", - "sha2", -] - [[package]] name = "sec1" version = "0.7.3" @@ -4121,7 +3586,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -4152,9 +3617,6 @@ name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" -dependencies = [ - "serde", -] [[package]] name = "semver-parser" @@ -4165,18 +3627,6 @@ dependencies = [ "pest", ] -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" - -[[package]] -name = "send_wrapper" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" - [[package]] name = "serde" version = "1.0.210" @@ -4219,15 +3669,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_spanned" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -4305,18 +3746,6 @@ dependencies = [ "rand_core", ] -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "time", -] - [[package]] name = "slab" version = "0.4.9" @@ -4344,9 +3773,9 @@ dependencies = [ [[package]] name = "spin" -version = "0.5.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spki" @@ -4461,20 +3890,20 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -4538,37 +3967,6 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa 1.0.11", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -4632,6 +4030,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.16" @@ -4666,26 +4075,11 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] [[package]] name = "toml_edit" @@ -4694,8 +4088,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap 2.5.0", - "serde", - "serde_spanned", "toml_datetime", "winnow", ] @@ -4741,10 +4133,10 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ - "bitflags 2.6.0", + "bitflags", "bytes", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "pin-project-lite", "tokio", @@ -4799,16 +4191,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "tracing-log" version = "0.2.0" @@ -4909,9 +4291,9 @@ checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" @@ -4930,16 +4312,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom", - "serde", -] - [[package]] name = "valuable" version = "0.1.0" @@ -5156,15 +4528,6 @@ dependencies = [ "windows-targets 0.42.2", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -5198,21 +4561,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -5235,12 +4583,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -5253,12 +4595,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -5271,12 +4607,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -5295,12 +4625,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -5313,12 +4637,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -5331,12 +4649,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -5349,12 +4661,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -5370,35 +4676,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "ws_stream_wasm" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" -dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version 0.4.1", - "send_wrapper 0.6.0", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wyz" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index 235484e..79d68db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] -members = ["app", "crates"] +members = ["app", "crates/bindings"] resolver = "2" [workspace.dependencies] -foundry-contracts = { path = "crates" } +foundry-contracts = { path = "crates/bindings" } diff --git a/Makefile b/Makefile index 1268c71..e9d90ce 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ bindings: rm -rf $(BINDINGS_OUT_PATH) # Generate new bindings - @forge bind --root $(CONTRACTS_PATH) --crate-name $(BINDINGS_FOLDER) + @forge bind --alloy --root $(CONTRACTS_PATH) --crate-name $(BINDINGS_FOLDER) # Move bindings to the correct location @mv -f $(BINDINGS_OUT_PATH) $(CRATES_FOLDER) @@ -51,4 +51,4 @@ setup: # Declare phony targets -.PHONY: build build-release clean fmt bindings \ No newline at end of file +.PHONY: build build-release clean fmt bindings diff --git a/README.md b/README.md index 964a67e..0481b3a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,28 @@ pflow-rs -------- +# Status + +Early Concept Discover and interact with pflow-xyz contracts using this contract explorer. -## Status +web api +------- -Early Concept +``` +pflow --daemon +``` + +Run a seqeuncer node to aggregate event logs. + + +cli +--- + +FIXME - need to target + +``` +pflow --try '[{ "action": "foo", "seq": 0, "scalar" },...{ "action": "foo", "seq": 0, "scalar" }]' +``` + +And, execute generalized intent based workflows. diff --git a/TODO.md b/TODO.md index aea8a08..adadd5d 100644 --- a/TODO.md +++ b/TODO.md @@ -1,13 +1,8 @@ OVERVIEW -------- -This is the local UX for p2p users - should be oriented toward private usage. +We're building a generalized intent framework. -For example, whenever we encounter a compatible contract address, -we will index that contract and provide a user interface to interact with it. - -TODO: probably keep everything in sqlite!!! -this is an end-user tool, not a developer tool (think courtesy node) STATUS ------ @@ -20,6 +15,8 @@ advance the design to be read/write in the same UX WIP --- +- [ ] integrate w/ Alloy APIs for interaction w/ Optimism + - [ ] refer to contracts by address *ONLY* in URLs - [ ] should we support loading models from contracts (YES!) - [ ] optimism.pflow.xyz/contract/0x1234 diff --git a/app/Cargo.toml b/app/Cargo.toml index aea4b50..39c0e45 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -5,11 +5,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -alloy = { git = "https://github.com/alloy-rs/alloy", features = [ - "providers", - "node-bindings", -] } -#foundry-contracts.workspace = true +foundry-contracts.workspace = true thiserror = "=1.0.56" axum = "0.7" axum-server = "0.6.0" @@ -27,12 +23,14 @@ tower-http = { version = "0.5", features = ["util", "timeout", "trace"] } tracing = "0.1" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } pflow-metamodel = "0.2.0" -webbrowser = "0.8.12" +webbrowser = "0.8" lazy_static = "1.5.0" rocksdb = "0.22.0" -async-recursion = "1.1.1" rusqlite = "0.32.1" futures-util = "0.3.30" +alloy = { version = "0.3", features = ["network", "providers", "transports", "transport-http", "rpc", "rpc-types", "rpc-client", "contract", "sol-types", "signers"] } +reqwest = "0.12.7" +log = "0.4.22" [[bin]] diff --git a/app/Makefile b/app/Makefile index cc6f1a7..e6bfc6f 100644 --- a/app/Makefile +++ b/app/Makefile @@ -6,4 +6,8 @@ clippy: .PHONY: test test: - cargo test --all \ No newline at end of file + cargo test --all + +.PHONY: run +run: + cargo run --bin pflow diff --git a/app/src/command.rs b/app/src/command.rs new file mode 100644 index 0000000..1bc09d4 --- /dev/null +++ b/app/src/command.rs @@ -0,0 +1,47 @@ +use serde_json::Value; +use std::str::FromStr; +use std::fmt; + +#[derive(Debug, serde::Serialize, serde::Deserialize, Clone)] +pub struct Action { + action: String, + scalar: i64, + #[serde(default)] + seq: Option, +} + +impl Default for Action { + fn default() -> Self { + Action { + action: "noop".to_string(), + scalar: 1, + seq: Some(0), + } + } +} + +impl FromStr for Action { + type Err = String; + + fn from_str(s: &str) -> Result { + let action = serde_json::from_str(s); + match action { + Ok(a) => Ok(a), + Err(e) => Err(e.to_string()), + } + } +} + +impl fmt::Display for Action { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", serde_json::to_string(self).unwrap()) + } +} + +pub fn run_command(action: Action) -> Value { + let result = match action.action.as_str() { + _ => -1, + }; + + serde_json::json!({"result": result}) +} \ No newline at end of file diff --git a/app/src/lib.rs b/app/src/lib.rs index d3478b7..cfa7eed 100644 --- a/app/src/lib.rs +++ b/app/src/lib.rs @@ -1,3 +1,4 @@ - pub mod server; pub mod storage; +pub mod command; +pub mod models; diff --git a/app/src/main.rs b/app/src/main.rs index a35181f..df414b4 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -1,32 +1,52 @@ use std::error::Error; -use clap::Parser; +use clap::{Parser}; use tokio::task; use pflow_cli::server::app; +use pflow_cli::command::{run_command, Action}; #[derive(Debug, Parser)] struct Config { #[clap(short = 'p', long, default_value = "3000")] port: u16, + + #[clap(short = 'd', long, default_value = "false")] + daemon: bool, + + #[clap(short = 'v', long, default_value = "false")] + verbose: bool, + + #[clap(value_parser)] + input: Option, } #[tokio::main] async fn main() -> Result<(), Box> { let config = Config::parse(); let addr = std::net::SocketAddr::from(([127, 0, 0, 1], config.port)); - println!("Listening on {}", addr); - let browser_task = task::spawn(async { - if webbrowser::open("http://localhost:3000").is_ok() { - println!("Browser opened successfully"); + if config.daemon { + println!("Listening on {}", addr); + let browser_task = task::spawn(async { + if webbrowser::open("http://localhost:3000").is_ok() { + println!("Browser opened successfully"); + } else { + println!("Failed to open browser"); + } + }); + + axum_server::bind(addr) + .serve(app().into_make_service()) + .await?; + + browser_task.await?; + } else { + if config.input.is_none() { + println!("No input provided"); } else { - println!("Failed to open browser"); + run_command(config.input.expect("No input provided")); } - }); - - axum_server::bind(addr) - .serve(app().into_make_service()) - .await?; + return Ok(()); + } - browser_task.await?; Ok(()) -} \ No newline at end of file +} diff --git a/app/src/models.rs b/app/src/models.rs new file mode 100644 index 0000000..06829ff --- /dev/null +++ b/app/src/models.rs @@ -0,0 +1,52 @@ +use lazy_static::lazy_static; +use pflow_metamodel::*; + +/// Expected CID needs to be updated if the model definition changes +fn check_for_update(cid: &str, model: &Model) { + let zblob = model.net.to_zblob(); + assert_eq!(cid, zblob.ipfs_cid, "[MODIFIED] {}\n[pflow] https://pflow.dev?z={:}\n",zblob.ipfs_cid, zblob.base64_zipped); +} + +#[macro_export] +macro_rules! pflow_model { + ($name:ident, $oid_name:ident, $expected_cid:expr, $($dsl:tt)*) => { + lazy_static! { + pub static ref $name: Model = { + let model = pflow_dsl! { + $($dsl)* + }; + check_for_update($expected_cid, &model); + model + }; + + pub static ref $oid_name: String = $expected_cid.to_string(); + } + }; +} + +/// Declare the model and its OID outside of the test module +/// Expected CID needs to be updated if the model changes +pflow_model!(TEST_MODEL, + TEST_CID, "zb2rhnJobUyvbfHB3yrFDZ3Z4KDhJRSNtrpeU272zri2LYfDT", + declare "petriNet" + cell "place0", 0, 3, [100, 180] + func "txn0", "default", [20, 100] + func "txn1", "default", [180, 100] + func "txn2", "default", [20, 260] + func "txn3", "default", [180, 260] + arrow "txn0", "place0", 1 + arrow "place0", "txn1", 3 + guard "txn2", "place0", 3 + guard "place0", "txn3", 1 +); + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_pflow_dsl() { + check_for_update(&**TEST_CID, &TEST_MODEL); + } + +} \ No newline at end of file diff --git a/app/src/server.rs b/app/src/server.rs index c2bd37f..c3d0753 100644 --- a/app/src/server.rs +++ b/app/src/server.rs @@ -5,12 +5,12 @@ use crate::storage::{Storage, Zblob}; use axum::{ extract::{Path, Query, State}, http::StatusCode, - response::{IntoResponse, Redirect, Response}, + response::{IntoResponse, Response}, routing::get, Router, }; use pflow_metamodel::compression::decompress_brotli_decode; -use pflow_metamodel::{oid, zblob}; +use pflow_metamodel::oid::Oid; use tower_http::trace::TraceLayer; async fn src_handler( @@ -86,47 +86,12 @@ fn index_response(cid: String, data: String) -> impl IntoResponse { .unwrap() } -async fn model_handler( - Path(ipfs_cid): Path, - req: Query>, - state: State>>, -) -> impl IntoResponse { - let zparam = req.get("z"); - let zblob = string_to_zblob(zparam); - - let new_blob = state - .lock() - .unwrap() - .create_or_retrieve( - "pflow_models", - &zblob.ipfs_cid, - &zblob.base64_zipped, - &zblob.title, - &zblob.description, - &zblob.keywords, - &zblob.referrer, - ) - .unwrap_or(zblob); - - // if zparam.is_some() && new_blob.id > 0 { - // return index_response_redirect(new_blob.ipfs_cid).into_response(); - // } - - let zblob = state - .lock() - .unwrap() - .get_by_cid("pflow_models", &ipfs_cid) - .unwrap_or(Option::from(Zblob::default())) - .unwrap_or_default(); - - index_response(zblob.ipfs_cid, zblob.base64_zipped).into_response() -} fn string_to_zblob(data: Option<&String>) -> Zblob { let mut zblob = Zblob::default(); if data.is_some() { zblob.base64_zipped = data.unwrap().to_string(); - zblob.ipfs_cid = oid::Oid::new(data.unwrap().as_bytes()).unwrap().to_string(); + zblob.ipfs_cid = Oid::new(data.unwrap().as_bytes()).unwrap().to_string(); } zblob @@ -137,7 +102,7 @@ async fn index_handler( state: State>>, ) -> impl IntoResponse { let zblob = string_to_zblob(req.get("z")); - let new_blob = state + let zblob = state .lock() .unwrap() .create_or_retrieve( @@ -149,14 +114,8 @@ async fn index_handler( &zblob.keywords, &zblob.referrer, ) - .unwrap_or_default(); - - if new_blob.id > 0 { - let redirect_uri = format!("/p/{}/", zblob.ipfs_cid); - return Redirect::permanent(&redirect_uri).into_response(); - } + .unwrap_or(zblob); - let zblob = zblob::Zblob::default(); index_response(zblob.ipfs_cid, zblob.base64_zipped).into_response() } diff --git a/crates/Cargo.toml b/crates/Cargo.toml deleted file mode 100644 index ddb0eaa..0000000 --- a/crates/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "bindings" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -ethers = { version = "2", default-features = false, features = ["abigen"] } -serde = "1" diff --git a/crates/bindings/Cargo.toml b/crates/bindings/Cargo.toml index ddb0eaa..99ffaad 100644 --- a/crates/bindings/Cargo.toml +++ b/crates/bindings/Cargo.toml @@ -1,10 +1,7 @@ [package] -name = "bindings" +name = "foundry-contracts" version = "0.1.0" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] -ethers = { version = "2", default-features = false, features = ["abigen"] } -serde = "1" +alloy = { git = "https://github.com/alloy-rs/alloy", features = ["sol-types", "contract"] } diff --git a/crates/bindings/src/ierc165.rs b/crates/bindings/src/ierc165.rs index 13e0228..d9583bc 100644 --- a/crates/bindings/src/ierc165.rs +++ b/crates/bindings/src/ierc165.rs @@ -1,143 +1,466 @@ -pub use ierc165::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc165 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ +/** + +Generated by the following Solidity interface... +```solidity +interface IERC165 { + function supportsInterface(bytes4 interfaceID) external view returns (bool); +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceID", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod IERC165 { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. +```solidity +function supportsInterface(bytes4 interfaceID) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct supportsInterfaceCall { + pub interfaceID: alloy::sol_types::private::FixedBytes<4>, + } + ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct supportsInterfaceReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceCall) -> Self { + (value.interfaceID,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { interfaceID: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for supportsInterfaceCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = supportsInterfaceReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "supportsInterface(bytes4)"; + const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { ( - ::std::borrow::ToOwned::to_owned("supportsInterface"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("supportsInterface"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("interfaceID"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ]), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, + as alloy_sol_types::SolType>::tokenize(&self.interfaceID), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } } + }; + ///Container for all the [`IERC165`](self) function calls. + pub enum IERC165Calls { + supportsInterface(supportsInterfaceCall), } - ///The parsed JSON ABI of the contract. - pub static IERC165_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct IERC165(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC165 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } + #[automatically_derived] + impl IERC165Calls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[[1u8, 255u8, 201u8, 167u8]]; } - impl ::core::ops::Deref for IERC165 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 + #[automatically_derived] + impl alloy_sol_types::SolInterface for IERC165Calls { + const NAME: &'static str = "IERC165Calls"; + const MIN_DATA_LENGTH: usize = 32usize; + const COUNT: usize = 1usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::supportsInterface(_) => { + ::SELECTOR + } + } } - } - impl ::core::ops::DerefMut for IERC165 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn supportsInterface( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC165Calls::supportsInterface) + } + supportsInterface + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::supportsInterface(inner) => { + ::abi_encoded_size( + inner, + ) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::supportsInterface(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`IERC165`](self) contract instance. + +See the [wrapper's documentation](`IERC165Instance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> IERC165Instance { + IERC165Instance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + IERC165Instance::::deploy(provider) } - impl ::core::fmt::Debug for IERC165 { + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + IERC165Instance::::deploy_builder(provider) + } + /**A [`IERC165`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`IERC165`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct IERC165Instance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for IERC165Instance { + #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC165)).field(&self.address()).finish() + f.debug_tuple("IERC165Instance").field(&self.address).finish() } } - impl IERC165 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC165Instance { + /**Creates a new wrapper around an on-chain [`IERC165`](self) contract instance. + +See the [wrapper's documentation](`IERC165Instance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC165_ABI.clone(), - client, - ), + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), ) } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider } } - impl From<::ethers::contract::Contract> - for IERC165 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) + impl IERC165Instance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> IERC165Instance { + IERC165Instance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } } } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC165Instance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`supportsInterface`] function. + pub fn supportsInterface( + &self, + interfaceID: alloy::sol_types::private::FixedBytes<4>, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &supportsInterfaceCall { + interfaceID, + }, + ) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC165Instance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } } - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); } diff --git a/crates/bindings/src/ierc20.rs b/crates/bindings/src/ierc20.rs index 76378d6..3a3ac36 100644 --- a/crates/bindings/src/ierc20.rs +++ b/crates/bindings/src/ierc20.rs @@ -1,1027 +1,2337 @@ -pub use ierc20::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc20 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("allowance"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("allowance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("decimals"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("decimals"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("name"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("name"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("symbol"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("symbol"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("totalSupply"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("totalSupply"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static IERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, +/** + +Generated by the following Solidity interface... +```solidity +interface IERC20 { + event Approval(address indexed owner, address indexed spender, uint256 value); + event Transfer(address indexed from, address indexed to, uint256 value); + + function allowance(address owner, address spender) external view returns (uint256); + function approve(address spender, uint256 amount) external returns (bool); + function balanceOf(address account) external view returns (uint256); + function decimals() external view returns (uint8); + function name() external view returns (string memory); + function symbol() external view returns (string memory); + function totalSupply() external view returns (uint256); + function transfer(address to, uint256 amount) external returns (bool); + function transferFrom(address from, address to, uint256 amount) external returns (bool); +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod IERC20 { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", ); - pub struct IERC20(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC20 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. +```solidity +event Approval(address indexed owner, address indexed spender, uint256 value); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct Approval { + #[allow(missing_docs)] + pub owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub spender: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub value: alloy::sol_types::private::U256, } - impl ::core::ops::Deref for IERC20 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Approval { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "Approval(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + owner: topics.1, + spender: topics.2, + value: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.value), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self.owner, + ); + out[2usize] = ::encode_topic( + &self.spender, + ); + Ok(()) + } } - } - impl ::core::ops::DerefMut for IERC20 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } } - } - impl ::core::fmt::Debug for IERC20 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC20)).field(&self.address()).finish() + #[automatically_derived] + impl From<&Approval> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Approval) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } } + }; + /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. +```solidity +event Transfer(address indexed from, address indexed to, uint256 value); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct Transfer { + #[allow(missing_docs)] + pub from: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub value: alloy::sol_types::private::U256, } - impl IERC20 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC20_ABI.clone(), - client, - ), - ) + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Transfer { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + from: topics.1, + to: topics.2, + value: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.value), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self.from, + ); + out[2usize] = ::encode_topic( + &self.to, + ); + Ok(()) + } } - ///Calls the contract's `allowance` (0xdd62ed3e) function - pub fn allowance( - &self, - owner: ::ethers::core::types::Address, - spender: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 98, 237, 62], (owner, spender)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - spender: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (spender, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - account: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], account) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `decimals` (0x313ce567) function - pub fn decimals(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([49, 60, 229, 103], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `name` (0x06fdde03) function - pub fn name( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([6, 253, 222, 3], ()) - .expect("method not found (this should never happen)") + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } } - ///Calls the contract's `symbol` (0x95d89b41) function - pub fn symbol( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([149, 216, 155, 65], ()) - .expect("method not found (this should never happen)") + #[automatically_derived] + impl From<&Transfer> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Transfer) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } } - ///Calls the contract's `totalSupply` (0x18160ddd) function - pub fn total_supply( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([24, 22, 13, 221], ()) - .expect("method not found (this should never happen)") + }; + /**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`. +```solidity +function allowance(address owner, address spender) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct allowanceCall { + pub owner: alloy::sol_types::private::Address, + pub spender: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct allowanceReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: allowanceCall) -> Self { + (value.owner, value.spender) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for allowanceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + owner: tuple.0, + spender: tuple.1, + } + } + } } - ///Calls the contract's `transfer` (0xa9059cbb) function - pub fn transfer( - &self, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 5, 156, 187], (to, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, amount)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, IERC20Events> { - self.0.event_with_filter(::core::default::Default::default()) + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: allowanceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for allowanceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } } - } - impl From<::ethers::contract::Contract> - for IERC20 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) + #[automatically_derived] + impl alloy_sol_types::SolCall for allowanceCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = allowanceReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "allowance(address,address)"; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.owner, + ), + ::tokenize( + &self.spender, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } } + }; + /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. +```solidity +function approve(address spender, uint256 amount) external returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveCall { + pub spender: alloy::sol_types::private::Address, + pub amount: alloy::sol_types::private::U256, } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub spender: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, + ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveReturn { + pub _0: bool, } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveCall) -> Self { + (value.spender, value.amount) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + spender: tuple.0, + amount: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for approveCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = approveReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "approve(address,uint256)"; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.spender, + ), + as alloy_sol_types::SolType>::tokenize(&self.amount), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `balanceOf(address)` and selector `0x70a08231`. +```solidity +function balanceOf(address account) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfCall { + pub account: alloy::sol_types::private::Address, } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC20Events { - ApprovalFilter(ApprovalFilter), - TransferFilter(TransferFilter), + ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfReturn { + pub _0: alloy::sol_types::private::U256, } - impl ::ethers::contract::EthLogDecode for IERC20Events { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(IERC20Events::ApprovalFilter(decoded)); + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(IERC20Events::TransferFilter(decoded)); + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfCall) -> Self { + (value.account,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { account: tuple.0 } + } } - Err(::ethers::core::abi::Error::InvalidData) } - } - impl ::core::fmt::Display for IERC20Events { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } } } - } - impl ::core::convert::From for IERC20Events { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) + #[automatically_derived] + impl alloy_sol_types::SolCall for balanceOfCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = balanceOfReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "balanceOf(address)"; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } } + }; + /**Function with signature `decimals()` and selector `0x313ce567`. +```solidity +function decimals() external view returns (uint8); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct decimalsCall {} + ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct decimalsReturn { + pub _0: u8, } - impl ::core::convert::From for IERC20Events { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: decimalsCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for decimalsCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: decimalsReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for decimalsReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for decimalsCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = decimalsReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "decimals()"; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `name()` and selector `0x06fdde03`. +```solidity +function name() external view returns (string memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct nameCall {} + ///Container type for the return parameters of the [`name()`](nameCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct nameReturn { + pub _0: alloy::sol_types::private::String, } - ///Container type for all input parameters for the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "allowance", abi = "allowance(address,address)")] - pub struct AllowanceCall { - pub owner: ::ethers::core::types::Address, - pub spender: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub spender: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub account: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "decimals", abi = "decimals()")] - pub struct DecimalsCall; - ///Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "name", abi = "name()")] - pub struct NameCall; - ///Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "symbol", abi = "symbol()")] - pub struct SymbolCall; - ///Container type for all input parameters for the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "totalSupply", abi = "totalSupply()")] - pub struct TotalSupplyCall; - ///Container type for all input parameters for the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transfer", abi = "transfer(address,uint256)")] - pub struct TransferCall { - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC20Calls { - Allowance(AllowanceCall), - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - Decimals(DecimalsCall), - Name(NameCall), - Symbol(SymbolCall), - TotalSupply(TotalSupplyCall), - Transfer(TransferCall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for IERC20Calls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::Allowance(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: nameCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for nameCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } } - if let Ok(decoded) = ::decode( - data, + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::Approve(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: nameReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for nameReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for nameCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = nameReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "name()"; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () } - if let Ok(decoded) = ::decode( - data, + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `symbol()` and selector `0x95d89b41`. +```solidity +function symbol() external view returns (string memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct symbolCall {} + ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct symbolReturn { + pub _0: alloy::sol_types::private::String, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::BalanceOf(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: symbolCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for symbolCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } } - if let Ok(decoded) = ::decode( - data, + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::Decimals(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } } - if let Ok(decoded) = ::decode( - data, + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: symbolReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for symbolReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for symbolCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = symbolReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "symbol()"; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `totalSupply()` and selector `0x18160ddd`. +```solidity +function totalSupply() external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct totalSupplyCall {} + ///Container type for the return parameters of the [`totalSupply()`](totalSupplyCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct totalSupplyReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::Name(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: totalSupplyCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for totalSupplyCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } } - if let Ok(decoded) = ::decode( - data, + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: totalSupplyReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for totalSupplyReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for totalSupplyCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = totalSupplyReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "totalSupply()"; + const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. +```solidity +function transfer(address to, uint256 amount) external returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferCall { + pub to: alloy::sol_types::private::Address, + pub amount: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::Symbol(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferCall) -> Self { + (value.to, value.amount) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + to: tuple.0, + amount: tuple.1, + } + } } - if let Ok(decoded) = ::decode( - data, + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::TotalSupply(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferReturn) -> Self { + (value._0,) + } } - if let Ok(decoded) = ::decode( - data, + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for transferCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = transferReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.to, + ), + as alloy_sol_types::SolType>::tokenize(&self.amount), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. +```solidity +function transferFrom(address from, address to, uint256 amount) external returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromCall { + pub from: alloy::sol_types::private::Address, + pub to: alloy::sol_types::private::Address, + pub amount: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::Transfer(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromCall) -> Self { + (value.from, value.to, value.amount) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + from: tuple.0, + to: tuple.1, + amount: tuple.2, + } + } } - if let Ok(decoded) = ::decode( - data, + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::TransferFrom(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } } - Err(::ethers::core::abi::Error::InvalidData.into()) } + #[automatically_derived] + impl alloy_sol_types::SolCall for transferFromCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = transferFromReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.from, + ), + ::tokenize( + &self.to, + ), + as alloy_sol_types::SolType>::tokenize(&self.amount), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + ///Container for all the [`IERC20`](self) function calls. + pub enum IERC20Calls { + allowance(allowanceCall), + approve(approveCall), + balanceOf(balanceOfCall), + decimals(decimalsCall), + name(nameCall), + symbol(symbolCall), + totalSupply(totalSupplyCall), + transfer(transferCall), + transferFrom(transferFromCall), } - impl ::ethers::core::abi::AbiEncode for IERC20Calls { - fn encode(self) -> Vec { + #[automatically_derived] + impl IERC20Calls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [6u8, 253u8, 222u8, 3u8], + [9u8, 94u8, 167u8, 179u8], + [24u8, 22u8, 13u8, 221u8], + [35u8, 184u8, 114u8, 221u8], + [49u8, 60u8, 229u8, 103u8], + [112u8, 160u8, 130u8, 49u8], + [149u8, 216u8, 155u8, 65u8], + [169u8, 5u8, 156u8, 187u8], + [221u8, 98u8, 237u8, 62u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for IERC20Calls { + const NAME: &'static str = "IERC20Calls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 9usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::allowance(_) => { + ::SELECTOR + } + Self::approve(_) => ::SELECTOR, + Self::balanceOf(_) => { + ::SELECTOR + } + Self::decimals(_) => ::SELECTOR, + Self::name(_) => ::SELECTOR, + Self::symbol(_) => ::SELECTOR, + Self::totalSupply(_) => { + ::SELECTOR + } + Self::transfer(_) => ::SELECTOR, + Self::transferFrom(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn name( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC20Calls::name) + } + name + }, + { + fn approve( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC20Calls::approve) + } + approve + }, + { + fn totalSupply( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC20Calls::totalSupply) + } + totalSupply + }, + { + fn transferFrom( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC20Calls::transferFrom) + } + transferFrom + }, + { + fn decimals( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC20Calls::decimals) + } + decimals + }, + { + fn balanceOf( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC20Calls::balanceOf) + } + balanceOf + }, + { + fn symbol( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC20Calls::symbol) + } + symbol + }, + { + fn transfer( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC20Calls::transfer) + } + transfer + }, + { + fn allowance( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC20Calls::allowance) + } + allowance + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { match self { - Self::Allowance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::allowance(inner) => { + ::abi_encoded_size(inner) + } + Self::approve(inner) => { + ::abi_encoded_size(inner) } - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::balanceOf(inner) => { + ::abi_encoded_size(inner) } - Self::Decimals(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::decimals(inner) => { + ::abi_encoded_size(inner) } - Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TotalSupply(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::name(inner) => { + ::abi_encoded_size(inner) } - Self::Transfer(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::symbol(inner) => { + ::abi_encoded_size(inner) } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::totalSupply(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::transfer(inner) => { + ::abi_encoded_size(inner) + } + Self::transferFrom(inner) => { + ::abi_encoded_size( + inner, + ) } } } - } - impl ::core::fmt::Display for IERC20Calls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { - Self::Allowance(element) => ::core::fmt::Display::fmt(element, f), - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::Decimals(element) => ::core::fmt::Display::fmt(element, f), - Self::Name(element) => ::core::fmt::Display::fmt(element, f), - Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), - Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f), - Self::Transfer(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), + Self::allowance(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::approve(inner) => { + ::abi_encode_raw(inner, out) + } + Self::balanceOf(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::decimals(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::name(inner) => { + ::abi_encode_raw(inner, out) + } + Self::symbol(inner) => { + ::abi_encode_raw(inner, out) + } + Self::totalSupply(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::transfer(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::transferFrom(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } } } } - impl ::core::convert::From for IERC20Calls { - fn from(value: AllowanceCall) -> Self { - Self::Allowance(value) - } + ///Container for all the [`IERC20`](self) events. + pub enum IERC20Events { + Approval(Approval), + Transfer(Transfer), } - impl ::core::convert::From for IERC20Calls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } + #[automatically_derived] + impl IERC20Events { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ], + [ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ], + ]; } - impl ::core::convert::From for IERC20Calls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for IERC20Events { + const NAME: &'static str = "IERC20Events"; + const COUNT: usize = 2usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Approval) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Transfer) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } } } - impl ::core::convert::From for IERC20Calls { - fn from(value: DecimalsCall) -> Self { - Self::Decimals(value) + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for IERC20Events { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } } } - impl ::core::convert::From for IERC20Calls { - fn from(value: NameCall) -> Self { - Self::Name(value) + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`IERC20`](self) contract instance. + +See the [wrapper's documentation](`IERC20Instance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> IERC20Instance { + IERC20Instance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + IERC20Instance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + IERC20Instance::::deploy_builder(provider) + } + /**A [`IERC20`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`IERC20`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct IERC20Instance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for IERC20Instance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("IERC20Instance").field(&self.address).finish() } } - impl ::core::convert::From for IERC20Calls { - fn from(value: SymbolCall) -> Self { - Self::Symbol(value) + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC20Instance { + /**Creates a new wrapper around an on-chain [`IERC20`](self) contract instance. + +See the [wrapper's documentation](`IERC20Instance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider } } - impl ::core::convert::From for IERC20Calls { - fn from(value: TotalSupplyCall) -> Self { - Self::TotalSupply(value) + impl IERC20Instance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> IERC20Instance { + IERC20Instance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } } } - impl ::core::convert::From for IERC20Calls { - fn from(value: TransferCall) -> Self { - Self::Transfer(value) + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC20Instance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`allowance`] function. + pub fn allowance( + &self, + owner: alloy::sol_types::private::Address, + spender: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&allowanceCall { owner, spender }) + } + ///Creates a new call builder for the [`approve`] function. + pub fn approve( + &self, + spender: alloy::sol_types::private::Address, + amount: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&approveCall { spender, amount }) + } + ///Creates a new call builder for the [`balanceOf`] function. + pub fn balanceOf( + &self, + account: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&balanceOfCall { account }) + } + ///Creates a new call builder for the [`decimals`] function. + pub fn decimals( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&decimalsCall {}) + } + ///Creates a new call builder for the [`name`] function. + pub fn name(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&nameCall {}) + } + ///Creates a new call builder for the [`symbol`] function. + pub fn symbol(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&symbolCall {}) + } + ///Creates a new call builder for the [`totalSupply`] function. + pub fn totalSupply( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&totalSupplyCall {}) + } + ///Creates a new call builder for the [`transfer`] function. + pub fn transfer( + &self, + to: alloy::sol_types::private::Address, + amount: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&transferCall { to, amount }) + } + ///Creates a new call builder for the [`transferFrom`] function. + pub fn transferFrom( + &self, + from: alloy::sol_types::private::Address, + to: alloy::sol_types::private::Address, + amount: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &transferFromCall { + from, + to, + amount, + }, + ) } } - impl ::core::convert::From for IERC20Calls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC20Instance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`Approval`] event. + pub fn Approval_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`Transfer`] event. + pub fn Transfer_filter(&self) -> alloy_contract::Event { + self.event_filter::() } } - ///Container type for all return fields from the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct AllowanceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ApproveReturn(pub bool); - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DecimalsReturn(pub u8); - ///Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NameReturn(pub ::std::string::String); - ///Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SymbolReturn(pub ::std::string::String); - ///Container type for all return fields from the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TotalSupplyReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferReturn(pub bool); - ///Container type for all return fields from the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferFromReturn(pub bool); } diff --git a/crates/bindings/src/ierc721.rs b/crates/bindings/src/ierc721.rs index 6b79dd0..eaa2c19 100644 --- a/crates/bindings/src/ierc721.rs +++ b/crates/bindings/src/ierc721.rs @@ -1,1177 +1,2895 @@ -pub use ierc721::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc721 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getApproved"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getApproved"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ownerOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("ownerOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("supportsInterface"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("supportsInterface"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("interfaceID"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ +/** + +Generated by the following Solidity interface... +```solidity +interface IERC721 { + event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); + event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); + event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); + + function approve(address _approved, uint256 _tokenId) external payable; + function balanceOf(address _owner) external view returns (uint256); + function getApproved(uint256 _tokenId) external view returns (address); + function isApprovedForAll(address _owner, address _operator) external view returns (bool); + function ownerOf(uint256 _tokenId) external view returns (address); + function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; + function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; + function setApprovalForAll(address _operator, bool _approved) external; + function supportsInterface(bytes4 interfaceID) external view returns (bool); + function transferFrom(address _from, address _to, uint256 _tokenId) external payable; +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "_approved", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "_owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getApproved", + "inputs": [ + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isApprovedForAll", + "inputs": [ + { + "name": "_owner", + "type": "address", + "internalType": "address" + }, + { + "name": "_operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "ownerOf", + "inputs": [ + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "setApprovalForAll", + "inputs": [ + { + "name": "_operator", + "type": "address", + "internalType": "address" + }, + { + "name": "_approved", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceID", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "_owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_approved", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ApprovalForAll", + "inputs": [ + { + "name": "_owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_approved", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "_from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod IERC721 { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. +```solidity +event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct Approval { + #[allow(missing_docs)] + pub _owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _approved: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _tokenId: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Approval { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "Approval(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _owner: topics.1, + _approved: topics.2, + _tokenId: topics.3, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), + Self::SIGNATURE_HASH.into(), + self._owner.clone(), + self._approved.clone(), + self._tokenId.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._owner, + ); + out[2usize] = ::encode_topic( + &self._approved, + ); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Approval> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Approval) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. +```solidity +event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct ApprovalForAll { + #[allow(missing_docs)] + pub _owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _operator: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _approved: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for ApprovalForAll { + type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 23u8, + 48u8, + 126u8, + 171u8, + 57u8, + 171u8, + 97u8, + 7u8, + 232u8, + 137u8, + 152u8, + 69u8, + 173u8, + 61u8, + 89u8, + 189u8, + 150u8, + 83u8, + 242u8, + 0u8, + 242u8, + 32u8, + 146u8, + 4u8, + 137u8, + 202u8, + 43u8, + 89u8, + 55u8, + 105u8, + 108u8, + 49u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _owner: topics.1, + _operator: topics.2, + _approved: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { ( - ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), + ::tokenize( + &self._approved, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, + Self::SIGNATURE_HASH.into(), + self._owner.clone(), + self._operator.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._owner, + ); + out[2usize] = ::encode_topic( + &self._operator, + ); + Ok(()) + } } - } - ///The parsed JSON ABI of the contract. - pub static IERC721_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct IERC721(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC721 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for ApprovalForAll { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } } - } - impl ::core::ops::Deref for IERC721 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 + #[automatically_derived] + impl From<&ApprovalForAll> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } } + }; + /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. +```solidity +event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct Transfer { + #[allow(missing_docs)] + pub _from: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _to: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _tokenId: alloy::sol_types::private::U256, } - impl ::core::ops::DerefMut for IERC721 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Transfer { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _from: topics.1, + _to: topics.2, + _tokenId: topics.3, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self._from.clone(), + self._to.clone(), + self._tokenId.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._from, + ); + out[2usize] = ::encode_topic( + &self._to, + ); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); + Ok(()) + } } - } - impl ::core::fmt::Debug for IERC721 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC721)).field(&self.address()).finish() + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } } + #[automatically_derived] + impl From<&Transfer> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Transfer) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. +```solidity +function approve(address _approved, uint256 _tokenId) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveCall { + pub _approved: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, } - impl IERC721 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC721_ABI.clone(), - client, - ), - ) + ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveCall) -> Self { + (value._approved, value._tokenId) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _approved: tuple.0, + _tokenId: tuple.1, + } + } + } } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - approved: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (approved, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], owner) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getApproved` (0x081812fc) function - pub fn get_approved( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([8, 24, 18, 252], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `isApprovedForAll` (0xe985e9c5) function - pub fn is_approved_for_all( - &self, - owner: ::ethers::core::types::Address, - operator: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([233, 133, 233, 197], (owner, operator)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `ownerOf` (0x6352211e) function - pub fn owner_of( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([99, 82, 33, 30], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0x42842e0e) function - pub fn safe_transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([66, 132, 46, 14], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0xb88d4fde) function - pub fn safe_transfer_from_with_from_and_to_and_data( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([184, 141, 79, 222], (from, to, token_id, data)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setApprovalForAll` (0xa22cb465) function - pub fn set_approval_for_all( - &self, - operator: ::ethers::core::types::Address, - approved: bool, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([162, 44, 180, 101], (operator, approved)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `ApprovalForAll` event - pub fn approval_for_all_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalForAllFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, IERC721Events> { - self.0.event_with_filter(::core::default::Default::default()) + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } } - } - impl From<::ethers::contract::Contract> - for IERC721 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) + #[automatically_derived] + impl alloy_sol_types::SolCall for approveCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = approveReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "approve(address,uint256)"; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._approved, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } } + }; + /**Function with signature `balanceOf(address)` and selector `0x70a08231`. +```solidity +function balanceOf(address _owner) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfCall { + pub _owner: alloy::sol_types::private::Address, } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub approved: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")] - pub struct ApprovalForAllFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721Events { - ApprovalFilter(ApprovalFilter), - ApprovalForAllFilter(ApprovalForAllFilter), - TransferFilter(TransferFilter), + ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfReturn { + pub _0: alloy::sol_types::private::U256, } - impl ::ethers::contract::EthLogDecode for IERC721Events { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(IERC721Events::ApprovalFilter(decoded)); + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } } - if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) { - return Ok(IERC721Events::ApprovalForAllFilter(decoded)); + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfCall) -> Self { + (value._owner,) + } } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(IERC721Events::TransferFilter(decoded)); + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _owner: tuple.0 } + } } - Err(::ethers::core::abi::Error::InvalidData) } - } - impl ::core::fmt::Display for IERC721Events { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ApprovalForAllFilter(element) => { - ::core::fmt::Display::fmt(element, f) + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } } - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), } } - } - impl ::core::convert::From for IERC721Events { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) + #[automatically_derived] + impl alloy_sol_types::SolCall for balanceOfCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = balanceOfReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "balanceOf(address)"; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._owner, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } } + }; + /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. +```solidity +function getApproved(uint256 _tokenId) external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct getApprovedCall { + pub _tokenId: alloy::sol_types::private::U256, } - impl ::core::convert::From for IERC721Events { - fn from(value: ApprovalForAllFilter) -> Self { - Self::ApprovalForAllFilter(value) - } + ///Container type for the return parameters of the [`getApproved(uint256)`](getApprovedCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct getApprovedReturn { + pub _0: alloy::sol_types::private::Address, } - impl ::core::convert::From for IERC721Events { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getApprovedCall) -> Self { + (value._tokenId,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getApprovedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _tokenId: tuple.0 } + } + } } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getApprovedReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getApprovedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for getApprovedCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = getApprovedReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getApproved(uint256)"; + const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. +```solidity +function isApprovedForAll(address _owner, address _operator) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct isApprovedForAllCall { + pub _owner: alloy::sol_types::private::Address, + pub _operator: alloy::sol_types::private::Address, } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub approved: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getApproved", abi = "getApproved(uint256)")] - pub struct GetApprovedCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")] - pub struct IsApprovedForAllCall { - pub owner: ::ethers::core::types::Address, - pub operator: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")] - pub struct OwnerOfCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256)" - )] - pub struct SafeTransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256,bytes)" - )] - pub struct SafeTransferFromWithFromAndToAndDataCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")] - pub struct SetApprovalForAllCall { - pub operator: ::ethers::core::types::Address, - pub approved: bool, + ///Container type for the return parameters of the [`isApprovedForAll(address,address)`](isApprovedForAllCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct isApprovedForAllReturn { + pub _0: bool, } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: isApprovedForAllCall) -> Self { + (value._owner, value._operator) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for isApprovedForAllCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _owner: tuple.0, + _operator: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: isApprovedForAllReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for isApprovedForAllReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for isApprovedForAllCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = isApprovedForAllReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; + const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._owner, + ), + ::tokenize( + &self._operator, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. +```solidity +function ownerOf(uint256 _tokenId) external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct ownerOfCall { + pub _tokenId: alloy::sol_types::private::U256, } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, + ///Container type for the return parameters of the [`ownerOf(uint256)`](ownerOfCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct ownerOfReturn { + pub _0: alloy::sol_types::private::Address, } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721Calls { - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - GetApproved(GetApprovedCall), - IsApprovedForAll(IsApprovedForAllCall), - OwnerOf(OwnerOfCall), - SafeTransferFrom(SafeTransferFromCall), - SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall), - SetApprovalForAll(SetApprovalForAllCall), - SupportsInterface(SupportsInterfaceCall), - TransferFrom(TransferFromCall), + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ownerOfCall) -> Self { + (value._tokenId,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ownerOfCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _tokenId: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ownerOfReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ownerOfReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for ownerOfCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = ownerOfReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ownerOf(uint256)"; + const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. +```solidity +function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_0Call { + pub _from: alloy::sol_types::private::Address, + pub _to: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, } - impl ::ethers::core::abi::AbiDecode for IERC721Calls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, + ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256)`](safeTransferFrom_0Call) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_0Return {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::Approve(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_0Call) -> Self { + (value._from, value._to, value._tokenId) + } } - if let Ok(decoded) = ::decode( - data, + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_0Call { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _from: tuple.0, + _to: tuple.1, + _tokenId: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::BalanceOf(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_0Return) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_0Return { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for safeTransferFrom_0Call { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = safeTransferFrom_0Return; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; + const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._from, + ), + ::tokenize( + &self._to, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) } - if let Ok(decoded) = ::decode( - data, + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. +```solidity +function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_1Call { + pub _from: alloy::sol_types::private::Address, + pub _to: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, + pub data: alloy::sol_types::private::Bytes, + } + ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256,bytes)`](safeTransferFrom_1Call) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_1Return {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Bytes, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + alloy::sol_types::private::Bytes, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::GetApproved(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_1Call) -> Self { + (value._from, value._to, value._tokenId, value.data) + } } - if let Ok(decoded) = ::decode( - data, + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_1Call { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _from: tuple.0, + _to: tuple.1, + _tokenId: tuple.2, + data: tuple.3, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::IsApprovedForAll(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_1Return) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_1Return { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for safeTransferFrom_1Call { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Bytes, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = safeTransferFrom_1Return; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; + const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._from, + ), + ::tokenize( + &self._to, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ::tokenize( + &self.data, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) } - if let Ok(decoded) = ::decode( - data, + } + }; + /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. +```solidity +function setApprovalForAll(address _operator, bool _approved) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct setApprovalForAllCall { + pub _operator: alloy::sol_types::private::Address, + pub _approved: bool, + } + ///Container type for the return parameters of the [`setApprovalForAll(address,bool)`](setApprovalForAllCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct setApprovalForAllReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Bool, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::OwnerOf(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } } - if let Ok(decoded) = ::decode( - data, + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: setApprovalForAllCall) -> Self { + (value._operator, value._approved) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for setApprovalForAllCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _operator: tuple.0, + _approved: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::SafeTransferFrom(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: setApprovalForAllReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for setApprovalForAllReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for setApprovalForAllCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Bool, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = setApprovalForAllReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; + const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() } - if let Ok(decoded) = ::decode( - data, + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._operator, + ), + ::tokenize( + &self._approved, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. +```solidity +function supportsInterface(bytes4 interfaceID) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct supportsInterfaceCall { + pub interfaceID: alloy::sol_types::private::FixedBytes<4>, + } + ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct supportsInterfaceReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceCall) -> Self { + (value.interfaceID,) + } } - if let Ok(decoded) = ::decode( - data, + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { interfaceID: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::SetApprovalForAll(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceReturn) -> Self { + (value._0,) + } } - if let Ok(decoded) = ::decode( - data, + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for supportsInterfaceCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = supportsInterfaceReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "supportsInterface(bytes4)"; + const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.interfaceID), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. +```solidity +function transferFrom(address _from, address _to, uint256 _tokenId) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromCall { + pub _from: alloy::sol_types::private::Address, + pub _to: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::SupportsInterface(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromCall) -> Self { + (value._from, value._to, value._tokenId) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _from: tuple.0, + _to: tuple.1, + _tokenId: tuple.2, + } + } } - if let Ok(decoded) = ::decode( - data, + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::TransferFrom(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for transferFromCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = transferFromReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._from, + ), + ::tokenize( + &self._to, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) } - Err(::ethers::core::abi::Error::InvalidData.into()) } + }; + ///Container for all the [`IERC721`](self) function calls. + pub enum IERC721Calls { + approve(approveCall), + balanceOf(balanceOfCall), + getApproved(getApprovedCall), + isApprovedForAll(isApprovedForAllCall), + ownerOf(ownerOfCall), + safeTransferFrom_0(safeTransferFrom_0Call), + safeTransferFrom_1(safeTransferFrom_1Call), + setApprovalForAll(setApprovalForAllCall), + supportsInterface(supportsInterfaceCall), + transferFrom(transferFromCall), + } + #[automatically_derived] + impl IERC721Calls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [1u8, 255u8, 201u8, 167u8], + [8u8, 24u8, 18u8, 252u8], + [9u8, 94u8, 167u8, 179u8], + [35u8, 184u8, 114u8, 221u8], + [66u8, 132u8, 46u8, 14u8], + [99u8, 82u8, 33u8, 30u8], + [112u8, 160u8, 130u8, 49u8], + [162u8, 44u8, 180u8, 101u8], + [184u8, 141u8, 79u8, 222u8], + [233u8, 133u8, 233u8, 197u8], + ]; } - impl ::ethers::core::abi::AbiEncode for IERC721Calls { - fn encode(self) -> Vec { + #[automatically_derived] + impl alloy_sol_types::SolInterface for IERC721Calls { + const NAME: &'static str = "IERC721Calls"; + const MIN_DATA_LENGTH: usize = 32usize; + const COUNT: usize = 10usize; + #[inline] + fn selector(&self) -> [u8; 4] { match self { - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::approve(_) => ::SELECTOR, + Self::balanceOf(_) => { + ::SELECTOR } - Self::GetApproved(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::getApproved(_) => { + ::SELECTOR } - Self::IsApprovedForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::isApprovedForAll(_) => { + ::SELECTOR } - Self::OwnerOf(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SafeTransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::ownerOf(_) => ::SELECTOR, + Self::safeTransferFrom_0(_) => { + ::SELECTOR } - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::safeTransferFrom_1(_) => { + ::SELECTOR } - Self::SetApprovalForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::setApprovalForAll(_) => { + ::SELECTOR } - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::supportsInterface(_) => { + ::SELECTOR } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::transferFrom(_) => { + ::SELECTOR } } } - } - impl ::core::fmt::Display for IERC721Calls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn supportsInterface( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721Calls::supportsInterface) + } + supportsInterface + }, + { + fn getApproved( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721Calls::getApproved) + } + getApproved + }, + { + fn approve( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721Calls::approve) + } + approve + }, + { + fn transferFrom( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721Calls::transferFrom) + } + transferFrom + }, + { + fn safeTransferFrom_0( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721Calls::safeTransferFrom_0) + } + safeTransferFrom_0 + }, + { + fn ownerOf( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721Calls::ownerOf) + } + ownerOf + }, + { + fn balanceOf( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721Calls::balanceOf) + } + balanceOf + }, + { + fn setApprovalForAll( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721Calls::setApprovalForAll) + } + setApprovalForAll + }, + { + fn safeTransferFrom_1( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721Calls::safeTransferFrom_1) + } + safeTransferFrom_1 + }, + { + fn isApprovedForAll( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721Calls::isApprovedForAll) + } + isApprovedForAll + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { match self { - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f), - Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::core::fmt::Display::fmt(element, f) + Self::approve(inner) => { + ::abi_encoded_size(inner) + } + Self::balanceOf(inner) => { + ::abi_encoded_size(inner) + } + Self::getApproved(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::isApprovedForAll(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::ownerOf(inner) => { + ::abi_encoded_size(inner) + } + Self::safeTransferFrom_0(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::safeTransferFrom_1(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::setApprovalForAll(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::supportsInterface(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::transferFrom(inner) => { + ::abi_encoded_size( + inner, + ) } - Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), } } - } - impl ::core::convert::From for IERC721Calls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::approve(inner) => { + ::abi_encode_raw(inner, out) + } + Self::balanceOf(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::getApproved(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::isApprovedForAll(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ownerOf(inner) => { + ::abi_encode_raw(inner, out) + } + Self::safeTransferFrom_0(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::safeTransferFrom_1(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::setApprovalForAll(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::supportsInterface(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::transferFrom(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } } } - impl ::core::convert::From for IERC721Calls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } + ///Container for all the [`IERC721`](self) events. + pub enum IERC721Events { + Approval(Approval), + ApprovalForAll(ApprovalForAll), + Transfer(Transfer), } - impl ::core::convert::From for IERC721Calls { - fn from(value: GetApprovedCall) -> Self { - Self::GetApproved(value) - } + #[automatically_derived] + impl IERC721Events { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 23u8, + 48u8, + 126u8, + 171u8, + 57u8, + 171u8, + 97u8, + 7u8, + 232u8, + 137u8, + 152u8, + 69u8, + 173u8, + 61u8, + 89u8, + 189u8, + 150u8, + 83u8, + 242u8, + 0u8, + 242u8, + 32u8, + 146u8, + 4u8, + 137u8, + 202u8, + 43u8, + 89u8, + 55u8, + 105u8, + 108u8, + 49u8, + ], + [ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ], + [ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ], + ]; } - impl ::core::convert::From for IERC721Calls { - fn from(value: IsApprovedForAllCall) -> Self { - Self::IsApprovedForAll(value) + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for IERC721Events { + const NAME: &'static str = "IERC721Events"; + const COUNT: usize = 3usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Approval) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::ApprovalForAll) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Transfer) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } } } - impl ::core::convert::From for IERC721Calls { - fn from(value: OwnerOfCall) -> Self { - Self::OwnerOf(value) + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for IERC721Events { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`IERC721`](self) contract instance. + +See the [wrapper's documentation](`IERC721Instance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> IERC721Instance { + IERC721Instance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + IERC721Instance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + IERC721Instance::::deploy_builder(provider) } - impl ::core::convert::From for IERC721Calls { - fn from(value: SafeTransferFromCall) -> Self { - Self::SafeTransferFrom(value) + /**A [`IERC721`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`IERC721`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct IERC721Instance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for IERC721Instance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("IERC721Instance").field(&self.address).finish() } } - impl ::core::convert::From - for IERC721Calls { - fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self { - Self::SafeTransferFromWithFromAndToAndData(value) + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721Instance { + /**Creates a new wrapper around an on-chain [`IERC721`](self) contract instance. + +See the [wrapper's documentation](`IERC721Instance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider } } - impl ::core::convert::From for IERC721Calls { - fn from(value: SetApprovalForAllCall) -> Self { - Self::SetApprovalForAll(value) + impl IERC721Instance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> IERC721Instance { + IERC721Instance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } } } - impl ::core::convert::From for IERC721Calls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721Instance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`approve`] function. + pub fn approve( + &self, + _approved: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&approveCall { _approved, _tokenId }) + } + ///Creates a new call builder for the [`balanceOf`] function. + pub fn balanceOf( + &self, + _owner: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&balanceOfCall { _owner }) + } + ///Creates a new call builder for the [`getApproved`] function. + pub fn getApproved( + &self, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&getApprovedCall { _tokenId }) + } + ///Creates a new call builder for the [`isApprovedForAll`] function. + pub fn isApprovedForAll( + &self, + _owner: alloy::sol_types::private::Address, + _operator: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &isApprovedForAllCall { + _owner, + _operator, + }, + ) + } + ///Creates a new call builder for the [`ownerOf`] function. + pub fn ownerOf( + &self, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&ownerOfCall { _tokenId }) + } + ///Creates a new call builder for the [`safeTransferFrom_0`] function. + pub fn safeTransferFrom_0( + &self, + _from: alloy::sol_types::private::Address, + _to: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &safeTransferFrom_0Call { + _from, + _to, + _tokenId, + }, + ) + } + ///Creates a new call builder for the [`safeTransferFrom_1`] function. + pub fn safeTransferFrom_1( + &self, + _from: alloy::sol_types::private::Address, + _to: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + data: alloy::sol_types::private::Bytes, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &safeTransferFrom_1Call { + _from, + _to, + _tokenId, + data, + }, + ) + } + ///Creates a new call builder for the [`setApprovalForAll`] function. + pub fn setApprovalForAll( + &self, + _operator: alloy::sol_types::private::Address, + _approved: bool, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &setApprovalForAllCall { + _operator, + _approved, + }, + ) + } + ///Creates a new call builder for the [`supportsInterface`] function. + pub fn supportsInterface( + &self, + interfaceID: alloy::sol_types::private::FixedBytes<4>, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &supportsInterfaceCall { + interfaceID, + }, + ) + } + ///Creates a new call builder for the [`transferFrom`] function. + pub fn transferFrom( + &self, + _from: alloy::sol_types::private::Address, + _to: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &transferFromCall { + _from, + _to, + _tokenId, + }, + ) } } - impl ::core::convert::From for IERC721Calls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721Instance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`Approval`] event. + pub fn Approval_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`ApprovalForAll`] event. + pub fn ApprovalForAll_filter( + &self, + ) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`Transfer`] event. + pub fn Transfer_filter(&self) -> alloy_contract::Event { + self.event_filter::() } } - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetApprovedReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct IsApprovedForAllReturn(pub bool); - ///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct OwnerOfReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); } diff --git a/crates/bindings/src/ierc721_enumerable.rs b/crates/bindings/src/ierc721_enumerable.rs deleted file mode 100644 index 77ee05f..0000000 --- a/crates/bindings/src/ierc721_enumerable.rs +++ /dev/null @@ -1,1447 +0,0 @@ -pub use ierc721_enumerable::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc721_enumerable { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getApproved"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getApproved"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ownerOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("ownerOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("supportsInterface"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("supportsInterface"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("interfaceID"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("tokenByIndex"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("tokenByIndex"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_index"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("tokenOfOwnerByIndex"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "tokenOfOwnerByIndex", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_index"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("totalSupply"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("totalSupply"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static IERC721ENUMERABLE_ABI: ::ethers::contract::Lazy< - ::ethers::core::abi::Abi, - > = ::ethers::contract::Lazy::new(__abi); - pub struct IERC721Enumerable(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC721Enumerable { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for IERC721Enumerable { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for IERC721Enumerable { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for IERC721Enumerable { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC721Enumerable)) - .field(&self.address()) - .finish() - } - } - impl IERC721Enumerable { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC721ENUMERABLE_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - approved: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (approved, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], owner) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getApproved` (0x081812fc) function - pub fn get_approved( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([8, 24, 18, 252], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `isApprovedForAll` (0xe985e9c5) function - pub fn is_approved_for_all( - &self, - owner: ::ethers::core::types::Address, - operator: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([233, 133, 233, 197], (owner, operator)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `ownerOf` (0x6352211e) function - pub fn owner_of( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([99, 82, 33, 30], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0x42842e0e) function - pub fn safe_transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([66, 132, 46, 14], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0xb88d4fde) function - pub fn safe_transfer_from_with_from_and_to_and_data( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([184, 141, 79, 222], (from, to, token_id, data)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setApprovalForAll` (0xa22cb465) function - pub fn set_approval_for_all( - &self, - operator: ::ethers::core::types::Address, - approved: bool, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([162, 44, 180, 101], (operator, approved)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `tokenByIndex` (0x4f6ccce7) function - pub fn token_by_index( - &self, - index: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([79, 108, 204, 231], index) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `tokenOfOwnerByIndex` (0x2f745c59) function - pub fn token_of_owner_by_index( - &self, - owner: ::ethers::core::types::Address, - index: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([47, 116, 92, 89], (owner, index)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `totalSupply` (0x18160ddd) function - pub fn total_supply( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([24, 22, 13, 221], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `ApprovalForAll` event - pub fn approval_for_all_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalForAllFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - IERC721EnumerableEvents, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for IERC721Enumerable { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub approved: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")] - pub struct ApprovalForAllFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721EnumerableEvents { - ApprovalFilter(ApprovalFilter), - ApprovalForAllFilter(ApprovalForAllFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for IERC721EnumerableEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(IERC721EnumerableEvents::ApprovalFilter(decoded)); - } - if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) { - return Ok(IERC721EnumerableEvents::ApprovalForAllFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(IERC721EnumerableEvents::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for IERC721EnumerableEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ApprovalForAllFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC721EnumerableEvents { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for IERC721EnumerableEvents { - fn from(value: ApprovalForAllFilter) -> Self { - Self::ApprovalForAllFilter(value) - } - } - impl ::core::convert::From for IERC721EnumerableEvents { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub approved: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getApproved", abi = "getApproved(uint256)")] - pub struct GetApprovedCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")] - pub struct IsApprovedForAllCall { - pub owner: ::ethers::core::types::Address, - pub operator: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")] - pub struct OwnerOfCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256)" - )] - pub struct SafeTransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256,bytes)" - )] - pub struct SafeTransferFromWithFromAndToAndDataCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")] - pub struct SetApprovalForAllCall { - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all input parameters for the `tokenByIndex` function with signature `tokenByIndex(uint256)` and selector `0x4f6ccce7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "tokenByIndex", abi = "tokenByIndex(uint256)")] - pub struct TokenByIndexCall { - pub index: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `tokenOfOwnerByIndex` function with signature `tokenOfOwnerByIndex(address,uint256)` and selector `0x2f745c59` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "tokenOfOwnerByIndex", - abi = "tokenOfOwnerByIndex(address,uint256)" - )] - pub struct TokenOfOwnerByIndexCall { - pub owner: ::ethers::core::types::Address, - pub index: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "totalSupply", abi = "totalSupply()")] - pub struct TotalSupplyCall; - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721EnumerableCalls { - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - GetApproved(GetApprovedCall), - IsApprovedForAll(IsApprovedForAllCall), - OwnerOf(OwnerOfCall), - SafeTransferFrom(SafeTransferFromCall), - SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall), - SetApprovalForAll(SetApprovalForAllCall), - SupportsInterface(SupportsInterfaceCall), - TokenByIndex(TokenByIndexCall), - TokenOfOwnerByIndex(TokenOfOwnerByIndexCall), - TotalSupply(TotalSupplyCall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for IERC721EnumerableCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetApproved(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IsApprovedForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OwnerOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFrom(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetApprovalForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SupportsInterface(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TokenByIndex(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TokenOfOwnerByIndex(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TotalSupply(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IERC721EnumerableCalls { - fn encode(self) -> Vec { - match self { - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetApproved(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::IsApprovedForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OwnerOf(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SafeTransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SetApprovalForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TokenByIndex(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TokenOfOwnerByIndex(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TotalSupply(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for IERC721EnumerableCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f), - Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - Self::TokenByIndex(element) => ::core::fmt::Display::fmt(element, f), - Self::TokenOfOwnerByIndex(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: GetApprovedCall) -> Self { - Self::GetApproved(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: IsApprovedForAllCall) -> Self { - Self::IsApprovedForAll(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: OwnerOfCall) -> Self { - Self::OwnerOf(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: SafeTransferFromCall) -> Self { - Self::SafeTransferFrom(value) - } - } - impl ::core::convert::From - for IERC721EnumerableCalls { - fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self { - Self::SafeTransferFromWithFromAndToAndData(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: SetApprovalForAllCall) -> Self { - Self::SetApprovalForAll(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: TokenByIndexCall) -> Self { - Self::TokenByIndex(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: TokenOfOwnerByIndexCall) -> Self { - Self::TokenOfOwnerByIndex(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: TotalSupplyCall) -> Self { - Self::TotalSupply(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetApprovedReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct IsApprovedForAllReturn(pub bool); - ///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct OwnerOfReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); - ///Container type for all return fields from the `tokenByIndex` function with signature `tokenByIndex(uint256)` and selector `0x4f6ccce7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TokenByIndexReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `tokenOfOwnerByIndex` function with signature `tokenOfOwnerByIndex(address,uint256)` and selector `0x2f745c59` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TokenOfOwnerByIndexReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TotalSupplyReturn(pub ::ethers::core::types::U256); -} diff --git a/crates/bindings/src/ierc721_metadata.rs b/crates/bindings/src/ierc721_metadata.rs deleted file mode 100644 index 6f150e7..0000000 --- a/crates/bindings/src/ierc721_metadata.rs +++ /dev/null @@ -1,1412 +0,0 @@ -pub use ierc721_metadata::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc721_metadata { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getApproved"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getApproved"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("name"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("name"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_name"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ownerOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("ownerOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("supportsInterface"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("supportsInterface"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("interfaceID"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("symbol"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("symbol"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_symbol"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("tokenURI"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("tokenURI"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static IERC721METADATA_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct IERC721Metadata(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC721Metadata { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for IERC721Metadata { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for IERC721Metadata { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for IERC721Metadata { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC721Metadata)) - .field(&self.address()) - .finish() - } - } - impl IERC721Metadata { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC721METADATA_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - approved: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (approved, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], owner) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getApproved` (0x081812fc) function - pub fn get_approved( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([8, 24, 18, 252], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `isApprovedForAll` (0xe985e9c5) function - pub fn is_approved_for_all( - &self, - owner: ::ethers::core::types::Address, - operator: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([233, 133, 233, 197], (owner, operator)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `name` (0x06fdde03) function - pub fn name( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([6, 253, 222, 3], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `ownerOf` (0x6352211e) function - pub fn owner_of( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([99, 82, 33, 30], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0x42842e0e) function - pub fn safe_transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([66, 132, 46, 14], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0xb88d4fde) function - pub fn safe_transfer_from_with_from_and_to_and_data( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([184, 141, 79, 222], (from, to, token_id, data)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setApprovalForAll` (0xa22cb465) function - pub fn set_approval_for_all( - &self, - operator: ::ethers::core::types::Address, - approved: bool, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([162, 44, 180, 101], (operator, approved)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `symbol` (0x95d89b41) function - pub fn symbol( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([149, 216, 155, 65], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `tokenURI` (0xc87b56dd) function - pub fn token_uri( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([200, 123, 86, 221], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `ApprovalForAll` event - pub fn approval_for_all_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalForAllFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - IERC721MetadataEvents, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for IERC721Metadata { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub approved: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")] - pub struct ApprovalForAllFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721MetadataEvents { - ApprovalFilter(ApprovalFilter), - ApprovalForAllFilter(ApprovalForAllFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for IERC721MetadataEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(IERC721MetadataEvents::ApprovalFilter(decoded)); - } - if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) { - return Ok(IERC721MetadataEvents::ApprovalForAllFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(IERC721MetadataEvents::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for IERC721MetadataEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ApprovalForAllFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC721MetadataEvents { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for IERC721MetadataEvents { - fn from(value: ApprovalForAllFilter) -> Self { - Self::ApprovalForAllFilter(value) - } - } - impl ::core::convert::From for IERC721MetadataEvents { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub approved: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getApproved", abi = "getApproved(uint256)")] - pub struct GetApprovedCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")] - pub struct IsApprovedForAllCall { - pub owner: ::ethers::core::types::Address, - pub operator: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "name", abi = "name()")] - pub struct NameCall; - ///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")] - pub struct OwnerOfCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256)" - )] - pub struct SafeTransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256,bytes)" - )] - pub struct SafeTransferFromWithFromAndToAndDataCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")] - pub struct SetApprovalForAllCall { - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "symbol", abi = "symbol()")] - pub struct SymbolCall; - ///Container type for all input parameters for the `tokenURI` function with signature `tokenURI(uint256)` and selector `0xc87b56dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "tokenURI", abi = "tokenURI(uint256)")] - pub struct TokenURICall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721MetadataCalls { - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - GetApproved(GetApprovedCall), - IsApprovedForAll(IsApprovedForAllCall), - Name(NameCall), - OwnerOf(OwnerOfCall), - SafeTransferFrom(SafeTransferFromCall), - SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall), - SetApprovalForAll(SetApprovalForAllCall), - SupportsInterface(SupportsInterfaceCall), - Symbol(SymbolCall), - TokenURI(TokenURICall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for IERC721MetadataCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetApproved(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IsApprovedForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Name(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OwnerOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFrom(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetApprovalForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SupportsInterface(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Symbol(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TokenURI(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IERC721MetadataCalls { - fn encode(self) -> Vec { - match self { - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetApproved(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::IsApprovedForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OwnerOf(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SafeTransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SetApprovalForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TokenURI(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for IERC721MetadataCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f), - Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::Name(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), - Self::TokenURI(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: GetApprovedCall) -> Self { - Self::GetApproved(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: IsApprovedForAllCall) -> Self { - Self::IsApprovedForAll(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: NameCall) -> Self { - Self::Name(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: OwnerOfCall) -> Self { - Self::OwnerOf(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: SafeTransferFromCall) -> Self { - Self::SafeTransferFrom(value) - } - } - impl ::core::convert::From - for IERC721MetadataCalls { - fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self { - Self::SafeTransferFromWithFromAndToAndData(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: SetApprovalForAllCall) -> Self { - Self::SetApprovalForAll(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: SymbolCall) -> Self { - Self::Symbol(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: TokenURICall) -> Self { - Self::TokenURI(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetApprovedReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct IsApprovedForAllReturn(pub bool); - ///Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NameReturn { - pub name: ::std::string::String, - } - ///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct OwnerOfReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); - ///Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SymbolReturn { - pub symbol: ::std::string::String, - } - ///Container type for all return fields from the `tokenURI` function with signature `tokenURI(uint256)` and selector `0xc87b56dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TokenURIReturn(pub ::std::string::String); -} diff --git a/crates/bindings/src/ierc721_token_receiver.rs b/crates/bindings/src/ierc721_token_receiver.rs deleted file mode 100644 index c2a4062..0000000 --- a/crates/bindings/src/ierc721_token_receiver.rs +++ /dev/null @@ -1,177 +0,0 @@ -pub use ierc721_token_receiver::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc721_token_receiver { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("onERC721Received"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onERC721Received"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static IERC721TOKENRECEIVER_ABI: ::ethers::contract::Lazy< - ::ethers::core::abi::Abi, - > = ::ethers::contract::Lazy::new(__abi); - pub struct IERC721TokenReceiver(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC721TokenReceiver { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for IERC721TokenReceiver { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for IERC721TokenReceiver { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for IERC721TokenReceiver { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC721TokenReceiver)) - .field(&self.address()) - .finish() - } - } - impl IERC721TokenReceiver { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC721TOKENRECEIVER_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `onERC721Received` (0x150b7a02) function - pub fn on_erc721_received( - &self, - operator: ::ethers::core::types::Address, - from: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([21, 11, 122, 2], (operator, from, token_id, data)) - .expect("method not found (this should never happen)") - } - } - impl From<::ethers::contract::Contract> - for IERC721TokenReceiver { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Container type for all input parameters for the `onERC721Received` function with signature `onERC721Received(address,address,uint256,bytes)` and selector `0x150b7a02` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onERC721Received", - abi = "onERC721Received(address,address,uint256,bytes)" - )] - pub struct OnERC721ReceivedCall { - pub operator: ::ethers::core::types::Address, - pub from: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all return fields from the `onERC721Received` function with signature `onERC721Received(address,address,uint256,bytes)` and selector `0x150b7a02` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct OnERC721ReceivedReturn(pub [u8; 4]); -} diff --git a/crates/bindings/src/ierc721enumerable.rs b/crates/bindings/src/ierc721enumerable.rs new file mode 100644 index 0000000..174e877 --- /dev/null +++ b/crates/bindings/src/ierc721enumerable.rs @@ -0,0 +1,3438 @@ +/** + +Generated by the following Solidity interface... +```solidity +interface IERC721Enumerable { + event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); + event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); + event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); + + function approve(address _approved, uint256 _tokenId) external payable; + function balanceOf(address _owner) external view returns (uint256); + function getApproved(uint256 _tokenId) external view returns (address); + function isApprovedForAll(address _owner, address _operator) external view returns (bool); + function ownerOf(uint256 _tokenId) external view returns (address); + function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; + function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; + function setApprovalForAll(address _operator, bool _approved) external; + function supportsInterface(bytes4 interfaceID) external view returns (bool); + function tokenByIndex(uint256 _index) external view returns (uint256); + function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256); + function totalSupply() external view returns (uint256); + function transferFrom(address _from, address _to, uint256 _tokenId) external payable; +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "_approved", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "_owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getApproved", + "inputs": [ + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isApprovedForAll", + "inputs": [ + { + "name": "_owner", + "type": "address", + "internalType": "address" + }, + { + "name": "_operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "ownerOf", + "inputs": [ + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "setApprovalForAll", + "inputs": [ + { + "name": "_operator", + "type": "address", + "internalType": "address" + }, + { + "name": "_approved", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceID", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenByIndex", + "inputs": [ + { + "name": "_index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenOfOwnerByIndex", + "inputs": [ + { + "name": "_owner", + "type": "address", + "internalType": "address" + }, + { + "name": "_index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "_owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_approved", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ApprovalForAll", + "inputs": [ + { + "name": "_owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_approved", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "_from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod IERC721Enumerable { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. +```solidity +event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct Approval { + #[allow(missing_docs)] + pub _owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _approved: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _tokenId: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Approval { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "Approval(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _owner: topics.1, + _approved: topics.2, + _tokenId: topics.3, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self._owner.clone(), + self._approved.clone(), + self._tokenId.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._owner, + ); + out[2usize] = ::encode_topic( + &self._approved, + ); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Approval> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Approval) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. +```solidity +event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct ApprovalForAll { + #[allow(missing_docs)] + pub _owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _operator: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _approved: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for ApprovalForAll { + type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 23u8, + 48u8, + 126u8, + 171u8, + 57u8, + 171u8, + 97u8, + 7u8, + 232u8, + 137u8, + 152u8, + 69u8, + 173u8, + 61u8, + 89u8, + 189u8, + 150u8, + 83u8, + 242u8, + 0u8, + 242u8, + 32u8, + 146u8, + 4u8, + 137u8, + 202u8, + 43u8, + 89u8, + 55u8, + 105u8, + 108u8, + 49u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _owner: topics.1, + _operator: topics.2, + _approved: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + ::tokenize( + &self._approved, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self._owner.clone(), + self._operator.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._owner, + ); + out[2usize] = ::encode_topic( + &self._operator, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for ApprovalForAll { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&ApprovalForAll> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. +```solidity +event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct Transfer { + #[allow(missing_docs)] + pub _from: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _to: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _tokenId: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Transfer { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _from: topics.1, + _to: topics.2, + _tokenId: topics.3, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self._from.clone(), + self._to.clone(), + self._tokenId.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._from, + ); + out[2usize] = ::encode_topic( + &self._to, + ); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Transfer> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Transfer) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. +```solidity +function approve(address _approved, uint256 _tokenId) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveCall { + pub _approved: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveCall) -> Self { + (value._approved, value._tokenId) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _approved: tuple.0, + _tokenId: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for approveCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = approveReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "approve(address,uint256)"; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._approved, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `balanceOf(address)` and selector `0x70a08231`. +```solidity +function balanceOf(address _owner) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfCall { + pub _owner: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfCall) -> Self { + (value._owner,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _owner: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for balanceOfCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = balanceOfReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "balanceOf(address)"; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._owner, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. +```solidity +function getApproved(uint256 _tokenId) external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct getApprovedCall { + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`getApproved(uint256)`](getApprovedCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct getApprovedReturn { + pub _0: alloy::sol_types::private::Address, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getApprovedCall) -> Self { + (value._tokenId,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getApprovedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _tokenId: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getApprovedReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getApprovedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for getApprovedCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = getApprovedReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getApproved(uint256)"; + const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. +```solidity +function isApprovedForAll(address _owner, address _operator) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct isApprovedForAllCall { + pub _owner: alloy::sol_types::private::Address, + pub _operator: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`isApprovedForAll(address,address)`](isApprovedForAllCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct isApprovedForAllReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: isApprovedForAllCall) -> Self { + (value._owner, value._operator) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for isApprovedForAllCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _owner: tuple.0, + _operator: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: isApprovedForAllReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for isApprovedForAllReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for isApprovedForAllCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = isApprovedForAllReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; + const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._owner, + ), + ::tokenize( + &self._operator, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. +```solidity +function ownerOf(uint256 _tokenId) external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct ownerOfCall { + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`ownerOf(uint256)`](ownerOfCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct ownerOfReturn { + pub _0: alloy::sol_types::private::Address, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ownerOfCall) -> Self { + (value._tokenId,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ownerOfCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _tokenId: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ownerOfReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ownerOfReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for ownerOfCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = ownerOfReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ownerOf(uint256)"; + const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. +```solidity +function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_0Call { + pub _from: alloy::sol_types::private::Address, + pub _to: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256)`](safeTransferFrom_0Call) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_0Return {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_0Call) -> Self { + (value._from, value._to, value._tokenId) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_0Call { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _from: tuple.0, + _to: tuple.1, + _tokenId: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_0Return) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_0Return { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for safeTransferFrom_0Call { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = safeTransferFrom_0Return; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; + const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._from, + ), + ::tokenize( + &self._to, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. +```solidity +function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_1Call { + pub _from: alloy::sol_types::private::Address, + pub _to: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, + pub data: alloy::sol_types::private::Bytes, + } + ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256,bytes)`](safeTransferFrom_1Call) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_1Return {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Bytes, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + alloy::sol_types::private::Bytes, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_1Call) -> Self { + (value._from, value._to, value._tokenId, value.data) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_1Call { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _from: tuple.0, + _to: tuple.1, + _tokenId: tuple.2, + data: tuple.3, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_1Return) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_1Return { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for safeTransferFrom_1Call { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Bytes, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = safeTransferFrom_1Return; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; + const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._from, + ), + ::tokenize( + &self._to, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ::tokenize( + &self.data, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. +```solidity +function setApprovalForAll(address _operator, bool _approved) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct setApprovalForAllCall { + pub _operator: alloy::sol_types::private::Address, + pub _approved: bool, + } + ///Container type for the return parameters of the [`setApprovalForAll(address,bool)`](setApprovalForAllCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct setApprovalForAllReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Bool, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: setApprovalForAllCall) -> Self { + (value._operator, value._approved) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for setApprovalForAllCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _operator: tuple.0, + _approved: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: setApprovalForAllReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for setApprovalForAllReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for setApprovalForAllCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Bool, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = setApprovalForAllReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; + const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._operator, + ), + ::tokenize( + &self._approved, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. +```solidity +function supportsInterface(bytes4 interfaceID) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct supportsInterfaceCall { + pub interfaceID: alloy::sol_types::private::FixedBytes<4>, + } + ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct supportsInterfaceReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceCall) -> Self { + (value.interfaceID,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { interfaceID: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for supportsInterfaceCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = supportsInterfaceReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "supportsInterface(bytes4)"; + const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.interfaceID), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `tokenByIndex(uint256)` and selector `0x4f6ccce7`. +```solidity +function tokenByIndex(uint256 _index) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct tokenByIndexCall { + pub _index: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`tokenByIndex(uint256)`](tokenByIndexCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct tokenByIndexReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: tokenByIndexCall) -> Self { + (value._index,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for tokenByIndexCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _index: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: tokenByIndexReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for tokenByIndexReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for tokenByIndexCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = tokenByIndexReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "tokenByIndex(uint256)"; + const SELECTOR: [u8; 4] = [79u8, 108u8, 204u8, 231u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._index), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `tokenOfOwnerByIndex(address,uint256)` and selector `0x2f745c59`. +```solidity +function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct tokenOfOwnerByIndexCall { + pub _owner: alloy::sol_types::private::Address, + pub _index: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`tokenOfOwnerByIndex(address,uint256)`](tokenOfOwnerByIndexCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct tokenOfOwnerByIndexReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: tokenOfOwnerByIndexCall) -> Self { + (value._owner, value._index) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for tokenOfOwnerByIndexCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _owner: tuple.0, + _index: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: tokenOfOwnerByIndexReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for tokenOfOwnerByIndexReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for tokenOfOwnerByIndexCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = tokenOfOwnerByIndexReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "tokenOfOwnerByIndex(address,uint256)"; + const SELECTOR: [u8; 4] = [47u8, 116u8, 92u8, 89u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._owner, + ), + as alloy_sol_types::SolType>::tokenize(&self._index), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `totalSupply()` and selector `0x18160ddd`. +```solidity +function totalSupply() external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct totalSupplyCall {} + ///Container type for the return parameters of the [`totalSupply()`](totalSupplyCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct totalSupplyReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: totalSupplyCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for totalSupplyCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: totalSupplyReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for totalSupplyReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for totalSupplyCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = totalSupplyReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "totalSupply()"; + const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. +```solidity +function transferFrom(address _from, address _to, uint256 _tokenId) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromCall { + pub _from: alloy::sol_types::private::Address, + pub _to: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromCall) -> Self { + (value._from, value._to, value._tokenId) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _from: tuple.0, + _to: tuple.1, + _tokenId: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for transferFromCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = transferFromReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._from, + ), + ::tokenize( + &self._to, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + ///Container for all the [`IERC721Enumerable`](self) function calls. + pub enum IERC721EnumerableCalls { + approve(approveCall), + balanceOf(balanceOfCall), + getApproved(getApprovedCall), + isApprovedForAll(isApprovedForAllCall), + ownerOf(ownerOfCall), + safeTransferFrom_0(safeTransferFrom_0Call), + safeTransferFrom_1(safeTransferFrom_1Call), + setApprovalForAll(setApprovalForAllCall), + supportsInterface(supportsInterfaceCall), + tokenByIndex(tokenByIndexCall), + tokenOfOwnerByIndex(tokenOfOwnerByIndexCall), + totalSupply(totalSupplyCall), + transferFrom(transferFromCall), + } + #[automatically_derived] + impl IERC721EnumerableCalls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [1u8, 255u8, 201u8, 167u8], + [8u8, 24u8, 18u8, 252u8], + [9u8, 94u8, 167u8, 179u8], + [24u8, 22u8, 13u8, 221u8], + [35u8, 184u8, 114u8, 221u8], + [47u8, 116u8, 92u8, 89u8], + [66u8, 132u8, 46u8, 14u8], + [79u8, 108u8, 204u8, 231u8], + [99u8, 82u8, 33u8, 30u8], + [112u8, 160u8, 130u8, 49u8], + [162u8, 44u8, 180u8, 101u8], + [184u8, 141u8, 79u8, 222u8], + [233u8, 133u8, 233u8, 197u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for IERC721EnumerableCalls { + const NAME: &'static str = "IERC721EnumerableCalls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 13usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::approve(_) => ::SELECTOR, + Self::balanceOf(_) => { + ::SELECTOR + } + Self::getApproved(_) => { + ::SELECTOR + } + Self::isApprovedForAll(_) => { + ::SELECTOR + } + Self::ownerOf(_) => ::SELECTOR, + Self::safeTransferFrom_0(_) => { + ::SELECTOR + } + Self::safeTransferFrom_1(_) => { + ::SELECTOR + } + Self::setApprovalForAll(_) => { + ::SELECTOR + } + Self::supportsInterface(_) => { + ::SELECTOR + } + Self::tokenByIndex(_) => { + ::SELECTOR + } + Self::tokenOfOwnerByIndex(_) => { + ::SELECTOR + } + Self::totalSupply(_) => { + ::SELECTOR + } + Self::transferFrom(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn supportsInterface( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::supportsInterface) + } + supportsInterface + }, + { + fn getApproved( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::getApproved) + } + getApproved + }, + { + fn approve( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::approve) + } + approve + }, + { + fn totalSupply( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::totalSupply) + } + totalSupply + }, + { + fn transferFrom( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::transferFrom) + } + transferFrom + }, + { + fn tokenOfOwnerByIndex( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::tokenOfOwnerByIndex) + } + tokenOfOwnerByIndex + }, + { + fn safeTransferFrom_0( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::safeTransferFrom_0) + } + safeTransferFrom_0 + }, + { + fn tokenByIndex( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::tokenByIndex) + } + tokenByIndex + }, + { + fn ownerOf( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::ownerOf) + } + ownerOf + }, + { + fn balanceOf( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::balanceOf) + } + balanceOf + }, + { + fn setApprovalForAll( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::setApprovalForAll) + } + setApprovalForAll + }, + { + fn safeTransferFrom_1( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::safeTransferFrom_1) + } + safeTransferFrom_1 + }, + { + fn isApprovedForAll( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721EnumerableCalls::isApprovedForAll) + } + isApprovedForAll + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::approve(inner) => { + ::abi_encoded_size(inner) + } + Self::balanceOf(inner) => { + ::abi_encoded_size(inner) + } + Self::getApproved(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::isApprovedForAll(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::ownerOf(inner) => { + ::abi_encoded_size(inner) + } + Self::safeTransferFrom_0(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::safeTransferFrom_1(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::setApprovalForAll(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::supportsInterface(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::tokenByIndex(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::tokenOfOwnerByIndex(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::totalSupply(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::transferFrom(inner) => { + ::abi_encoded_size( + inner, + ) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::approve(inner) => { + ::abi_encode_raw(inner, out) + } + Self::balanceOf(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::getApproved(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::isApprovedForAll(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ownerOf(inner) => { + ::abi_encode_raw(inner, out) + } + Self::safeTransferFrom_0(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::safeTransferFrom_1(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::setApprovalForAll(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::supportsInterface(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::tokenByIndex(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::tokenOfOwnerByIndex(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::totalSupply(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::transferFrom(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + ///Container for all the [`IERC721Enumerable`](self) events. + pub enum IERC721EnumerableEvents { + Approval(Approval), + ApprovalForAll(ApprovalForAll), + Transfer(Transfer), + } + #[automatically_derived] + impl IERC721EnumerableEvents { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 23u8, + 48u8, + 126u8, + 171u8, + 57u8, + 171u8, + 97u8, + 7u8, + 232u8, + 137u8, + 152u8, + 69u8, + 173u8, + 61u8, + 89u8, + 189u8, + 150u8, + 83u8, + 242u8, + 0u8, + 242u8, + 32u8, + 146u8, + 4u8, + 137u8, + 202u8, + 43u8, + 89u8, + 55u8, + 105u8, + 108u8, + 49u8, + ], + [ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ], + [ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for IERC721EnumerableEvents { + const NAME: &'static str = "IERC721EnumerableEvents"; + const COUNT: usize = 3usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Approval) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::ApprovalForAll) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Transfer) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for IERC721EnumerableEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`IERC721Enumerable`](self) contract instance. + +See the [wrapper's documentation](`IERC721EnumerableInstance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> IERC721EnumerableInstance { + IERC721EnumerableInstance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + IERC721EnumerableInstance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + IERC721EnumerableInstance::::deploy_builder(provider) + } + /**A [`IERC721Enumerable`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`IERC721Enumerable`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct IERC721EnumerableInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for IERC721EnumerableInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("IERC721EnumerableInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721EnumerableInstance { + /**Creates a new wrapper around an on-chain [`IERC721Enumerable`](self) contract instance. + +See the [wrapper's documentation](`IERC721EnumerableInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl IERC721EnumerableInstance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> IERC721EnumerableInstance { + IERC721EnumerableInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721EnumerableInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`approve`] function. + pub fn approve( + &self, + _approved: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&approveCall { _approved, _tokenId }) + } + ///Creates a new call builder for the [`balanceOf`] function. + pub fn balanceOf( + &self, + _owner: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&balanceOfCall { _owner }) + } + ///Creates a new call builder for the [`getApproved`] function. + pub fn getApproved( + &self, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&getApprovedCall { _tokenId }) + } + ///Creates a new call builder for the [`isApprovedForAll`] function. + pub fn isApprovedForAll( + &self, + _owner: alloy::sol_types::private::Address, + _operator: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &isApprovedForAllCall { + _owner, + _operator, + }, + ) + } + ///Creates a new call builder for the [`ownerOf`] function. + pub fn ownerOf( + &self, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&ownerOfCall { _tokenId }) + } + ///Creates a new call builder for the [`safeTransferFrom_0`] function. + pub fn safeTransferFrom_0( + &self, + _from: alloy::sol_types::private::Address, + _to: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &safeTransferFrom_0Call { + _from, + _to, + _tokenId, + }, + ) + } + ///Creates a new call builder for the [`safeTransferFrom_1`] function. + pub fn safeTransferFrom_1( + &self, + _from: alloy::sol_types::private::Address, + _to: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + data: alloy::sol_types::private::Bytes, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &safeTransferFrom_1Call { + _from, + _to, + _tokenId, + data, + }, + ) + } + ///Creates a new call builder for the [`setApprovalForAll`] function. + pub fn setApprovalForAll( + &self, + _operator: alloy::sol_types::private::Address, + _approved: bool, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &setApprovalForAllCall { + _operator, + _approved, + }, + ) + } + ///Creates a new call builder for the [`supportsInterface`] function. + pub fn supportsInterface( + &self, + interfaceID: alloy::sol_types::private::FixedBytes<4>, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &supportsInterfaceCall { + interfaceID, + }, + ) + } + ///Creates a new call builder for the [`tokenByIndex`] function. + pub fn tokenByIndex( + &self, + _index: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&tokenByIndexCall { _index }) + } + ///Creates a new call builder for the [`tokenOfOwnerByIndex`] function. + pub fn tokenOfOwnerByIndex( + &self, + _owner: alloy::sol_types::private::Address, + _index: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &tokenOfOwnerByIndexCall { + _owner, + _index, + }, + ) + } + ///Creates a new call builder for the [`totalSupply`] function. + pub fn totalSupply( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&totalSupplyCall {}) + } + ///Creates a new call builder for the [`transferFrom`] function. + pub fn transferFrom( + &self, + _from: alloy::sol_types::private::Address, + _to: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &transferFromCall { + _from, + _to, + _tokenId, + }, + ) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721EnumerableInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`Approval`] event. + pub fn Approval_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`ApprovalForAll`] event. + pub fn ApprovalForAll_filter( + &self, + ) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`Transfer`] event. + pub fn Transfer_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + } +} diff --git a/crates/bindings/src/ierc721metadata.rs b/crates/bindings/src/ierc721metadata.rs new file mode 100644 index 0000000..f966df4 --- /dev/null +++ b/crates/bindings/src/ierc721metadata.rs @@ -0,0 +1,3372 @@ +/** + +Generated by the following Solidity interface... +```solidity +interface IERC721Metadata { + event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); + event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); + event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); + + function approve(address _approved, uint256 _tokenId) external payable; + function balanceOf(address _owner) external view returns (uint256); + function getApproved(uint256 _tokenId) external view returns (address); + function isApprovedForAll(address _owner, address _operator) external view returns (bool); + function name() external view returns (string memory _name); + function ownerOf(uint256 _tokenId) external view returns (address); + function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; + function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; + function setApprovalForAll(address _operator, bool _approved) external; + function supportsInterface(bytes4 interfaceID) external view returns (bool); + function symbol() external view returns (string memory _symbol); + function tokenURI(uint256 _tokenId) external view returns (string memory); + function transferFrom(address _from, address _to, uint256 _tokenId) external payable; +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "_approved", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "_owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getApproved", + "inputs": [ + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isApprovedForAll", + "inputs": [ + { + "name": "_owner", + "type": "address", + "internalType": "address" + }, + { + "name": "_operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "_name", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "ownerOf", + "inputs": [ + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "setApprovalForAll", + "inputs": [ + { + "name": "_operator", + "type": "address", + "internalType": "address" + }, + { + "name": "_approved", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceID", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "_symbol", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenURI", + "inputs": [ + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "_owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_approved", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ApprovalForAll", + "inputs": [ + { + "name": "_owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_approved", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "_from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod IERC721Metadata { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. +```solidity +event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct Approval { + #[allow(missing_docs)] + pub _owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _approved: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _tokenId: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Approval { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "Approval(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _owner: topics.1, + _approved: topics.2, + _tokenId: topics.3, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self._owner.clone(), + self._approved.clone(), + self._tokenId.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._owner, + ); + out[2usize] = ::encode_topic( + &self._approved, + ); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Approval> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Approval) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. +```solidity +event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct ApprovalForAll { + #[allow(missing_docs)] + pub _owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _operator: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _approved: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for ApprovalForAll { + type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 23u8, + 48u8, + 126u8, + 171u8, + 57u8, + 171u8, + 97u8, + 7u8, + 232u8, + 137u8, + 152u8, + 69u8, + 173u8, + 61u8, + 89u8, + 189u8, + 150u8, + 83u8, + 242u8, + 0u8, + 242u8, + 32u8, + 146u8, + 4u8, + 137u8, + 202u8, + 43u8, + 89u8, + 55u8, + 105u8, + 108u8, + 49u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _owner: topics.1, + _operator: topics.2, + _approved: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + ::tokenize( + &self._approved, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self._owner.clone(), + self._operator.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._owner, + ); + out[2usize] = ::encode_topic( + &self._operator, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for ApprovalForAll { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&ApprovalForAll> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. +```solidity +event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct Transfer { + #[allow(missing_docs)] + pub _from: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _to: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _tokenId: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Transfer { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _from: topics.1, + _to: topics.2, + _tokenId: topics.3, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self._from.clone(), + self._to.clone(), + self._tokenId.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._from, + ); + out[2usize] = ::encode_topic( + &self._to, + ); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Transfer> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Transfer) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. +```solidity +function approve(address _approved, uint256 _tokenId) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveCall { + pub _approved: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveCall) -> Self { + (value._approved, value._tokenId) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _approved: tuple.0, + _tokenId: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for approveCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = approveReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "approve(address,uint256)"; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._approved, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `balanceOf(address)` and selector `0x70a08231`. +```solidity +function balanceOf(address _owner) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfCall { + pub _owner: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfCall) -> Self { + (value._owner,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _owner: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for balanceOfCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = balanceOfReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "balanceOf(address)"; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._owner, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. +```solidity +function getApproved(uint256 _tokenId) external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct getApprovedCall { + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`getApproved(uint256)`](getApprovedCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct getApprovedReturn { + pub _0: alloy::sol_types::private::Address, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getApprovedCall) -> Self { + (value._tokenId,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getApprovedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _tokenId: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getApprovedReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getApprovedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for getApprovedCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = getApprovedReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getApproved(uint256)"; + const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. +```solidity +function isApprovedForAll(address _owner, address _operator) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct isApprovedForAllCall { + pub _owner: alloy::sol_types::private::Address, + pub _operator: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`isApprovedForAll(address,address)`](isApprovedForAllCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct isApprovedForAllReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: isApprovedForAllCall) -> Self { + (value._owner, value._operator) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for isApprovedForAllCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _owner: tuple.0, + _operator: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: isApprovedForAllReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for isApprovedForAllReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for isApprovedForAllCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = isApprovedForAllReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; + const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._owner, + ), + ::tokenize( + &self._operator, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `name()` and selector `0x06fdde03`. +```solidity +function name() external view returns (string memory _name); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct nameCall {} + ///Container type for the return parameters of the [`name()`](nameCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct nameReturn { + pub _name: alloy::sol_types::private::String, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: nameCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for nameCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: nameReturn) -> Self { + (value._name,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for nameReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _name: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for nameCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = nameReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "name()"; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. +```solidity +function ownerOf(uint256 _tokenId) external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct ownerOfCall { + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`ownerOf(uint256)`](ownerOfCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct ownerOfReturn { + pub _0: alloy::sol_types::private::Address, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ownerOfCall) -> Self { + (value._tokenId,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ownerOfCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _tokenId: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ownerOfReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ownerOfReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for ownerOfCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = ownerOfReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ownerOf(uint256)"; + const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. +```solidity +function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_0Call { + pub _from: alloy::sol_types::private::Address, + pub _to: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256)`](safeTransferFrom_0Call) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_0Return {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_0Call) -> Self { + (value._from, value._to, value._tokenId) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_0Call { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _from: tuple.0, + _to: tuple.1, + _tokenId: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_0Return) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_0Return { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for safeTransferFrom_0Call { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = safeTransferFrom_0Return; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; + const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._from, + ), + ::tokenize( + &self._to, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. +```solidity +function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory data) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_1Call { + pub _from: alloy::sol_types::private::Address, + pub _to: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, + pub data: alloy::sol_types::private::Bytes, + } + ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256,bytes)`](safeTransferFrom_1Call) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_1Return {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Bytes, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + alloy::sol_types::private::Bytes, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_1Call) -> Self { + (value._from, value._to, value._tokenId, value.data) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_1Call { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _from: tuple.0, + _to: tuple.1, + _tokenId: tuple.2, + data: tuple.3, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_1Return) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_1Return { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for safeTransferFrom_1Call { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Bytes, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = safeTransferFrom_1Return; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; + const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._from, + ), + ::tokenize( + &self._to, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ::tokenize( + &self.data, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. +```solidity +function setApprovalForAll(address _operator, bool _approved) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct setApprovalForAllCall { + pub _operator: alloy::sol_types::private::Address, + pub _approved: bool, + } + ///Container type for the return parameters of the [`setApprovalForAll(address,bool)`](setApprovalForAllCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct setApprovalForAllReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Bool, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: setApprovalForAllCall) -> Self { + (value._operator, value._approved) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for setApprovalForAllCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _operator: tuple.0, + _approved: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: setApprovalForAllReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for setApprovalForAllReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for setApprovalForAllCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Bool, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = setApprovalForAllReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; + const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._operator, + ), + ::tokenize( + &self._approved, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. +```solidity +function supportsInterface(bytes4 interfaceID) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct supportsInterfaceCall { + pub interfaceID: alloy::sol_types::private::FixedBytes<4>, + } + ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct supportsInterfaceReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceCall) -> Self { + (value.interfaceID,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { interfaceID: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for supportsInterfaceCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = supportsInterfaceReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "supportsInterface(bytes4)"; + const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.interfaceID), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `symbol()` and selector `0x95d89b41`. +```solidity +function symbol() external view returns (string memory _symbol); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct symbolCall {} + ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct symbolReturn { + pub _symbol: alloy::sol_types::private::String, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: symbolCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for symbolCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: symbolReturn) -> Self { + (value._symbol,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for symbolReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _symbol: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for symbolCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = symbolReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "symbol()"; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `tokenURI(uint256)` and selector `0xc87b56dd`. +```solidity +function tokenURI(uint256 _tokenId) external view returns (string memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct tokenURICall { + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`tokenURI(uint256)`](tokenURICall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct tokenURIReturn { + pub _0: alloy::sol_types::private::String, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: tokenURICall) -> Self { + (value._tokenId,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for tokenURICall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _tokenId: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: tokenURIReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for tokenURIReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for tokenURICall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = tokenURIReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "tokenURI(uint256)"; + const SELECTOR: [u8; 4] = [200u8, 123u8, 86u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. +```solidity +function transferFrom(address _from, address _to, uint256 _tokenId) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromCall { + pub _from: alloy::sol_types::private::Address, + pub _to: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromCall) -> Self { + (value._from, value._to, value._tokenId) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _from: tuple.0, + _to: tuple.1, + _tokenId: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for transferFromCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = transferFromReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._from, + ), + ::tokenize( + &self._to, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + ///Container for all the [`IERC721Metadata`](self) function calls. + pub enum IERC721MetadataCalls { + approve(approveCall), + balanceOf(balanceOfCall), + getApproved(getApprovedCall), + isApprovedForAll(isApprovedForAllCall), + name(nameCall), + ownerOf(ownerOfCall), + safeTransferFrom_0(safeTransferFrom_0Call), + safeTransferFrom_1(safeTransferFrom_1Call), + setApprovalForAll(setApprovalForAllCall), + supportsInterface(supportsInterfaceCall), + symbol(symbolCall), + tokenURI(tokenURICall), + transferFrom(transferFromCall), + } + #[automatically_derived] + impl IERC721MetadataCalls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [1u8, 255u8, 201u8, 167u8], + [6u8, 253u8, 222u8, 3u8], + [8u8, 24u8, 18u8, 252u8], + [9u8, 94u8, 167u8, 179u8], + [35u8, 184u8, 114u8, 221u8], + [66u8, 132u8, 46u8, 14u8], + [99u8, 82u8, 33u8, 30u8], + [112u8, 160u8, 130u8, 49u8], + [149u8, 216u8, 155u8, 65u8], + [162u8, 44u8, 180u8, 101u8], + [184u8, 141u8, 79u8, 222u8], + [200u8, 123u8, 86u8, 221u8], + [233u8, 133u8, 233u8, 197u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for IERC721MetadataCalls { + const NAME: &'static str = "IERC721MetadataCalls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 13usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::approve(_) => ::SELECTOR, + Self::balanceOf(_) => { + ::SELECTOR + } + Self::getApproved(_) => { + ::SELECTOR + } + Self::isApprovedForAll(_) => { + ::SELECTOR + } + Self::name(_) => ::SELECTOR, + Self::ownerOf(_) => ::SELECTOR, + Self::safeTransferFrom_0(_) => { + ::SELECTOR + } + Self::safeTransferFrom_1(_) => { + ::SELECTOR + } + Self::setApprovalForAll(_) => { + ::SELECTOR + } + Self::supportsInterface(_) => { + ::SELECTOR + } + Self::symbol(_) => ::SELECTOR, + Self::tokenURI(_) => ::SELECTOR, + Self::transferFrom(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn supportsInterface( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::supportsInterface) + } + supportsInterface + }, + { + fn name( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::name) + } + name + }, + { + fn getApproved( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::getApproved) + } + getApproved + }, + { + fn approve( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::approve) + } + approve + }, + { + fn transferFrom( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::transferFrom) + } + transferFrom + }, + { + fn safeTransferFrom_0( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::safeTransferFrom_0) + } + safeTransferFrom_0 + }, + { + fn ownerOf( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::ownerOf) + } + ownerOf + }, + { + fn balanceOf( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::balanceOf) + } + balanceOf + }, + { + fn symbol( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::symbol) + } + symbol + }, + { + fn setApprovalForAll( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::setApprovalForAll) + } + setApprovalForAll + }, + { + fn safeTransferFrom_1( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::safeTransferFrom_1) + } + safeTransferFrom_1 + }, + { + fn tokenURI( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::tokenURI) + } + tokenURI + }, + { + fn isApprovedForAll( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721MetadataCalls::isApprovedForAll) + } + isApprovedForAll + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::approve(inner) => { + ::abi_encoded_size(inner) + } + Self::balanceOf(inner) => { + ::abi_encoded_size(inner) + } + Self::getApproved(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::isApprovedForAll(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::name(inner) => { + ::abi_encoded_size(inner) + } + Self::ownerOf(inner) => { + ::abi_encoded_size(inner) + } + Self::safeTransferFrom_0(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::safeTransferFrom_1(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::setApprovalForAll(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::supportsInterface(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::symbol(inner) => { + ::abi_encoded_size(inner) + } + Self::tokenURI(inner) => { + ::abi_encoded_size(inner) + } + Self::transferFrom(inner) => { + ::abi_encoded_size( + inner, + ) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::approve(inner) => { + ::abi_encode_raw(inner, out) + } + Self::balanceOf(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::getApproved(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::isApprovedForAll(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::name(inner) => { + ::abi_encode_raw(inner, out) + } + Self::ownerOf(inner) => { + ::abi_encode_raw(inner, out) + } + Self::safeTransferFrom_0(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::safeTransferFrom_1(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::setApprovalForAll(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::supportsInterface(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::symbol(inner) => { + ::abi_encode_raw(inner, out) + } + Self::tokenURI(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::transferFrom(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + ///Container for all the [`IERC721Metadata`](self) events. + pub enum IERC721MetadataEvents { + Approval(Approval), + ApprovalForAll(ApprovalForAll), + Transfer(Transfer), + } + #[automatically_derived] + impl IERC721MetadataEvents { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 23u8, + 48u8, + 126u8, + 171u8, + 57u8, + 171u8, + 97u8, + 7u8, + 232u8, + 137u8, + 152u8, + 69u8, + 173u8, + 61u8, + 89u8, + 189u8, + 150u8, + 83u8, + 242u8, + 0u8, + 242u8, + 32u8, + 146u8, + 4u8, + 137u8, + 202u8, + 43u8, + 89u8, + 55u8, + 105u8, + 108u8, + 49u8, + ], + [ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ], + [ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for IERC721MetadataEvents { + const NAME: &'static str = "IERC721MetadataEvents"; + const COUNT: usize = 3usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Approval) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::ApprovalForAll) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Transfer) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for IERC721MetadataEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`IERC721Metadata`](self) contract instance. + +See the [wrapper's documentation](`IERC721MetadataInstance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> IERC721MetadataInstance { + IERC721MetadataInstance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + IERC721MetadataInstance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + IERC721MetadataInstance::::deploy_builder(provider) + } + /**A [`IERC721Metadata`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`IERC721Metadata`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct IERC721MetadataInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for IERC721MetadataInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("IERC721MetadataInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721MetadataInstance { + /**Creates a new wrapper around an on-chain [`IERC721Metadata`](self) contract instance. + +See the [wrapper's documentation](`IERC721MetadataInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl IERC721MetadataInstance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> IERC721MetadataInstance { + IERC721MetadataInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721MetadataInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`approve`] function. + pub fn approve( + &self, + _approved: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&approveCall { _approved, _tokenId }) + } + ///Creates a new call builder for the [`balanceOf`] function. + pub fn balanceOf( + &self, + _owner: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&balanceOfCall { _owner }) + } + ///Creates a new call builder for the [`getApproved`] function. + pub fn getApproved( + &self, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&getApprovedCall { _tokenId }) + } + ///Creates a new call builder for the [`isApprovedForAll`] function. + pub fn isApprovedForAll( + &self, + _owner: alloy::sol_types::private::Address, + _operator: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &isApprovedForAllCall { + _owner, + _operator, + }, + ) + } + ///Creates a new call builder for the [`name`] function. + pub fn name(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&nameCall {}) + } + ///Creates a new call builder for the [`ownerOf`] function. + pub fn ownerOf( + &self, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&ownerOfCall { _tokenId }) + } + ///Creates a new call builder for the [`safeTransferFrom_0`] function. + pub fn safeTransferFrom_0( + &self, + _from: alloy::sol_types::private::Address, + _to: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &safeTransferFrom_0Call { + _from, + _to, + _tokenId, + }, + ) + } + ///Creates a new call builder for the [`safeTransferFrom_1`] function. + pub fn safeTransferFrom_1( + &self, + _from: alloy::sol_types::private::Address, + _to: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + data: alloy::sol_types::private::Bytes, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &safeTransferFrom_1Call { + _from, + _to, + _tokenId, + data, + }, + ) + } + ///Creates a new call builder for the [`setApprovalForAll`] function. + pub fn setApprovalForAll( + &self, + _operator: alloy::sol_types::private::Address, + _approved: bool, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &setApprovalForAllCall { + _operator, + _approved, + }, + ) + } + ///Creates a new call builder for the [`supportsInterface`] function. + pub fn supportsInterface( + &self, + interfaceID: alloy::sol_types::private::FixedBytes<4>, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &supportsInterfaceCall { + interfaceID, + }, + ) + } + ///Creates a new call builder for the [`symbol`] function. + pub fn symbol(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&symbolCall {}) + } + ///Creates a new call builder for the [`tokenURI`] function. + pub fn tokenURI( + &self, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&tokenURICall { _tokenId }) + } + ///Creates a new call builder for the [`transferFrom`] function. + pub fn transferFrom( + &self, + _from: alloy::sol_types::private::Address, + _to: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &transferFromCall { + _from, + _to, + _tokenId, + }, + ) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721MetadataInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`Approval`] event. + pub fn Approval_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`ApprovalForAll`] event. + pub fn ApprovalForAll_filter( + &self, + ) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`Transfer`] event. + pub fn Transfer_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + } +} diff --git a/crates/bindings/src/ierc721tokenreceiver.rs b/crates/bindings/src/ierc721tokenreceiver.rs new file mode 100644 index 0000000..a622af1 --- /dev/null +++ b/crates/bindings/src/ierc721tokenreceiver.rs @@ -0,0 +1,523 @@ +/** + +Generated by the following Solidity interface... +```solidity +interface IERC721TokenReceiver { + function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) external returns (bytes4); +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "onERC721Received", + "inputs": [ + { + "name": "_operator", + "type": "address", + "internalType": "address" + }, + { + "name": "_from", + "type": "address", + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "stateMutability": "nonpayable" + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod IERC721TokenReceiver { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /**Function with signature `onERC721Received(address,address,uint256,bytes)` and selector `0x150b7a02`. +```solidity +function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) external returns (bytes4); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct onERC721ReceivedCall { + pub _operator: alloy::sol_types::private::Address, + pub _from: alloy::sol_types::private::Address, + pub _tokenId: alloy::sol_types::private::U256, + pub _data: alloy::sol_types::private::Bytes, + } + ///Container type for the return parameters of the [`onERC721Received(address,address,uint256,bytes)`](onERC721ReceivedCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct onERC721ReceivedReturn { + pub _0: alloy::sol_types::private::FixedBytes<4>, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Bytes, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + alloy::sol_types::private::Bytes, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: onERC721ReceivedCall) -> Self { + (value._operator, value._from, value._tokenId, value._data) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for onERC721ReceivedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _operator: tuple.0, + _from: tuple.1, + _tokenId: tuple.2, + _data: tuple.3, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: onERC721ReceivedReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for onERC721ReceivedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for onERC721ReceivedCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Bytes, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = onERC721ReceivedReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "onERC721Received(address,address,uint256,bytes)"; + const SELECTOR: [u8; 4] = [21u8, 11u8, 122u8, 2u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._operator, + ), + ::tokenize( + &self._from, + ), + as alloy_sol_types::SolType>::tokenize(&self._tokenId), + ::tokenize( + &self._data, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + ///Container for all the [`IERC721TokenReceiver`](self) function calls. + pub enum IERC721TokenReceiverCalls { + onERC721Received(onERC721ReceivedCall), + } + #[automatically_derived] + impl IERC721TokenReceiverCalls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[[21u8, 11u8, 122u8, 2u8]]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for IERC721TokenReceiverCalls { + const NAME: &'static str = "IERC721TokenReceiverCalls"; + const MIN_DATA_LENGTH: usize = 160usize; + const COUNT: usize = 1usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::onERC721Received(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn onERC721Received( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(IERC721TokenReceiverCalls::onERC721Received) + } + onERC721Received + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::onERC721Received(inner) => { + ::abi_encoded_size( + inner, + ) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::onERC721Received(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`IERC721TokenReceiver`](self) contract instance. + +See the [wrapper's documentation](`IERC721TokenReceiverInstance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> IERC721TokenReceiverInstance { + IERC721TokenReceiverInstance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + IERC721TokenReceiverInstance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + IERC721TokenReceiverInstance::::deploy_builder(provider) + } + /**A [`IERC721TokenReceiver`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`IERC721TokenReceiver`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct IERC721TokenReceiverInstance< + T, + P, + N = alloy_contract::private::Ethereum, + > { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for IERC721TokenReceiverInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("IERC721TokenReceiverInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721TokenReceiverInstance { + /**Creates a new wrapper around an on-chain [`IERC721TokenReceiver`](self) contract instance. + +See the [wrapper's documentation](`IERC721TokenReceiverInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl IERC721TokenReceiverInstance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> IERC721TokenReceiverInstance { + IERC721TokenReceiverInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721TokenReceiverInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`onERC721Received`] function. + pub fn onERC721Received( + &self, + _operator: alloy::sol_types::private::Address, + _from: alloy::sol_types::private::Address, + _tokenId: alloy::sol_types::private::U256, + _data: alloy::sol_types::private::Bytes, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &onERC721ReceivedCall { + _operator, + _from, + _tokenId, + _data, + }, + ) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IERC721TokenReceiverInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + } +} diff --git a/crates/bindings/src/lib.rs b/crates/bindings/src/lib.rs index 8409bd9..f2f72b8 100644 --- a/crates/bindings/src/lib.rs +++ b/crates/bindings/src/lib.rs @@ -1,20 +1,19 @@ -#![allow(clippy::all)] -//! This lib contains abigen! generated bindings for solidity contracts. +#![allow(unused_imports, clippy::all, rustdoc::all)] +//! This module contains the sol! generated bindings for solidity contracts. //! This is autogenerated code. //! Do not manually edit these files. //! These files may be overwritten by the codegen system at any time. pub mod ierc165; pub mod ierc20; pub mod ierc721; -pub mod ierc721_enumerable; -pub mod ierc721_metadata; -pub mod ierc721_token_receiver; +pub mod ierc721enumerable; +pub mod ierc721metadata; +pub mod ierc721tokenreceiver; +pub mod mockerc20; +pub mod mockerc721; pub mod metamodel; -pub mod mock_erc20; -pub mod mock_erc721; pub mod model; -pub mod model_interface; -pub mod my_model_contract; -pub mod my_state_machine; -pub mod pflow_dsl; -pub mod shared_types; +pub mod modelinterface; +pub mod mymodelcontract; +pub mod mystatemachine; +pub mod pflowdsl; diff --git a/crates/bindings/src/metamodel.rs b/crates/bindings/src/metamodel.rs index a54531c..a40c35c 100644 --- a/crates/bindings/src/metamodel.rs +++ b/crates/bindings/src/metamodel.rs @@ -1,623 +1,2649 @@ -pub use metamodel::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod metamodel { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("context"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("context"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedArray( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - 10usize, - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ], - ), - ), - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct Model.Head"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("latestBlocks"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("latestBlocks"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), +/** + +Generated by the following Solidity interface... +```solidity +interface Metamodel { + struct Head { + uint256[10] latestBlocks; + uint256 sequence; + int256[] state; + Place[] places; + Transition[] transitions; + } + struct Place { + string label; + uint8 offset; + Position position; + uint256 initial; + uint256 capacity; + } + struct Position { + uint8 x; + uint8 y; + } + struct Transition { + string label; + uint8 offset; + Position position; + uint8 role; + int256[] delta; + int256[] guard; + } + + event SignaledEvent(uint8 indexed role, uint8 indexed actionId, uint256 indexed scalar, uint256 sequence); + + function context() external view returns (Head memory); + function latestBlocks(uint256) external view returns (uint256); + function sequence() external view returns (uint256); + function signal(uint8 action, uint256 scalar) external; + function signalMany(uint8[] memory actions, uint256[] memory scalars) external; +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "context", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct Model.Head", + "components": [ + { + "name": "latestBlocks", + "type": "uint256[10]", + "internalType": "uint256[10]" + }, + { + "name": "sequence", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "state", + "type": "int256[]", + "internalType": "int256[]" + }, + { + "name": "places", + "type": "tuple[]", + "internalType": "struct Model.Place[]", + "components": [ + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "offset", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "position", + "type": "tuple", + "internalType": "struct Model.Position", + "components": [ + { + "name": "x", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "y", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "name": "initial", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "capacity", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "transitions", + "type": "tuple[]", + "internalType": "struct Model.Transition[]", + "components": [ + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "offset", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "position", + "type": "tuple", + "internalType": "struct Model.Position", + "components": [ + { + "name": "x", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "y", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "name": "role", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "delta", + "type": "int256[]", + "internalType": "int256[]" + }, + { + "name": "guard", + "type": "int256[]", + "internalType": "int256[]" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "latestBlocks", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "sequence", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "signal", + "inputs": [ + { + "name": "action", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "scalar", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "signalMany", + "inputs": [ + { + "name": "actions", + "type": "uint8[]", + "internalType": "uint8[]" + }, + { + "name": "scalars", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "SignaledEvent", + "inputs": [ + { + "name": "role", + "type": "uint8", + "indexed": true, + "internalType": "uint8" + }, + { + "name": "actionId", + "type": "uint8", + "indexed": true, + "internalType": "uint8" + }, + { + "name": "scalar", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "sequence", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod Metamodel { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /**```solidity +struct Head { uint256[10] latestBlocks; uint256 sequence; int256[] state; Place[] places; Transition[] transitions; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Head { + pub latestBlocks: [alloy::sol_types::private::U256; 10usize], + pub sequence: alloy::sol_types::private::U256, + pub state: alloy::sol_types::private::Vec, + pub places: alloy::sol_types::private::Vec< + ::RustType, + >, + pub transitions: alloy::sol_types::private::Vec< + ::RustType, + >, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedArray< + alloy::sol_types::sol_data::Uint<256>, + 10usize, + >, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array, + alloy::sol_types::sol_data::Array, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + [alloy::sol_types::private::U256; 10usize], + alloy::sol_types::private::U256, + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec< + ::RustType, + >, + alloy::sol_types::private::Vec< + ::RustType, + >, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Head) -> Self { ( - ::std::borrow::ToOwned::to_owned("sequence"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("sequence"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), + value.latestBlocks, + value.sequence, + value.state, + value.places, + value.transitions, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Head { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + latestBlocks: tuple.0, + sequence: tuple.1, + state: tuple.2, + places: tuple.3, + transitions: tuple.4, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Head { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Head { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { ( - ::std::borrow::ToOwned::to_owned("signal"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signal"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("action"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), + , + 10usize, + > as alloy_sol_types::SolType>::tokenize(&self.latestBlocks), + as alloy_sol_types::SolType>::tokenize(&self.sequence), + , + > as alloy_sol_types::SolType>::tokenize(&self.state), + as alloy_sol_types::SolType>::tokenize(&self.places), + as alloy_sol_types::SolType>::tokenize(&self.transitions), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Head { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Head { + const NAME: &'static str = "Head"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Head(uint256[10] latestBlocks,uint256 sequence,int256[] state,Place[] places,Transition[] transitions)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(2); + components + .push(::eip712_root_type()); + components + .extend(::eip712_components()); + components + .push( + ::eip712_root_type(), + ); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + , + 10usize, + > as alloy_sol_types::SolType>::eip712_data_word(&self.latestBlocks) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.sequence) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.state) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.places) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.transitions) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Head { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + , + 10usize, + > as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.latestBlocks, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.sequence, + ) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.state) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.places, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.transitions, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + , + 10usize, + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.latestBlocks, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.sequence, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.state, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.places, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.transitions, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**```solidity +struct Place { string label; uint8 offset; Position position; uint256 initial; uint256 capacity; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Place { + pub label: alloy::sol_types::private::String, + pub offset: u8, + pub position: ::RustType, + pub initial: alloy::sol_types::private::U256, + pub capacity: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + Position, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + u8, + ::RustType, + alloy::sol_types::private::U256, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Place) -> Self { ( - ::std::borrow::ToOwned::to_owned("signalMany"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signalMany"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("actions"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalars"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256[]"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ + value.label, + value.offset, + value.position, + value.initial, + value.capacity, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Place { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + label: tuple.0, + offset: tuple.1, + position: tuple.2, + initial: tuple.3, + capacity: tuple.4, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Place { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Place { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { ( - ::std::borrow::ToOwned::to_owned("SignaledEvent"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("SignaledEvent"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("role"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("actionId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, + ::tokenize( + &self.label, + ), + as alloy_sol_types::SolType>::tokenize(&self.offset), + ::tokenize(&self.position), + as alloy_sol_types::SolType>::tokenize(&self.initial), + as alloy_sol_types::SolType>::tokenize(&self.capacity), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } } - } - ///The parsed JSON ABI of the contract. - pub static METAMODEL_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct Metamodel(::ethers::contract::Contract); - impl ::core::clone::Clone for Metamodel { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) + #[automatically_derived] + impl alloy_sol_types::SolType for Place { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } } - } - impl ::core::ops::Deref for Metamodel { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 + #[automatically_derived] + impl alloy_sol_types::SolStruct for Place { + const NAME: &'static str = "Place"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Place(string label,uint8 offset,Position position,uint256 initial,uint256 capacity)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(1); + components + .push(::eip712_root_type()); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + ::eip712_data_word( + &self.label, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.offset) + .0, + ::eip712_data_word( + &self.position, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.initial) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.capacity) + .0, + ] + .concat() + } } - } - impl ::core::ops::DerefMut for Metamodel { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 + #[automatically_derived] + impl alloy_sol_types::EventTopic for Place { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + ::topic_preimage_length( + &rust.label, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.offset, + ) + + ::topic_preimage_length( + &rust.position, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.initial, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.capacity, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + ::encode_topic_preimage( + &rust.label, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.offset, + out, + ); + ::encode_topic_preimage( + &rust.position, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.initial, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.capacity, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } } + }; + /**```solidity +struct Position { uint8 x; uint8 y; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Position { + pub x: u8, + pub y: u8, } - impl ::core::fmt::Debug for Metamodel { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(Metamodel)).field(&self.address()).finish() + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<8>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8, u8); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } } - } - impl Metamodel { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - METAMODEL_ABI.clone(), - client, - ), - ) + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Position) -> Self { + (value.x, value.y) + } } - ///Calls the contract's `context` (0xd0496d6a) function - pub fn context(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([208, 73, 109, 106], ()) - .expect("method not found (this should never happen)") + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Position { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { x: tuple.0, y: tuple.1 } + } } - ///Calls the contract's `latestBlocks` (0x6ee376e6) function - pub fn latest_blocks( - &self, - p0: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([110, 227, 118, 230], p0) - .expect("method not found (this should never happen)") + #[automatically_derived] + impl alloy_sol_types::SolValue for Position { + type SolType = Self; } - ///Calls the contract's `sequence` (0x529d15cc) function - pub fn sequence( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([82, 157, 21, 204], ()) - .expect("method not found (this should never happen)") + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Position { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.x), + as alloy_sol_types::SolType>::tokenize(&self.y), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } } - ///Calls the contract's `signal` (0xddc3b187) function - pub fn signal( - &self, - action: u8, - scalar: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 195, 177, 135], (action, scalar)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signalMany` (0xfff01fe2) function - pub fn signal_many( - &self, - actions: ::std::vec::Vec, - scalars: ::std::vec::Vec<::ethers::core::types::U256>, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([255, 240, 31, 226], (actions, scalars)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `SignaledEvent` event - pub fn signaled_event_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event_with_filter(::core::default::Default::default()) + #[automatically_derived] + impl alloy_sol_types::SolType for Position { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } } - } - impl From<::ethers::contract::Contract> - for Metamodel { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) + #[automatically_derived] + impl alloy_sol_types::SolStruct for Position { + const NAME: &'static str = "Position"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed("Position(uint8 x,uint8 y)") + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + alloy_sol_types::private::Vec::new() + } + #[inline] + fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + as alloy_sol_types::SolType>::eip712_data_word(&self.x) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.y) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Position { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.x) + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.y) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage(&rust.x, out); + as alloy_sol_types::EventTopic>::encode_topic_preimage(&rust.y, out); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } } + }; + /**```solidity +struct Transition { string label; uint8 offset; Position position; uint8 role; int256[] delta; int256[] guard; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Transition { + pub label: alloy::sol_types::private::String, + pub offset: u8, + pub position: ::RustType, + pub role: u8, + pub delta: alloy::sol_types::private::Vec, + pub guard: alloy::sol_types::private::Vec, } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "SignaledEvent", - abi = "SignaledEvent(uint8,uint8,uint256,uint256)" - )] - pub struct SignaledEventFilter { - #[ethevent(indexed)] + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + Position, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + u8, + ::RustType, + u8, + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Transition) -> Self { + ( + value.label, + value.offset, + value.position, + value.role, + value.delta, + value.guard, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Transition { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + label: tuple.0, + offset: tuple.1, + position: tuple.2, + role: tuple.3, + delta: tuple.4, + guard: tuple.5, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Transition { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Transition { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + ::tokenize( + &self.label, + ), + as alloy_sol_types::SolType>::tokenize(&self.offset), + ::tokenize(&self.position), + as alloy_sol_types::SolType>::tokenize(&self.role), + , + > as alloy_sol_types::SolType>::tokenize(&self.delta), + , + > as alloy_sol_types::SolType>::tokenize(&self.guard), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Transition { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Transition { + const NAME: &'static str = "Transition"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Transition(string label,uint8 offset,Position position,uint8 role,int256[] delta,int256[] guard)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(1); + components + .push(::eip712_root_type()); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + ::eip712_data_word( + &self.label, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.offset) + .0, + ::eip712_data_word( + &self.position, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.role) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.delta) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.guard) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Transition { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + ::topic_preimage_length( + &rust.label, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.offset, + ) + + ::topic_preimage_length( + &rust.position, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.role) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.delta) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.guard) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + ::encode_topic_preimage( + &rust.label, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.offset, + out, + ); + ::encode_topic_preimage( + &rust.position, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.role, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.delta, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.guard, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**Event with signature `SignaledEvent(uint8,uint8,uint256,uint256)` and selector `0x50e4a52b0772bed9f06a7d3f7dfa66d73640067a5cc77a73c24556ccc900fa08`. +```solidity +event SignaledEvent(uint8 indexed role, uint8 indexed actionId, uint256 indexed scalar, uint256 sequence); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct SignaledEvent { + #[allow(missing_docs)] pub role: u8, - #[ethevent(indexed)] - pub action_id: u8, - #[ethevent(indexed)] - pub scalar: ::ethers::core::types::U256, - pub sequence: ::ethers::core::types::U256, + #[allow(missing_docs)] + pub actionId: u8, + #[allow(missing_docs)] + pub scalar: alloy::sol_types::private::U256, + #[allow(missing_docs)] + pub sequence: alloy::sol_types::private::U256, } - ///Container type for all input parameters for the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "context", abi = "context()")] - pub struct ContextCall; - ///Container type for all input parameters for the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "latestBlocks", abi = "latestBlocks(uint256)")] - pub struct LatestBlocksCall(pub ::ethers::core::types::U256); - ///Container type for all input parameters for the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "sequence", abi = "sequence()")] - pub struct SequenceCall; - ///Container type for all input parameters for the `signal` function with signature `signal(uint8,uint256)` and selector `0xddc3b187` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signal", abi = "signal(uint8,uint256)")] - pub struct SignalCall { - pub action: u8, - pub scalar: ::ethers::core::types::U256, + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for SignaledEvent { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "SignaledEvent(uint8,uint8,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 80u8, + 228u8, + 165u8, + 43u8, + 7u8, + 114u8, + 190u8, + 217u8, + 240u8, + 106u8, + 125u8, + 63u8, + 125u8, + 250u8, + 102u8, + 215u8, + 54u8, + 64u8, + 6u8, + 122u8, + 92u8, + 199u8, + 122u8, + 115u8, + 194u8, + 69u8, + 86u8, + 204u8, + 201u8, + 0u8, + 250u8, + 8u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + actionId: topics.2, + scalar: topics.3, + sequence: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.sequence), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.actionId.clone(), + self.scalar.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.actionId); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.scalar); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for SignaledEvent { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&SignaledEvent> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &SignaledEvent) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Function with signature `context()` and selector `0xd0496d6a`. +```solidity +function context() external view returns (Head memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct contextCall {} + ///Container type for the return parameters of the [`context()`](contextCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct contextReturn { + pub _0: ::RustType, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: contextCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for contextCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (Head,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: contextReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for contextReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for contextCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = contextReturn; + type ReturnTuple<'a> = (Head,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "context()"; + const SELECTOR: [u8; 4] = [208u8, 73u8, 109u8, 106u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `latestBlocks(uint256)` and selector `0x6ee376e6`. +```solidity +function latestBlocks(uint256) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct latestBlocksCall { + pub _0: alloy::sol_types::private::U256, } - ///Container type for all input parameters for the `signalMany` function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signalMany", abi = "signalMany(uint8[],uint256[])")] - pub struct SignalManyCall { - pub actions: ::std::vec::Vec, - pub scalars: ::std::vec::Vec<::ethers::core::types::U256>, + ///Container type for the return parameters of the [`latestBlocks(uint256)`](latestBlocksCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct latestBlocksReturn { + pub _0: alloy::sol_types::private::U256, } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MetamodelCalls { - Context(ContextCall), - LatestBlocks(LatestBlocksCall), - Sequence(SequenceCall), - Signal(SignalCall), - SignalMany(SignalManyCall), + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: latestBlocksCall) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for latestBlocksCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: latestBlocksReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for latestBlocksReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for latestBlocksCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = latestBlocksReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "latestBlocks(uint256)"; + const SELECTOR: [u8; 4] = [110u8, 227u8, 118u8, 230u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._0), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `sequence()` and selector `0x529d15cc`. +```solidity +function sequence() external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct sequenceCall {} + ///Container type for the return parameters of the [`sequence()`](sequenceCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct sequenceReturn { + pub _0: alloy::sol_types::private::U256, } - impl ::ethers::core::abi::AbiDecode for MetamodelCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::Context(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } } - if let Ok(decoded) = ::decode( - data, + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: sequenceCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for sequenceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::LatestBlocks(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: sequenceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for sequenceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } } - if let Ok(decoded) = ::decode( - data, + } + #[automatically_derived] + impl alloy_sol_types::SolCall for sequenceCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = sequenceReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "sequence()"; + const SELECTOR: [u8; 4] = [82u8, 157u8, 21u8, 204u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `signal(uint8,uint256)` and selector `0xddc3b187`. +```solidity +function signal(uint8 action, uint256 scalar) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalCall { + pub action: u8, + pub scalar: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`signal(uint8,uint256)`](signalCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8, alloy::sol_types::private::U256); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::Sequence(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalCall) -> Self { + (value.action, value.scalar) + } } - if let Ok(decoded) = ::decode( - data, + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + action: tuple.0, + scalar: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::Signal(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for signalCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = signalReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "signal(uint8,uint256)"; + const SELECTOR: [u8; 4] = [221u8, 195u8, 177u8, 135u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() } - if let Ok(decoded) = ::decode( - data, + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.action), + as alloy_sol_types::SolType>::tokenize(&self.scalar), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2`. +```solidity +function signalMany(uint8[] memory actions, uint256[] memory scalars) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalManyCall { + pub actions: alloy::sol_types::private::Vec, + pub scalars: alloy::sol_types::private::Vec, + } + ///Container type for the return parameters of the [`signalMany(uint8[],uint256[])`](signalManyCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalManyReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, ) { - return Ok(Self::SignalMany(decoded)); + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalManyCall) -> Self { + (value.actions, value.scalars) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalManyCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + actions: tuple.0, + scalars: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalManyReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalManyReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for signalManyCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = signalManyReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "signalMany(uint8[],uint256[])"; + const SELECTOR: [u8; 4] = [255u8, 240u8, 31u8, 226u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + , + > as alloy_sol_types::SolType>::tokenize(&self.actions), + , + > as alloy_sol_types::SolType>::tokenize(&self.scalars), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) } - Err(::ethers::core::abi::Error::InvalidData.into()) } + }; + ///Container for all the [`Metamodel`](self) function calls. + pub enum MetamodelCalls { + context(contextCall), + latestBlocks(latestBlocksCall), + sequence(sequenceCall), + signal(signalCall), + signalMany(signalManyCall), } - impl ::ethers::core::abi::AbiEncode for MetamodelCalls { - fn encode(self) -> Vec { + #[automatically_derived] + impl MetamodelCalls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [82u8, 157u8, 21u8, 204u8], + [110u8, 227u8, 118u8, 230u8], + [208u8, 73u8, 109u8, 106u8], + [221u8, 195u8, 177u8, 135u8], + [255u8, 240u8, 31u8, 226u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for MetamodelCalls { + const NAME: &'static str = "MetamodelCalls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 5usize; + #[inline] + fn selector(&self) -> [u8; 4] { match self { - Self::Context(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::LatestBlocks(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::context(_) => ::SELECTOR, + Self::latestBlocks(_) => { + ::SELECTOR } - Self::Sequence(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + Self::sequence(_) => ::SELECTOR, + Self::signal(_) => ::SELECTOR, + Self::signalMany(_) => { + ::SELECTOR } - Self::Signal(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SignalMany(element) => { - ::ethers::core::abi::AbiEncode::encode(element) + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn sequence( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MetamodelCalls::sequence) + } + sequence + }, + { + fn latestBlocks( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MetamodelCalls::latestBlocks) + } + latestBlocks + }, + { + fn context( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MetamodelCalls::context) + } + context + }, + { + fn signal( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MetamodelCalls::signal) + } + signal + }, + { + fn signalMany( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MetamodelCalls::signalMany) + } + signalMany + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::context(inner) => { + ::abi_encoded_size(inner) + } + Self::latestBlocks(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::sequence(inner) => { + ::abi_encoded_size(inner) + } + Self::signal(inner) => { + ::abi_encoded_size(inner) + } + Self::signalMany(inner) => { + ::abi_encoded_size(inner) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::context(inner) => { + ::abi_encode_raw(inner, out) + } + Self::latestBlocks(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::sequence(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::signal(inner) => { + ::abi_encode_raw(inner, out) + } + Self::signalMany(inner) => { + ::abi_encode_raw( + inner, + out, + ) } } } } - impl ::core::fmt::Display for MetamodelCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + ///Container for all the [`Metamodel`](self) events. + pub enum MetamodelEvents { + SignaledEvent(SignaledEvent), + } + #[automatically_derived] + impl MetamodelEvents { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 80u8, + 228u8, + 165u8, + 43u8, + 7u8, + 114u8, + 190u8, + 217u8, + 240u8, + 106u8, + 125u8, + 63u8, + 125u8, + 250u8, + 102u8, + 215u8, + 54u8, + 64u8, + 6u8, + 122u8, + 92u8, + 199u8, + 122u8, + 115u8, + 194u8, + 69u8, + 86u8, + 204u8, + 201u8, + 0u8, + 250u8, + 8u8, + ], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for MetamodelEvents { + const NAME: &'static str = "MetamodelEvents"; + const COUNT: usize = 1usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::SignaledEvent) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for MetamodelEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::SignaledEvent(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { - Self::Context(element) => ::core::fmt::Display::fmt(element, f), - Self::LatestBlocks(element) => ::core::fmt::Display::fmt(element, f), - Self::Sequence(element) => ::core::fmt::Display::fmt(element, f), - Self::Signal(element) => ::core::fmt::Display::fmt(element, f), - Self::SignalMany(element) => ::core::fmt::Display::fmt(element, f), + Self::SignaledEvent(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } } } } - impl ::core::convert::From for MetamodelCalls { - fn from(value: ContextCall) -> Self { - Self::Context(value) + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`Metamodel`](self) contract instance. + +See the [wrapper's documentation](`MetamodelInstance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> MetamodelInstance { + MetamodelInstance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + MetamodelInstance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + MetamodelInstance::::deploy_builder(provider) + } + /**A [`Metamodel`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`Metamodel`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct MetamodelInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for MetamodelInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("MetamodelInstance").field(&self.address).finish() } } - impl ::core::convert::From for MetamodelCalls { - fn from(value: LatestBlocksCall) -> Self { - Self::LatestBlocks(value) + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MetamodelInstance { + /**Creates a new wrapper around an on-chain [`Metamodel`](self) contract instance. + +See the [wrapper's documentation](`MetamodelInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider } } - impl ::core::convert::From for MetamodelCalls { - fn from(value: SequenceCall) -> Self { - Self::Sequence(value) + impl MetamodelInstance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> MetamodelInstance { + MetamodelInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } } } - impl ::core::convert::From for MetamodelCalls { - fn from(value: SignalCall) -> Self { - Self::Signal(value) + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MetamodelInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`context`] function. + pub fn context(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&contextCall {}) + } + ///Creates a new call builder for the [`latestBlocks`] function. + pub fn latestBlocks( + &self, + _0: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&latestBlocksCall { _0 }) + } + ///Creates a new call builder for the [`sequence`] function. + pub fn sequence( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&sequenceCall {}) + } + ///Creates a new call builder for the [`signal`] function. + pub fn signal( + &self, + action: u8, + scalar: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&signalCall { action, scalar }) + } + ///Creates a new call builder for the [`signalMany`] function. + pub fn signalMany( + &self, + actions: alloy::sol_types::private::Vec, + scalars: alloy::sol_types::private::Vec, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&signalManyCall { actions, scalars }) } } - impl ::core::convert::From for MetamodelCalls { - fn from(value: SignalManyCall) -> Self { - Self::SignalMany(value) + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MetamodelInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`SignaledEvent`] event. + pub fn SignaledEvent_filter( + &self, + ) -> alloy_contract::Event { + self.event_filter::() } } - ///Container type for all return fields from the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ContextReturn(pub Head); - ///Container type for all return fields from the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct LatestBlocksReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SequenceReturn(pub ::ethers::core::types::U256); } diff --git a/crates/bindings/src/mock_erc20.rs b/crates/bindings/src/mock_erc20.rs deleted file mode 100644 index 27d958c..0000000 --- a/crates/bindings/src/mock_erc20.rs +++ /dev/null @@ -1,1443 +0,0 @@ -pub use mock_erc20::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod mock_erc20 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("DOMAIN_SEPARATOR"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("DOMAIN_SEPARATOR"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("allowance"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("allowance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("decimals"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("decimals"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("initialize"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("initialize"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("name_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("symbol_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("decimals_"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("name"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("name"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("nonces"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nonces"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("permit"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("permit"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("deadline"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("v"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("r"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("s"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("symbol"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("symbol"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("totalSupply"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("totalSupply"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MOCKERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - #[rustfmt::skip] - const __BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[Pa\x0Eu\x80a\0 `\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xCFW`\x005`\xE0\x1C\x80c6D\xE5\x15\x11a\0\x8CW\x80c\x95\xD8\x9BA\x11a\0fW\x80c\x95\xD8\x9BA\x14a\x01\xB5W\x80c\xA9\x05\x9C\xBB\x14a\x01\xBDW\x80c\xD5\x05\xAC\xCF\x14a\x01\xD0W\x80c\xDDb\xED>\x14a\x01\xE3W`\0\x80\xFD[\x80c6D\xE5\x15\x14a\x01dW\x80cp\xA0\x821\x14a\x01lW\x80c~\xCE\xBE\0\x14a\x01\x95W`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xD4W\x80c\t^\xA7\xB3\x14a\0\xF2W\x80c\x16$\xF6\xC6\x14a\x01\x15W\x80c\x18\x16\r\xDD\x14a\x01*W\x80c#\xB8r\xDD\x14a\x01=`\0\xFD[PP`@Q`\x1F\x19\x01Q\x91PP`\x01`\x01`\xA0\x1B\x03\x81\x16\x15\x80\x15\x90a\x07RWP\x87`\x01`\x01`\xA0\x1B\x03\x16\x81`\x01`\x01`\xA0\x1B\x03\x16\x14[a\x07\x8FW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm$\xA7+ \xA6$\xA2/\xA9\xA4\xA3\xA7\"\xA9`\x91\x1B`D\x82\x01R`d\x01a\x03`V[`\x01`\x01`\xA0\x1B\x03\x81\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x8B\x85\x16\x80\x85R\x90\x83R\x92\x81\x90 \x8A\x90UQ\x89\x81R\x91\x92\x8B\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPPPPPPV[`\0a\tw\x80a\x08\x0Bc\xFF\xFF\xFF\xFF\x82\x16V[\x92PPP\x90V[`\0\x7F\x8Bs\xC3\xC6\x9B\xB8\xFE=Q.\xCCL\xF7Y\xCCy#\x9F{\x17\x9B\x0F\xFA\xCA\xA9\xA7]R+9@\x0F`\0`@Qa\x08D\x91\x90a\r\xA3V[`@Q\x80\x91\x03\x90 \x7F\xC8\x9E\xFD\xAAT\xC0\xF2\x0Cz\xDFa(\x82\xDF\tP\xF5\xA9Qc~\x03\x07\xCD\xCBLg/)\x8B\x8B\xC6a\x08ua\x07\xF9V[`@\x80Q` \x81\x01\x95\x90\x95R\x84\x01\x92\x90\x92R``\x83\x01R`\x80\x82\x01R0`\xA0\x82\x01R`\xC0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 \x90P\x90V[`\0\x81\x83\x10\x15a\t\x07W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FERC20: subtraction underflow\0\0\0\0`D\x82\x01R`d\x01a\x03`V[a\t\x11\x82\x84a\x0E\x19V[\x93\x92PPPV[`\0\x80a\t%\x83\x85a\x0E,V[\x90P\x83\x81\x10\x15a\t\x11W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x18`$\x82\x01R\x7FERC20: addition overflow\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03`V[F\x90V[`\0` \x80\x83R\x83Q\x80\x82\x85\x01R`\0[\x81\x81\x10\x15a\t\xA8W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\t\x8CV[P`\0`@\x82\x86\x01\x01R`@`\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\t\xF8W`\0\x80\xFD[a\n\x01\x83a\t\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0\x82`\x1F\x83\x01\x12a\n6W`\0\x80\xFD[\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\nQWa\nQa\n\x0FV[`@Q`\x1F\x83\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\nyWa\nya\n\x0FV[\x81`@R\x83\x81R\x86` \x85\x88\x01\x01\x11\x15a\n\x92W`\0\x80\xFD[\x83` \x87\x01` \x83\x017`\0` \x85\x83\x01\x01R\x80\x94PPPPP\x92\x91PPV[\x805`\xFF\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[`\0\x80`\0``\x84\x86\x03\x12\x15a\n\xD8W`\0\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\n\xF0W`\0\x80\xFD[a\n\xFC\x87\x83\x88\x01a\n%V[\x94P` \x86\x015\x91P\x80\x82\x11\x15a\x0B\x12W`\0\x80\xFD[Pa\x0B\x1F\x86\x82\x87\x01a\n%V[\x92PPa\x0B.`@\x85\x01a\n\xB2V[\x90P\x92P\x92P\x92V[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0BLW`\0\x80\xFD[a\x0BU\x84a\t\xC9V[\x92Pa\x0Bc` \x85\x01a\t\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\x0B\x85W`\0\x80\xFD[a\t\x11\x82a\t\xC9V[`\0\x80`\0\x80`\0\x80`\0`\xE0\x88\x8A\x03\x12\x15a\x0B\xA9W`\0\x80\xFD[a\x0B\xB2\x88a\t\xC9V[\x96Pa\x0B\xC0` \x89\x01a\t\xC9V[\x95P`@\x88\x015\x94P``\x88\x015\x93Pa\x0B\xDC`\x80\x89\x01a\n\xB2V[\x92P`\xA0\x88\x015\x91P`\xC0\x88\x015\x90P\x92\x95\x98\x91\x94\x97P\x92\x95PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x0BW`\0\x80\xFD[a\x0C\x14\x83a\t\xC9V[\x91Pa\x0C\"` \x84\x01a\t\xC9V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0C?W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x0C_WcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x0C\xAFW`\0\x81\x81R` \x81 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x0C\x8CWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x0C\xABW\x82\x81U`\x01\x01a\x0C\x98V[PPP[PPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xCEWa\x0C\xCEa\n\x0FV[a\x0C\xE2\x81a\x0C\xDC\x84Ta\x0C+V[\x84a\x0CeV[` \x80`\x1F\x83\x11`\x01\x81\x14a\r\x17W`\0\x84\x15a\x0C\xFFWP\x85\x83\x01Q[`\0\x19`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x0C\xABV[`\0\x85\x81R` \x81 `\x1F\x19\x86\x16\x91[\x82\x81\x10\x15a\rFW\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\r'V[P\x85\x82\x10\x15a\rdW\x87\x85\x01Q`\0\x19`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\r\x9CWa\r\x9Ca\rtV[P`\x01\x01\x90V[`\0\x80\x83Ta\r\xB1\x81a\x0C+V[`\x01\x82\x81\x16\x80\x15a\r\xC9W`\x01\x81\x14a\r\xDEWa\x0E\rV[`\xFF\x19\x84\x16\x87R\x82\x15\x15\x83\x02\x87\x01\x94Pa\x0E\rV[\x87`\0R` \x80`\0 `\0[\x85\x81\x10\x15a\x0E\x04W\x81T\x8A\x82\x01R\x90\x84\x01\x90\x82\x01a\r\xEBV[PPP\x82\x87\x01\x94P[P\x92\x96\x95PPPPPPV[\x81\x81\x03\x81\x81\x11\x15a\x03\x15Wa\x03\x15a\rtV[\x80\x82\x01\x80\x82\x11\x15a\x03\x15Wa\x03\x15a\rtV\xFE\xA2dipfsX\"\x12 \xA7\x1D\x19E/\xC8,\xBA\x84\xFC\xB8\xA0\x07k\x18\x825l\xCE\"\x88\xA8\x16\xE333L\xDF\xEE\xB5\xB4\xB6dsolcC\0\x08\x15\x003"; - /// The bytecode of the contract. - pub static MOCKERC20_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __BYTECODE, - ); - #[rustfmt::skip] - const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xCFW`\x005`\xE0\x1C\x80c6D\xE5\x15\x11a\0\x8CW\x80c\x95\xD8\x9BA\x11a\0fW\x80c\x95\xD8\x9BA\x14a\x01\xB5W\x80c\xA9\x05\x9C\xBB\x14a\x01\xBDW\x80c\xD5\x05\xAC\xCF\x14a\x01\xD0W\x80c\xDDb\xED>\x14a\x01\xE3W`\0\x80\xFD[\x80c6D\xE5\x15\x14a\x01dW\x80cp\xA0\x821\x14a\x01lW\x80c~\xCE\xBE\0\x14a\x01\x95W`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xD4W\x80c\t^\xA7\xB3\x14a\0\xF2W\x80c\x16$\xF6\xC6\x14a\x01\x15W\x80c\x18\x16\r\xDD\x14a\x01*W\x80c#\xB8r\xDD\x14a\x01=`\0\xFD[PP`@Q`\x1F\x19\x01Q\x91PP`\x01`\x01`\xA0\x1B\x03\x81\x16\x15\x80\x15\x90a\x07RWP\x87`\x01`\x01`\xA0\x1B\x03\x16\x81`\x01`\x01`\xA0\x1B\x03\x16\x14[a\x07\x8FW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm$\xA7+ \xA6$\xA2/\xA9\xA4\xA3\xA7\"\xA9`\x91\x1B`D\x82\x01R`d\x01a\x03`V[`\x01`\x01`\xA0\x1B\x03\x81\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x8B\x85\x16\x80\x85R\x90\x83R\x92\x81\x90 \x8A\x90UQ\x89\x81R\x91\x92\x8B\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPPPPPPV[`\0a\tw\x80a\x08\x0Bc\xFF\xFF\xFF\xFF\x82\x16V[\x92PPP\x90V[`\0\x7F\x8Bs\xC3\xC6\x9B\xB8\xFE=Q.\xCCL\xF7Y\xCCy#\x9F{\x17\x9B\x0F\xFA\xCA\xA9\xA7]R+9@\x0F`\0`@Qa\x08D\x91\x90a\r\xA3V[`@Q\x80\x91\x03\x90 \x7F\xC8\x9E\xFD\xAAT\xC0\xF2\x0Cz\xDFa(\x82\xDF\tP\xF5\xA9Qc~\x03\x07\xCD\xCBLg/)\x8B\x8B\xC6a\x08ua\x07\xF9V[`@\x80Q` \x81\x01\x95\x90\x95R\x84\x01\x92\x90\x92R``\x83\x01R`\x80\x82\x01R0`\xA0\x82\x01R`\xC0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 \x90P\x90V[`\0\x81\x83\x10\x15a\t\x07W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FERC20: subtraction underflow\0\0\0\0`D\x82\x01R`d\x01a\x03`V[a\t\x11\x82\x84a\x0E\x19V[\x93\x92PPPV[`\0\x80a\t%\x83\x85a\x0E,V[\x90P\x83\x81\x10\x15a\t\x11W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x18`$\x82\x01R\x7FERC20: addition overflow\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03`V[F\x90V[`\0` \x80\x83R\x83Q\x80\x82\x85\x01R`\0[\x81\x81\x10\x15a\t\xA8W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\t\x8CV[P`\0`@\x82\x86\x01\x01R`@`\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\t\xF8W`\0\x80\xFD[a\n\x01\x83a\t\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0\x82`\x1F\x83\x01\x12a\n6W`\0\x80\xFD[\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\nQWa\nQa\n\x0FV[`@Q`\x1F\x83\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\nyWa\nya\n\x0FV[\x81`@R\x83\x81R\x86` \x85\x88\x01\x01\x11\x15a\n\x92W`\0\x80\xFD[\x83` \x87\x01` \x83\x017`\0` \x85\x83\x01\x01R\x80\x94PPPPP\x92\x91PPV[\x805`\xFF\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[`\0\x80`\0``\x84\x86\x03\x12\x15a\n\xD8W`\0\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\n\xF0W`\0\x80\xFD[a\n\xFC\x87\x83\x88\x01a\n%V[\x94P` \x86\x015\x91P\x80\x82\x11\x15a\x0B\x12W`\0\x80\xFD[Pa\x0B\x1F\x86\x82\x87\x01a\n%V[\x92PPa\x0B.`@\x85\x01a\n\xB2V[\x90P\x92P\x92P\x92V[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0BLW`\0\x80\xFD[a\x0BU\x84a\t\xC9V[\x92Pa\x0Bc` \x85\x01a\t\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\x0B\x85W`\0\x80\xFD[a\t\x11\x82a\t\xC9V[`\0\x80`\0\x80`\0\x80`\0`\xE0\x88\x8A\x03\x12\x15a\x0B\xA9W`\0\x80\xFD[a\x0B\xB2\x88a\t\xC9V[\x96Pa\x0B\xC0` \x89\x01a\t\xC9V[\x95P`@\x88\x015\x94P``\x88\x015\x93Pa\x0B\xDC`\x80\x89\x01a\n\xB2V[\x92P`\xA0\x88\x015\x91P`\xC0\x88\x015\x90P\x92\x95\x98\x91\x94\x97P\x92\x95PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x0BW`\0\x80\xFD[a\x0C\x14\x83a\t\xC9V[\x91Pa\x0C\"` \x84\x01a\t\xC9V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0C?W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x0C_WcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x0C\xAFW`\0\x81\x81R` \x81 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x0C\x8CWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x0C\xABW\x82\x81U`\x01\x01a\x0C\x98V[PPP[PPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xCEWa\x0C\xCEa\n\x0FV[a\x0C\xE2\x81a\x0C\xDC\x84Ta\x0C+V[\x84a\x0CeV[` \x80`\x1F\x83\x11`\x01\x81\x14a\r\x17W`\0\x84\x15a\x0C\xFFWP\x85\x83\x01Q[`\0\x19`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x0C\xABV[`\0\x85\x81R` \x81 `\x1F\x19\x86\x16\x91[\x82\x81\x10\x15a\rFW\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\r'V[P\x85\x82\x10\x15a\rdW\x87\x85\x01Q`\0\x19`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\r\x9CWa\r\x9Ca\rtV[P`\x01\x01\x90V[`\0\x80\x83Ta\r\xB1\x81a\x0C+V[`\x01\x82\x81\x16\x80\x15a\r\xC9W`\x01\x81\x14a\r\xDEWa\x0E\rV[`\xFF\x19\x84\x16\x87R\x82\x15\x15\x83\x02\x87\x01\x94Pa\x0E\rV[\x87`\0R` \x80`\0 `\0[\x85\x81\x10\x15a\x0E\x04W\x81T\x8A\x82\x01R\x90\x84\x01\x90\x82\x01a\r\xEBV[PPP\x82\x87\x01\x94P[P\x92\x96\x95PPPPPPV[\x81\x81\x03\x81\x81\x11\x15a\x03\x15Wa\x03\x15a\rtV[\x80\x82\x01\x80\x82\x11\x15a\x03\x15Wa\x03\x15a\rtV\xFE\xA2dipfsX\"\x12 \xA7\x1D\x19E/\xC8,\xBA\x84\xFC\xB8\xA0\x07k\x18\x825l\xCE\"\x88\xA8\x16\xE333L\xDF\xEE\xB5\xB4\xB6dsolcC\0\x08\x15\x003"; - /// The deployed bytecode of the contract. - pub static MOCKERC20_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __DEPLOYED_BYTECODE, - ); - pub struct MockERC20(::ethers::contract::Contract); - impl ::core::clone::Clone for MockERC20 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for MockERC20 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for MockERC20 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for MockERC20 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(MockERC20)).field(&self.address()).finish() - } - } - impl MockERC20 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MOCKERC20_ABI.clone(), - client, - ), - ) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - MOCKERC20_ABI.clone(), - MOCKERC20_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - ///Calls the contract's `DOMAIN_SEPARATOR` (0x3644e515) function - pub fn domain_separator( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([54, 68, 229, 21], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `allowance` (0xdd62ed3e) function - pub fn allowance( - &self, - owner: ::ethers::core::types::Address, - spender: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 98, 237, 62], (owner, spender)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - spender: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (spender, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], owner) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `decimals` (0x313ce567) function - pub fn decimals(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([49, 60, 229, 103], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `initialize` (0x1624f6c6) function - pub fn initialize( - &self, - name: ::std::string::String, - symbol: ::std::string::String, - decimals: u8, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([22, 36, 246, 198], (name, symbol, decimals)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `name` (0x06fdde03) function - pub fn name( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([6, 253, 222, 3], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `nonces` (0x7ecebe00) function - pub fn nonces( - &self, - p0: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([126, 206, 190, 0], p0) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `permit` (0xd505accf) function - pub fn permit( - &self, - owner: ::ethers::core::types::Address, - spender: ::ethers::core::types::Address, - value: ::ethers::core::types::U256, - deadline: ::ethers::core::types::U256, - v: u8, - r: [u8; 32], - s: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [213, 5, 172, 207], - (owner, spender, value, deadline, v, r, s), - ) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `symbol` (0x95d89b41) function - pub fn symbol( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([149, 216, 155, 65], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `totalSupply` (0x18160ddd) function - pub fn total_supply( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([24, 22, 13, 221], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transfer` (0xa9059cbb) function - pub fn transfer( - &self, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 5, 156, 187], (to, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, amount)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - MockERC20Events, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for MockERC20 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub spender: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MockERC20Events { - ApprovalFilter(ApprovalFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for MockERC20Events { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(MockERC20Events::ApprovalFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(MockERC20Events::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for MockERC20Events { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MockERC20Events { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for MockERC20Events { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `DOMAIN_SEPARATOR` function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "DOMAIN_SEPARATOR", abi = "DOMAIN_SEPARATOR()")] - pub struct DomainSeparatorCall; - ///Container type for all input parameters for the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "allowance", abi = "allowance(address,address)")] - pub struct AllowanceCall { - pub owner: ::ethers::core::types::Address, - pub spender: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub spender: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "decimals", abi = "decimals()")] - pub struct DecimalsCall; - ///Container type for all input parameters for the `initialize` function with signature `initialize(string,string,uint8)` and selector `0x1624f6c6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "initialize", abi = "initialize(string,string,uint8)")] - pub struct InitializeCall { - pub name: ::std::string::String, - pub symbol: ::std::string::String, - pub decimals: u8, - } - ///Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "name", abi = "name()")] - pub struct NameCall; - ///Container type for all input parameters for the `nonces` function with signature `nonces(address)` and selector `0x7ecebe00` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "nonces", abi = "nonces(address)")] - pub struct NoncesCall(pub ::ethers::core::types::Address); - ///Container type for all input parameters for the `permit` function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "permit", - abi = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)" - )] - pub struct PermitCall { - pub owner: ::ethers::core::types::Address, - pub spender: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - pub deadline: ::ethers::core::types::U256, - pub v: u8, - pub r: [u8; 32], - pub s: [u8; 32], - } - ///Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "symbol", abi = "symbol()")] - pub struct SymbolCall; - ///Container type for all input parameters for the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "totalSupply", abi = "totalSupply()")] - pub struct TotalSupplyCall; - ///Container type for all input parameters for the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transfer", abi = "transfer(address,uint256)")] - pub struct TransferCall { - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MockERC20Calls { - DomainSeparator(DomainSeparatorCall), - Allowance(AllowanceCall), - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - Decimals(DecimalsCall), - Initialize(InitializeCall), - Name(NameCall), - Nonces(NoncesCall), - Permit(PermitCall), - Symbol(SymbolCall), - TotalSupply(TotalSupplyCall), - Transfer(TransferCall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for MockERC20Calls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DomainSeparator(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Allowance(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Decimals(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Initialize(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Name(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Nonces(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Permit(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Symbol(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TotalSupply(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Transfer(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for MockERC20Calls { - fn encode(self) -> Vec { - match self { - Self::DomainSeparator(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Allowance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Decimals(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Initialize(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Nonces(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Permit(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TotalSupply(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Transfer(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for MockERC20Calls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::DomainSeparator(element) => ::core::fmt::Display::fmt(element, f), - Self::Allowance(element) => ::core::fmt::Display::fmt(element, f), - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::Decimals(element) => ::core::fmt::Display::fmt(element, f), - Self::Initialize(element) => ::core::fmt::Display::fmt(element, f), - Self::Name(element) => ::core::fmt::Display::fmt(element, f), - Self::Nonces(element) => ::core::fmt::Display::fmt(element, f), - Self::Permit(element) => ::core::fmt::Display::fmt(element, f), - Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), - Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f), - Self::Transfer(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: DomainSeparatorCall) -> Self { - Self::DomainSeparator(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: AllowanceCall) -> Self { - Self::Allowance(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: DecimalsCall) -> Self { - Self::Decimals(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: InitializeCall) -> Self { - Self::Initialize(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: NameCall) -> Self { - Self::Name(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: NoncesCall) -> Self { - Self::Nonces(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: PermitCall) -> Self { - Self::Permit(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: SymbolCall) -> Self { - Self::Symbol(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: TotalSupplyCall) -> Self { - Self::TotalSupply(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: TransferCall) -> Self { - Self::Transfer(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `DOMAIN_SEPARATOR` function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DomainSeparatorReturn(pub [u8; 32]); - ///Container type for all return fields from the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct AllowanceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ApproveReturn(pub bool); - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DecimalsReturn(pub u8); - ///Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NameReturn(pub ::std::string::String); - ///Container type for all return fields from the `nonces` function with signature `nonces(address)` and selector `0x7ecebe00` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NoncesReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SymbolReturn(pub ::std::string::String); - ///Container type for all return fields from the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TotalSupplyReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferReturn(pub bool); - ///Container type for all return fields from the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferFromReturn(pub bool); -} diff --git a/crates/bindings/src/mock_erc721.rs b/crates/bindings/src/mock_erc721.rs deleted file mode 100644 index a705596..0000000 --- a/crates/bindings/src/mock_erc721.rs +++ /dev/null @@ -1,1529 +0,0 @@ -pub use mock_erc721::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod mock_erc721 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getApproved"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getApproved"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("initialize"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("initialize"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("name_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("symbol_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("name"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("name"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ownerOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("ownerOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("supportsInterface"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("supportsInterface"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("interfaceId"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("symbol"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("symbol"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("tokenURI"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("tokenURI"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MOCKERC721_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - #[rustfmt::skip] - const __BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[Pa\x0Fz\x80a\0 `\09`\0\xF3\xFE`\x80`@R`\x046\x10a\0\xDDW`\x005`\xE0\x1C\x80ccR!\x1E\x11a\0\x7FW\x80c\xA2,\xB4e\x11a\0YW\x80c\xA2,\xB4e\x14a\x02EW\x80c\xB8\x8DO\xDE\x14a\x02eW\x80c\xC8{V\xDD\x14a\x02xW\x80c\xE9\x85\xE9\xC5\x14a\x02\x99W`\0\x80\xFD[\x80ccR!\x1E\x14a\x01\xE2W\x80cp\xA0\x821\x14a\x02\x02W\x80c\x95\xD8\x9BA\x14a\x020W`\0\x80\xFD[\x80c\t^\xA7\xB3\x11a\0\xBBW\x80c\t^\xA7\xB3\x14a\x01\x87W\x80c#\xB8r\xDD\x14a\x01\x9CW\x80cB\x84.\x0E\x14a\x01\xAFW\x80cL\xD8\x8Bv\x14a\x01\xC2W`\0\x80\xFD[\x80c\x01\xFF\xC9\xA7\x14a\0\xE2W\x80c\x06\xFD\xDE\x03\x14a\x01\x17W\x80c\x08\x18\x12\xFC\x14a\x019W[`\0\x80\xFD[4\x80\x15a\0\xEEW`\0\x80\xFD[Pa\x01\x02a\0\xFD6`\x04a\n3V[a\x02\xE2V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[4\x80\x15a\x01#W`\0\x80\xFD[Pa\x01,a\x034V[`@Qa\x01\x0E\x91\x90a\n\x9DV[4\x80\x15a\x01EW`\0\x80\xFD[Pa\x01oa\x01T6`\x04a\n\xB0V[`\0\x90\x81R`\x04` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x16\x90V[`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x01a\x01\x0EV[a\x01\x9Aa\x01\x956`\x04a\n\xE0V[a\x03\xC6V[\0[a\x01\x9Aa\x01\xAA6`\x04a\x0B\nV[a\x04\xADV[a\x01\x9Aa\x01\xBD6`\x04a\x0B\nV[a\x06\xA6V[4\x80\x15a\x01\xCEW`\0\x80\xFD[Pa\x01\x9Aa\x01\xDD6`\x04a\x0B\xF2V[a\x07\x95V[4\x80\x15a\x01\xEEW`\0\x80\xFD[Pa\x01oa\x01\xFD6`\x04a\n\xB0V[a\x08\tV[4\x80\x15a\x02\x0EW`\0\x80\xFD[Pa\x02\"a\x02\x1D6`\x04a\x0CVV[a\x08`V[`@Q\x90\x81R` \x01a\x01\x0EV[4\x80\x15a\x02V[4\x80\x15a\x02\x84W`\0\x80\xFD[Pa\x01,a\x02\x936`\x04a\n\xB0V[P``\x90V[4\x80\x15a\x02\xA5W`\0\x80\xFD[Pa\x01\x02a\x02\xB46`\x04a\r)V[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T`\xFF\x16\x90V[`\0c\x01\xFF\xC9\xA7`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14\x80a\x03\x13WPc\x80\xACX\xCD`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x80a\x03.WPc[^\x13\x9F`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x92\x91PPV[```\0\x80Ta\x03C\x90a\r\\V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03o\x90a\r\\V[\x80\x15a\x03\xBCW\x80`\x1F\x10a\x03\x91Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xBCV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\x9FW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x81\x14\x80a\x04\x0FWP`\x01`\x01`\xA0\x1B\x03\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[a\x04QW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0\x82\x81R`\x04` R`@\x80\x82 \x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x87\x81\x16\x91\x82\x17\x90\x92U\x91Q\x85\x93\x91\x85\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\xA4PPPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x84\x81\x16\x91\x16\x14a\x05\x03W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01RiWRONG_FROM`\xB0\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x05MW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x11`$\x82\x01Rp\x12S\x95\x90S\x12Q\x17\xD4\x91P\xD2T\x12QS\x95`z\x1B`D\x82\x01R`d\x01a\x04HV[3`\x01`\x01`\xA0\x1B\x03\x84\x16\x14\x80a\x05\x87WP`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[\x80a\x05\xA8WP`\0\x81\x81R`\x04` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x14[a\x05\xE5W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x06\t\x83a\r\xACV[\x90\x91UPP`\x01`\x01`\xA0\x1B\x03\x82\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x062\x83a\r\xC3V[\x90\x91UPP`\0\x81\x81R`\x02` \x90\x81R`@\x80\x83 \x80T`\x01`\x01`\xA0\x1B\x03\x80\x88\x16`\x01`\x01`\xA0\x1B\x03\x19\x92\x83\x16\x81\x17\x90\x93U`\x04\x90\x94R\x82\x85 \x80T\x90\x91\x16\x90U\x90Q\x84\x93\x91\x92\x87\x16\x91\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\xA4PPPV[a\x06\xB1\x83\x83\x83a\x04\xADV[\x81;\x15\x80a\x07QWP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R3`\x04\x83\x01R`\x01`\x01`\xA0\x1B\x03\x85\x81\x16`$\x84\x01R`D\x83\x01\x84\x90R`\x80`d\x84\x01R`\0`\x84\x84\x01R\x90\x91\x90\x84\x16\x90c\x15\x0Bz\x02\x90`\xA4\x01` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\x07!W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x07E\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\x07\x90W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPV[`\x06T`\xFF\x16\x15a\x07\xDEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x13`$\x82\x01Rr\x10S\x14\x91PQ\x16W\xD2S\x92U\x12PS\x12V\x91Q`j\x1B`D\x82\x01R`d\x01a\x04HV[`\0a\x07\xEA\x83\x82a\x0EGV[P`\x01a\x07\xF7\x82\x82a\x0EGV[PP`\x06\x80T`\xFF\x19\x16`\x01\x17\x90UPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x16\x80a\x08[W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01Ri\x13\x93\xD5\x17\xD3RS\x95\x11Q`\xB2\x1B`D\x82\x01R`d\x01a\x04HV[\x91\x90PV[`\0`\x01`\x01`\xA0\x1B\x03\x82\x16a\x08\xA7W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0C`$\x82\x01RkZERO_ADDRESS`\xA0\x1B`D\x82\x01R`d\x01a\x04HV[P`\x01`\x01`\xA0\x1B\x03\x16`\0\x90\x81R`\x03` R`@\x90 T\x90V[```\x01\x80Ta\x03C\x90a\r\\V[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 `\x01`\x01`\xA0\x1B\x03\x87\x16\x80\x85R\x90\x83R\x92\x81\x90 \x80T`\xFF\x19\x16\x86\x15\x15\x90\x81\x17\x90\x91U\x90Q\x90\x81R\x91\x92\x91\x7F\x170~\xAB9\xABa\x07\xE8\x89\x98E\xAD=Y\xBD\x96S\xF2\0\xF2 \x92\x04\x89\xCA+Y7il1\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[a\tI\x84\x84\x84a\x04\xADV[\x82;\x15\x80a\t\xD5WP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R\x90`\x01`\x01`\xA0\x1B\x03\x85\x16\x90c\x15\x0Bz\x02\x90a\t\x86\x903\x90\x89\x90\x88\x90\x88\x90`\x04\x01a\x0F\x07V[` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\t\xA5W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t\xC9\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\n\x14W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPPV[`\x01`\x01`\xE0\x1B\x03\x19\x81\x16\x81\x14a\n0W`\0\x80\xFD[PV[`\0` \x82\x84\x03\x12\x15a\nEW`\0\x80\xFD[\x815a\nP\x81a\n\x1AV[\x93\x92PPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\n}W` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\naV[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[` \x81R`\0a\nP` \x83\x01\x84a\nWV[`\0` \x82\x84\x03\x12\x15a\n\xC2W`\0\x80\xFD[P5\x91\x90PV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x08[W`\0\x80\xFD[`\0\x80`@\x83\x85\x03\x12\x15a\n\xF3W`\0\x80\xFD[a\n\xFC\x83a\n\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0B\x1FW`\0\x80\xFD[a\x0B(\x84a\n\xC9V[\x92Pa\x0B6` \x85\x01a\n\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x11\x15a\x0BwWa\x0Bwa\x0BFV[`@Q`\x1F\x85\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\x0B\x9FWa\x0B\x9Fa\x0BFV[\x81`@R\x80\x93P\x85\x81R\x86\x86\x86\x01\x11\x15a\x0B\xB8W`\0\x80\xFD[\x85\x85` \x83\x017`\0` \x87\x83\x01\x01RPPP\x93\x92PPPV[`\0\x82`\x1F\x83\x01\x12a\x0B\xE3W`\0\x80\xFD[a\nP\x83\x835` \x85\x01a\x0B\\V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x05W`\0\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0C\x1DW`\0\x80\xFD[a\x0C)\x86\x83\x87\x01a\x0B\xD2V[\x93P` \x85\x015\x91P\x80\x82\x11\x15a\x0C?W`\0\x80\xFD[Pa\x0CL\x85\x82\x86\x01a\x0B\xD2V[\x91PP\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x0ChW`\0\x80\xFD[a\nP\x82a\n\xC9V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x84W`\0\x80\xFD[a\x0C\x8D\x83a\n\xC9V[\x91P` \x83\x015\x80\x15\x15\x81\x14a\x0C\xA2W`\0\x80\xFD[\x80\x91PP\x92P\x92\x90PV[`\0\x80`\0\x80`\x80\x85\x87\x03\x12\x15a\x0C\xC3W`\0\x80\xFD[a\x0C\xCC\x85a\n\xC9V[\x93Pa\x0C\xDA` \x86\x01a\n\xC9V[\x92P`@\x85\x015\x91P``\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xFDW`\0\x80\xFD[\x85\x01`\x1F\x81\x01\x87\x13a\r\x0EW`\0\x80\xFD[a\r\x1D\x87\x825` \x84\x01a\x0B\\V[\x91PP\x92\x95\x91\x94P\x92PV[`\0\x80`@\x83\x85\x03\x12\x15a\rV[4\x80\x15a\x02\x84W`\0\x80\xFD[Pa\x01,a\x02\x936`\x04a\n\xB0V[P``\x90V[4\x80\x15a\x02\xA5W`\0\x80\xFD[Pa\x01\x02a\x02\xB46`\x04a\r)V[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T`\xFF\x16\x90V[`\0c\x01\xFF\xC9\xA7`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14\x80a\x03\x13WPc\x80\xACX\xCD`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x80a\x03.WPc[^\x13\x9F`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x92\x91PPV[```\0\x80Ta\x03C\x90a\r\\V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03o\x90a\r\\V[\x80\x15a\x03\xBCW\x80`\x1F\x10a\x03\x91Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xBCV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\x9FW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x81\x14\x80a\x04\x0FWP`\x01`\x01`\xA0\x1B\x03\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[a\x04QW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0\x82\x81R`\x04` R`@\x80\x82 \x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x87\x81\x16\x91\x82\x17\x90\x92U\x91Q\x85\x93\x91\x85\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\xA4PPPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x84\x81\x16\x91\x16\x14a\x05\x03W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01RiWRONG_FROM`\xB0\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x05MW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x11`$\x82\x01Rp\x12S\x95\x90S\x12Q\x17\xD4\x91P\xD2T\x12QS\x95`z\x1B`D\x82\x01R`d\x01a\x04HV[3`\x01`\x01`\xA0\x1B\x03\x84\x16\x14\x80a\x05\x87WP`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[\x80a\x05\xA8WP`\0\x81\x81R`\x04` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x14[a\x05\xE5W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x06\t\x83a\r\xACV[\x90\x91UPP`\x01`\x01`\xA0\x1B\x03\x82\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x062\x83a\r\xC3V[\x90\x91UPP`\0\x81\x81R`\x02` \x90\x81R`@\x80\x83 \x80T`\x01`\x01`\xA0\x1B\x03\x80\x88\x16`\x01`\x01`\xA0\x1B\x03\x19\x92\x83\x16\x81\x17\x90\x93U`\x04\x90\x94R\x82\x85 \x80T\x90\x91\x16\x90U\x90Q\x84\x93\x91\x92\x87\x16\x91\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\xA4PPPV[a\x06\xB1\x83\x83\x83a\x04\xADV[\x81;\x15\x80a\x07QWP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R3`\x04\x83\x01R`\x01`\x01`\xA0\x1B\x03\x85\x81\x16`$\x84\x01R`D\x83\x01\x84\x90R`\x80`d\x84\x01R`\0`\x84\x84\x01R\x90\x91\x90\x84\x16\x90c\x15\x0Bz\x02\x90`\xA4\x01` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\x07!W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x07E\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\x07\x90W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPV[`\x06T`\xFF\x16\x15a\x07\xDEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x13`$\x82\x01Rr\x10S\x14\x91PQ\x16W\xD2S\x92U\x12PS\x12V\x91Q`j\x1B`D\x82\x01R`d\x01a\x04HV[`\0a\x07\xEA\x83\x82a\x0EGV[P`\x01a\x07\xF7\x82\x82a\x0EGV[PP`\x06\x80T`\xFF\x19\x16`\x01\x17\x90UPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x16\x80a\x08[W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01Ri\x13\x93\xD5\x17\xD3RS\x95\x11Q`\xB2\x1B`D\x82\x01R`d\x01a\x04HV[\x91\x90PV[`\0`\x01`\x01`\xA0\x1B\x03\x82\x16a\x08\xA7W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0C`$\x82\x01RkZERO_ADDRESS`\xA0\x1B`D\x82\x01R`d\x01a\x04HV[P`\x01`\x01`\xA0\x1B\x03\x16`\0\x90\x81R`\x03` R`@\x90 T\x90V[```\x01\x80Ta\x03C\x90a\r\\V[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 `\x01`\x01`\xA0\x1B\x03\x87\x16\x80\x85R\x90\x83R\x92\x81\x90 \x80T`\xFF\x19\x16\x86\x15\x15\x90\x81\x17\x90\x91U\x90Q\x90\x81R\x91\x92\x91\x7F\x170~\xAB9\xABa\x07\xE8\x89\x98E\xAD=Y\xBD\x96S\xF2\0\xF2 \x92\x04\x89\xCA+Y7il1\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[a\tI\x84\x84\x84a\x04\xADV[\x82;\x15\x80a\t\xD5WP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R\x90`\x01`\x01`\xA0\x1B\x03\x85\x16\x90c\x15\x0Bz\x02\x90a\t\x86\x903\x90\x89\x90\x88\x90\x88\x90`\x04\x01a\x0F\x07V[` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\t\xA5W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t\xC9\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\n\x14W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPPV[`\x01`\x01`\xE0\x1B\x03\x19\x81\x16\x81\x14a\n0W`\0\x80\xFD[PV[`\0` \x82\x84\x03\x12\x15a\nEW`\0\x80\xFD[\x815a\nP\x81a\n\x1AV[\x93\x92PPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\n}W` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\naV[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[` \x81R`\0a\nP` \x83\x01\x84a\nWV[`\0` \x82\x84\x03\x12\x15a\n\xC2W`\0\x80\xFD[P5\x91\x90PV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x08[W`\0\x80\xFD[`\0\x80`@\x83\x85\x03\x12\x15a\n\xF3W`\0\x80\xFD[a\n\xFC\x83a\n\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0B\x1FW`\0\x80\xFD[a\x0B(\x84a\n\xC9V[\x92Pa\x0B6` \x85\x01a\n\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x11\x15a\x0BwWa\x0Bwa\x0BFV[`@Q`\x1F\x85\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\x0B\x9FWa\x0B\x9Fa\x0BFV[\x81`@R\x80\x93P\x85\x81R\x86\x86\x86\x01\x11\x15a\x0B\xB8W`\0\x80\xFD[\x85\x85` \x83\x017`\0` \x87\x83\x01\x01RPPP\x93\x92PPPV[`\0\x82`\x1F\x83\x01\x12a\x0B\xE3W`\0\x80\xFD[a\nP\x83\x835` \x85\x01a\x0B\\V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x05W`\0\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0C\x1DW`\0\x80\xFD[a\x0C)\x86\x83\x87\x01a\x0B\xD2V[\x93P` \x85\x015\x91P\x80\x82\x11\x15a\x0C?W`\0\x80\xFD[Pa\x0CL\x85\x82\x86\x01a\x0B\xD2V[\x91PP\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x0ChW`\0\x80\xFD[a\nP\x82a\n\xC9V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x84W`\0\x80\xFD[a\x0C\x8D\x83a\n\xC9V[\x91P` \x83\x015\x80\x15\x15\x81\x14a\x0C\xA2W`\0\x80\xFD[\x80\x91PP\x92P\x92\x90PV[`\0\x80`\0\x80`\x80\x85\x87\x03\x12\x15a\x0C\xC3W`\0\x80\xFD[a\x0C\xCC\x85a\n\xC9V[\x93Pa\x0C\xDA` \x86\x01a\n\xC9V[\x92P`@\x85\x015\x91P``\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xFDW`\0\x80\xFD[\x85\x01`\x1F\x81\x01\x87\x13a\r\x0EW`\0\x80\xFD[a\r\x1D\x87\x825` \x84\x01a\x0B\\V[\x91PP\x92\x95\x91\x94P\x92PV[`\0\x80`@\x83\x85\x03\x12\x15a\r(::ethers::contract::Contract); - impl ::core::clone::Clone for MockERC721 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for MockERC721 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for MockERC721 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for MockERC721 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(MockERC721)).field(&self.address()).finish() - } - } - impl MockERC721 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MOCKERC721_ABI.clone(), - client, - ), - ) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - MOCKERC721_ABI.clone(), - MOCKERC721_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - spender: ::ethers::core::types::Address, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (spender, id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], owner) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getApproved` (0x081812fc) function - pub fn get_approved( - &self, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([8, 24, 18, 252], id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `initialize` (0x4cd88b76) function - pub fn initialize( - &self, - name: ::std::string::String, - symbol: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([76, 216, 139, 118], (name, symbol)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `isApprovedForAll` (0xe985e9c5) function - pub fn is_approved_for_all( - &self, - owner: ::ethers::core::types::Address, - operator: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([233, 133, 233, 197], (owner, operator)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `name` (0x06fdde03) function - pub fn name( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([6, 253, 222, 3], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `ownerOf` (0x6352211e) function - pub fn owner_of( - &self, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([99, 82, 33, 30], id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0x42842e0e) function - pub fn safe_transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([66, 132, 46, 14], (from, to, id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0xb88d4fde) function - pub fn safe_transfer_from_with_from_and_to_and_data( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - id: ::ethers::core::types::U256, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([184, 141, 79, 222], (from, to, id, data)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setApprovalForAll` (0xa22cb465) function - pub fn set_approval_for_all( - &self, - operator: ::ethers::core::types::Address, - approved: bool, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([162, 44, 180, 101], (operator, approved)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `symbol` (0x95d89b41) function - pub fn symbol( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([149, 216, 155, 65], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `tokenURI` (0xc87b56dd) function - pub fn token_uri( - &self, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([200, 123, 86, 221], id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, id)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `ApprovalForAll` event - pub fn approval_for_all_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalForAllFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - MockERC721Events, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for MockERC721 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub approved: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")] - pub struct ApprovalForAllFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MockERC721Events { - ApprovalFilter(ApprovalFilter), - ApprovalForAllFilter(ApprovalForAllFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for MockERC721Events { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(MockERC721Events::ApprovalFilter(decoded)); - } - if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) { - return Ok(MockERC721Events::ApprovalForAllFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(MockERC721Events::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for MockERC721Events { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ApprovalForAllFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MockERC721Events { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for MockERC721Events { - fn from(value: ApprovalForAllFilter) -> Self { - Self::ApprovalForAllFilter(value) - } - } - impl ::core::convert::From for MockERC721Events { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub spender: ::ethers::core::types::Address, - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getApproved", abi = "getApproved(uint256)")] - pub struct GetApprovedCall { - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `initialize` function with signature `initialize(string,string)` and selector `0x4cd88b76` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "initialize", abi = "initialize(string,string)")] - pub struct InitializeCall { - pub name: ::std::string::String, - pub symbol: ::std::string::String, - } - ///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")] - pub struct IsApprovedForAllCall { - pub owner: ::ethers::core::types::Address, - pub operator: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "name", abi = "name()")] - pub struct NameCall; - ///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")] - pub struct OwnerOfCall { - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256)" - )] - pub struct SafeTransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256,bytes)" - )] - pub struct SafeTransferFromWithFromAndToAndDataCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub id: ::ethers::core::types::U256, - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")] - pub struct SetApprovalForAllCall { - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "symbol", abi = "symbol()")] - pub struct SymbolCall; - ///Container type for all input parameters for the `tokenURI` function with signature `tokenURI(uint256)` and selector `0xc87b56dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "tokenURI", abi = "tokenURI(uint256)")] - pub struct TokenURICall { - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MockERC721Calls { - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - GetApproved(GetApprovedCall), - Initialize(InitializeCall), - IsApprovedForAll(IsApprovedForAllCall), - Name(NameCall), - OwnerOf(OwnerOfCall), - SafeTransferFrom(SafeTransferFromCall), - SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall), - SetApprovalForAll(SetApprovalForAllCall), - SupportsInterface(SupportsInterfaceCall), - Symbol(SymbolCall), - TokenURI(TokenURICall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for MockERC721Calls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetApproved(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Initialize(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IsApprovedForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Name(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OwnerOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFrom(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetApprovalForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SupportsInterface(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Symbol(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TokenURI(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for MockERC721Calls { - fn encode(self) -> Vec { - match self { - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetApproved(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Initialize(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::IsApprovedForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OwnerOf(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SafeTransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SetApprovalForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TokenURI(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for MockERC721Calls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f), - Self::Initialize(element) => ::core::fmt::Display::fmt(element, f), - Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::Name(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), - Self::TokenURI(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: GetApprovedCall) -> Self { - Self::GetApproved(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: InitializeCall) -> Self { - Self::Initialize(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: IsApprovedForAllCall) -> Self { - Self::IsApprovedForAll(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: NameCall) -> Self { - Self::Name(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: OwnerOfCall) -> Self { - Self::OwnerOf(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: SafeTransferFromCall) -> Self { - Self::SafeTransferFrom(value) - } - } - impl ::core::convert::From - for MockERC721Calls { - fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self { - Self::SafeTransferFromWithFromAndToAndData(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: SetApprovalForAllCall) -> Self { - Self::SetApprovalForAll(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: SymbolCall) -> Self { - Self::Symbol(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: TokenURICall) -> Self { - Self::TokenURI(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetApprovedReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct IsApprovedForAllReturn(pub bool); - ///Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NameReturn(pub ::std::string::String); - ///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct OwnerOfReturn { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); - ///Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SymbolReturn(pub ::std::string::String); - ///Container type for all return fields from the `tokenURI` function with signature `tokenURI(uint256)` and selector `0xc87b56dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TokenURIReturn(pub ::std::string::String); -} diff --git a/crates/bindings/src/mockerc20.rs b/crates/bindings/src/mockerc20.rs new file mode 100644 index 0000000..db4bb21 --- /dev/null +++ b/crates/bindings/src/mockerc20.rs @@ -0,0 +1,3148 @@ +/** + +Generated by the following Solidity interface... +```solidity +interface MockERC20 { + event Approval(address indexed owner, address indexed spender, uint256 value); + event Transfer(address indexed from, address indexed to, uint256 value); + + function DOMAIN_SEPARATOR() external view returns (bytes32); + function allowance(address owner, address spender) external view returns (uint256); + function approve(address spender, uint256 amount) external returns (bool); + function balanceOf(address owner) external view returns (uint256); + function decimals() external view returns (uint8); + function initialize(string memory name_, string memory symbol_, uint8 decimals_) external; + function name() external view returns (string memory); + function nonces(address) external view returns (uint256); + function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; + function symbol() external view returns (string memory); + function totalSupply() external view returns (uint256); + function transfer(address to, uint256 amount) external returns (bool); + function transferFrom(address from, address to, uint256 amount) external returns (bool); +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "DOMAIN_SEPARATOR", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "name_", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol_", + "type": "string", + "internalType": "string" + }, + { + "name": "decimals_", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "nonces", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "permit", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod MockERC20 { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x608060405234801561001057600080fd5b50610e75806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80633644e5151161008c57806395d89b411161006657806395d89b41146101b5578063a9059cbb146101bd578063d505accf146101d0578063dd62ed3e146101e357600080fd5b80633644e5151461016457806370a082311461016c5780637ecebe001461019557600080fd5b806306fdde03146100d4578063095ea7b3146100f25780631624f6c61461011557806318160ddd1461012a57806323b872dd1461013c578063313ce5671461014f575b600080fd5b6100dc61021c565b6040516100e9919061097b565b60405180910390f35b6101056101003660046109e5565b6102ae565b60405190151581526020016100e9565b610128610123366004610ac3565b61031b565b005b6003545b6040519081526020016100e9565b61010561014a366004610b37565b6103ba565b60025460405160ff90911681526020016100e9565b61012e6104cf565b61012e61017a366004610b73565b6001600160a01b031660009081526004602052604090205490565b61012e6101a3366004610b73565b60086020526000908152604090205481565b6100dc6104f5565b6101056101cb3660046109e5565b610504565b6101286101de366004610b8e565b61059b565b61012e6101f1366004610bf8565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b60606000805461022b90610c2b565b80601f016020809104026020016040519081016040528092919081815260200182805461025790610c2b565b80156102a45780601f10610279576101008083540402835291602001916102a4565b820191906000526020600020905b81548152906001019060200180831161028757829003601f168201915b5050505050905090565b3360008181526005602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103099086815260200190565b60405180910390a35060015b92915050565b60095460ff16156103695760405162461bcd60e51b81526020600482015260136024820152721053149150511657d253925512505312569151606a1b60448201526064015b60405180910390fd5b60006103758482610cb4565b5060016103828382610cb4565b506002805460ff191660ff831617905561039a6107f9565b6006556103a5610812565b60075550506009805460ff1916600117905550565b6001600160a01b03831660009081526005602090815260408083203384529091528120546000198114610416576103f181846108b5565b6001600160a01b03861660009081526005602090815260408083203384529091529020555b6001600160a01b03851660009081526004602052604090205461043990846108b5565b6001600160a01b0380871660009081526004602052604080822093909355908616815220546104689084610918565b6001600160a01b0380861660008181526004602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906104bc9087815260200190565b60405180910390a3506001949350505050565b60006006546104dc6107f9565b146104ee576104e9610812565b905090565b5060075490565b60606001805461022b90610c2b565b3360009081526004602052604081205461051e90836108b5565b33600090815260046020526040808220929092556001600160a01b0385168152205461054a9083610918565b6001600160a01b0384166000818152600460205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103099086815260200190565b428410156105eb5760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152606401610360565b600060016105f76104cf565b6001600160a01b038a16600090815260086020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d9290919061064583610d8a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e001604051602081830303815290604052805190602001206040516020016106be92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561071c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906107525750876001600160a01b0316816001600160a01b0316145b61078f5760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152606401610360565b6001600160a01b0381811660009081526005602090815260408083208b8516808552908352928190208a90555189815291928b16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35050505050505050565b60006109778061080b63ffffffff8216565b9250505090565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60006040516108449190610da3565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66108756107f9565b604080516020810195909552840192909252606083015260808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000818310156109075760405162461bcd60e51b815260206004820152601c60248201527f45524332303a207375627472616374696f6e20756e646572666c6f77000000006044820152606401610360565b6109118284610e19565b9392505050565b6000806109258385610e2c565b9050838110156109115760405162461bcd60e51b815260206004820152601860248201527f45524332303a206164646974696f6e206f766572666c6f7700000000000000006044820152606401610360565b4690565b600060208083528351808285015260005b818110156109a85785810183015185820160400152820161098c565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146109e057600080fd5b919050565b600080604083850312156109f857600080fd5b610a01836109c9565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610a3657600080fd5b813567ffffffffffffffff80821115610a5157610a51610a0f565b604051601f8301601f19908116603f01168101908282118183101715610a7957610a79610a0f565b81604052838152866020858801011115610a9257600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146109e057600080fd5b600080600060608486031215610ad857600080fd5b833567ffffffffffffffff80821115610af057600080fd5b610afc87838801610a25565b94506020860135915080821115610b1257600080fd5b50610b1f86828701610a25565b925050610b2e60408501610ab2565b90509250925092565b600080600060608486031215610b4c57600080fd5b610b55846109c9565b9250610b63602085016109c9565b9150604084013590509250925092565b600060208284031215610b8557600080fd5b610911826109c9565b600080600080600080600060e0888a031215610ba957600080fd5b610bb2886109c9565b9650610bc0602089016109c9565b95506040880135945060608801359350610bdc60808901610ab2565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215610c0b57600080fd5b610c14836109c9565b9150610c22602084016109c9565b90509250929050565b600181811c90821680610c3f57607f821691505b602082108103610c5f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610caf57600081815260208120601f850160051c81016020861015610c8c5750805b601f850160051c820191505b81811015610cab57828155600101610c98565b5050505b505050565b815167ffffffffffffffff811115610cce57610cce610a0f565b610ce281610cdc8454610c2b565b84610c65565b602080601f831160018114610d175760008415610cff5750858301515b600019600386901b1c1916600185901b178555610cab565b600085815260208120601f198616915b82811015610d4657888601518255948401946001909101908401610d27565b5085821015610d645787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600060018201610d9c57610d9c610d74565b5060010190565b6000808354610db181610c2b565b60018281168015610dc95760018114610dde57610e0d565b60ff1984168752821515830287019450610e0d565b8760005260208060002060005b85811015610e045781548a820152908401908201610deb565b50505082870194505b50929695505050505050565b8181038181111561031557610315610d74565b8082018082111561031557610315610d7456fea2646970667358221220a71d19452fc82cba84fcb8a0076b1882356cce2288a816e333334cdfeeb5b4b664736f6c63430008150033 + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[Pa\x0Eu\x80a\0 `\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xCFW`\x005`\xE0\x1C\x80c6D\xE5\x15\x11a\0\x8CW\x80c\x95\xD8\x9BA\x11a\0fW\x80c\x95\xD8\x9BA\x14a\x01\xB5W\x80c\xA9\x05\x9C\xBB\x14a\x01\xBDW\x80c\xD5\x05\xAC\xCF\x14a\x01\xD0W\x80c\xDDb\xED>\x14a\x01\xE3W`\0\x80\xFD[\x80c6D\xE5\x15\x14a\x01dW\x80cp\xA0\x821\x14a\x01lW\x80c~\xCE\xBE\0\x14a\x01\x95W`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xD4W\x80c\t^\xA7\xB3\x14a\0\xF2W\x80c\x16$\xF6\xC6\x14a\x01\x15W\x80c\x18\x16\r\xDD\x14a\x01*W\x80c#\xB8r\xDD\x14a\x01=`\0\xFD[PP`@Q`\x1F\x19\x01Q\x91PP`\x01`\x01`\xA0\x1B\x03\x81\x16\x15\x80\x15\x90a\x07RWP\x87`\x01`\x01`\xA0\x1B\x03\x16\x81`\x01`\x01`\xA0\x1B\x03\x16\x14[a\x07\x8FW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm$\xA7+ \xA6$\xA2/\xA9\xA4\xA3\xA7\"\xA9`\x91\x1B`D\x82\x01R`d\x01a\x03`V[`\x01`\x01`\xA0\x1B\x03\x81\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x8B\x85\x16\x80\x85R\x90\x83R\x92\x81\x90 \x8A\x90UQ\x89\x81R\x91\x92\x8B\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPPPPPPV[`\0a\tw\x80a\x08\x0Bc\xFF\xFF\xFF\xFF\x82\x16V[\x92PPP\x90V[`\0\x7F\x8Bs\xC3\xC6\x9B\xB8\xFE=Q.\xCCL\xF7Y\xCCy#\x9F{\x17\x9B\x0F\xFA\xCA\xA9\xA7]R+9@\x0F`\0`@Qa\x08D\x91\x90a\r\xA3V[`@Q\x80\x91\x03\x90 \x7F\xC8\x9E\xFD\xAAT\xC0\xF2\x0Cz\xDFa(\x82\xDF\tP\xF5\xA9Qc~\x03\x07\xCD\xCBLg/)\x8B\x8B\xC6a\x08ua\x07\xF9V[`@\x80Q` \x81\x01\x95\x90\x95R\x84\x01\x92\x90\x92R``\x83\x01R`\x80\x82\x01R0`\xA0\x82\x01R`\xC0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 \x90P\x90V[`\0\x81\x83\x10\x15a\t\x07W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FERC20: subtraction underflow\0\0\0\0`D\x82\x01R`d\x01a\x03`V[a\t\x11\x82\x84a\x0E\x19V[\x93\x92PPPV[`\0\x80a\t%\x83\x85a\x0E,V[\x90P\x83\x81\x10\x15a\t\x11W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x18`$\x82\x01R\x7FERC20: addition overflow\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03`V[F\x90V[`\0` \x80\x83R\x83Q\x80\x82\x85\x01R`\0[\x81\x81\x10\x15a\t\xA8W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\t\x8CV[P`\0`@\x82\x86\x01\x01R`@`\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\t\xF8W`\0\x80\xFD[a\n\x01\x83a\t\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0\x82`\x1F\x83\x01\x12a\n6W`\0\x80\xFD[\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\nQWa\nQa\n\x0FV[`@Q`\x1F\x83\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\nyWa\nya\n\x0FV[\x81`@R\x83\x81R\x86` \x85\x88\x01\x01\x11\x15a\n\x92W`\0\x80\xFD[\x83` \x87\x01` \x83\x017`\0` \x85\x83\x01\x01R\x80\x94PPPPP\x92\x91PPV[\x805`\xFF\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[`\0\x80`\0``\x84\x86\x03\x12\x15a\n\xD8W`\0\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\n\xF0W`\0\x80\xFD[a\n\xFC\x87\x83\x88\x01a\n%V[\x94P` \x86\x015\x91P\x80\x82\x11\x15a\x0B\x12W`\0\x80\xFD[Pa\x0B\x1F\x86\x82\x87\x01a\n%V[\x92PPa\x0B.`@\x85\x01a\n\xB2V[\x90P\x92P\x92P\x92V[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0BLW`\0\x80\xFD[a\x0BU\x84a\t\xC9V[\x92Pa\x0Bc` \x85\x01a\t\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\x0B\x85W`\0\x80\xFD[a\t\x11\x82a\t\xC9V[`\0\x80`\0\x80`\0\x80`\0`\xE0\x88\x8A\x03\x12\x15a\x0B\xA9W`\0\x80\xFD[a\x0B\xB2\x88a\t\xC9V[\x96Pa\x0B\xC0` \x89\x01a\t\xC9V[\x95P`@\x88\x015\x94P``\x88\x015\x93Pa\x0B\xDC`\x80\x89\x01a\n\xB2V[\x92P`\xA0\x88\x015\x91P`\xC0\x88\x015\x90P\x92\x95\x98\x91\x94\x97P\x92\x95PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x0BW`\0\x80\xFD[a\x0C\x14\x83a\t\xC9V[\x91Pa\x0C\"` \x84\x01a\t\xC9V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0C?W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x0C_WcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x0C\xAFW`\0\x81\x81R` \x81 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x0C\x8CWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x0C\xABW\x82\x81U`\x01\x01a\x0C\x98V[PPP[PPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xCEWa\x0C\xCEa\n\x0FV[a\x0C\xE2\x81a\x0C\xDC\x84Ta\x0C+V[\x84a\x0CeV[` \x80`\x1F\x83\x11`\x01\x81\x14a\r\x17W`\0\x84\x15a\x0C\xFFWP\x85\x83\x01Q[`\0\x19`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x0C\xABV[`\0\x85\x81R` \x81 `\x1F\x19\x86\x16\x91[\x82\x81\x10\x15a\rFW\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\r'V[P\x85\x82\x10\x15a\rdW\x87\x85\x01Q`\0\x19`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\r\x9CWa\r\x9Ca\rtV[P`\x01\x01\x90V[`\0\x80\x83Ta\r\xB1\x81a\x0C+V[`\x01\x82\x81\x16\x80\x15a\r\xC9W`\x01\x81\x14a\r\xDEWa\x0E\rV[`\xFF\x19\x84\x16\x87R\x82\x15\x15\x83\x02\x87\x01\x94Pa\x0E\rV[\x87`\0R` \x80`\0 `\0[\x85\x81\x10\x15a\x0E\x04W\x81T\x8A\x82\x01R\x90\x84\x01\x90\x82\x01a\r\xEBV[PPP\x82\x87\x01\x94P[P\x92\x96\x95PPPPPPV[\x81\x81\x03\x81\x81\x11\x15a\x03\x15Wa\x03\x15a\rtV[\x80\x82\x01\x80\x82\x11\x15a\x03\x15Wa\x03\x15a\rtV\xFE\xA2dipfsX\"\x12 \xA7\x1D\x19E/\xC8,\xBA\x84\xFC\xB8\xA0\x07k\x18\x825l\xCE\"\x88\xA8\x16\xE333L\xDF\xEE\xB5\xB4\xB6dsolcC\0\x08\x15\x003", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80633644e5151161008c57806395d89b411161006657806395d89b41146101b5578063a9059cbb146101bd578063d505accf146101d0578063dd62ed3e146101e357600080fd5b80633644e5151461016457806370a082311461016c5780637ecebe001461019557600080fd5b806306fdde03146100d4578063095ea7b3146100f25780631624f6c61461011557806318160ddd1461012a57806323b872dd1461013c578063313ce5671461014f575b600080fd5b6100dc61021c565b6040516100e9919061097b565b60405180910390f35b6101056101003660046109e5565b6102ae565b60405190151581526020016100e9565b610128610123366004610ac3565b61031b565b005b6003545b6040519081526020016100e9565b61010561014a366004610b37565b6103ba565b60025460405160ff90911681526020016100e9565b61012e6104cf565b61012e61017a366004610b73565b6001600160a01b031660009081526004602052604090205490565b61012e6101a3366004610b73565b60086020526000908152604090205481565b6100dc6104f5565b6101056101cb3660046109e5565b610504565b6101286101de366004610b8e565b61059b565b61012e6101f1366004610bf8565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b60606000805461022b90610c2b565b80601f016020809104026020016040519081016040528092919081815260200182805461025790610c2b565b80156102a45780601f10610279576101008083540402835291602001916102a4565b820191906000526020600020905b81548152906001019060200180831161028757829003601f168201915b5050505050905090565b3360008181526005602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103099086815260200190565b60405180910390a35060015b92915050565b60095460ff16156103695760405162461bcd60e51b81526020600482015260136024820152721053149150511657d253925512505312569151606a1b60448201526064015b60405180910390fd5b60006103758482610cb4565b5060016103828382610cb4565b506002805460ff191660ff831617905561039a6107f9565b6006556103a5610812565b60075550506009805460ff1916600117905550565b6001600160a01b03831660009081526005602090815260408083203384529091528120546000198114610416576103f181846108b5565b6001600160a01b03861660009081526005602090815260408083203384529091529020555b6001600160a01b03851660009081526004602052604090205461043990846108b5565b6001600160a01b0380871660009081526004602052604080822093909355908616815220546104689084610918565b6001600160a01b0380861660008181526004602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906104bc9087815260200190565b60405180910390a3506001949350505050565b60006006546104dc6107f9565b146104ee576104e9610812565b905090565b5060075490565b60606001805461022b90610c2b565b3360009081526004602052604081205461051e90836108b5565b33600090815260046020526040808220929092556001600160a01b0385168152205461054a9083610918565b6001600160a01b0384166000818152600460205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103099086815260200190565b428410156105eb5760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152606401610360565b600060016105f76104cf565b6001600160a01b038a16600090815260086020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d9290919061064583610d8a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e001604051602081830303815290604052805190602001206040516020016106be92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561071c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906107525750876001600160a01b0316816001600160a01b0316145b61078f5760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152606401610360565b6001600160a01b0381811660009081526005602090815260408083208b8516808552908352928190208a90555189815291928b16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35050505050505050565b60006109778061080b63ffffffff8216565b9250505090565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60006040516108449190610da3565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66108756107f9565b604080516020810195909552840192909252606083015260808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000818310156109075760405162461bcd60e51b815260206004820152601c60248201527f45524332303a207375627472616374696f6e20756e646572666c6f77000000006044820152606401610360565b6109118284610e19565b9392505050565b6000806109258385610e2c565b9050838110156109115760405162461bcd60e51b815260206004820152601860248201527f45524332303a206164646974696f6e206f766572666c6f7700000000000000006044820152606401610360565b4690565b600060208083528351808285015260005b818110156109a85785810183015185820160400152820161098c565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146109e057600080fd5b919050565b600080604083850312156109f857600080fd5b610a01836109c9565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610a3657600080fd5b813567ffffffffffffffff80821115610a5157610a51610a0f565b604051601f8301601f19908116603f01168101908282118183101715610a7957610a79610a0f565b81604052838152866020858801011115610a9257600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146109e057600080fd5b600080600060608486031215610ad857600080fd5b833567ffffffffffffffff80821115610af057600080fd5b610afc87838801610a25565b94506020860135915080821115610b1257600080fd5b50610b1f86828701610a25565b925050610b2e60408501610ab2565b90509250925092565b600080600060608486031215610b4c57600080fd5b610b55846109c9565b9250610b63602085016109c9565b9150604084013590509250925092565b600060208284031215610b8557600080fd5b610911826109c9565b600080600080600080600060e0888a031215610ba957600080fd5b610bb2886109c9565b9650610bc0602089016109c9565b95506040880135945060608801359350610bdc60808901610ab2565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215610c0b57600080fd5b610c14836109c9565b9150610c22602084016109c9565b90509250929050565b600181811c90821680610c3f57607f821691505b602082108103610c5f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610caf57600081815260208120601f850160051c81016020861015610c8c5750805b601f850160051c820191505b81811015610cab57828155600101610c98565b5050505b505050565b815167ffffffffffffffff811115610cce57610cce610a0f565b610ce281610cdc8454610c2b565b84610c65565b602080601f831160018114610d175760008415610cff5750858301515b600019600386901b1c1916600185901b178555610cab565b600085815260208120601f198616915b82811015610d4657888601518255948401946001909101908401610d27565b5085821015610d645787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600060018201610d9c57610d9c610d74565b5060010190565b6000808354610db181610c2b565b60018281168015610dc95760018114610dde57610e0d565b60ff1984168752821515830287019450610e0d565b8760005260208060002060005b85811015610e045781548a820152908401908201610deb565b50505082870194505b50929695505050505050565b8181038181111561031557610315610d74565b8082018082111561031557610315610d7456fea2646970667358221220a71d19452fc82cba84fcb8a0076b1882356cce2288a816e333334cdfeeb5b4b664736f6c63430008150033 + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xCFW`\x005`\xE0\x1C\x80c6D\xE5\x15\x11a\0\x8CW\x80c\x95\xD8\x9BA\x11a\0fW\x80c\x95\xD8\x9BA\x14a\x01\xB5W\x80c\xA9\x05\x9C\xBB\x14a\x01\xBDW\x80c\xD5\x05\xAC\xCF\x14a\x01\xD0W\x80c\xDDb\xED>\x14a\x01\xE3W`\0\x80\xFD[\x80c6D\xE5\x15\x14a\x01dW\x80cp\xA0\x821\x14a\x01lW\x80c~\xCE\xBE\0\x14a\x01\x95W`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xD4W\x80c\t^\xA7\xB3\x14a\0\xF2W\x80c\x16$\xF6\xC6\x14a\x01\x15W\x80c\x18\x16\r\xDD\x14a\x01*W\x80c#\xB8r\xDD\x14a\x01=`\0\xFD[PP`@Q`\x1F\x19\x01Q\x91PP`\x01`\x01`\xA0\x1B\x03\x81\x16\x15\x80\x15\x90a\x07RWP\x87`\x01`\x01`\xA0\x1B\x03\x16\x81`\x01`\x01`\xA0\x1B\x03\x16\x14[a\x07\x8FW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm$\xA7+ \xA6$\xA2/\xA9\xA4\xA3\xA7\"\xA9`\x91\x1B`D\x82\x01R`d\x01a\x03`V[`\x01`\x01`\xA0\x1B\x03\x81\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x8B\x85\x16\x80\x85R\x90\x83R\x92\x81\x90 \x8A\x90UQ\x89\x81R\x91\x92\x8B\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPPPPPPV[`\0a\tw\x80a\x08\x0Bc\xFF\xFF\xFF\xFF\x82\x16V[\x92PPP\x90V[`\0\x7F\x8Bs\xC3\xC6\x9B\xB8\xFE=Q.\xCCL\xF7Y\xCCy#\x9F{\x17\x9B\x0F\xFA\xCA\xA9\xA7]R+9@\x0F`\0`@Qa\x08D\x91\x90a\r\xA3V[`@Q\x80\x91\x03\x90 \x7F\xC8\x9E\xFD\xAAT\xC0\xF2\x0Cz\xDFa(\x82\xDF\tP\xF5\xA9Qc~\x03\x07\xCD\xCBLg/)\x8B\x8B\xC6a\x08ua\x07\xF9V[`@\x80Q` \x81\x01\x95\x90\x95R\x84\x01\x92\x90\x92R``\x83\x01R`\x80\x82\x01R0`\xA0\x82\x01R`\xC0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 \x90P\x90V[`\0\x81\x83\x10\x15a\t\x07W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FERC20: subtraction underflow\0\0\0\0`D\x82\x01R`d\x01a\x03`V[a\t\x11\x82\x84a\x0E\x19V[\x93\x92PPPV[`\0\x80a\t%\x83\x85a\x0E,V[\x90P\x83\x81\x10\x15a\t\x11W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x18`$\x82\x01R\x7FERC20: addition overflow\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03`V[F\x90V[`\0` \x80\x83R\x83Q\x80\x82\x85\x01R`\0[\x81\x81\x10\x15a\t\xA8W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\t\x8CV[P`\0`@\x82\x86\x01\x01R`@`\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\t\xF8W`\0\x80\xFD[a\n\x01\x83a\t\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0\x82`\x1F\x83\x01\x12a\n6W`\0\x80\xFD[\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\nQWa\nQa\n\x0FV[`@Q`\x1F\x83\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\nyWa\nya\n\x0FV[\x81`@R\x83\x81R\x86` \x85\x88\x01\x01\x11\x15a\n\x92W`\0\x80\xFD[\x83` \x87\x01` \x83\x017`\0` \x85\x83\x01\x01R\x80\x94PPPPP\x92\x91PPV[\x805`\xFF\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[`\0\x80`\0``\x84\x86\x03\x12\x15a\n\xD8W`\0\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\n\xF0W`\0\x80\xFD[a\n\xFC\x87\x83\x88\x01a\n%V[\x94P` \x86\x015\x91P\x80\x82\x11\x15a\x0B\x12W`\0\x80\xFD[Pa\x0B\x1F\x86\x82\x87\x01a\n%V[\x92PPa\x0B.`@\x85\x01a\n\xB2V[\x90P\x92P\x92P\x92V[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0BLW`\0\x80\xFD[a\x0BU\x84a\t\xC9V[\x92Pa\x0Bc` \x85\x01a\t\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\x0B\x85W`\0\x80\xFD[a\t\x11\x82a\t\xC9V[`\0\x80`\0\x80`\0\x80`\0`\xE0\x88\x8A\x03\x12\x15a\x0B\xA9W`\0\x80\xFD[a\x0B\xB2\x88a\t\xC9V[\x96Pa\x0B\xC0` \x89\x01a\t\xC9V[\x95P`@\x88\x015\x94P``\x88\x015\x93Pa\x0B\xDC`\x80\x89\x01a\n\xB2V[\x92P`\xA0\x88\x015\x91P`\xC0\x88\x015\x90P\x92\x95\x98\x91\x94\x97P\x92\x95PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x0BW`\0\x80\xFD[a\x0C\x14\x83a\t\xC9V[\x91Pa\x0C\"` \x84\x01a\t\xC9V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0C?W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x0C_WcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x0C\xAFW`\0\x81\x81R` \x81 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x0C\x8CWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x0C\xABW\x82\x81U`\x01\x01a\x0C\x98V[PPP[PPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xCEWa\x0C\xCEa\n\x0FV[a\x0C\xE2\x81a\x0C\xDC\x84Ta\x0C+V[\x84a\x0CeV[` \x80`\x1F\x83\x11`\x01\x81\x14a\r\x17W`\0\x84\x15a\x0C\xFFWP\x85\x83\x01Q[`\0\x19`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x0C\xABV[`\0\x85\x81R` \x81 `\x1F\x19\x86\x16\x91[\x82\x81\x10\x15a\rFW\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\r'V[P\x85\x82\x10\x15a\rdW\x87\x85\x01Q`\0\x19`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\r\x9CWa\r\x9Ca\rtV[P`\x01\x01\x90V[`\0\x80\x83Ta\r\xB1\x81a\x0C+V[`\x01\x82\x81\x16\x80\x15a\r\xC9W`\x01\x81\x14a\r\xDEWa\x0E\rV[`\xFF\x19\x84\x16\x87R\x82\x15\x15\x83\x02\x87\x01\x94Pa\x0E\rV[\x87`\0R` \x80`\0 `\0[\x85\x81\x10\x15a\x0E\x04W\x81T\x8A\x82\x01R\x90\x84\x01\x90\x82\x01a\r\xEBV[PPP\x82\x87\x01\x94P[P\x92\x96\x95PPPPPPV[\x81\x81\x03\x81\x81\x11\x15a\x03\x15Wa\x03\x15a\rtV[\x80\x82\x01\x80\x82\x11\x15a\x03\x15Wa\x03\x15a\rtV\xFE\xA2dipfsX\"\x12 \xA7\x1D\x19E/\xC8,\xBA\x84\xFC\xB8\xA0\x07k\x18\x825l\xCE\"\x88\xA8\x16\xE333L\xDF\xEE\xB5\xB4\xB6dsolcC\0\x08\x15\x003", + ); + /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. +```solidity +event Approval(address indexed owner, address indexed spender, uint256 value); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct Approval { + #[allow(missing_docs)] + pub owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub spender: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub value: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Approval { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "Approval(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + owner: topics.1, + spender: topics.2, + value: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.value), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self.owner, + ); + out[2usize] = ::encode_topic( + &self.spender, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Approval> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Approval) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. +```solidity +event Transfer(address indexed from, address indexed to, uint256 value); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct Transfer { + #[allow(missing_docs)] + pub from: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub value: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Transfer { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + from: topics.1, + to: topics.2, + value: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.value), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self.from, + ); + out[2usize] = ::encode_topic( + &self.to, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Transfer> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Transfer) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. +```solidity +function DOMAIN_SEPARATOR() external view returns (bytes32); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct DOMAIN_SEPARATORCall {} + ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct DOMAIN_SEPARATORReturn { + pub _0: alloy::sol_types::private::FixedBytes<32>, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: DOMAIN_SEPARATORCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for DOMAIN_SEPARATORCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: DOMAIN_SEPARATORReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for DOMAIN_SEPARATORReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = DOMAIN_SEPARATORReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`. +```solidity +function allowance(address owner, address spender) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct allowanceCall { + pub owner: alloy::sol_types::private::Address, + pub spender: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct allowanceReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: allowanceCall) -> Self { + (value.owner, value.spender) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for allowanceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + owner: tuple.0, + spender: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: allowanceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for allowanceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for allowanceCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = allowanceReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "allowance(address,address)"; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.owner, + ), + ::tokenize( + &self.spender, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. +```solidity +function approve(address spender, uint256 amount) external returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveCall { + pub spender: alloy::sol_types::private::Address, + pub amount: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveCall) -> Self { + (value.spender, value.amount) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + spender: tuple.0, + amount: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for approveCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = approveReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "approve(address,uint256)"; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.spender, + ), + as alloy_sol_types::SolType>::tokenize(&self.amount), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `balanceOf(address)` and selector `0x70a08231`. +```solidity +function balanceOf(address owner) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfCall { + pub owner: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfCall) -> Self { + (value.owner,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { owner: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for balanceOfCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = balanceOfReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "balanceOf(address)"; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.owner, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `decimals()` and selector `0x313ce567`. +```solidity +function decimals() external view returns (uint8); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct decimalsCall {} + ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct decimalsReturn { + pub _0: u8, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: decimalsCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for decimalsCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: decimalsReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for decimalsReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for decimalsCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = decimalsReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "decimals()"; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `initialize(string,string,uint8)` and selector `0x1624f6c6`. +```solidity +function initialize(string memory name_, string memory symbol_, uint8 decimals_) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct initializeCall { + pub name_: alloy::sol_types::private::String, + pub symbol_: alloy::sol_types::private::String, + pub decimals_: u8, + } + ///Container type for the return parameters of the [`initialize(string,string,uint8)`](initializeCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct initializeReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + alloy::sol_types::private::String, + u8, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: initializeCall) -> Self { + (value.name_, value.symbol_, value.decimals_) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for initializeCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + name_: tuple.0, + symbol_: tuple.1, + decimals_: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: initializeReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for initializeReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for initializeCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = initializeReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "initialize(string,string,uint8)"; + const SELECTOR: [u8; 4] = [22u8, 36u8, 246u8, 198u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.name_, + ), + ::tokenize( + &self.symbol_, + ), + as alloy_sol_types::SolType>::tokenize(&self.decimals_), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `name()` and selector `0x06fdde03`. +```solidity +function name() external view returns (string memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct nameCall {} + ///Container type for the return parameters of the [`name()`](nameCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct nameReturn { + pub _0: alloy::sol_types::private::String, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: nameCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for nameCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: nameReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for nameReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for nameCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = nameReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "name()"; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `nonces(address)` and selector `0x7ecebe00`. +```solidity +function nonces(address) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct noncesCall { + pub _0: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`nonces(address)`](noncesCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct noncesReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: noncesCall) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for noncesCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: noncesReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for noncesReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for noncesCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = noncesReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "nonces(address)"; + const SELECTOR: [u8; 4] = [126u8, 206u8, 190u8, 0u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._0, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf`. +```solidity +function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct permitCall { + pub owner: alloy::sol_types::private::Address, + pub spender: alloy::sol_types::private::Address, + pub value: alloy::sol_types::private::U256, + pub deadline: alloy::sol_types::private::U256, + pub v: u8, + pub r: alloy::sol_types::private::FixedBytes<32>, + pub s: alloy::sol_types::private::FixedBytes<32>, + } + ///Container type for the return parameters of the [`permit(address,address,uint256,uint256,uint8,bytes32,bytes32)`](permitCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct permitReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + alloy::sol_types::private::U256, + u8, + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::FixedBytes<32>, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: permitCall) -> Self { + ( + value.owner, + value.spender, + value.value, + value.deadline, + value.v, + value.r, + value.s, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for permitCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + owner: tuple.0, + spender: tuple.1, + value: tuple.2, + deadline: tuple.3, + v: tuple.4, + r: tuple.5, + s: tuple.6, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: permitReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for permitReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for permitCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = permitReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + const SELECTOR: [u8; 4] = [213u8, 5u8, 172u8, 207u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.owner, + ), + ::tokenize( + &self.spender, + ), + as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize(&self.deadline), + as alloy_sol_types::SolType>::tokenize(&self.v), + as alloy_sol_types::SolType>::tokenize(&self.r), + as alloy_sol_types::SolType>::tokenize(&self.s), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `symbol()` and selector `0x95d89b41`. +```solidity +function symbol() external view returns (string memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct symbolCall {} + ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct symbolReturn { + pub _0: alloy::sol_types::private::String, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: symbolCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for symbolCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: symbolReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for symbolReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for symbolCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = symbolReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "symbol()"; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `totalSupply()` and selector `0x18160ddd`. +```solidity +function totalSupply() external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct totalSupplyCall {} + ///Container type for the return parameters of the [`totalSupply()`](totalSupplyCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct totalSupplyReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: totalSupplyCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for totalSupplyCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: totalSupplyReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for totalSupplyReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for totalSupplyCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = totalSupplyReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "totalSupply()"; + const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. +```solidity +function transfer(address to, uint256 amount) external returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferCall { + pub to: alloy::sol_types::private::Address, + pub amount: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferCall) -> Self { + (value.to, value.amount) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + to: tuple.0, + amount: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for transferCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = transferReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.to, + ), + as alloy_sol_types::SolType>::tokenize(&self.amount), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. +```solidity +function transferFrom(address from, address to, uint256 amount) external returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromCall { + pub from: alloy::sol_types::private::Address, + pub to: alloy::sol_types::private::Address, + pub amount: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromCall) -> Self { + (value.from, value.to, value.amount) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + from: tuple.0, + to: tuple.1, + amount: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for transferFromCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = transferFromReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.from, + ), + ::tokenize( + &self.to, + ), + as alloy_sol_types::SolType>::tokenize(&self.amount), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + ///Container for all the [`MockERC20`](self) function calls. + pub enum MockERC20Calls { + DOMAIN_SEPARATOR(DOMAIN_SEPARATORCall), + allowance(allowanceCall), + approve(approveCall), + balanceOf(balanceOfCall), + decimals(decimalsCall), + initialize(initializeCall), + name(nameCall), + nonces(noncesCall), + permit(permitCall), + symbol(symbolCall), + totalSupply(totalSupplyCall), + transfer(transferCall), + transferFrom(transferFromCall), + } + #[automatically_derived] + impl MockERC20Calls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [6u8, 253u8, 222u8, 3u8], + [9u8, 94u8, 167u8, 179u8], + [22u8, 36u8, 246u8, 198u8], + [24u8, 22u8, 13u8, 221u8], + [35u8, 184u8, 114u8, 221u8], + [49u8, 60u8, 229u8, 103u8], + [54u8, 68u8, 229u8, 21u8], + [112u8, 160u8, 130u8, 49u8], + [126u8, 206u8, 190u8, 0u8], + [149u8, 216u8, 155u8, 65u8], + [169u8, 5u8, 156u8, 187u8], + [213u8, 5u8, 172u8, 207u8], + [221u8, 98u8, 237u8, 62u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for MockERC20Calls { + const NAME: &'static str = "MockERC20Calls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 13usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::DOMAIN_SEPARATOR(_) => { + ::SELECTOR + } + Self::allowance(_) => { + ::SELECTOR + } + Self::approve(_) => ::SELECTOR, + Self::balanceOf(_) => { + ::SELECTOR + } + Self::decimals(_) => ::SELECTOR, + Self::initialize(_) => { + ::SELECTOR + } + Self::name(_) => ::SELECTOR, + Self::nonces(_) => ::SELECTOR, + Self::permit(_) => ::SELECTOR, + Self::symbol(_) => ::SELECTOR, + Self::totalSupply(_) => { + ::SELECTOR + } + Self::transfer(_) => ::SELECTOR, + Self::transferFrom(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn name( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::name) + } + name + }, + { + fn approve( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::approve) + } + approve + }, + { + fn initialize( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::initialize) + } + initialize + }, + { + fn totalSupply( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::totalSupply) + } + totalSupply + }, + { + fn transferFrom( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::transferFrom) + } + transferFrom + }, + { + fn decimals( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::decimals) + } + decimals + }, + { + fn DOMAIN_SEPARATOR( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::DOMAIN_SEPARATOR) + } + DOMAIN_SEPARATOR + }, + { + fn balanceOf( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::balanceOf) + } + balanceOf + }, + { + fn nonces( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::nonces) + } + nonces + }, + { + fn symbol( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::symbol) + } + symbol + }, + { + fn transfer( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::transfer) + } + transfer + }, + { + fn permit( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::permit) + } + permit + }, + { + fn allowance( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC20Calls::allowance) + } + allowance + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::DOMAIN_SEPARATOR(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::allowance(inner) => { + ::abi_encoded_size(inner) + } + Self::approve(inner) => { + ::abi_encoded_size(inner) + } + Self::balanceOf(inner) => { + ::abi_encoded_size(inner) + } + Self::decimals(inner) => { + ::abi_encoded_size(inner) + } + Self::initialize(inner) => { + ::abi_encoded_size(inner) + } + Self::name(inner) => { + ::abi_encoded_size(inner) + } + Self::nonces(inner) => { + ::abi_encoded_size(inner) + } + Self::permit(inner) => { + ::abi_encoded_size(inner) + } + Self::symbol(inner) => { + ::abi_encoded_size(inner) + } + Self::totalSupply(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::transfer(inner) => { + ::abi_encoded_size(inner) + } + Self::transferFrom(inner) => { + ::abi_encoded_size( + inner, + ) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::DOMAIN_SEPARATOR(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::allowance(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::approve(inner) => { + ::abi_encode_raw(inner, out) + } + Self::balanceOf(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::decimals(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::initialize(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::name(inner) => { + ::abi_encode_raw(inner, out) + } + Self::nonces(inner) => { + ::abi_encode_raw(inner, out) + } + Self::permit(inner) => { + ::abi_encode_raw(inner, out) + } + Self::symbol(inner) => { + ::abi_encode_raw(inner, out) + } + Self::totalSupply(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::transfer(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::transferFrom(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + ///Container for all the [`MockERC20`](self) events. + pub enum MockERC20Events { + Approval(Approval), + Transfer(Transfer), + } + #[automatically_derived] + impl MockERC20Events { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ], + [ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for MockERC20Events { + const NAME: &'static str = "MockERC20Events"; + const COUNT: usize = 2usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Approval) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Transfer) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for MockERC20Events { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`MockERC20`](self) contract instance. + +See the [wrapper's documentation](`MockERC20Instance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> MockERC20Instance { + MockERC20Instance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + MockERC20Instance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + MockERC20Instance::::deploy_builder(provider) + } + /**A [`MockERC20`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`MockERC20`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct MockERC20Instance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for MockERC20Instance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("MockERC20Instance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC20Instance { + /**Creates a new wrapper around an on-chain [`MockERC20`](self) contract instance. + +See the [wrapper's documentation](`MockERC20Instance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl MockERC20Instance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> MockERC20Instance { + MockERC20Instance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC20Instance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`DOMAIN_SEPARATOR`] function. + pub fn DOMAIN_SEPARATOR( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&DOMAIN_SEPARATORCall {}) + } + ///Creates a new call builder for the [`allowance`] function. + pub fn allowance( + &self, + owner: alloy::sol_types::private::Address, + spender: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&allowanceCall { owner, spender }) + } + ///Creates a new call builder for the [`approve`] function. + pub fn approve( + &self, + spender: alloy::sol_types::private::Address, + amount: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&approveCall { spender, amount }) + } + ///Creates a new call builder for the [`balanceOf`] function. + pub fn balanceOf( + &self, + owner: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&balanceOfCall { owner }) + } + ///Creates a new call builder for the [`decimals`] function. + pub fn decimals( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&decimalsCall {}) + } + ///Creates a new call builder for the [`initialize`] function. + pub fn initialize( + &self, + name_: alloy::sol_types::private::String, + symbol_: alloy::sol_types::private::String, + decimals_: u8, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &initializeCall { + name_, + symbol_, + decimals_, + }, + ) + } + ///Creates a new call builder for the [`name`] function. + pub fn name(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&nameCall {}) + } + ///Creates a new call builder for the [`nonces`] function. + pub fn nonces( + &self, + _0: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&noncesCall { _0 }) + } + ///Creates a new call builder for the [`permit`] function. + pub fn permit( + &self, + owner: alloy::sol_types::private::Address, + spender: alloy::sol_types::private::Address, + value: alloy::sol_types::private::U256, + deadline: alloy::sol_types::private::U256, + v: u8, + r: alloy::sol_types::private::FixedBytes<32>, + s: alloy::sol_types::private::FixedBytes<32>, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &permitCall { + owner, + spender, + value, + deadline, + v, + r, + s, + }, + ) + } + ///Creates a new call builder for the [`symbol`] function. + pub fn symbol(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&symbolCall {}) + } + ///Creates a new call builder for the [`totalSupply`] function. + pub fn totalSupply( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&totalSupplyCall {}) + } + ///Creates a new call builder for the [`transfer`] function. + pub fn transfer( + &self, + to: alloy::sol_types::private::Address, + amount: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&transferCall { to, amount }) + } + ///Creates a new call builder for the [`transferFrom`] function. + pub fn transferFrom( + &self, + from: alloy::sol_types::private::Address, + to: alloy::sol_types::private::Address, + amount: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &transferFromCall { + from, + to, + amount, + }, + ) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC20Instance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`Approval`] event. + pub fn Approval_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`Transfer`] event. + pub fn Transfer_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + } +} diff --git a/crates/bindings/src/mockerc721.rs b/crates/bindings/src/mockerc721.rs new file mode 100644 index 0000000..c11f31c --- /dev/null +++ b/crates/bindings/src/mockerc721.rs @@ -0,0 +1,3553 @@ +/** + +Generated by the following Solidity interface... +```solidity +interface MockERC721 { + event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); + event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); + event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); + + function approve(address spender, uint256 id) external payable; + function balanceOf(address owner) external view returns (uint256); + function getApproved(uint256 id) external view returns (address); + function initialize(string memory name_, string memory symbol_) external; + function isApprovedForAll(address owner, address operator) external view returns (bool); + function name() external view returns (string memory); + function ownerOf(uint256 id) external view returns (address owner); + function safeTransferFrom(address from, address to, uint256 id) external payable; + function safeTransferFrom(address from, address to, uint256 id, bytes memory data) external payable; + function setApprovalForAll(address operator, bool approved) external; + function supportsInterface(bytes4 interfaceId) external view returns (bool); + function symbol() external view returns (string memory); + function tokenURI(uint256 id) external view returns (string memory); + function transferFrom(address from, address to, uint256 id) external payable; +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getApproved", + "inputs": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "name_", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol_", + "type": "string", + "internalType": "string" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isApprovedForAll", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "ownerOf", + "inputs": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "setApprovalForAll", + "inputs": [ + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "approved", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenURI", + "inputs": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "_owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_approved", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ApprovalForAll", + "inputs": [ + { + "name": "_owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_approved", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "_from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "_tokenId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod MockERC721 { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x608060405234801561001057600080fd5b50610f7a806100206000396000f3fe6080604052600436106100dd5760003560e01c80636352211e1161007f578063a22cb46511610059578063a22cb46514610245578063b88d4fde14610265578063c87b56dd14610278578063e985e9c51461029957600080fd5b80636352211e146101e257806370a082311461020257806395d89b411461023057600080fd5b8063095ea7b3116100bb578063095ea7b31461018757806323b872dd1461019c57806342842e0e146101af5780634cd88b76146101c257600080fd5b806301ffc9a7146100e257806306fdde0314610117578063081812fc14610139575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610a33565b6102e2565b60405190151581526020015b60405180910390f35b34801561012357600080fd5b5061012c610334565b60405161010e9190610a9d565b34801561014557600080fd5b5061016f610154366004610ab0565b6000908152600460205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200161010e565b61019a610195366004610ae0565b6103c6565b005b61019a6101aa366004610b0a565b6104ad565b61019a6101bd366004610b0a565b6106a6565b3480156101ce57600080fd5b5061019a6101dd366004610bf2565b610795565b3480156101ee57600080fd5b5061016f6101fd366004610ab0565b610809565b34801561020e57600080fd5b5061022261021d366004610c56565b610860565b60405190815260200161010e565b34801561023c57600080fd5b5061012c6108c3565b34801561025157600080fd5b5061019a610260366004610c71565b6108d2565b61019a610273366004610cad565b61093e565b34801561028457600080fd5b5061012c610293366004610ab0565b50606090565b3480156102a557600080fd5b506101026102b4366004610d29565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006301ffc9a760e01b6001600160e01b03198316148061031357506380ac58cd60e01b6001600160e01b03198316145b8061032e5750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606000805461034390610d5c565b80601f016020809104026020016040519081016040528092919081815260200182805461036f90610d5c565b80156103bc5780601f10610391576101008083540402835291602001916103bc565b820191906000526020600020905b81548152906001019060200180831161039f57829003601f168201915b5050505050905090565b6000818152600260205260409020546001600160a01b03163381148061040f57506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b6104515760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000818152600260205260409020546001600160a01b038481169116146105035760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b6044820152606401610448565b6001600160a01b03821661054d5760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b6044820152606401610448565b336001600160a01b038416148061058757506001600160a01b038316600090815260056020908152604080832033845290915290205460ff165b806105a857506000818152600460205260409020546001600160a01b031633145b6105e55760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b6044820152606401610448565b6001600160a01b038316600090815260036020526040812080549161060983610dac565b90915550506001600160a01b038216600090815260036020526040812080549161063283610dc3565b9091555050600081815260026020908152604080832080546001600160a01b038088166001600160a01b031992831681179093556004909452828520805490911690559051849391928716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6106b18383836104ad565b813b15806107515750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610721573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107459190610ddc565b6001600160e01b031916145b6107905760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b6044820152606401610448565b505050565b60065460ff16156107de5760405162461bcd60e51b81526020600482015260136024820152721053149150511657d253925512505312569151606a1b6044820152606401610448565b60006107ea8382610e47565b5060016107f78282610e47565b50506006805460ff1916600117905550565b6000818152600260205260409020546001600160a01b03168061085b5760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b6044820152606401610448565b919050565b60006001600160a01b0382166108a75760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b6044820152606401610448565b506001600160a01b031660009081526003602052604090205490565b60606001805461034390610d5c565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6109498484846104ad565b823b15806109d55750604051630a85bd0160e11b808252906001600160a01b0385169063150b7a0290610986903390899088908890600401610f07565b6020604051808303816000875af11580156109a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c99190610ddc565b6001600160e01b031916145b610a145760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b6044820152606401610448565b50505050565b6001600160e01b031981168114610a3057600080fd5b50565b600060208284031215610a4557600080fd5b8135610a5081610a1a565b9392505050565b6000815180845260005b81811015610a7d57602081850181015186830182015201610a61565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610a506020830184610a57565b600060208284031215610ac257600080fd5b5035919050565b80356001600160a01b038116811461085b57600080fd5b60008060408385031215610af357600080fd5b610afc83610ac9565b946020939093013593505050565b600080600060608486031215610b1f57600080fd5b610b2884610ac9565b9250610b3660208501610ac9565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115610b7757610b77610b46565b604051601f8501601f19908116603f01168101908282118183101715610b9f57610b9f610b46565b81604052809350858152868686011115610bb857600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112610be357600080fd5b610a5083833560208501610b5c565b60008060408385031215610c0557600080fd5b823567ffffffffffffffff80821115610c1d57600080fd5b610c2986838701610bd2565b93506020850135915080821115610c3f57600080fd5b50610c4c85828601610bd2565b9150509250929050565b600060208284031215610c6857600080fd5b610a5082610ac9565b60008060408385031215610c8457600080fd5b610c8d83610ac9565b915060208301358015158114610ca257600080fd5b809150509250929050565b60008060008060808587031215610cc357600080fd5b610ccc85610ac9565b9350610cda60208601610ac9565b925060408501359150606085013567ffffffffffffffff811115610cfd57600080fd5b8501601f81018713610d0e57600080fd5b610d1d87823560208401610b5c565b91505092959194509250565b60008060408385031215610d3c57600080fd5b610d4583610ac9565b9150610d5360208401610ac9565b90509250929050565b600181811c90821680610d7057607f821691505b602082108103610d9057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081610dbb57610dbb610d96565b506000190190565b600060018201610dd557610dd5610d96565b5060010190565b600060208284031215610dee57600080fd5b8151610a5081610a1a565b601f82111561079057600081815260208120601f850160051c81016020861015610e205750805b601f850160051c820191505b81811015610e3f57828155600101610e2c565b505050505050565b815167ffffffffffffffff811115610e6157610e61610b46565b610e7581610e6f8454610d5c565b84610df9565b602080601f831160018114610eaa5760008415610e925750858301515b600019600386901b1c1916600185901b178555610e3f565b600085815260208120601f198616915b82811015610ed957888601518255948401946001909101908401610eba565b5085821015610ef75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090610f3a90830184610a57565b969550505050505056fea2646970667358221220f75249aa06b52550c00dc8134ba370f80d5bd92dd8bebf1736259648239f478864736f6c63430008150033 + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[Pa\x0Fz\x80a\0 `\09`\0\xF3\xFE`\x80`@R`\x046\x10a\0\xDDW`\x005`\xE0\x1C\x80ccR!\x1E\x11a\0\x7FW\x80c\xA2,\xB4e\x11a\0YW\x80c\xA2,\xB4e\x14a\x02EW\x80c\xB8\x8DO\xDE\x14a\x02eW\x80c\xC8{V\xDD\x14a\x02xW\x80c\xE9\x85\xE9\xC5\x14a\x02\x99W`\0\x80\xFD[\x80ccR!\x1E\x14a\x01\xE2W\x80cp\xA0\x821\x14a\x02\x02W\x80c\x95\xD8\x9BA\x14a\x020W`\0\x80\xFD[\x80c\t^\xA7\xB3\x11a\0\xBBW\x80c\t^\xA7\xB3\x14a\x01\x87W\x80c#\xB8r\xDD\x14a\x01\x9CW\x80cB\x84.\x0E\x14a\x01\xAFW\x80cL\xD8\x8Bv\x14a\x01\xC2W`\0\x80\xFD[\x80c\x01\xFF\xC9\xA7\x14a\0\xE2W\x80c\x06\xFD\xDE\x03\x14a\x01\x17W\x80c\x08\x18\x12\xFC\x14a\x019W[`\0\x80\xFD[4\x80\x15a\0\xEEW`\0\x80\xFD[Pa\x01\x02a\0\xFD6`\x04a\n3V[a\x02\xE2V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[4\x80\x15a\x01#W`\0\x80\xFD[Pa\x01,a\x034V[`@Qa\x01\x0E\x91\x90a\n\x9DV[4\x80\x15a\x01EW`\0\x80\xFD[Pa\x01oa\x01T6`\x04a\n\xB0V[`\0\x90\x81R`\x04` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x16\x90V[`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x01a\x01\x0EV[a\x01\x9Aa\x01\x956`\x04a\n\xE0V[a\x03\xC6V[\0[a\x01\x9Aa\x01\xAA6`\x04a\x0B\nV[a\x04\xADV[a\x01\x9Aa\x01\xBD6`\x04a\x0B\nV[a\x06\xA6V[4\x80\x15a\x01\xCEW`\0\x80\xFD[Pa\x01\x9Aa\x01\xDD6`\x04a\x0B\xF2V[a\x07\x95V[4\x80\x15a\x01\xEEW`\0\x80\xFD[Pa\x01oa\x01\xFD6`\x04a\n\xB0V[a\x08\tV[4\x80\x15a\x02\x0EW`\0\x80\xFD[Pa\x02\"a\x02\x1D6`\x04a\x0CVV[a\x08`V[`@Q\x90\x81R` \x01a\x01\x0EV[4\x80\x15a\x02V[4\x80\x15a\x02\x84W`\0\x80\xFD[Pa\x01,a\x02\x936`\x04a\n\xB0V[P``\x90V[4\x80\x15a\x02\xA5W`\0\x80\xFD[Pa\x01\x02a\x02\xB46`\x04a\r)V[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T`\xFF\x16\x90V[`\0c\x01\xFF\xC9\xA7`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14\x80a\x03\x13WPc\x80\xACX\xCD`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x80a\x03.WPc[^\x13\x9F`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x92\x91PPV[```\0\x80Ta\x03C\x90a\r\\V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03o\x90a\r\\V[\x80\x15a\x03\xBCW\x80`\x1F\x10a\x03\x91Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xBCV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\x9FW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x81\x14\x80a\x04\x0FWP`\x01`\x01`\xA0\x1B\x03\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[a\x04QW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0\x82\x81R`\x04` R`@\x80\x82 \x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x87\x81\x16\x91\x82\x17\x90\x92U\x91Q\x85\x93\x91\x85\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\xA4PPPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x84\x81\x16\x91\x16\x14a\x05\x03W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01RiWRONG_FROM`\xB0\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x05MW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x11`$\x82\x01Rp\x12S\x95\x90S\x12Q\x17\xD4\x91P\xD2T\x12QS\x95`z\x1B`D\x82\x01R`d\x01a\x04HV[3`\x01`\x01`\xA0\x1B\x03\x84\x16\x14\x80a\x05\x87WP`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[\x80a\x05\xA8WP`\0\x81\x81R`\x04` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x14[a\x05\xE5W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x06\t\x83a\r\xACV[\x90\x91UPP`\x01`\x01`\xA0\x1B\x03\x82\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x062\x83a\r\xC3V[\x90\x91UPP`\0\x81\x81R`\x02` \x90\x81R`@\x80\x83 \x80T`\x01`\x01`\xA0\x1B\x03\x80\x88\x16`\x01`\x01`\xA0\x1B\x03\x19\x92\x83\x16\x81\x17\x90\x93U`\x04\x90\x94R\x82\x85 \x80T\x90\x91\x16\x90U\x90Q\x84\x93\x91\x92\x87\x16\x91\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\xA4PPPV[a\x06\xB1\x83\x83\x83a\x04\xADV[\x81;\x15\x80a\x07QWP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R3`\x04\x83\x01R`\x01`\x01`\xA0\x1B\x03\x85\x81\x16`$\x84\x01R`D\x83\x01\x84\x90R`\x80`d\x84\x01R`\0`\x84\x84\x01R\x90\x91\x90\x84\x16\x90c\x15\x0Bz\x02\x90`\xA4\x01` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\x07!W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x07E\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\x07\x90W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPV[`\x06T`\xFF\x16\x15a\x07\xDEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x13`$\x82\x01Rr\x10S\x14\x91PQ\x16W\xD2S\x92U\x12PS\x12V\x91Q`j\x1B`D\x82\x01R`d\x01a\x04HV[`\0a\x07\xEA\x83\x82a\x0EGV[P`\x01a\x07\xF7\x82\x82a\x0EGV[PP`\x06\x80T`\xFF\x19\x16`\x01\x17\x90UPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x16\x80a\x08[W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01Ri\x13\x93\xD5\x17\xD3RS\x95\x11Q`\xB2\x1B`D\x82\x01R`d\x01a\x04HV[\x91\x90PV[`\0`\x01`\x01`\xA0\x1B\x03\x82\x16a\x08\xA7W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0C`$\x82\x01RkZERO_ADDRESS`\xA0\x1B`D\x82\x01R`d\x01a\x04HV[P`\x01`\x01`\xA0\x1B\x03\x16`\0\x90\x81R`\x03` R`@\x90 T\x90V[```\x01\x80Ta\x03C\x90a\r\\V[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 `\x01`\x01`\xA0\x1B\x03\x87\x16\x80\x85R\x90\x83R\x92\x81\x90 \x80T`\xFF\x19\x16\x86\x15\x15\x90\x81\x17\x90\x91U\x90Q\x90\x81R\x91\x92\x91\x7F\x170~\xAB9\xABa\x07\xE8\x89\x98E\xAD=Y\xBD\x96S\xF2\0\xF2 \x92\x04\x89\xCA+Y7il1\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[a\tI\x84\x84\x84a\x04\xADV[\x82;\x15\x80a\t\xD5WP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R\x90`\x01`\x01`\xA0\x1B\x03\x85\x16\x90c\x15\x0Bz\x02\x90a\t\x86\x903\x90\x89\x90\x88\x90\x88\x90`\x04\x01a\x0F\x07V[` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\t\xA5W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t\xC9\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\n\x14W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPPV[`\x01`\x01`\xE0\x1B\x03\x19\x81\x16\x81\x14a\n0W`\0\x80\xFD[PV[`\0` \x82\x84\x03\x12\x15a\nEW`\0\x80\xFD[\x815a\nP\x81a\n\x1AV[\x93\x92PPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\n}W` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\naV[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[` \x81R`\0a\nP` \x83\x01\x84a\nWV[`\0` \x82\x84\x03\x12\x15a\n\xC2W`\0\x80\xFD[P5\x91\x90PV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x08[W`\0\x80\xFD[`\0\x80`@\x83\x85\x03\x12\x15a\n\xF3W`\0\x80\xFD[a\n\xFC\x83a\n\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0B\x1FW`\0\x80\xFD[a\x0B(\x84a\n\xC9V[\x92Pa\x0B6` \x85\x01a\n\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x11\x15a\x0BwWa\x0Bwa\x0BFV[`@Q`\x1F\x85\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\x0B\x9FWa\x0B\x9Fa\x0BFV[\x81`@R\x80\x93P\x85\x81R\x86\x86\x86\x01\x11\x15a\x0B\xB8W`\0\x80\xFD[\x85\x85` \x83\x017`\0` \x87\x83\x01\x01RPPP\x93\x92PPPV[`\0\x82`\x1F\x83\x01\x12a\x0B\xE3W`\0\x80\xFD[a\nP\x83\x835` \x85\x01a\x0B\\V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x05W`\0\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0C\x1DW`\0\x80\xFD[a\x0C)\x86\x83\x87\x01a\x0B\xD2V[\x93P` \x85\x015\x91P\x80\x82\x11\x15a\x0C?W`\0\x80\xFD[Pa\x0CL\x85\x82\x86\x01a\x0B\xD2V[\x91PP\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x0ChW`\0\x80\xFD[a\nP\x82a\n\xC9V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x84W`\0\x80\xFD[a\x0C\x8D\x83a\n\xC9V[\x91P` \x83\x015\x80\x15\x15\x81\x14a\x0C\xA2W`\0\x80\xFD[\x80\x91PP\x92P\x92\x90PV[`\0\x80`\0\x80`\x80\x85\x87\x03\x12\x15a\x0C\xC3W`\0\x80\xFD[a\x0C\xCC\x85a\n\xC9V[\x93Pa\x0C\xDA` \x86\x01a\n\xC9V[\x92P`@\x85\x015\x91P``\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xFDW`\0\x80\xFD[\x85\x01`\x1F\x81\x01\x87\x13a\r\x0EW`\0\x80\xFD[a\r\x1D\x87\x825` \x84\x01a\x0B\\V[\x91PP\x92\x95\x91\x94P\x92PV[`\0\x80`@\x83\x85\x03\x12\x15a\rV[4\x80\x15a\x02\x84W`\0\x80\xFD[Pa\x01,a\x02\x936`\x04a\n\xB0V[P``\x90V[4\x80\x15a\x02\xA5W`\0\x80\xFD[Pa\x01\x02a\x02\xB46`\x04a\r)V[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T`\xFF\x16\x90V[`\0c\x01\xFF\xC9\xA7`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14\x80a\x03\x13WPc\x80\xACX\xCD`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x80a\x03.WPc[^\x13\x9F`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x92\x91PPV[```\0\x80Ta\x03C\x90a\r\\V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03o\x90a\r\\V[\x80\x15a\x03\xBCW\x80`\x1F\x10a\x03\x91Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xBCV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\x9FW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x81\x14\x80a\x04\x0FWP`\x01`\x01`\xA0\x1B\x03\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[a\x04QW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0\x82\x81R`\x04` R`@\x80\x82 \x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x87\x81\x16\x91\x82\x17\x90\x92U\x91Q\x85\x93\x91\x85\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\xA4PPPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x84\x81\x16\x91\x16\x14a\x05\x03W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01RiWRONG_FROM`\xB0\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x05MW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x11`$\x82\x01Rp\x12S\x95\x90S\x12Q\x17\xD4\x91P\xD2T\x12QS\x95`z\x1B`D\x82\x01R`d\x01a\x04HV[3`\x01`\x01`\xA0\x1B\x03\x84\x16\x14\x80a\x05\x87WP`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[\x80a\x05\xA8WP`\0\x81\x81R`\x04` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x14[a\x05\xE5W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x06\t\x83a\r\xACV[\x90\x91UPP`\x01`\x01`\xA0\x1B\x03\x82\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x062\x83a\r\xC3V[\x90\x91UPP`\0\x81\x81R`\x02` \x90\x81R`@\x80\x83 \x80T`\x01`\x01`\xA0\x1B\x03\x80\x88\x16`\x01`\x01`\xA0\x1B\x03\x19\x92\x83\x16\x81\x17\x90\x93U`\x04\x90\x94R\x82\x85 \x80T\x90\x91\x16\x90U\x90Q\x84\x93\x91\x92\x87\x16\x91\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\xA4PPPV[a\x06\xB1\x83\x83\x83a\x04\xADV[\x81;\x15\x80a\x07QWP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R3`\x04\x83\x01R`\x01`\x01`\xA0\x1B\x03\x85\x81\x16`$\x84\x01R`D\x83\x01\x84\x90R`\x80`d\x84\x01R`\0`\x84\x84\x01R\x90\x91\x90\x84\x16\x90c\x15\x0Bz\x02\x90`\xA4\x01` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\x07!W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x07E\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\x07\x90W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPV[`\x06T`\xFF\x16\x15a\x07\xDEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x13`$\x82\x01Rr\x10S\x14\x91PQ\x16W\xD2S\x92U\x12PS\x12V\x91Q`j\x1B`D\x82\x01R`d\x01a\x04HV[`\0a\x07\xEA\x83\x82a\x0EGV[P`\x01a\x07\xF7\x82\x82a\x0EGV[PP`\x06\x80T`\xFF\x19\x16`\x01\x17\x90UPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x16\x80a\x08[W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01Ri\x13\x93\xD5\x17\xD3RS\x95\x11Q`\xB2\x1B`D\x82\x01R`d\x01a\x04HV[\x91\x90PV[`\0`\x01`\x01`\xA0\x1B\x03\x82\x16a\x08\xA7W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0C`$\x82\x01RkZERO_ADDRESS`\xA0\x1B`D\x82\x01R`d\x01a\x04HV[P`\x01`\x01`\xA0\x1B\x03\x16`\0\x90\x81R`\x03` R`@\x90 T\x90V[```\x01\x80Ta\x03C\x90a\r\\V[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 `\x01`\x01`\xA0\x1B\x03\x87\x16\x80\x85R\x90\x83R\x92\x81\x90 \x80T`\xFF\x19\x16\x86\x15\x15\x90\x81\x17\x90\x91U\x90Q\x90\x81R\x91\x92\x91\x7F\x170~\xAB9\xABa\x07\xE8\x89\x98E\xAD=Y\xBD\x96S\xF2\0\xF2 \x92\x04\x89\xCA+Y7il1\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[a\tI\x84\x84\x84a\x04\xADV[\x82;\x15\x80a\t\xD5WP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R\x90`\x01`\x01`\xA0\x1B\x03\x85\x16\x90c\x15\x0Bz\x02\x90a\t\x86\x903\x90\x89\x90\x88\x90\x88\x90`\x04\x01a\x0F\x07V[` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\t\xA5W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t\xC9\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\n\x14W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPPV[`\x01`\x01`\xE0\x1B\x03\x19\x81\x16\x81\x14a\n0W`\0\x80\xFD[PV[`\0` \x82\x84\x03\x12\x15a\nEW`\0\x80\xFD[\x815a\nP\x81a\n\x1AV[\x93\x92PPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\n}W` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\naV[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[` \x81R`\0a\nP` \x83\x01\x84a\nWV[`\0` \x82\x84\x03\x12\x15a\n\xC2W`\0\x80\xFD[P5\x91\x90PV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x08[W`\0\x80\xFD[`\0\x80`@\x83\x85\x03\x12\x15a\n\xF3W`\0\x80\xFD[a\n\xFC\x83a\n\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0B\x1FW`\0\x80\xFD[a\x0B(\x84a\n\xC9V[\x92Pa\x0B6` \x85\x01a\n\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x11\x15a\x0BwWa\x0Bwa\x0BFV[`@Q`\x1F\x85\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\x0B\x9FWa\x0B\x9Fa\x0BFV[\x81`@R\x80\x93P\x85\x81R\x86\x86\x86\x01\x11\x15a\x0B\xB8W`\0\x80\xFD[\x85\x85` \x83\x017`\0` \x87\x83\x01\x01RPPP\x93\x92PPPV[`\0\x82`\x1F\x83\x01\x12a\x0B\xE3W`\0\x80\xFD[a\nP\x83\x835` \x85\x01a\x0B\\V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x05W`\0\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0C\x1DW`\0\x80\xFD[a\x0C)\x86\x83\x87\x01a\x0B\xD2V[\x93P` \x85\x015\x91P\x80\x82\x11\x15a\x0C?W`\0\x80\xFD[Pa\x0CL\x85\x82\x86\x01a\x0B\xD2V[\x91PP\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x0ChW`\0\x80\xFD[a\nP\x82a\n\xC9V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x84W`\0\x80\xFD[a\x0C\x8D\x83a\n\xC9V[\x91P` \x83\x015\x80\x15\x15\x81\x14a\x0C\xA2W`\0\x80\xFD[\x80\x91PP\x92P\x92\x90PV[`\0\x80`\0\x80`\x80\x85\x87\x03\x12\x15a\x0C\xC3W`\0\x80\xFD[a\x0C\xCC\x85a\n\xC9V[\x93Pa\x0C\xDA` \x86\x01a\n\xC9V[\x92P`@\x85\x015\x91P``\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xFDW`\0\x80\xFD[\x85\x01`\x1F\x81\x01\x87\x13a\r\x0EW`\0\x80\xFD[a\r\x1D\x87\x825` \x84\x01a\x0B\\V[\x91PP\x92\x95\x91\x94P\x92PV[`\0\x80`@\x83\x85\x03\x12\x15a\r = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "Approval(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _owner: topics.1, + _approved: topics.2, + _tokenId: topics.3, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self._owner.clone(), + self._approved.clone(), + self._tokenId.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._owner, + ); + out[2usize] = ::encode_topic( + &self._approved, + ); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Approval> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Approval) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `ApprovalForAll(address,address,bool)` and selector `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31`. +```solidity +event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct ApprovalForAll { + #[allow(missing_docs)] + pub _owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _operator: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _approved: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for ApprovalForAll { + type DataTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "ApprovalForAll(address,address,bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 23u8, + 48u8, + 126u8, + 171u8, + 57u8, + 171u8, + 97u8, + 7u8, + 232u8, + 137u8, + 152u8, + 69u8, + 173u8, + 61u8, + 89u8, + 189u8, + 150u8, + 83u8, + 242u8, + 0u8, + 242u8, + 32u8, + 146u8, + 4u8, + 137u8, + 202u8, + 43u8, + 89u8, + 55u8, + 105u8, + 108u8, + 49u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _owner: topics.1, + _operator: topics.2, + _approved: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + ::tokenize( + &self._approved, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self._owner.clone(), + self._operator.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._owner, + ); + out[2usize] = ::encode_topic( + &self._operator, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for ApprovalForAll { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&ApprovalForAll> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &ApprovalForAll) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. +```solidity +event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct Transfer { + #[allow(missing_docs)] + pub _from: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _to: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _tokenId: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Transfer { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + _from: topics.1, + _to: topics.2, + _tokenId: topics.3, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self._from.clone(), + self._to.clone(), + self._tokenId.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self._from, + ); + out[2usize] = ::encode_topic( + &self._to, + ); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self._tokenId); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Transfer> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Transfer) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. +```solidity +function approve(address spender, uint256 id) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveCall { + pub spender: alloy::sol_types::private::Address, + pub id: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct approveReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveCall) -> Self { + (value.spender, value.id) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + spender: tuple.0, + id: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for approveCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = approveReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "approve(address,uint256)"; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.spender, + ), + as alloy_sol_types::SolType>::tokenize(&self.id), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `balanceOf(address)` and selector `0x70a08231`. +```solidity +function balanceOf(address owner) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfCall { + pub owner: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct balanceOfReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfCall) -> Self { + (value.owner,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { owner: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for balanceOfCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = balanceOfReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "balanceOf(address)"; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.owner, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `getApproved(uint256)` and selector `0x081812fc`. +```solidity +function getApproved(uint256 id) external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct getApprovedCall { + pub id: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`getApproved(uint256)`](getApprovedCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct getApprovedReturn { + pub _0: alloy::sol_types::private::Address, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getApprovedCall) -> Self { + (value.id,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getApprovedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { id: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getApprovedReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getApprovedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for getApprovedCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = getApprovedReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getApproved(uint256)"; + const SELECTOR: [u8; 4] = [8u8, 24u8, 18u8, 252u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.id), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `initialize(string,string)` and selector `0x4cd88b76`. +```solidity +function initialize(string memory name_, string memory symbol_) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct initializeCall { + pub name_: alloy::sol_types::private::String, + pub symbol_: alloy::sol_types::private::String, + } + ///Container type for the return parameters of the [`initialize(string,string)`](initializeCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct initializeReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::String, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + alloy::sol_types::private::String, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: initializeCall) -> Self { + (value.name_, value.symbol_) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for initializeCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + name_: tuple.0, + symbol_: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: initializeReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for initializeReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for initializeCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::String, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = initializeReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "initialize(string,string)"; + const SELECTOR: [u8; 4] = [76u8, 216u8, 139u8, 118u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.name_, + ), + ::tokenize( + &self.symbol_, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`. +```solidity +function isApprovedForAll(address owner, address operator) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct isApprovedForAllCall { + pub owner: alloy::sol_types::private::Address, + pub operator: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`isApprovedForAll(address,address)`](isApprovedForAllCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct isApprovedForAllReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: isApprovedForAllCall) -> Self { + (value.owner, value.operator) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for isApprovedForAllCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + owner: tuple.0, + operator: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: isApprovedForAllReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for isApprovedForAllReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for isApprovedForAllCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = isApprovedForAllReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "isApprovedForAll(address,address)"; + const SELECTOR: [u8; 4] = [233u8, 133u8, 233u8, 197u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.owner, + ), + ::tokenize( + &self.operator, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `name()` and selector `0x06fdde03`. +```solidity +function name() external view returns (string memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct nameCall {} + ///Container type for the return parameters of the [`name()`](nameCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct nameReturn { + pub _0: alloy::sol_types::private::String, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: nameCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for nameCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: nameReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for nameReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for nameCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = nameReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "name()"; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `ownerOf(uint256)` and selector `0x6352211e`. +```solidity +function ownerOf(uint256 id) external view returns (address owner); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct ownerOfCall { + pub id: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`ownerOf(uint256)`](ownerOfCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct ownerOfReturn { + pub owner: alloy::sol_types::private::Address, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ownerOfCall) -> Self { + (value.id,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ownerOfCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { id: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ownerOfReturn) -> Self { + (value.owner,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ownerOfReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { owner: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for ownerOfCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = ownerOfReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ownerOf(uint256)"; + const SELECTOR: [u8; 4] = [99u8, 82u8, 33u8, 30u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.id), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`. +```solidity +function safeTransferFrom(address from, address to, uint256 id) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_0Call { + pub from: alloy::sol_types::private::Address, + pub to: alloy::sol_types::private::Address, + pub id: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256)`](safeTransferFrom_0Call) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_0Return {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_0Call) -> Self { + (value.from, value.to, value.id) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_0Call { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + from: tuple.0, + to: tuple.1, + id: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_0Return) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_0Return { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for safeTransferFrom_0Call { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = safeTransferFrom_0Return; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256)"; + const SELECTOR: [u8; 4] = [66u8, 132u8, 46u8, 14u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.from, + ), + ::tokenize( + &self.to, + ), + as alloy_sol_types::SolType>::tokenize(&self.id), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`. +```solidity +function safeTransferFrom(address from, address to, uint256 id, bytes memory data) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_1Call { + pub from: alloy::sol_types::private::Address, + pub to: alloy::sol_types::private::Address, + pub id: alloy::sol_types::private::U256, + pub data: alloy::sol_types::private::Bytes, + } + ///Container type for the return parameters of the [`safeTransferFrom(address,address,uint256,bytes)`](safeTransferFrom_1Call) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct safeTransferFrom_1Return {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Bytes, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + alloy::sol_types::private::Bytes, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_1Call) -> Self { + (value.from, value.to, value.id, value.data) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_1Call { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + from: tuple.0, + to: tuple.1, + id: tuple.2, + data: tuple.3, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: safeTransferFrom_1Return) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for safeTransferFrom_1Return { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for safeTransferFrom_1Call { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Bytes, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = safeTransferFrom_1Return; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "safeTransferFrom(address,address,uint256,bytes)"; + const SELECTOR: [u8; 4] = [184u8, 141u8, 79u8, 222u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.from, + ), + ::tokenize( + &self.to, + ), + as alloy_sol_types::SolType>::tokenize(&self.id), + ::tokenize( + &self.data, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`. +```solidity +function setApprovalForAll(address operator, bool approved) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct setApprovalForAllCall { + pub operator: alloy::sol_types::private::Address, + pub approved: bool, + } + ///Container type for the return parameters of the [`setApprovalForAll(address,bool)`](setApprovalForAllCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct setApprovalForAllReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Bool, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address, bool); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: setApprovalForAllCall) -> Self { + (value.operator, value.approved) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for setApprovalForAllCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + operator: tuple.0, + approved: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: setApprovalForAllReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for setApprovalForAllReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for setApprovalForAllCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Bool, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = setApprovalForAllReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "setApprovalForAll(address,bool)"; + const SELECTOR: [u8; 4] = [162u8, 44u8, 180u8, 101u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.operator, + ), + ::tokenize( + &self.approved, + ), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. +```solidity +function supportsInterface(bytes4 interfaceId) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct supportsInterfaceCall { + pub interfaceId: alloy::sol_types::private::FixedBytes<4>, + } + ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct supportsInterfaceReturn { + pub _0: bool, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceCall) -> Self { + (value.interfaceId,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { interfaceId: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for supportsInterfaceCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = supportsInterfaceReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "supportsInterface(bytes4)"; + const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.interfaceId), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `symbol()` and selector `0x95d89b41`. +```solidity +function symbol() external view returns (string memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct symbolCall {} + ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct symbolReturn { + pub _0: alloy::sol_types::private::String, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: symbolCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for symbolCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: symbolReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for symbolReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for symbolCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = symbolReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "symbol()"; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `tokenURI(uint256)` and selector `0xc87b56dd`. +```solidity +function tokenURI(uint256 id) external view returns (string memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct tokenURICall { + pub id: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`tokenURI(uint256)`](tokenURICall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct tokenURIReturn { + pub _0: alloy::sol_types::private::String, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: tokenURICall) -> Self { + (value.id,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for tokenURICall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { id: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: tokenURIReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for tokenURIReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for tokenURICall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = tokenURIReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "tokenURI(uint256)"; + const SELECTOR: [u8; 4] = [200u8, 123u8, 86u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.id), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. +```solidity +function transferFrom(address from, address to, uint256 id) external payable; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromCall { + pub from: alloy::sol_types::private::Address, + pub to: alloy::sol_types::private::Address, + pub id: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct transferFromReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromCall) -> Self { + (value.from, value.to, value.id) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + from: tuple.0, + to: tuple.1, + id: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for transferFromCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = transferFromReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.from, + ), + ::tokenize( + &self.to, + ), + as alloy_sol_types::SolType>::tokenize(&self.id), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + ///Container for all the [`MockERC721`](self) function calls. + pub enum MockERC721Calls { + approve(approveCall), + balanceOf(balanceOfCall), + getApproved(getApprovedCall), + initialize(initializeCall), + isApprovedForAll(isApprovedForAllCall), + name(nameCall), + ownerOf(ownerOfCall), + safeTransferFrom_0(safeTransferFrom_0Call), + safeTransferFrom_1(safeTransferFrom_1Call), + setApprovalForAll(setApprovalForAllCall), + supportsInterface(supportsInterfaceCall), + symbol(symbolCall), + tokenURI(tokenURICall), + transferFrom(transferFromCall), + } + #[automatically_derived] + impl MockERC721Calls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [1u8, 255u8, 201u8, 167u8], + [6u8, 253u8, 222u8, 3u8], + [8u8, 24u8, 18u8, 252u8], + [9u8, 94u8, 167u8, 179u8], + [35u8, 184u8, 114u8, 221u8], + [66u8, 132u8, 46u8, 14u8], + [76u8, 216u8, 139u8, 118u8], + [99u8, 82u8, 33u8, 30u8], + [112u8, 160u8, 130u8, 49u8], + [149u8, 216u8, 155u8, 65u8], + [162u8, 44u8, 180u8, 101u8], + [184u8, 141u8, 79u8, 222u8], + [200u8, 123u8, 86u8, 221u8], + [233u8, 133u8, 233u8, 197u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for MockERC721Calls { + const NAME: &'static str = "MockERC721Calls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 14usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::approve(_) => ::SELECTOR, + Self::balanceOf(_) => { + ::SELECTOR + } + Self::getApproved(_) => { + ::SELECTOR + } + Self::initialize(_) => { + ::SELECTOR + } + Self::isApprovedForAll(_) => { + ::SELECTOR + } + Self::name(_) => ::SELECTOR, + Self::ownerOf(_) => ::SELECTOR, + Self::safeTransferFrom_0(_) => { + ::SELECTOR + } + Self::safeTransferFrom_1(_) => { + ::SELECTOR + } + Self::setApprovalForAll(_) => { + ::SELECTOR + } + Self::supportsInterface(_) => { + ::SELECTOR + } + Self::symbol(_) => ::SELECTOR, + Self::tokenURI(_) => ::SELECTOR, + Self::transferFrom(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn supportsInterface( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::supportsInterface) + } + supportsInterface + }, + { + fn name( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::name) + } + name + }, + { + fn getApproved( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::getApproved) + } + getApproved + }, + { + fn approve( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::approve) + } + approve + }, + { + fn transferFrom( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::transferFrom) + } + transferFrom + }, + { + fn safeTransferFrom_0( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::safeTransferFrom_0) + } + safeTransferFrom_0 + }, + { + fn initialize( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::initialize) + } + initialize + }, + { + fn ownerOf( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::ownerOf) + } + ownerOf + }, + { + fn balanceOf( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::balanceOf) + } + balanceOf + }, + { + fn symbol( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::symbol) + } + symbol + }, + { + fn setApprovalForAll( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::setApprovalForAll) + } + setApprovalForAll + }, + { + fn safeTransferFrom_1( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::safeTransferFrom_1) + } + safeTransferFrom_1 + }, + { + fn tokenURI( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::tokenURI) + } + tokenURI + }, + { + fn isApprovedForAll( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MockERC721Calls::isApprovedForAll) + } + isApprovedForAll + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::approve(inner) => { + ::abi_encoded_size(inner) + } + Self::balanceOf(inner) => { + ::abi_encoded_size(inner) + } + Self::getApproved(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::initialize(inner) => { + ::abi_encoded_size(inner) + } + Self::isApprovedForAll(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::name(inner) => { + ::abi_encoded_size(inner) + } + Self::ownerOf(inner) => { + ::abi_encoded_size(inner) + } + Self::safeTransferFrom_0(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::safeTransferFrom_1(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::setApprovalForAll(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::supportsInterface(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::symbol(inner) => { + ::abi_encoded_size(inner) + } + Self::tokenURI(inner) => { + ::abi_encoded_size(inner) + } + Self::transferFrom(inner) => { + ::abi_encoded_size( + inner, + ) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::approve(inner) => { + ::abi_encode_raw(inner, out) + } + Self::balanceOf(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::getApproved(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::initialize(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::isApprovedForAll(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::name(inner) => { + ::abi_encode_raw(inner, out) + } + Self::ownerOf(inner) => { + ::abi_encode_raw(inner, out) + } + Self::safeTransferFrom_0(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::safeTransferFrom_1(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::setApprovalForAll(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::supportsInterface(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::symbol(inner) => { + ::abi_encode_raw(inner, out) + } + Self::tokenURI(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::transferFrom(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + ///Container for all the [`MockERC721`](self) events. + pub enum MockERC721Events { + Approval(Approval), + ApprovalForAll(ApprovalForAll), + Transfer(Transfer), + } + #[automatically_derived] + impl MockERC721Events { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 23u8, + 48u8, + 126u8, + 171u8, + 57u8, + 171u8, + 97u8, + 7u8, + 232u8, + 137u8, + 152u8, + 69u8, + 173u8, + 61u8, + 89u8, + 189u8, + 150u8, + 83u8, + 242u8, + 0u8, + 242u8, + 32u8, + 146u8, + 4u8, + 137u8, + 202u8, + 43u8, + 89u8, + 55u8, + 105u8, + 108u8, + 49u8, + ], + [ + 140u8, + 91u8, + 225u8, + 229u8, + 235u8, + 236u8, + 125u8, + 91u8, + 209u8, + 79u8, + 113u8, + 66u8, + 125u8, + 30u8, + 132u8, + 243u8, + 221u8, + 3u8, + 20u8, + 192u8, + 247u8, + 178u8, + 41u8, + 30u8, + 91u8, + 32u8, + 10u8, + 200u8, + 199u8, + 195u8, + 185u8, + 37u8, + ], + [ + 221u8, + 242u8, + 82u8, + 173u8, + 27u8, + 226u8, + 200u8, + 155u8, + 105u8, + 194u8, + 176u8, + 104u8, + 252u8, + 55u8, + 141u8, + 170u8, + 149u8, + 43u8, + 167u8, + 241u8, + 99u8, + 196u8, + 161u8, + 22u8, + 40u8, + 245u8, + 90u8, + 77u8, + 245u8, + 35u8, + 179u8, + 239u8, + ], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for MockERC721Events { + const NAME: &'static str = "MockERC721Events"; + const COUNT: usize = 3usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Approval) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::ApprovalForAll) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::Transfer) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for MockERC721Events { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::ApprovalForAll(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`MockERC721`](self) contract instance. + +See the [wrapper's documentation](`MockERC721Instance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> MockERC721Instance { + MockERC721Instance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + MockERC721Instance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + MockERC721Instance::::deploy_builder(provider) + } + /**A [`MockERC721`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`MockERC721`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct MockERC721Instance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for MockERC721Instance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("MockERC721Instance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC721Instance { + /**Creates a new wrapper around an on-chain [`MockERC721`](self) contract instance. + +See the [wrapper's documentation](`MockERC721Instance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl MockERC721Instance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> MockERC721Instance { + MockERC721Instance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC721Instance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`approve`] function. + pub fn approve( + &self, + spender: alloy::sol_types::private::Address, + id: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&approveCall { spender, id }) + } + ///Creates a new call builder for the [`balanceOf`] function. + pub fn balanceOf( + &self, + owner: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&balanceOfCall { owner }) + } + ///Creates a new call builder for the [`getApproved`] function. + pub fn getApproved( + &self, + id: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&getApprovedCall { id }) + } + ///Creates a new call builder for the [`initialize`] function. + pub fn initialize( + &self, + name_: alloy::sol_types::private::String, + symbol_: alloy::sol_types::private::String, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&initializeCall { name_, symbol_ }) + } + ///Creates a new call builder for the [`isApprovedForAll`] function. + pub fn isApprovedForAll( + &self, + owner: alloy::sol_types::private::Address, + operator: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &isApprovedForAllCall { + owner, + operator, + }, + ) + } + ///Creates a new call builder for the [`name`] function. + pub fn name(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&nameCall {}) + } + ///Creates a new call builder for the [`ownerOf`] function. + pub fn ownerOf( + &self, + id: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&ownerOfCall { id }) + } + ///Creates a new call builder for the [`safeTransferFrom_0`] function. + pub fn safeTransferFrom_0( + &self, + from: alloy::sol_types::private::Address, + to: alloy::sol_types::private::Address, + id: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &safeTransferFrom_0Call { + from, + to, + id, + }, + ) + } + ///Creates a new call builder for the [`safeTransferFrom_1`] function. + pub fn safeTransferFrom_1( + &self, + from: alloy::sol_types::private::Address, + to: alloy::sol_types::private::Address, + id: alloy::sol_types::private::U256, + data: alloy::sol_types::private::Bytes, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &safeTransferFrom_1Call { + from, + to, + id, + data, + }, + ) + } + ///Creates a new call builder for the [`setApprovalForAll`] function. + pub fn setApprovalForAll( + &self, + operator: alloy::sol_types::private::Address, + approved: bool, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &setApprovalForAllCall { + operator, + approved, + }, + ) + } + ///Creates a new call builder for the [`supportsInterface`] function. + pub fn supportsInterface( + &self, + interfaceId: alloy::sol_types::private::FixedBytes<4>, + ) -> alloy_contract::SolCallBuilder { + self.call_builder( + &supportsInterfaceCall { + interfaceId, + }, + ) + } + ///Creates a new call builder for the [`symbol`] function. + pub fn symbol(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&symbolCall {}) + } + ///Creates a new call builder for the [`tokenURI`] function. + pub fn tokenURI( + &self, + id: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&tokenURICall { id }) + } + ///Creates a new call builder for the [`transferFrom`] function. + pub fn transferFrom( + &self, + from: alloy::sol_types::private::Address, + to: alloy::sol_types::private::Address, + id: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&transferFromCall { from, to, id }) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MockERC721Instance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`Approval`] event. + pub fn Approval_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`ApprovalForAll`] event. + pub fn ApprovalForAll_filter( + &self, + ) -> alloy_contract::Event { + self.event_filter::() + } + ///Creates a new event filter for the [`Transfer`] event. + pub fn Transfer_filter(&self) -> alloy_contract::Event { + self.event_filter::() + } + } +} diff --git a/crates/bindings/src/model.rs b/crates/bindings/src/model.rs index 8817ef9..595935a 100644 --- a/crates/bindings/src/model.rs +++ b/crates/bindings/src/model.rs @@ -1,204 +1,493 @@ -pub use model::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod model { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::std::collections::BTreeMap::new(), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("SignaledEvent"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("SignaledEvent"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("role"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("actionId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MODEL_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); +/** + +Generated by the following Solidity interface... +```solidity +interface Model { + event SignaledEvent(uint8 indexed role, uint8 indexed actionId, uint256 indexed scalar, uint256 sequence); +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "event", + "name": "SignaledEvent", + "inputs": [ + { + "name": "role", + "type": "uint8", + "indexed": true, + "internalType": "uint8" + }, + { + "name": "actionId", + "type": "uint8", + "indexed": true, + "internalType": "uint8" + }, + { + "name": "scalar", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "sequence", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod Model { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c800aeb62d18267dcfc30523b9d51995fedf28f18495cd7501ff534bb3f2a28564736f6c63430008150033 + /// ``` #[rustfmt::skip] - const __BYTECODE: &[u8] = b"`V`7`\x0B\x82\x82\x829\x80Q`\0\x1A`s\x14`*WcNH{q`\xE0\x1B`\0R`\0`\x04R`$`\0\xFD[0`\0R`s\x81S\x82\x81\xF3\xFEs\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x000\x14`\x80`@R`\0\x80\xFD\xFE\xA2dipfsX\"\x12 \xC8\0\xAE\xB6-\x18&}\xCF\xC3\x05#\xB9\xD5\x19\x95\xFE\xDF(\xF1\x84\x95\xCDu\x01\xFFSK\xB3\xF2\xA2\x85dsolcC\0\x08\x15\x003"; - /// The bytecode of the contract. - pub static MODEL_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __BYTECODE, + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"`V`7`\x0B\x82\x82\x829\x80Q`\0\x1A`s\x14`*WcNH{q`\xE0\x1B`\0R`\0`\x04R`$`\0\xFD[0`\0R`s\x81S\x82\x81\xF3\xFEs\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x000\x14`\x80`@R`\0\x80\xFD\xFE\xA2dipfsX\"\x12 \xC8\0\xAE\xB6-\x18&}\xCF\xC3\x05#\xB9\xD5\x19\x95\xFE\xDF(\xF1\x84\x95\xCDu\x01\xFFSK\xB3\xF2\xA2\x85dsolcC\0\x08\x15\x003", ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c800aeb62d18267dcfc30523b9d51995fedf28f18495cd7501ff534bb3f2a28564736f6c63430008150033 + /// ``` #[rustfmt::skip] - const __DEPLOYED_BYTECODE: &[u8] = b"s\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x000\x14`\x80`@R`\0\x80\xFD\xFE\xA2dipfsX\"\x12 \xC8\0\xAE\xB6-\x18&}\xCF\xC3\x05#\xB9\xD5\x19\x95\xFE\xDF(\xF1\x84\x95\xCDu\x01\xFFSK\xB3\xF2\xA2\x85dsolcC\0\x08\x15\x003"; - /// The deployed bytecode of the contract. - pub static MODEL_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __DEPLOYED_BYTECODE, + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"s\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x000\x14`\x80`@R`\0\x80\xFD\xFE\xA2dipfsX\"\x12 \xC8\0\xAE\xB6-\x18&}\xCF\xC3\x05#\xB9\xD5\x19\x95\xFE\xDF(\xF1\x84\x95\xCDu\x01\xFFSK\xB3\xF2\xA2\x85dsolcC\0\x08\x15\x003", ); - pub struct Model(::ethers::contract::Contract); - impl ::core::clone::Clone for Model { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) + /**Event with signature `SignaledEvent(uint8,uint8,uint256,uint256)` and selector `0x50e4a52b0772bed9f06a7d3f7dfa66d73640067a5cc77a73c24556ccc900fa08`. +```solidity +event SignaledEvent(uint8 indexed role, uint8 indexed actionId, uint256 indexed scalar, uint256 sequence); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct SignaledEvent { + #[allow(missing_docs)] + pub role: u8, + #[allow(missing_docs)] + pub actionId: u8, + #[allow(missing_docs)] + pub scalar: alloy::sol_types::private::U256, + #[allow(missing_docs)] + pub sequence: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for SignaledEvent { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "SignaledEvent(uint8,uint8,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 80u8, + 228u8, + 165u8, + 43u8, + 7u8, + 114u8, + 190u8, + 217u8, + 240u8, + 106u8, + 125u8, + 63u8, + 125u8, + 250u8, + 102u8, + 215u8, + 54u8, + 64u8, + 6u8, + 122u8, + 92u8, + 199u8, + 122u8, + 115u8, + 194u8, + 69u8, + 86u8, + 204u8, + 201u8, + 0u8, + 250u8, + 8u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + actionId: topics.2, + scalar: topics.3, + sequence: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.sequence), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.actionId.clone(), + self.scalar.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.actionId); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.scalar); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for SignaledEvent { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } } + #[automatically_derived] + impl From<&SignaledEvent> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &SignaledEvent) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + ///Container for all the [`Model`](self) events. + pub enum ModelEvents { + SignaledEvent(SignaledEvent), + } + #[automatically_derived] + impl ModelEvents { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 80u8, + 228u8, + 165u8, + 43u8, + 7u8, + 114u8, + 190u8, + 217u8, + 240u8, + 106u8, + 125u8, + 63u8, + 125u8, + 250u8, + 102u8, + 215u8, + 54u8, + 64u8, + 6u8, + 122u8, + 92u8, + 199u8, + 122u8, + 115u8, + 194u8, + 69u8, + 86u8, + 204u8, + 201u8, + 0u8, + 250u8, + 8u8, + ], + ]; } - impl ::core::ops::Deref for Model { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for ModelEvents { + const NAME: &'static str = "ModelEvents"; + const COUNT: usize = 1usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::SignaledEvent) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } } } - impl ::core::ops::DerefMut for Model { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for ModelEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::SignaledEvent(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::SignaledEvent(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } } } - impl ::core::fmt::Debug for Model { + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`Model`](self) contract instance. + +See the [wrapper's documentation](`ModelInstance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> ModelInstance { + ModelInstance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + ModelInstance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + ModelInstance::::deploy_builder(provider) + } + /**A [`Model`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`Model`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct ModelInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for ModelInstance { + #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(Model)).field(&self.address()).finish() + f.debug_tuple("ModelInstance").field(&self.address).finish() } } - impl Model { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ModelInstance { + /**Creates a new wrapper around an on-chain [`Model`](self) contract instance. + +See the [wrapper's documentation](`ModelInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MODEL_ABI.clone(), - client, - ), + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), ) } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - MODEL_ABI.clone(), - MODEL_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address } - ///Gets the contract's `SignaledEvent` event - pub fn signaled_event_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event_with_filter(::core::default::Default::default()) + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider } } - impl From<::ethers::contract::Contract> - for Model { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) + impl ModelInstance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> ModelInstance { + ModelInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } } } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "SignaledEvent", - abi = "SignaledEvent(uint8,uint8,uint256,uint256)" - )] - pub struct SignaledEventFilter { - #[ethevent(indexed)] - pub role: u8, - #[ethevent(indexed)] - pub action_id: u8, - #[ethevent(indexed)] - pub scalar: ::ethers::core::types::U256, - pub sequence: ::ethers::core::types::U256, + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ModelInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ModelInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`SignaledEvent`] event. + pub fn SignaledEvent_filter( + &self, + ) -> alloy_contract::Event { + self.event_filter::() + } } } diff --git a/crates/bindings/src/model_interface.rs b/crates/bindings/src/model_interface.rs deleted file mode 100644 index b8db454..0000000 --- a/crates/bindings/src/model_interface.rs +++ /dev/null @@ -1,385 +0,0 @@ -pub use model_interface::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod model_interface { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("context"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("context"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedArray( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - 10usize, - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ], - ), - ), - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct Model.Head"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signal"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signal"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("action"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signalMany"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signalMany"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("actions"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalars"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256[]"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MODELINTERFACE_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct ModelInterface(::ethers::contract::Contract); - impl ::core::clone::Clone for ModelInterface { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for ModelInterface { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for ModelInterface { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for ModelInterface { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(ModelInterface)) - .field(&self.address()) - .finish() - } - } - impl ModelInterface { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MODELINTERFACE_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `context` (0xd0496d6a) function - pub fn context(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([208, 73, 109, 106], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signal` (0xddc3b187) function - pub fn signal( - &self, - action: u8, - scalar: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 195, 177, 135], (action, scalar)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signalMany` (0xfff01fe2) function - pub fn signal_many( - &self, - actions: ::std::vec::Vec, - scalars: ::std::vec::Vec<::ethers::core::types::U256>, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([255, 240, 31, 226], (actions, scalars)) - .expect("method not found (this should never happen)") - } - } - impl From<::ethers::contract::Contract> - for ModelInterface { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Container type for all input parameters for the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "context", abi = "context()")] - pub struct ContextCall; - ///Container type for all input parameters for the `signal` function with signature `signal(uint8,uint256)` and selector `0xddc3b187` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signal", abi = "signal(uint8,uint256)")] - pub struct SignalCall { - pub action: u8, - pub scalar: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `signalMany` function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signalMany", abi = "signalMany(uint8[],uint256[])")] - pub struct SignalManyCall { - pub actions: ::std::vec::Vec, - pub scalars: ::std::vec::Vec<::ethers::core::types::U256>, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum ModelInterfaceCalls { - Context(ContextCall), - Signal(SignalCall), - SignalMany(SignalManyCall), - } - impl ::ethers::core::abi::AbiDecode for ModelInterfaceCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Context(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Signal(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SignalMany(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for ModelInterfaceCalls { - fn encode(self) -> Vec { - match self { - Self::Context(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Signal(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SignalMany(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for ModelInterfaceCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Context(element) => ::core::fmt::Display::fmt(element, f), - Self::Signal(element) => ::core::fmt::Display::fmt(element, f), - Self::SignalMany(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for ModelInterfaceCalls { - fn from(value: ContextCall) -> Self { - Self::Context(value) - } - } - impl ::core::convert::From for ModelInterfaceCalls { - fn from(value: SignalCall) -> Self { - Self::Signal(value) - } - } - impl ::core::convert::From for ModelInterfaceCalls { - fn from(value: SignalManyCall) -> Self { - Self::SignalMany(value) - } - } - ///Container type for all return fields from the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ContextReturn(pub Head); -} diff --git a/crates/bindings/src/modelinterface.rs b/crates/bindings/src/modelinterface.rs new file mode 100644 index 0000000..0189a7d --- /dev/null +++ b/crates/bindings/src/modelinterface.rs @@ -0,0 +1,2042 @@ +/** + +Generated by the following Solidity interface... +```solidity +interface ModelInterface { + struct Head { + uint256[10] latestBlocks; + uint256 sequence; + int256[] state; + Place[] places; + Transition[] transitions; + } + struct Place { + string label; + uint8 offset; + Position position; + uint256 initial; + uint256 capacity; + } + struct Position { + uint8 x; + uint8 y; + } + struct Transition { + string label; + uint8 offset; + Position position; + uint8 role; + int256[] delta; + int256[] guard; + } + + function context() external returns (Head memory); + function signal(uint8 action, uint256 scalar) external; + function signalMany(uint8[] memory actions, uint256[] memory scalars) external; +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "context", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct Model.Head", + "components": [ + { + "name": "latestBlocks", + "type": "uint256[10]", + "internalType": "uint256[10]" + }, + { + "name": "sequence", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "state", + "type": "int256[]", + "internalType": "int256[]" + }, + { + "name": "places", + "type": "tuple[]", + "internalType": "struct Model.Place[]", + "components": [ + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "offset", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "position", + "type": "tuple", + "internalType": "struct Model.Position", + "components": [ + { + "name": "x", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "y", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "name": "initial", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "capacity", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "transitions", + "type": "tuple[]", + "internalType": "struct Model.Transition[]", + "components": [ + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "offset", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "position", + "type": "tuple", + "internalType": "struct Model.Position", + "components": [ + { + "name": "x", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "y", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "name": "role", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "delta", + "type": "int256[]", + "internalType": "int256[]" + }, + { + "name": "guard", + "type": "int256[]", + "internalType": "int256[]" + } + ] + } + ] + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "signal", + "inputs": [ + { + "name": "action", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "scalar", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "signalMany", + "inputs": [ + { + "name": "actions", + "type": "uint8[]", + "internalType": "uint8[]" + }, + { + "name": "scalars", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod ModelInterface { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /**```solidity +struct Head { uint256[10] latestBlocks; uint256 sequence; int256[] state; Place[] places; Transition[] transitions; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Head { + pub latestBlocks: [alloy::sol_types::private::U256; 10usize], + pub sequence: alloy::sol_types::private::U256, + pub state: alloy::sol_types::private::Vec, + pub places: alloy::sol_types::private::Vec< + ::RustType, + >, + pub transitions: alloy::sol_types::private::Vec< + ::RustType, + >, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedArray< + alloy::sol_types::sol_data::Uint<256>, + 10usize, + >, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array, + alloy::sol_types::sol_data::Array, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + [alloy::sol_types::private::U256; 10usize], + alloy::sol_types::private::U256, + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec< + ::RustType, + >, + alloy::sol_types::private::Vec< + ::RustType, + >, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Head) -> Self { + ( + value.latestBlocks, + value.sequence, + value.state, + value.places, + value.transitions, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Head { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + latestBlocks: tuple.0, + sequence: tuple.1, + state: tuple.2, + places: tuple.3, + transitions: tuple.4, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Head { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Head { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + , + 10usize, + > as alloy_sol_types::SolType>::tokenize(&self.latestBlocks), + as alloy_sol_types::SolType>::tokenize(&self.sequence), + , + > as alloy_sol_types::SolType>::tokenize(&self.state), + as alloy_sol_types::SolType>::tokenize(&self.places), + as alloy_sol_types::SolType>::tokenize(&self.transitions), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Head { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Head { + const NAME: &'static str = "Head"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Head(uint256[10] latestBlocks,uint256 sequence,int256[] state,Place[] places,Transition[] transitions)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(2); + components + .push(::eip712_root_type()); + components + .extend(::eip712_components()); + components + .push( + ::eip712_root_type(), + ); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + , + 10usize, + > as alloy_sol_types::SolType>::eip712_data_word(&self.latestBlocks) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.sequence) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.state) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.places) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.transitions) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Head { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + , + 10usize, + > as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.latestBlocks, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.sequence, + ) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.state) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.places, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.transitions, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + , + 10usize, + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.latestBlocks, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.sequence, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.state, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.places, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.transitions, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**```solidity +struct Place { string label; uint8 offset; Position position; uint256 initial; uint256 capacity; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Place { + pub label: alloy::sol_types::private::String, + pub offset: u8, + pub position: ::RustType, + pub initial: alloy::sol_types::private::U256, + pub capacity: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + Position, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + u8, + ::RustType, + alloy::sol_types::private::U256, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Place) -> Self { + ( + value.label, + value.offset, + value.position, + value.initial, + value.capacity, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Place { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + label: tuple.0, + offset: tuple.1, + position: tuple.2, + initial: tuple.3, + capacity: tuple.4, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Place { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Place { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + ::tokenize( + &self.label, + ), + as alloy_sol_types::SolType>::tokenize(&self.offset), + ::tokenize(&self.position), + as alloy_sol_types::SolType>::tokenize(&self.initial), + as alloy_sol_types::SolType>::tokenize(&self.capacity), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Place { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Place { + const NAME: &'static str = "Place"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Place(string label,uint8 offset,Position position,uint256 initial,uint256 capacity)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(1); + components + .push(::eip712_root_type()); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + ::eip712_data_word( + &self.label, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.offset) + .0, + ::eip712_data_word( + &self.position, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.initial) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.capacity) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Place { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + ::topic_preimage_length( + &rust.label, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.offset, + ) + + ::topic_preimage_length( + &rust.position, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.initial, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.capacity, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + ::encode_topic_preimage( + &rust.label, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.offset, + out, + ); + ::encode_topic_preimage( + &rust.position, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.initial, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.capacity, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**```solidity +struct Position { uint8 x; uint8 y; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Position { + pub x: u8, + pub y: u8, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<8>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8, u8); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Position) -> Self { + (value.x, value.y) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Position { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { x: tuple.0, y: tuple.1 } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Position { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Position { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.x), + as alloy_sol_types::SolType>::tokenize(&self.y), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Position { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Position { + const NAME: &'static str = "Position"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed("Position(uint8 x,uint8 y)") + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + alloy_sol_types::private::Vec::new() + } + #[inline] + fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + as alloy_sol_types::SolType>::eip712_data_word(&self.x) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.y) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Position { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.x) + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.y) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage(&rust.x, out); + as alloy_sol_types::EventTopic>::encode_topic_preimage(&rust.y, out); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**```solidity +struct Transition { string label; uint8 offset; Position position; uint8 role; int256[] delta; int256[] guard; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Transition { + pub label: alloy::sol_types::private::String, + pub offset: u8, + pub position: ::RustType, + pub role: u8, + pub delta: alloy::sol_types::private::Vec, + pub guard: alloy::sol_types::private::Vec, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + Position, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + u8, + ::RustType, + u8, + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Transition) -> Self { + ( + value.label, + value.offset, + value.position, + value.role, + value.delta, + value.guard, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Transition { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + label: tuple.0, + offset: tuple.1, + position: tuple.2, + role: tuple.3, + delta: tuple.4, + guard: tuple.5, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Transition { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Transition { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + ::tokenize( + &self.label, + ), + as alloy_sol_types::SolType>::tokenize(&self.offset), + ::tokenize(&self.position), + as alloy_sol_types::SolType>::tokenize(&self.role), + , + > as alloy_sol_types::SolType>::tokenize(&self.delta), + , + > as alloy_sol_types::SolType>::tokenize(&self.guard), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Transition { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Transition { + const NAME: &'static str = "Transition"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Transition(string label,uint8 offset,Position position,uint8 role,int256[] delta,int256[] guard)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(1); + components + .push(::eip712_root_type()); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + ::eip712_data_word( + &self.label, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.offset) + .0, + ::eip712_data_word( + &self.position, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.role) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.delta) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.guard) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Transition { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + ::topic_preimage_length( + &rust.label, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.offset, + ) + + ::topic_preimage_length( + &rust.position, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.role) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.delta) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.guard) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + ::encode_topic_preimage( + &rust.label, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.offset, + out, + ); + ::encode_topic_preimage( + &rust.position, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.role, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.delta, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.guard, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**Function with signature `context()` and selector `0xd0496d6a`. +```solidity +function context() external returns (Head memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct contextCall {} + ///Container type for the return parameters of the [`context()`](contextCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct contextReturn { + pub _0: ::RustType, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: contextCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for contextCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (Head,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: contextReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for contextReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for contextCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = contextReturn; + type ReturnTuple<'a> = (Head,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "context()"; + const SELECTOR: [u8; 4] = [208u8, 73u8, 109u8, 106u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `signal(uint8,uint256)` and selector `0xddc3b187`. +```solidity +function signal(uint8 action, uint256 scalar) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalCall { + pub action: u8, + pub scalar: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`signal(uint8,uint256)`](signalCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8, alloy::sol_types::private::U256); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalCall) -> Self { + (value.action, value.scalar) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + action: tuple.0, + scalar: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for signalCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = signalReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "signal(uint8,uint256)"; + const SELECTOR: [u8; 4] = [221u8, 195u8, 177u8, 135u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.action), + as alloy_sol_types::SolType>::tokenize(&self.scalar), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2`. +```solidity +function signalMany(uint8[] memory actions, uint256[] memory scalars) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalManyCall { + pub actions: alloy::sol_types::private::Vec, + pub scalars: alloy::sol_types::private::Vec, + } + ///Container type for the return parameters of the [`signalMany(uint8[],uint256[])`](signalManyCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalManyReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalManyCall) -> Self { + (value.actions, value.scalars) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalManyCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + actions: tuple.0, + scalars: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalManyReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalManyReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for signalManyCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = signalManyReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "signalMany(uint8[],uint256[])"; + const SELECTOR: [u8; 4] = [255u8, 240u8, 31u8, 226u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + , + > as alloy_sol_types::SolType>::tokenize(&self.actions), + , + > as alloy_sol_types::SolType>::tokenize(&self.scalars), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + ///Container for all the [`ModelInterface`](self) function calls. + pub enum ModelInterfaceCalls { + context(contextCall), + signal(signalCall), + signalMany(signalManyCall), + } + #[automatically_derived] + impl ModelInterfaceCalls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [208u8, 73u8, 109u8, 106u8], + [221u8, 195u8, 177u8, 135u8], + [255u8, 240u8, 31u8, 226u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for ModelInterfaceCalls { + const NAME: &'static str = "ModelInterfaceCalls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 3usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::context(_) => ::SELECTOR, + Self::signal(_) => ::SELECTOR, + Self::signalMany(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn context( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(ModelInterfaceCalls::context) + } + context + }, + { + fn signal( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(ModelInterfaceCalls::signal) + } + signal + }, + { + fn signalMany( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(ModelInterfaceCalls::signalMany) + } + signalMany + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::context(inner) => { + ::abi_encoded_size(inner) + } + Self::signal(inner) => { + ::abi_encoded_size(inner) + } + Self::signalMany(inner) => { + ::abi_encoded_size(inner) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::context(inner) => { + ::abi_encode_raw(inner, out) + } + Self::signal(inner) => { + ::abi_encode_raw(inner, out) + } + Self::signalMany(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`ModelInterface`](self) contract instance. + +See the [wrapper's documentation](`ModelInterfaceInstance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> ModelInterfaceInstance { + ModelInterfaceInstance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + ModelInterfaceInstance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + ModelInterfaceInstance::::deploy_builder(provider) + } + /**A [`ModelInterface`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`ModelInterface`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct ModelInterfaceInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for ModelInterfaceInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("ModelInterfaceInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ModelInterfaceInstance { + /**Creates a new wrapper around an on-chain [`ModelInterface`](self) contract instance. + +See the [wrapper's documentation](`ModelInterfaceInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl ModelInterfaceInstance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> ModelInterfaceInstance { + ModelInterfaceInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ModelInterfaceInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`context`] function. + pub fn context(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&contextCall {}) + } + ///Creates a new call builder for the [`signal`] function. + pub fn signal( + &self, + action: u8, + scalar: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&signalCall { action, scalar }) + } + ///Creates a new call builder for the [`signalMany`] function. + pub fn signalMany( + &self, + actions: alloy::sol_types::private::Vec, + scalars: alloy::sol_types::private::Vec, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&signalManyCall { actions, scalars }) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > ModelInterfaceInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + } +} diff --git a/crates/bindings/src/my_model_contract.rs b/crates/bindings/src/my_model_contract.rs deleted file mode 100644 index 4ce835c..0000000 --- a/crates/bindings/src/my_model_contract.rs +++ /dev/null @@ -1,706 +0,0 @@ -pub use my_model_contract::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod my_model_contract { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("context"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("context"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedArray( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - 10usize, - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ], - ), - ), - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct Model.Head"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("latestBlocks"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("latestBlocks"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("sequence"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("sequence"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signal"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signal"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("action"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signalMany"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signalMany"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("actions"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalars"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256[]"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("state"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("state"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Int(256usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("int256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("SignaledEvent"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("SignaledEvent"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("role"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("actionId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MYMODELCONTRACT_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct MyModelContract(::ethers::contract::Contract); - impl ::core::clone::Clone for MyModelContract { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for MyModelContract { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for MyModelContract { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for MyModelContract { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(MyModelContract)) - .field(&self.address()) - .finish() - } - } - impl MyModelContract { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MYMODELCONTRACT_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `context` (0xd0496d6a) function - pub fn context(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([208, 73, 109, 106], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `latestBlocks` (0x6ee376e6) function - pub fn latest_blocks( - &self, - p0: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([110, 227, 118, 230], p0) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `sequence` (0x529d15cc) function - pub fn sequence( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([82, 157, 21, 204], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signal` (0xddc3b187) function - pub fn signal( - &self, - action: u8, - scalar: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 195, 177, 135], (action, scalar)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signalMany` (0xfff01fe2) function - pub fn signal_many( - &self, - actions: ::std::vec::Vec, - scalars: ::std::vec::Vec<::ethers::core::types::U256>, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([255, 240, 31, 226], (actions, scalars)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `state` (0x3e4f49e6) function - pub fn state( - &self, - p0: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([62, 79, 73, 230], p0) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `SignaledEvent` event - pub fn signaled_event_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for MyModelContract { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "SignaledEvent", - abi = "SignaledEvent(uint8,uint8,uint256,uint256)" - )] - pub struct SignaledEventFilter { - #[ethevent(indexed)] - pub role: u8, - #[ethevent(indexed)] - pub action_id: u8, - #[ethevent(indexed)] - pub scalar: ::ethers::core::types::U256, - pub sequence: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "context", abi = "context()")] - pub struct ContextCall; - ///Container type for all input parameters for the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "latestBlocks", abi = "latestBlocks(uint256)")] - pub struct LatestBlocksCall(pub ::ethers::core::types::U256); - ///Container type for all input parameters for the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "sequence", abi = "sequence()")] - pub struct SequenceCall; - ///Container type for all input parameters for the `signal` function with signature `signal(uint8,uint256)` and selector `0xddc3b187` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signal", abi = "signal(uint8,uint256)")] - pub struct SignalCall { - pub action: u8, - pub scalar: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `signalMany` function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signalMany", abi = "signalMany(uint8[],uint256[])")] - pub struct SignalManyCall { - pub actions: ::std::vec::Vec, - pub scalars: ::std::vec::Vec<::ethers::core::types::U256>, - } - ///Container type for all input parameters for the `state` function with signature `state(uint256)` and selector `0x3e4f49e6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "state", abi = "state(uint256)")] - pub struct StateCall(pub ::ethers::core::types::U256); - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MyModelContractCalls { - Context(ContextCall), - LatestBlocks(LatestBlocksCall), - Sequence(SequenceCall), - Signal(SignalCall), - SignalMany(SignalManyCall), - State(StateCall), - } - impl ::ethers::core::abi::AbiDecode for MyModelContractCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Context(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::LatestBlocks(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Sequence(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Signal(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SignalMany(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::State(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for MyModelContractCalls { - fn encode(self) -> Vec { - match self { - Self::Context(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::LatestBlocks(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Sequence(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Signal(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SignalMany(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::State(element) => ::ethers::core::abi::AbiEncode::encode(element), - } - } - } - impl ::core::fmt::Display for MyModelContractCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Context(element) => ::core::fmt::Display::fmt(element, f), - Self::LatestBlocks(element) => ::core::fmt::Display::fmt(element, f), - Self::Sequence(element) => ::core::fmt::Display::fmt(element, f), - Self::Signal(element) => ::core::fmt::Display::fmt(element, f), - Self::SignalMany(element) => ::core::fmt::Display::fmt(element, f), - Self::State(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: ContextCall) -> Self { - Self::Context(value) - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: LatestBlocksCall) -> Self { - Self::LatestBlocks(value) - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: SequenceCall) -> Self { - Self::Sequence(value) - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: SignalCall) -> Self { - Self::Signal(value) - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: SignalManyCall) -> Self { - Self::SignalMany(value) - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: StateCall) -> Self { - Self::State(value) - } - } - ///Container type for all return fields from the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ContextReturn(pub Head); - ///Container type for all return fields from the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct LatestBlocksReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SequenceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `state` function with signature `state(uint256)` and selector `0x3e4f49e6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct StateReturn(pub ::ethers::core::types::I256); -} diff --git a/crates/bindings/src/my_state_machine.rs b/crates/bindings/src/my_state_machine.rs deleted file mode 100644 index 5b9cc8d..0000000 --- a/crates/bindings/src/my_state_machine.rs +++ /dev/null @@ -1,757 +0,0 @@ -pub use my_state_machine::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod my_state_machine { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("context"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("context"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedArray( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - 10usize, - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ], - ), - ), - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct Model.Head"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("latestBlocks"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("latestBlocks"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("sequence"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("sequence"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signal"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signal"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("action"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signalMany"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signalMany"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("actions"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalars"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256[]"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("state"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("state"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Int(256usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("int256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("SignaledEvent"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("SignaledEvent"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("role"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("actionId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MYSTATEMACHINE_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - #[rustfmt::skip] - const __BYTECODE: &[u8] = b"`\0`\x02\x81\x90Ua\x01\xC0`@R`\x80\x81\x81R`\xA0\x82\x90R`\xC0\x82\x90R`\xE0\x82\x90Ra\x01\0\x82\x90Ra\x01 \x82\x90Ra\x01@\x82\x90Ra\x01`\x82\x90Ra\x01\x80\x82\x90Ra\x01\xA0\x91\x90\x91Rb\0\0U\x90`\x03\x90`\nb\0\x13\xAAV[P`@\x80Q`\x01\x80\x82R\x81\x83\x01\x90\x92R\x90` \x80\x83\x01\x90\x806\x837PP\x81Qb\0\0\x87\x92`\r\x92P` \x01\x90b\0\x13\xF2V[P4\x80\x15b\0\0\x95W`\0\x80\xFD[P`@\x80Q\x80\x82\x01\x82R`\x06\x81Re\x07\x06\xC6\x166S`\xD4\x1B` \x80\x83\x01\x91\x90\x91R\x82Q\x80\x84\x01\x90\x93R`\x01\x83R`\x02\x90\x83\x01Rb\0\0\xD9\x91`\0\x90`\x03\x90b\0\r\xE2V[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rc\x07G\x86\xE3`\xE4\x1B` \x82\x01Rb\0\x01\x1A\x90`\x01`\0\x80`@\x80Q\x80\x82\x01\x90\x91R`\0\x81R`\x01` \x82\x01Rb\0\x0E\xFDV[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rctxn1`\xE0\x1B` \x82\x01Rb\0\x01[\x90`\x01\x80`\0`@\x80Q\x80\x82\x01\x90\x91R`\x02\x81R`\x01` \x82\x01Rb\0\x0E\xFDV[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rc:<7\x19`\xE1\x1B` \x82\x01Rb\0\x01\x9D\x90`\x01`\x02`\0`@\x80Q\x80\x82\x01\x90\x91R`\0\x81R`\x03` \x82\x01Rb\0\x0E\xFDV[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rctxn3`\xE0\x1B` \x82\x01Rb\0\x01\xDF\x90`\x01`\x03`\0`@\x80Q\x80\x82\x01\x90\x91R`\x02\x81R`\x03` \x82\x01Rb\0\x0E\xFDV[Pb\0\x04\xBD`\x01\x80`\0\x81T\x81\x10b\0\x01\xFCWb\0\x01\xFCb\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x02'\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x02U\x90b\0\x14sV[\x80\x15b\0\x02\xA6W\x80`\x1F\x10b\0\x02zWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x02\xA6V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x02\x88W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x03>W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x03)W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\x03\x98W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x03\x83W[PPPPP\x81RPP`\0\x80\x81T\x81\x10b\0\x03\xB7Wb\0\x03\xB7b\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x03\xE2\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x04\x10\x90b\0\x14sV[\x80\x15b\0\x04aW\x80`\x1F\x10b\0\x045Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x04aV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x04CW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x82\x01R`\x03\x82\x01T``\x82\x01R`\x04\x90\x91\x01T`\x80\x90\x91\x01Rb\0\x11UV[b\0\x07\xA0`\x03`\0\x80\x81T\x81\x10b\0\x04\xD9Wb\0\x04\xD9b\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x05\x04\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x052\x90b\0\x14sV[\x80\x15b\0\x05\x83W\x80`\x1F\x10b\0\x05WWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x05\x83V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x05eW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x83\x01R`\x03\x83\x01T``\x83\x01R`\x04\x90\x92\x01T`\x80\x90\x91\x01R\x80T\x81\x90\x81\x10b\0\x05\xEFWb\0\x05\xEFb\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x06\x1A\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x06H\x90b\0\x14sV[\x80\x15b\0\x06\x99W\x80`\x1F\x10b\0\x06mWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x06\x99V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x06{W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x071W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x07\x1CW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\x07\x8BW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x07vW[PPPPP\x81RPPb\0\x11\xF1` \x1B` \x1CV[b\0\n~`\x03`\x01`\x02\x81T\x81\x10b\0\x07\xBDWb\0\x07\xBDb\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x07\xE8\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x08\x16\x90b\0\x14sV[\x80\x15b\0\x08gW\x80`\x1F\x10b\0\x08;Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x08gV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x08IW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x08\xFFW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x08\xEAW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\tYW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\tDW[PPPPP\x81RPP`\0\x80\x81T\x81\x10b\0\txWb\0\txb\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\t\xA3\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\t\xD1\x90b\0\x14sV[\x80\x15b\0\n\"W\x80`\x1F\x10b\0\t\xF6Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\n\"V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\n\x04W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x82\x01R`\x03\x82\x01T``\x82\x01R`\x04\x90\x91\x01T`\x80\x90\x91\x01Rb\0\x12\x88V[b\0\rf`\x01`\0\x80\x81T\x81\x10b\0\n\x9AWb\0\n\x9Ab\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\n\xC5\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\n\xF3\x90b\0\x14sV[\x80\x15b\0\x0BDW\x80`\x1F\x10b\0\x0B\x18Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x0BDV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x0B&W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x83\x01R`\x03\x80\x84\x01T``\x84\x01R`\x04\x90\x93\x01T`\x80\x90\x92\x01\x91\x90\x91R\x80T\x90\x91\x90\x81\x10b\0\x0B\xB5Wb\0\x0B\xB5b\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x0B\xE0\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x0C\x0E\x90b\0\x14sV[\x80\x15b\0\x0C_W\x80`\x1F\x10b\0\x0C3Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x0C_V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x0CAW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x0C\xF7W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x0C\xE2W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\rQW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\r enum mismatch\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0`@Q\x80`\xC0\x01`@R\x80\x88\x81R` \x01\x86`\xFF\x16\x81R` \x01\x84\x81R` \x01\x85`\xFF\x16\x81R` \x01\x87`\xFF\x16`\x01`\x01`@\x1B\x03\x81\x11\x15b\0\x0F\xEEWb\0\x0F\xEEb\0\x14GV[`@Q\x90\x80\x82R\x80` \x02` \x01\x82\x01`@R\x80\x15b\0\x10\x18W\x81` \x01` \x82\x02\x806\x837\x01\x90P[P\x81R` \x01\x87`\xFF\x16`\x01`\x01`@\x1B\x03\x81\x11\x15b\0\x10OI\xE6\x14a\0gW\x80cR\x9D\x15\xCC\x14a\0\x8DW\x80cn\xE3v\xE6\x14a\0\x96W\x80c\xD0Imj\x14a\0\xA9W\x80c\xDD\xC3\xB1\x87\x14a\0\xBEW\x80c\xFF\xF0\x1F\xE2\x14a\0\xD3W[`\0\x80\xFD[a\0za\0u6`\x04a\x0CDV[a\0\xE6V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0z`\x02T\x81V[a\0za\0\xA46`\x04a\x0CDV[a\x01\x07V[a\0\xB1a\x01\x1EV[`@Qa\0\x84\x91\x90a\x0EOV[a\0\xD1a\0\xCC6`\x04a\x0F\x04V[a\x04\xDCV[\0[a\0\xD1a\0\xE16`\x04a\x0FzV[a\x04\xF3V[`\r\x81\x81T\x81\x10a\0\xF6W`\0\x80\xFD[`\0\x91\x82R` \x90\x91 \x01T\x90P\x81V[`\x03\x81`\n\x81\x10a\x01\x17W`\0\x80\xFD[\x01T\x90P\x81V[a\x01&a\x0B\xF0V[`@\x80Qa\x01\xE0\x81\x01\x90\x91R\x80`\xA0\x81\x01`\x03`\n\x82\x82\x82` \x02\x82\x01\x91[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01EWPPPPP\x81R` \x01`\x02T\x81R` \x01`\r\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x01\xB6W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01\xA2W[PPPPP\x81R` \x01`\0\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x02\xF4W\x83\x82\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x02\x15\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02A\x90a\x0F\xE6V[\x80\x15a\x02\x8EW\x80`\x1F\x10a\x02cWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\x8EV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02qW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x83\x83\x01R\x84\x01\x91\x90\x91R`\x03\x84\x01T``\x84\x01R`\x04\x90\x93\x01T`\x80\x90\x92\x01\x91\x90\x91R\x91\x83R\x92\x01\x91\x01a\x01\xE2V[PPPP\x81R` \x01`\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x04\xD1W\x83\x82\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x03R\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03~\x90a\x0F\xE6V[\x80\x15a\x03\xCBW\x80`\x1F\x10a\x03\xA0Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xCBV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\xAEW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x04aW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04MW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x04\xB9W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04\xA5W[PPPPP\x81RPP\x81R` \x01\x90`\x01\x01\x90a\x03\x1FV[PPP\x91RP\x91\x90PV[a\x04\xE6\x82\x82a\x05\xBCV[a\x04\xEFCa\x08^V[PPV[\x82\x81\x14a\x05GW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FModelRegistry: invalid input\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0[\x83\x81\x10\x15a\x05\xACWa\x05\x9A\x85\x85\x83\x81\x81\x10a\x05gWa\x05ga\x10 V[\x90P` \x02\x01` \x81\x01\x90a\x05|\x91\x90a\x106V[\x84\x84\x84\x81\x81\x10a\x05\x8EWa\x05\x8Ea\x10 V[\x90P` \x02\x015a\x05\xBCV[\x80a\x05\xA4\x81a\x10nV[\x91PPa\x05JV[Pa\x05\xB6Ca\x08^V[PPPPV[`\0`\x01\x83`\xFF\x16\x81T\x81\x10a\x05\xD4Wa\x05\xD4a\x10 V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x05\xFD\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x06)\x90a\x0F\xE6V[\x80\x15a\x06vW\x80`\x1F\x10a\x06KWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x06vV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x06YW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x07\x0CW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x06\xF8W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x07dW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x07PW[PPPPP\x81RPP\x90Pa\x07x\x81a\x08\xBFV[\x15a\x07\xB1W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rh\x1A[\x9A\x1AX\x9A]\x19Y`\xBA\x1B`D\x82\x01R`d\x01a\x05>V[\x80` \x01Q`\xFF\x16\x83`\xFF\x16\x14a\x07\xCAWa\x07\xCAa\x10\x87V[`\0[`\0T`\xFF\x90\x81\x16\x90\x82\x16\x10\x15a\x07\xFBWa\x07\xE9\x81\x83\x85a\t\xF9V[\x80a\x07\xF3\x81a\x10\x9DV[\x91PPa\x07\xCDV[P`\x02\x80T\x90`\0a\x08\x0C\x83a\x10nV[\x91\x90PUP\x81\x83`\xFF\x16\x82``\x01Q`\xFF\x16\x7FP\xE4\xA5+\x07r\xBE\xD9\xF0j}?}\xFAf\xD76@\x06z\\\xC7zs\xC2EV\xCC\xC9\0\xFA\x08`\x02T`@Qa\x08Q\x91\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA4PPPV[`\0[`\t\x81`\xFF\x16\x10\x15a\x08\xB9W`\x03a\x08z\x82`\x01a\x10\xBCV[`\xFF\x16`\n\x81\x10a\x08\x8DWa\x08\x8Da\x10 V[\x01T`\x03\x82`\xFF\x16`\n\x81\x10a\x08\xA5Wa\x08\xA5a\x10 V[\x01U\x80a\x08\xB1\x81a\x10\x9DV[\x91PPa\x08aV[P`\x0CUV[`\0\x80[`\x01`\xFF\x82\x16\x10\x15a\t\xF0W\x82`\xA0\x01Q\x81`\xFF\x16\x81Q\x81\x10a\x08\xE8Wa\x08\xE8a\x10 V[` \x02` \x01\x01Q`\0\x14a\t\xDEW`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x12Wa\t\x12a\x10 V[` \x02` \x01\x01Q\x12\x15a\t\x81W`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t;Wa\t;a\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\tYWa\tYa\x10 V[\x90`\0R` `\0 \x01Ta\tn\x91\x90a\x10\xDBV[\x12a\t|WP`\x01\x92\x91PPV[a\t\xDEV[`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x9CWa\t\x9Ca\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\t\xBAWa\t\xBAa\x10 V[\x90`\0R` `\0 \x01Ta\t\xCF\x91\x90a\x11\x03V[\x12\x15a\t\xDEWP`\x01\x92\x91PPV[\x80a\t\xE8\x81a\x10\x9DV[\x91PPa\x08\xC3V[P`\0\x92\x91PPV[`\0\x81\x11a\n:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm4\xB7;0\xB64\xB2\x109\xB1\xB0\xB60\xB9`\x91\x1B`D\x82\x01R`d\x01a\x05>V[\x81`\x80\x01Q\x83`\xFF\x16\x81Q\x81\x10a\nSWa\nSa\x10 V[` \x02` \x01\x01Q`\0\x14a\x0B\xEBW\x80\x82`\x80\x01Q\x84`\xFF\x16\x81Q\x81\x10a\n|Wa\n|a\x10 V[` \x02` \x01\x01Qa\n\x8E\x91\x90a\x11*V[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xA4Wa\n\xA4a\x10 V[\x90`\0R` `\0 \x01Ta\n\xB9\x91\x90a\x10\xDBV[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xCFWa\n\xCFa\x10 V[\x90`\0R` `\0 \x01\x81\x90UP`\0`\r\x84`\xFF\x16\x81T\x81\x10a\n\xF5Wa\n\xF5a\x10 V[\x90`\0R` `\0 \x01T\x12\x15a\x0B:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rhunderflow`\xB8\x1B`D\x82\x01R`d\x01a\x05>V[`\0\x80\x84`\xFF\x16\x81T\x81\x10a\x0BQWa\x0BQa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T\x11\x15a\x0B\xEBW`\0\x83`\xFF\x16\x81T\x81\x10a\x0B\x7FWa\x0B\x7Fa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T`\r\x84`\xFF\x16\x81T\x81\x10a\x0B\xA7Wa\x0B\xA7a\x10 V[\x90`\0R` `\0 \x01T\x13\x15a\x0B\xEBW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x08`$\x82\x01Rgoverflow`\xC0\x1B`D\x82\x01R`d\x01a\x05>V[PPPV[`@Q\x80`\xA0\x01`@R\x80a\x0C\x03a\x0C%V[\x81R` \x01`\0\x81R` \x01``\x81R` \x01``\x81R` \x01``\x81RP\x90V[`@Q\x80a\x01@\x01`@R\x80`\n\x90` \x82\x02\x806\x837P\x91\x92\x91PPV[`\0` \x82\x84\x03\x12\x15a\x0CVW`\0\x80\xFD[P5\x91\x90PV[`\0\x81Q\x80\x84R` \x80\x85\x01\x94P\x80\x84\x01`\0[\x83\x81\x10\x15a\x0C\x8DW\x81Q\x87R\x95\x82\x01\x95\x90\x82\x01\x90`\x01\x01a\x0CqV[P\x94\x95\x94PPPPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\x0C\xBEW` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\x0C\xA2V[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xC0\x81Q\x81\x87Ra\r\x1E\x82\x88\x01\x82a\x0C\x98V[\x91PP`\xFF\x87\x83\x01Q\x16\x87\x87\x01R`@\x80\x83\x01Qa\rN\x82\x89\x01\x82\x80Q`\xFF\x90\x81\x16\x83R` \x91\x82\x01Q\x16\x91\x01RV[PP``\x82\x01Q`\x80\x87\x81\x01\x91\x90\x91R\x90\x91\x01Q`\xA0\x90\x95\x01\x94\x90\x94R\x97\x84\x01\x97\x90\x84\x01\x90`\x01\x01a\x0C\xFCV[P\x91\x97\x96PPPPPPPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xE0\x81Q\x81\x87Ra\r\xC8\x82\x88\x01\x82a\x0C\x98V[\x83\x89\x01Q`\xFF\x90\x81\x16\x89\x8B\x01R`@\x80\x86\x01Q\x80Q\x83\x16\x82\x8C\x01R` \x81\x01Q\x83\x16``\x8C\x01R\x92\x94P\x92P\x90P``\x84\x01Q\x91P`\x80\x81\x83\x16\x81\x8A\x01R\x80\x85\x01Q\x92PPP`\xA0\x87\x83\x03\x81\x89\x01Ra\x0E!\x83\x83a\x0C]V[\x93\x01Q\x87\x84\x03`\xC0\x89\x01R\x92\x91Pa\x0E;\x90P\x81\x83a\x0C]V[\x9A\x87\x01\x9A\x95PPP\x90\x84\x01\x90`\x01\x01a\r\xA6V[` \x80\x82R\x82Q`\0\x91\x90\x82\x84\x83\x01[`\n\x82\x10\x15a\x0E~W\x82Q\x81R\x91\x83\x01\x91`\x01\x91\x90\x91\x01\x90\x83\x01a\x0E_V[PPP\x83\x01Qa\x01`\x83\x01R`@\x83\x01Qa\x01\xC0a\x01\x80\x84\x01\x81\x90Ra\x0E\xA8a\x01\xE0\x85\x01\x83a\x0C]V[\x91P``\x85\x01Q`\x1F\x19\x80\x86\x85\x03\x01a\x01\xA0\x87\x01Ra\x0E\xC7\x84\x83a\x0C\xDEV[\x93P`\x80\x87\x01Q\x91P\x80\x86\x85\x03\x01\x83\x87\x01RPa\x0E\xE4\x83\x82a\r\x88V[\x96\x95PPPPPPV[\x805`\xFF\x81\x16\x81\x14a\x0E\xFFW`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0F\x17W`\0\x80\xFD[a\x0F \x83a\x0E\xEEV[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80\x83`\x1F\x84\x01\x12a\x0F@W`\0\x80\xFD[P\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0FXW`\0\x80\xFD[` \x83\x01\x91P\x83` \x82`\x05\x1B\x85\x01\x01\x11\x15a\x0FsW`\0\x80\xFD[\x92P\x92\x90PV[`\0\x80`\0\x80`@\x85\x87\x03\x12\x15a\x0F\x90W`\0\x80\xFD[\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0F\xA8W`\0\x80\xFD[a\x0F\xB4\x88\x83\x89\x01a\x0F.V[\x90\x96P\x94P` \x87\x015\x91P\x80\x82\x11\x15a\x0F\xCDW`\0\x80\xFD[Pa\x0F\xDA\x87\x82\x88\x01a\x0F.V[\x95\x98\x94\x97P\x95PPPPV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0F\xFAW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x10\x1AWcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[cNH{q`\xE0\x1B`\0R`2`\x04R`$`\0\xFD[`\0` \x82\x84\x03\x12\x15a\x10HW`\0\x80\xFD[a\x10Q\x82a\x0E\xEEV[\x93\x92PPPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\x10\x80Wa\x10\x80a\x10XV[P`\x01\x01\x90V[cNH{q`\xE0\x1B`\0R`\x01`\x04R`$`\0\xFD[`\0`\xFF\x82\x16`\xFF\x81\x03a\x10\xB3Wa\x10\xB3a\x10XV[`\x01\x01\x92\x91PPV[`\xFF\x81\x81\x16\x83\x82\x16\x01\x90\x81\x11\x15a\x10\xD5Wa\x10\xD5a\x10XV[\x92\x91PPV[\x80\x82\x01\x82\x81\x12`\0\x83\x12\x80\x15\x82\x16\x82\x15\x82\x16\x17\x15a\x10\xFBWa\x10\xFBa\x10XV[PP\x92\x91PPV[\x81\x81\x03`\0\x83\x12\x80\x15\x83\x83\x13\x16\x83\x83\x12\x82\x16\x17\x15a\x11#Wa\x11#a\x10XV[P\x92\x91PPV[\x80\x82\x02`\0\x82\x12`\x01`\xFF\x1B\x84\x14\x16\x15a\x11FWa\x11Fa\x10XV[\x81\x81\x05\x83\x14\x82\x15\x17a\x10\xD5Wa\x10\xD5a\x10XV\xFE\xA2dipfsX\"\x12 C\xBA\x8BiP\xA9\xCDh\xD9h=\xA7\xA0\x08O(\xF8tvI#\xF9\r\xD4\xF7\xCF\x01}\x08MG\x94dsolcC\0\x08\x15\x003weight must be > 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; - /// The bytecode of the contract. - pub static MYSTATEMACHINE_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __BYTECODE, - ); - #[rustfmt::skip] - const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0bW`\x005`\xE0\x1C\x80c>OI\xE6\x14a\0gW\x80cR\x9D\x15\xCC\x14a\0\x8DW\x80cn\xE3v\xE6\x14a\0\x96W\x80c\xD0Imj\x14a\0\xA9W\x80c\xDD\xC3\xB1\x87\x14a\0\xBEW\x80c\xFF\xF0\x1F\xE2\x14a\0\xD3W[`\0\x80\xFD[a\0za\0u6`\x04a\x0CDV[a\0\xE6V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0z`\x02T\x81V[a\0za\0\xA46`\x04a\x0CDV[a\x01\x07V[a\0\xB1a\x01\x1EV[`@Qa\0\x84\x91\x90a\x0EOV[a\0\xD1a\0\xCC6`\x04a\x0F\x04V[a\x04\xDCV[\0[a\0\xD1a\0\xE16`\x04a\x0FzV[a\x04\xF3V[`\r\x81\x81T\x81\x10a\0\xF6W`\0\x80\xFD[`\0\x91\x82R` \x90\x91 \x01T\x90P\x81V[`\x03\x81`\n\x81\x10a\x01\x17W`\0\x80\xFD[\x01T\x90P\x81V[a\x01&a\x0B\xF0V[`@\x80Qa\x01\xE0\x81\x01\x90\x91R\x80`\xA0\x81\x01`\x03`\n\x82\x82\x82` \x02\x82\x01\x91[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01EWPPPPP\x81R` \x01`\x02T\x81R` \x01`\r\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x01\xB6W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01\xA2W[PPPPP\x81R` \x01`\0\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x02\xF4W\x83\x82\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x02\x15\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02A\x90a\x0F\xE6V[\x80\x15a\x02\x8EW\x80`\x1F\x10a\x02cWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\x8EV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02qW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x83\x83\x01R\x84\x01\x91\x90\x91R`\x03\x84\x01T``\x84\x01R`\x04\x90\x93\x01T`\x80\x90\x92\x01\x91\x90\x91R\x91\x83R\x92\x01\x91\x01a\x01\xE2V[PPPP\x81R` \x01`\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x04\xD1W\x83\x82\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x03R\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03~\x90a\x0F\xE6V[\x80\x15a\x03\xCBW\x80`\x1F\x10a\x03\xA0Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xCBV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\xAEW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x04aW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04MW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x04\xB9W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04\xA5W[PPPPP\x81RPP\x81R` \x01\x90`\x01\x01\x90a\x03\x1FV[PPP\x91RP\x91\x90PV[a\x04\xE6\x82\x82a\x05\xBCV[a\x04\xEFCa\x08^V[PPV[\x82\x81\x14a\x05GW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FModelRegistry: invalid input\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0[\x83\x81\x10\x15a\x05\xACWa\x05\x9A\x85\x85\x83\x81\x81\x10a\x05gWa\x05ga\x10 V[\x90P` \x02\x01` \x81\x01\x90a\x05|\x91\x90a\x106V[\x84\x84\x84\x81\x81\x10a\x05\x8EWa\x05\x8Ea\x10 V[\x90P` \x02\x015a\x05\xBCV[\x80a\x05\xA4\x81a\x10nV[\x91PPa\x05JV[Pa\x05\xB6Ca\x08^V[PPPPV[`\0`\x01\x83`\xFF\x16\x81T\x81\x10a\x05\xD4Wa\x05\xD4a\x10 V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x05\xFD\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x06)\x90a\x0F\xE6V[\x80\x15a\x06vW\x80`\x1F\x10a\x06KWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x06vV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x06YW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x07\x0CW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x06\xF8W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x07dW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x07PW[PPPPP\x81RPP\x90Pa\x07x\x81a\x08\xBFV[\x15a\x07\xB1W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rh\x1A[\x9A\x1AX\x9A]\x19Y`\xBA\x1B`D\x82\x01R`d\x01a\x05>V[\x80` \x01Q`\xFF\x16\x83`\xFF\x16\x14a\x07\xCAWa\x07\xCAa\x10\x87V[`\0[`\0T`\xFF\x90\x81\x16\x90\x82\x16\x10\x15a\x07\xFBWa\x07\xE9\x81\x83\x85a\t\xF9V[\x80a\x07\xF3\x81a\x10\x9DV[\x91PPa\x07\xCDV[P`\x02\x80T\x90`\0a\x08\x0C\x83a\x10nV[\x91\x90PUP\x81\x83`\xFF\x16\x82``\x01Q`\xFF\x16\x7FP\xE4\xA5+\x07r\xBE\xD9\xF0j}?}\xFAf\xD76@\x06z\\\xC7zs\xC2EV\xCC\xC9\0\xFA\x08`\x02T`@Qa\x08Q\x91\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA4PPPV[`\0[`\t\x81`\xFF\x16\x10\x15a\x08\xB9W`\x03a\x08z\x82`\x01a\x10\xBCV[`\xFF\x16`\n\x81\x10a\x08\x8DWa\x08\x8Da\x10 V[\x01T`\x03\x82`\xFF\x16`\n\x81\x10a\x08\xA5Wa\x08\xA5a\x10 V[\x01U\x80a\x08\xB1\x81a\x10\x9DV[\x91PPa\x08aV[P`\x0CUV[`\0\x80[`\x01`\xFF\x82\x16\x10\x15a\t\xF0W\x82`\xA0\x01Q\x81`\xFF\x16\x81Q\x81\x10a\x08\xE8Wa\x08\xE8a\x10 V[` \x02` \x01\x01Q`\0\x14a\t\xDEW`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x12Wa\t\x12a\x10 V[` \x02` \x01\x01Q\x12\x15a\t\x81W`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t;Wa\t;a\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\tYWa\tYa\x10 V[\x90`\0R` `\0 \x01Ta\tn\x91\x90a\x10\xDBV[\x12a\t|WP`\x01\x92\x91PPV[a\t\xDEV[`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x9CWa\t\x9Ca\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\t\xBAWa\t\xBAa\x10 V[\x90`\0R` `\0 \x01Ta\t\xCF\x91\x90a\x11\x03V[\x12\x15a\t\xDEWP`\x01\x92\x91PPV[\x80a\t\xE8\x81a\x10\x9DV[\x91PPa\x08\xC3V[P`\0\x92\x91PPV[`\0\x81\x11a\n:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm4\xB7;0\xB64\xB2\x109\xB1\xB0\xB60\xB9`\x91\x1B`D\x82\x01R`d\x01a\x05>V[\x81`\x80\x01Q\x83`\xFF\x16\x81Q\x81\x10a\nSWa\nSa\x10 V[` \x02` \x01\x01Q`\0\x14a\x0B\xEBW\x80\x82`\x80\x01Q\x84`\xFF\x16\x81Q\x81\x10a\n|Wa\n|a\x10 V[` \x02` \x01\x01Qa\n\x8E\x91\x90a\x11*V[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xA4Wa\n\xA4a\x10 V[\x90`\0R` `\0 \x01Ta\n\xB9\x91\x90a\x10\xDBV[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xCFWa\n\xCFa\x10 V[\x90`\0R` `\0 \x01\x81\x90UP`\0`\r\x84`\xFF\x16\x81T\x81\x10a\n\xF5Wa\n\xF5a\x10 V[\x90`\0R` `\0 \x01T\x12\x15a\x0B:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rhunderflow`\xB8\x1B`D\x82\x01R`d\x01a\x05>V[`\0\x80\x84`\xFF\x16\x81T\x81\x10a\x0BQWa\x0BQa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T\x11\x15a\x0B\xEBW`\0\x83`\xFF\x16\x81T\x81\x10a\x0B\x7FWa\x0B\x7Fa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T`\r\x84`\xFF\x16\x81T\x81\x10a\x0B\xA7Wa\x0B\xA7a\x10 V[\x90`\0R` `\0 \x01T\x13\x15a\x0B\xEBW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x08`$\x82\x01Rgoverflow`\xC0\x1B`D\x82\x01R`d\x01a\x05>V[PPPV[`@Q\x80`\xA0\x01`@R\x80a\x0C\x03a\x0C%V[\x81R` \x01`\0\x81R` \x01``\x81R` \x01``\x81R` \x01``\x81RP\x90V[`@Q\x80a\x01@\x01`@R\x80`\n\x90` \x82\x02\x806\x837P\x91\x92\x91PPV[`\0` \x82\x84\x03\x12\x15a\x0CVW`\0\x80\xFD[P5\x91\x90PV[`\0\x81Q\x80\x84R` \x80\x85\x01\x94P\x80\x84\x01`\0[\x83\x81\x10\x15a\x0C\x8DW\x81Q\x87R\x95\x82\x01\x95\x90\x82\x01\x90`\x01\x01a\x0CqV[P\x94\x95\x94PPPPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\x0C\xBEW` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\x0C\xA2V[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xC0\x81Q\x81\x87Ra\r\x1E\x82\x88\x01\x82a\x0C\x98V[\x91PP`\xFF\x87\x83\x01Q\x16\x87\x87\x01R`@\x80\x83\x01Qa\rN\x82\x89\x01\x82\x80Q`\xFF\x90\x81\x16\x83R` \x91\x82\x01Q\x16\x91\x01RV[PP``\x82\x01Q`\x80\x87\x81\x01\x91\x90\x91R\x90\x91\x01Q`\xA0\x90\x95\x01\x94\x90\x94R\x97\x84\x01\x97\x90\x84\x01\x90`\x01\x01a\x0C\xFCV[P\x91\x97\x96PPPPPPPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xE0\x81Q\x81\x87Ra\r\xC8\x82\x88\x01\x82a\x0C\x98V[\x83\x89\x01Q`\xFF\x90\x81\x16\x89\x8B\x01R`@\x80\x86\x01Q\x80Q\x83\x16\x82\x8C\x01R` \x81\x01Q\x83\x16``\x8C\x01R\x92\x94P\x92P\x90P``\x84\x01Q\x91P`\x80\x81\x83\x16\x81\x8A\x01R\x80\x85\x01Q\x92PPP`\xA0\x87\x83\x03\x81\x89\x01Ra\x0E!\x83\x83a\x0C]V[\x93\x01Q\x87\x84\x03`\xC0\x89\x01R\x92\x91Pa\x0E;\x90P\x81\x83a\x0C]V[\x9A\x87\x01\x9A\x95PPP\x90\x84\x01\x90`\x01\x01a\r\xA6V[` \x80\x82R\x82Q`\0\x91\x90\x82\x84\x83\x01[`\n\x82\x10\x15a\x0E~W\x82Q\x81R\x91\x83\x01\x91`\x01\x91\x90\x91\x01\x90\x83\x01a\x0E_V[PPP\x83\x01Qa\x01`\x83\x01R`@\x83\x01Qa\x01\xC0a\x01\x80\x84\x01\x81\x90Ra\x0E\xA8a\x01\xE0\x85\x01\x83a\x0C]V[\x91P``\x85\x01Q`\x1F\x19\x80\x86\x85\x03\x01a\x01\xA0\x87\x01Ra\x0E\xC7\x84\x83a\x0C\xDEV[\x93P`\x80\x87\x01Q\x91P\x80\x86\x85\x03\x01\x83\x87\x01RPa\x0E\xE4\x83\x82a\r\x88V[\x96\x95PPPPPPV[\x805`\xFF\x81\x16\x81\x14a\x0E\xFFW`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0F\x17W`\0\x80\xFD[a\x0F \x83a\x0E\xEEV[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80\x83`\x1F\x84\x01\x12a\x0F@W`\0\x80\xFD[P\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0FXW`\0\x80\xFD[` \x83\x01\x91P\x83` \x82`\x05\x1B\x85\x01\x01\x11\x15a\x0FsW`\0\x80\xFD[\x92P\x92\x90PV[`\0\x80`\0\x80`@\x85\x87\x03\x12\x15a\x0F\x90W`\0\x80\xFD[\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0F\xA8W`\0\x80\xFD[a\x0F\xB4\x88\x83\x89\x01a\x0F.V[\x90\x96P\x94P` \x87\x015\x91P\x80\x82\x11\x15a\x0F\xCDW`\0\x80\xFD[Pa\x0F\xDA\x87\x82\x88\x01a\x0F.V[\x95\x98\x94\x97P\x95PPPPV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0F\xFAW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x10\x1AWcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[cNH{q`\xE0\x1B`\0R`2`\x04R`$`\0\xFD[`\0` \x82\x84\x03\x12\x15a\x10HW`\0\x80\xFD[a\x10Q\x82a\x0E\xEEV[\x93\x92PPPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\x10\x80Wa\x10\x80a\x10XV[P`\x01\x01\x90V[cNH{q`\xE0\x1B`\0R`\x01`\x04R`$`\0\xFD[`\0`\xFF\x82\x16`\xFF\x81\x03a\x10\xB3Wa\x10\xB3a\x10XV[`\x01\x01\x92\x91PPV[`\xFF\x81\x81\x16\x83\x82\x16\x01\x90\x81\x11\x15a\x10\xD5Wa\x10\xD5a\x10XV[\x92\x91PPV[\x80\x82\x01\x82\x81\x12`\0\x83\x12\x80\x15\x82\x16\x82\x15\x82\x16\x17\x15a\x10\xFBWa\x10\xFBa\x10XV[PP\x92\x91PPV[\x81\x81\x03`\0\x83\x12\x80\x15\x83\x83\x13\x16\x83\x83\x12\x82\x16\x17\x15a\x11#Wa\x11#a\x10XV[P\x92\x91PPV[\x80\x82\x02`\0\x82\x12`\x01`\xFF\x1B\x84\x14\x16\x15a\x11FWa\x11Fa\x10XV[\x81\x81\x05\x83\x14\x82\x15\x17a\x10\xD5Wa\x10\xD5a\x10XV\xFE\xA2dipfsX\"\x12 C\xBA\x8BiP\xA9\xCDh\xD9h=\xA7\xA0\x08O(\xF8tvI#\xF9\r\xD4\xF7\xCF\x01}\x08MG\x94dsolcC\0\x08\x15\x003"; - /// The deployed bytecode of the contract. - pub static MYSTATEMACHINE_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __DEPLOYED_BYTECODE, - ); - pub struct MyStateMachine(::ethers::contract::Contract); - impl ::core::clone::Clone for MyStateMachine { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for MyStateMachine { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for MyStateMachine { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for MyStateMachine { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(MyStateMachine)) - .field(&self.address()) - .finish() - } - } - impl MyStateMachine { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MYSTATEMACHINE_ABI.clone(), - client, - ), - ) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - MYSTATEMACHINE_ABI.clone(), - MYSTATEMACHINE_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - ///Calls the contract's `context` (0xd0496d6a) function - pub fn context(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([208, 73, 109, 106], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `latestBlocks` (0x6ee376e6) function - pub fn latest_blocks( - &self, - p0: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([110, 227, 118, 230], p0) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `sequence` (0x529d15cc) function - pub fn sequence( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([82, 157, 21, 204], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signal` (0xddc3b187) function - pub fn signal( - &self, - action: u8, - scalar: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 195, 177, 135], (action, scalar)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signalMany` (0xfff01fe2) function - pub fn signal_many( - &self, - actions: ::std::vec::Vec, - scalars: ::std::vec::Vec<::ethers::core::types::U256>, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([255, 240, 31, 226], (actions, scalars)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `state` (0x3e4f49e6) function - pub fn state( - &self, - p0: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([62, 79, 73, 230], p0) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `SignaledEvent` event - pub fn signaled_event_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for MyStateMachine { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "SignaledEvent", - abi = "SignaledEvent(uint8,uint8,uint256,uint256)" - )] - pub struct SignaledEventFilter { - #[ethevent(indexed)] - pub role: u8, - #[ethevent(indexed)] - pub action_id: u8, - #[ethevent(indexed)] - pub scalar: ::ethers::core::types::U256, - pub sequence: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "context", abi = "context()")] - pub struct ContextCall; - ///Container type for all input parameters for the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "latestBlocks", abi = "latestBlocks(uint256)")] - pub struct LatestBlocksCall(pub ::ethers::core::types::U256); - ///Container type for all input parameters for the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "sequence", abi = "sequence()")] - pub struct SequenceCall; - ///Container type for all input parameters for the `signal` function with signature `signal(uint8,uint256)` and selector `0xddc3b187` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signal", abi = "signal(uint8,uint256)")] - pub struct SignalCall { - pub action: u8, - pub scalar: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `signalMany` function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signalMany", abi = "signalMany(uint8[],uint256[])")] - pub struct SignalManyCall { - pub actions: ::std::vec::Vec, - pub scalars: ::std::vec::Vec<::ethers::core::types::U256>, - } - ///Container type for all input parameters for the `state` function with signature `state(uint256)` and selector `0x3e4f49e6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "state", abi = "state(uint256)")] - pub struct StateCall(pub ::ethers::core::types::U256); - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MyStateMachineCalls { - Context(ContextCall), - LatestBlocks(LatestBlocksCall), - Sequence(SequenceCall), - Signal(SignalCall), - SignalMany(SignalManyCall), - State(StateCall), - } - impl ::ethers::core::abi::AbiDecode for MyStateMachineCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Context(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::LatestBlocks(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Sequence(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Signal(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SignalMany(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::State(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for MyStateMachineCalls { - fn encode(self) -> Vec { - match self { - Self::Context(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::LatestBlocks(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Sequence(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Signal(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SignalMany(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::State(element) => ::ethers::core::abi::AbiEncode::encode(element), - } - } - } - impl ::core::fmt::Display for MyStateMachineCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Context(element) => ::core::fmt::Display::fmt(element, f), - Self::LatestBlocks(element) => ::core::fmt::Display::fmt(element, f), - Self::Sequence(element) => ::core::fmt::Display::fmt(element, f), - Self::Signal(element) => ::core::fmt::Display::fmt(element, f), - Self::SignalMany(element) => ::core::fmt::Display::fmt(element, f), - Self::State(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: ContextCall) -> Self { - Self::Context(value) - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: LatestBlocksCall) -> Self { - Self::LatestBlocks(value) - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: SequenceCall) -> Self { - Self::Sequence(value) - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: SignalCall) -> Self { - Self::Signal(value) - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: SignalManyCall) -> Self { - Self::SignalMany(value) - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: StateCall) -> Self { - Self::State(value) - } - } - ///Container type for all return fields from the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ContextReturn(pub Head); - ///Container type for all return fields from the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct LatestBlocksReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SequenceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `state` function with signature `state(uint256)` and selector `0x3e4f49e6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct StateReturn(pub ::ethers::core::types::I256); -} diff --git a/crates/bindings/src/mymodelcontract.rs b/crates/bindings/src/mymodelcontract.rs new file mode 100644 index 0000000..648beae --- /dev/null +++ b/crates/bindings/src/mymodelcontract.rs @@ -0,0 +1,2817 @@ +/** + +Generated by the following Solidity interface... +```solidity +interface MyModelContract { + struct Head { + uint256[10] latestBlocks; + uint256 sequence; + int256[] state; + Place[] places; + Transition[] transitions; + } + struct Place { + string label; + uint8 offset; + Position position; + uint256 initial; + uint256 capacity; + } + struct Position { + uint8 x; + uint8 y; + } + struct Transition { + string label; + uint8 offset; + Position position; + uint8 role; + int256[] delta; + int256[] guard; + } + + event SignaledEvent(uint8 indexed role, uint8 indexed actionId, uint256 indexed scalar, uint256 sequence); + + function context() external view returns (Head memory); + function latestBlocks(uint256) external view returns (uint256); + function sequence() external view returns (uint256); + function signal(uint8 action, uint256 scalar) external; + function signalMany(uint8[] memory actions, uint256[] memory scalars) external; + function state(uint256) external view returns (int256); +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "context", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct Model.Head", + "components": [ + { + "name": "latestBlocks", + "type": "uint256[10]", + "internalType": "uint256[10]" + }, + { + "name": "sequence", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "state", + "type": "int256[]", + "internalType": "int256[]" + }, + { + "name": "places", + "type": "tuple[]", + "internalType": "struct Model.Place[]", + "components": [ + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "offset", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "position", + "type": "tuple", + "internalType": "struct Model.Position", + "components": [ + { + "name": "x", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "y", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "name": "initial", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "capacity", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "transitions", + "type": "tuple[]", + "internalType": "struct Model.Transition[]", + "components": [ + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "offset", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "position", + "type": "tuple", + "internalType": "struct Model.Position", + "components": [ + { + "name": "x", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "y", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "name": "role", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "delta", + "type": "int256[]", + "internalType": "int256[]" + }, + { + "name": "guard", + "type": "int256[]", + "internalType": "int256[]" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "latestBlocks", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "sequence", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "signal", + "inputs": [ + { + "name": "action", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "scalar", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "signalMany", + "inputs": [ + { + "name": "actions", + "type": "uint8[]", + "internalType": "uint8[]" + }, + { + "name": "scalars", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "state", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "int256", + "internalType": "int256" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "SignaledEvent", + "inputs": [ + { + "name": "role", + "type": "uint8", + "indexed": true, + "internalType": "uint8" + }, + { + "name": "actionId", + "type": "uint8", + "indexed": true, + "internalType": "uint8" + }, + { + "name": "scalar", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "sequence", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod MyModelContract { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /**```solidity +struct Head { uint256[10] latestBlocks; uint256 sequence; int256[] state; Place[] places; Transition[] transitions; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Head { + pub latestBlocks: [alloy::sol_types::private::U256; 10usize], + pub sequence: alloy::sol_types::private::U256, + pub state: alloy::sol_types::private::Vec, + pub places: alloy::sol_types::private::Vec< + ::RustType, + >, + pub transitions: alloy::sol_types::private::Vec< + ::RustType, + >, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedArray< + alloy::sol_types::sol_data::Uint<256>, + 10usize, + >, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array, + alloy::sol_types::sol_data::Array, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + [alloy::sol_types::private::U256; 10usize], + alloy::sol_types::private::U256, + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec< + ::RustType, + >, + alloy::sol_types::private::Vec< + ::RustType, + >, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Head) -> Self { + ( + value.latestBlocks, + value.sequence, + value.state, + value.places, + value.transitions, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Head { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + latestBlocks: tuple.0, + sequence: tuple.1, + state: tuple.2, + places: tuple.3, + transitions: tuple.4, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Head { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Head { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + , + 10usize, + > as alloy_sol_types::SolType>::tokenize(&self.latestBlocks), + as alloy_sol_types::SolType>::tokenize(&self.sequence), + , + > as alloy_sol_types::SolType>::tokenize(&self.state), + as alloy_sol_types::SolType>::tokenize(&self.places), + as alloy_sol_types::SolType>::tokenize(&self.transitions), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Head { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Head { + const NAME: &'static str = "Head"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Head(uint256[10] latestBlocks,uint256 sequence,int256[] state,Place[] places,Transition[] transitions)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(2); + components + .push(::eip712_root_type()); + components + .extend(::eip712_components()); + components + .push( + ::eip712_root_type(), + ); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + , + 10usize, + > as alloy_sol_types::SolType>::eip712_data_word(&self.latestBlocks) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.sequence) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.state) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.places) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.transitions) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Head { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + , + 10usize, + > as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.latestBlocks, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.sequence, + ) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.state) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.places, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.transitions, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + , + 10usize, + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.latestBlocks, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.sequence, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.state, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.places, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.transitions, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**```solidity +struct Place { string label; uint8 offset; Position position; uint256 initial; uint256 capacity; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Place { + pub label: alloy::sol_types::private::String, + pub offset: u8, + pub position: ::RustType, + pub initial: alloy::sol_types::private::U256, + pub capacity: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + Position, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + u8, + ::RustType, + alloy::sol_types::private::U256, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Place) -> Self { + ( + value.label, + value.offset, + value.position, + value.initial, + value.capacity, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Place { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + label: tuple.0, + offset: tuple.1, + position: tuple.2, + initial: tuple.3, + capacity: tuple.4, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Place { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Place { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + ::tokenize( + &self.label, + ), + as alloy_sol_types::SolType>::tokenize(&self.offset), + ::tokenize(&self.position), + as alloy_sol_types::SolType>::tokenize(&self.initial), + as alloy_sol_types::SolType>::tokenize(&self.capacity), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Place { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Place { + const NAME: &'static str = "Place"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Place(string label,uint8 offset,Position position,uint256 initial,uint256 capacity)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(1); + components + .push(::eip712_root_type()); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + ::eip712_data_word( + &self.label, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.offset) + .0, + ::eip712_data_word( + &self.position, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.initial) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.capacity) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Place { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + ::topic_preimage_length( + &rust.label, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.offset, + ) + + ::topic_preimage_length( + &rust.position, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.initial, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.capacity, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + ::encode_topic_preimage( + &rust.label, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.offset, + out, + ); + ::encode_topic_preimage( + &rust.position, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.initial, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.capacity, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**```solidity +struct Position { uint8 x; uint8 y; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Position { + pub x: u8, + pub y: u8, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<8>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8, u8); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Position) -> Self { + (value.x, value.y) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Position { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { x: tuple.0, y: tuple.1 } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Position { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Position { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.x), + as alloy_sol_types::SolType>::tokenize(&self.y), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Position { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Position { + const NAME: &'static str = "Position"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed("Position(uint8 x,uint8 y)") + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + alloy_sol_types::private::Vec::new() + } + #[inline] + fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + as alloy_sol_types::SolType>::eip712_data_word(&self.x) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.y) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Position { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.x) + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.y) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage(&rust.x, out); + as alloy_sol_types::EventTopic>::encode_topic_preimage(&rust.y, out); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**```solidity +struct Transition { string label; uint8 offset; Position position; uint8 role; int256[] delta; int256[] guard; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Transition { + pub label: alloy::sol_types::private::String, + pub offset: u8, + pub position: ::RustType, + pub role: u8, + pub delta: alloy::sol_types::private::Vec, + pub guard: alloy::sol_types::private::Vec, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + Position, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + u8, + ::RustType, + u8, + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Transition) -> Self { + ( + value.label, + value.offset, + value.position, + value.role, + value.delta, + value.guard, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Transition { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + label: tuple.0, + offset: tuple.1, + position: tuple.2, + role: tuple.3, + delta: tuple.4, + guard: tuple.5, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Transition { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Transition { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + ::tokenize( + &self.label, + ), + as alloy_sol_types::SolType>::tokenize(&self.offset), + ::tokenize(&self.position), + as alloy_sol_types::SolType>::tokenize(&self.role), + , + > as alloy_sol_types::SolType>::tokenize(&self.delta), + , + > as alloy_sol_types::SolType>::tokenize(&self.guard), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Transition { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Transition { + const NAME: &'static str = "Transition"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Transition(string label,uint8 offset,Position position,uint8 role,int256[] delta,int256[] guard)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(1); + components + .push(::eip712_root_type()); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + ::eip712_data_word( + &self.label, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.offset) + .0, + ::eip712_data_word( + &self.position, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.role) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.delta) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.guard) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Transition { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + ::topic_preimage_length( + &rust.label, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.offset, + ) + + ::topic_preimage_length( + &rust.position, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.role) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.delta) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.guard) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + ::encode_topic_preimage( + &rust.label, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.offset, + out, + ); + ::encode_topic_preimage( + &rust.position, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.role, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.delta, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.guard, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**Event with signature `SignaledEvent(uint8,uint8,uint256,uint256)` and selector `0x50e4a52b0772bed9f06a7d3f7dfa66d73640067a5cc77a73c24556ccc900fa08`. +```solidity +event SignaledEvent(uint8 indexed role, uint8 indexed actionId, uint256 indexed scalar, uint256 sequence); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct SignaledEvent { + #[allow(missing_docs)] + pub role: u8, + #[allow(missing_docs)] + pub actionId: u8, + #[allow(missing_docs)] + pub scalar: alloy::sol_types::private::U256, + #[allow(missing_docs)] + pub sequence: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for SignaledEvent { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "SignaledEvent(uint8,uint8,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 80u8, + 228u8, + 165u8, + 43u8, + 7u8, + 114u8, + 190u8, + 217u8, + 240u8, + 106u8, + 125u8, + 63u8, + 125u8, + 250u8, + 102u8, + 215u8, + 54u8, + 64u8, + 6u8, + 122u8, + 92u8, + 199u8, + 122u8, + 115u8, + 194u8, + 69u8, + 86u8, + 204u8, + 201u8, + 0u8, + 250u8, + 8u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + actionId: topics.2, + scalar: topics.3, + sequence: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.sequence), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.actionId.clone(), + self.scalar.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.actionId); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.scalar); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for SignaledEvent { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&SignaledEvent> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &SignaledEvent) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Function with signature `context()` and selector `0xd0496d6a`. +```solidity +function context() external view returns (Head memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct contextCall {} + ///Container type for the return parameters of the [`context()`](contextCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct contextReturn { + pub _0: ::RustType, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: contextCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for contextCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (Head,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: contextReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for contextReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for contextCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = contextReturn; + type ReturnTuple<'a> = (Head,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "context()"; + const SELECTOR: [u8; 4] = [208u8, 73u8, 109u8, 106u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `latestBlocks(uint256)` and selector `0x6ee376e6`. +```solidity +function latestBlocks(uint256) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct latestBlocksCall { + pub _0: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`latestBlocks(uint256)`](latestBlocksCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct latestBlocksReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: latestBlocksCall) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for latestBlocksCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: latestBlocksReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for latestBlocksReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for latestBlocksCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = latestBlocksReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "latestBlocks(uint256)"; + const SELECTOR: [u8; 4] = [110u8, 227u8, 118u8, 230u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._0), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `sequence()` and selector `0x529d15cc`. +```solidity +function sequence() external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct sequenceCall {} + ///Container type for the return parameters of the [`sequence()`](sequenceCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct sequenceReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: sequenceCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for sequenceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: sequenceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for sequenceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for sequenceCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = sequenceReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "sequence()"; + const SELECTOR: [u8; 4] = [82u8, 157u8, 21u8, 204u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `signal(uint8,uint256)` and selector `0xddc3b187`. +```solidity +function signal(uint8 action, uint256 scalar) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalCall { + pub action: u8, + pub scalar: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`signal(uint8,uint256)`](signalCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8, alloy::sol_types::private::U256); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalCall) -> Self { + (value.action, value.scalar) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + action: tuple.0, + scalar: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for signalCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = signalReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "signal(uint8,uint256)"; + const SELECTOR: [u8; 4] = [221u8, 195u8, 177u8, 135u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.action), + as alloy_sol_types::SolType>::tokenize(&self.scalar), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2`. +```solidity +function signalMany(uint8[] memory actions, uint256[] memory scalars) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalManyCall { + pub actions: alloy::sol_types::private::Vec, + pub scalars: alloy::sol_types::private::Vec, + } + ///Container type for the return parameters of the [`signalMany(uint8[],uint256[])`](signalManyCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalManyReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalManyCall) -> Self { + (value.actions, value.scalars) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalManyCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + actions: tuple.0, + scalars: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalManyReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalManyReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for signalManyCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = signalManyReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "signalMany(uint8[],uint256[])"; + const SELECTOR: [u8; 4] = [255u8, 240u8, 31u8, 226u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + , + > as alloy_sol_types::SolType>::tokenize(&self.actions), + , + > as alloy_sol_types::SolType>::tokenize(&self.scalars), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `state(uint256)` and selector `0x3e4f49e6`. +```solidity +function state(uint256) external view returns (int256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct stateCall { + pub _0: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`state(uint256)`](stateCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct stateReturn { + pub _0: alloy::sol_types::private::I256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: stateCall) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for stateCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Int<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::I256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: stateReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for stateReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for stateCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = stateReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Int<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "state(uint256)"; + const SELECTOR: [u8; 4] = [62u8, 79u8, 73u8, 230u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._0), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + ///Container for all the [`MyModelContract`](self) function calls. + pub enum MyModelContractCalls { + context(contextCall), + latestBlocks(latestBlocksCall), + sequence(sequenceCall), + signal(signalCall), + signalMany(signalManyCall), + state(stateCall), + } + #[automatically_derived] + impl MyModelContractCalls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [62u8, 79u8, 73u8, 230u8], + [82u8, 157u8, 21u8, 204u8], + [110u8, 227u8, 118u8, 230u8], + [208u8, 73u8, 109u8, 106u8], + [221u8, 195u8, 177u8, 135u8], + [255u8, 240u8, 31u8, 226u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for MyModelContractCalls { + const NAME: &'static str = "MyModelContractCalls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 6usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::context(_) => ::SELECTOR, + Self::latestBlocks(_) => { + ::SELECTOR + } + Self::sequence(_) => ::SELECTOR, + Self::signal(_) => ::SELECTOR, + Self::signalMany(_) => { + ::SELECTOR + } + Self::state(_) => ::SELECTOR, + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn state( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyModelContractCalls::state) + } + state + }, + { + fn sequence( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyModelContractCalls::sequence) + } + sequence + }, + { + fn latestBlocks( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyModelContractCalls::latestBlocks) + } + latestBlocks + }, + { + fn context( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyModelContractCalls::context) + } + context + }, + { + fn signal( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyModelContractCalls::signal) + } + signal + }, + { + fn signalMany( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyModelContractCalls::signalMany) + } + signalMany + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::context(inner) => { + ::abi_encoded_size(inner) + } + Self::latestBlocks(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::sequence(inner) => { + ::abi_encoded_size(inner) + } + Self::signal(inner) => { + ::abi_encoded_size(inner) + } + Self::signalMany(inner) => { + ::abi_encoded_size(inner) + } + Self::state(inner) => { + ::abi_encoded_size(inner) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::context(inner) => { + ::abi_encode_raw(inner, out) + } + Self::latestBlocks(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::sequence(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::signal(inner) => { + ::abi_encode_raw(inner, out) + } + Self::signalMany(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::state(inner) => { + ::abi_encode_raw(inner, out) + } + } + } + } + ///Container for all the [`MyModelContract`](self) events. + pub enum MyModelContractEvents { + SignaledEvent(SignaledEvent), + } + #[automatically_derived] + impl MyModelContractEvents { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 80u8, + 228u8, + 165u8, + 43u8, + 7u8, + 114u8, + 190u8, + 217u8, + 240u8, + 106u8, + 125u8, + 63u8, + 125u8, + 250u8, + 102u8, + 215u8, + 54u8, + 64u8, + 6u8, + 122u8, + 92u8, + 199u8, + 122u8, + 115u8, + 194u8, + 69u8, + 86u8, + 204u8, + 201u8, + 0u8, + 250u8, + 8u8, + ], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for MyModelContractEvents { + const NAME: &'static str = "MyModelContractEvents"; + const COUNT: usize = 1usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::SignaledEvent) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for MyModelContractEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::SignaledEvent(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::SignaledEvent(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`MyModelContract`](self) contract instance. + +See the [wrapper's documentation](`MyModelContractInstance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> MyModelContractInstance { + MyModelContractInstance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + MyModelContractInstance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + MyModelContractInstance::::deploy_builder(provider) + } + /**A [`MyModelContract`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`MyModelContract`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct MyModelContractInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for MyModelContractInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("MyModelContractInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MyModelContractInstance { + /**Creates a new wrapper around an on-chain [`MyModelContract`](self) contract instance. + +See the [wrapper's documentation](`MyModelContractInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl MyModelContractInstance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> MyModelContractInstance { + MyModelContractInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MyModelContractInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`context`] function. + pub fn context(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&contextCall {}) + } + ///Creates a new call builder for the [`latestBlocks`] function. + pub fn latestBlocks( + &self, + _0: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&latestBlocksCall { _0 }) + } + ///Creates a new call builder for the [`sequence`] function. + pub fn sequence( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&sequenceCall {}) + } + ///Creates a new call builder for the [`signal`] function. + pub fn signal( + &self, + action: u8, + scalar: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&signalCall { action, scalar }) + } + ///Creates a new call builder for the [`signalMany`] function. + pub fn signalMany( + &self, + actions: alloy::sol_types::private::Vec, + scalars: alloy::sol_types::private::Vec, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&signalManyCall { actions, scalars }) + } + ///Creates a new call builder for the [`state`] function. + pub fn state( + &self, + _0: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&stateCall { _0 }) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MyModelContractInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`SignaledEvent`] event. + pub fn SignaledEvent_filter( + &self, + ) -> alloy_contract::Event { + self.event_filter::() + } + } +} diff --git a/crates/bindings/src/mystatemachine.rs b/crates/bindings/src/mystatemachine.rs new file mode 100644 index 0000000..970311a --- /dev/null +++ b/crates/bindings/src/mystatemachine.rs @@ -0,0 +1,2817 @@ +/** + +Generated by the following Solidity interface... +```solidity +interface MyStateMachine { + struct Head { + uint256[10] latestBlocks; + uint256 sequence; + int256[] state; + Place[] places; + Transition[] transitions; + } + struct Place { + string label; + uint8 offset; + Position position; + uint256 initial; + uint256 capacity; + } + struct Position { + uint8 x; + uint8 y; + } + struct Transition { + string label; + uint8 offset; + Position position; + uint8 role; + int256[] delta; + int256[] guard; + } + + event SignaledEvent(uint8 indexed role, uint8 indexed actionId, uint256 indexed scalar, uint256 sequence); + + function context() external view returns (Head memory); + function latestBlocks(uint256) external view returns (uint256); + function sequence() external view returns (uint256); + function signal(uint8 action, uint256 scalar) external; + function signalMany(uint8[] memory actions, uint256[] memory scalars) external; + function state(uint256) external view returns (int256); +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "context", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct Model.Head", + "components": [ + { + "name": "latestBlocks", + "type": "uint256[10]", + "internalType": "uint256[10]" + }, + { + "name": "sequence", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "state", + "type": "int256[]", + "internalType": "int256[]" + }, + { + "name": "places", + "type": "tuple[]", + "internalType": "struct Model.Place[]", + "components": [ + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "offset", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "position", + "type": "tuple", + "internalType": "struct Model.Position", + "components": [ + { + "name": "x", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "y", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "name": "initial", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "capacity", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "transitions", + "type": "tuple[]", + "internalType": "struct Model.Transition[]", + "components": [ + { + "name": "label", + "type": "string", + "internalType": "string" + }, + { + "name": "offset", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "position", + "type": "tuple", + "internalType": "struct Model.Position", + "components": [ + { + "name": "x", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "y", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "name": "role", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "delta", + "type": "int256[]", + "internalType": "int256[]" + }, + { + "name": "guard", + "type": "int256[]", + "internalType": "int256[]" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "latestBlocks", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "sequence", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "signal", + "inputs": [ + { + "name": "action", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "scalar", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "signalMany", + "inputs": [ + { + "name": "actions", + "type": "uint8[]", + "internalType": "uint8[]" + }, + { + "name": "scalars", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "state", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "int256", + "internalType": "int256" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "SignaledEvent", + "inputs": [ + { + "name": "role", + "type": "uint8", + "indexed": true, + "internalType": "uint8" + }, + { + "name": "actionId", + "type": "uint8", + "indexed": true, + "internalType": "uint8" + }, + { + "name": "scalar", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "sequence", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod MyStateMachine { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x600060028190556101c0604052608081815260a082905260c082905260e08290526101008290526101208290526101408290526101608290526101808290526101a0919091526200005590600390600a620013aa565b506040805160018082528183019092529060208083019080368337505081516200008792600d925060200190620013f2565b503480156200009557600080fd5b5060408051808201825260068152650706c616365360d41b602080830191909152825180840190935260018352600290830152620000d99160009060039062000de2565b50604080518082019091526004815263074786e360e41b60208201526200011a90600160008060408051808201909152600081526001602082015262000efd565b5060408051808201909152600481526374786e3160e01b60208201526200015b90600180600060408051808201909152600281526001602082015262000efd565b506040805180820190915260048152633a3c371960e11b60208201526200019d9060016002600060408051808201909152600081526003602082015262000efd565b5060408051808201909152600481526374786e3360e01b6020820152620001df9060016003600060408051808201909152600281526003602082015262000efd565b50620004bd600180600081548110620001fc57620001fc6200145d565b90600052602060002090600602016040518060c0016040529081600082018054620002279062001473565b80601f0160208091040260200160405190810160405280929190818152602001828054620002559062001473565b8015620002a65780601f106200027a57610100808354040283529160200191620002a6565b820191906000526020600020905b8154815290600101906020018083116200028857829003601f168201915b5050509183525050600182015460ff908116602080840191909152604080518082018252600286015480851682526101009004841681840152818501526003850154909216606084015260048401805483518184028101840190945280845260809094019390918301828280156200033e57602002820191906000526020600020905b81548152602001906001019080831162000329575b50505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200039857602002820191906000526020600020905b81548152602001906001019080831162000383575b50505050508152505060008081548110620003b757620003b76200145d565b90600052602060002090600502016040518060a0016040529081600082018054620003e29062001473565b80601f0160208091040260200160405190810160405280929190818152602001828054620004109062001473565b8015620004615780601f10620004355761010080835404028352916020019162000461565b820191906000526020600020905b8154815290600101906020018083116200044357829003601f168201915b5050509183525050600182015460ff908116602080840191909152604080518082018252600286015480851682526101009004909316918301919091528201526003820154606082015260049091015460809091015262001155565b620007a0600360008081548110620004d957620004d96200145d565b90600052602060002090600502016040518060a0016040529081600082018054620005049062001473565b80601f0160208091040260200160405190810160405280929190818152602001828054620005329062001473565b8015620005835780601f10620005575761010080835404028352916020019162000583565b820191906000526020600020905b8154815290600101906020018083116200056557829003601f168201915b505050918352505060018281015460ff9081166020808501919091526040805180820182526002870154808516825261010090049093169183019190915283015260038301546060830152600490920154608090910152805481908110620005ef57620005ef6200145d565b90600052602060002090600602016040518060c00160405290816000820180546200061a9062001473565b80601f0160208091040260200160405190810160405280929190818152602001828054620006489062001473565b8015620006995780601f106200066d5761010080835404028352916020019162000699565b820191906000526020600020905b8154815290600101906020018083116200067b57829003601f168201915b5050509183525050600182015460ff908116602080840191909152604080518082018252600286015480851682526101009004841681840152818501526003850154909216606084015260048401805483518184028101840190945280845260809094019390918301828280156200073157602002820191906000526020600020905b8154815260200190600101908083116200071c575b50505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200078b57602002820191906000526020600020905b81548152602001906001019080831162000776575b505050505081525050620011f160201b60201c565b62000a7e60036001600281548110620007bd57620007bd6200145d565b90600052602060002090600602016040518060c0016040529081600082018054620007e89062001473565b80601f0160208091040260200160405190810160405280929190818152602001828054620008169062001473565b8015620008675780601f106200083b5761010080835404028352916020019162000867565b820191906000526020600020905b8154815290600101906020018083116200084957829003601f168201915b5050509183525050600182015460ff90811660208084019190915260408051808201825260028601548085168252610100900484168184015281850152600385015490921660608401526004840180548351818402810184019094528084526080909401939091830182828015620008ff57602002820191906000526020600020905b815481526020019060010190808311620008ea575b50505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156200095957602002820191906000526020600020905b81548152602001906001019080831162000944575b505050505081525050600080815481106200097857620009786200145d565b90600052602060002090600502016040518060a0016040529081600082018054620009a39062001473565b80601f0160208091040260200160405190810160405280929190818152602001828054620009d19062001473565b801562000a225780601f10620009f65761010080835404028352916020019162000a22565b820191906000526020600020905b81548152906001019060200180831162000a0457829003601f168201915b5050509183525050600182015460ff908116602080840191909152604080518082018252600286015480851682526101009004909316918301919091528201526003820154606082015260049091015460809091015262001288565b62000d6660016000808154811062000a9a5762000a9a6200145d565b90600052602060002090600502016040518060a001604052908160008201805462000ac59062001473565b80601f016020809104026020016040519081016040528092919081815260200182805462000af39062001473565b801562000b445780601f1062000b185761010080835404028352916020019162000b44565b820191906000526020600020905b81548152906001019060200180831162000b2657829003601f168201915b505050918352505060018281015460ff9081166020808501919091526040805180820182526002870154808516825261010090049093169183019190915283015260038084015460608401526004909301546080909201919091528054909190811062000bb55762000bb56200145d565b90600052602060002090600602016040518060c001604052908160008201805462000be09062001473565b80601f016020809104026020016040519081016040528092919081815260200182805462000c0e9062001473565b801562000c5f5780601f1062000c335761010080835404028352916020019162000c5f565b820191906000526020600020905b81548152906001019060200180831162000c4157829003601f168201915b5050509183525050600182015460ff9081166020808401919091526040805180820182526002860154808516825261010090048416818401528185015260038501549092166060840152600484018054835181840281018401909452808452608090940193909183018282801562000cf757602002820191906000526020600020905b81548152602001906001019080831162000ce2575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801562000d5157602002820191906000526020600020905b81548152602001906001019080831162000d3c575b5050505050815250506200131360201b60201c565b60005b600160ff8216101562000ddb5760008160ff168154811062000d8f5762000d8f6200145d565b906000526020600020906005020160030154600d8260ff168154811062000dba5762000dba6200145d565b6000918252602090912001558062000dd281620014c5565b91505062000d69565b5062001630565b62000e286040805160a081018252606081526000602080830182905283518085018552828152908101919091529091820190815260200160008152602001600081525090565b6040805160a0810182528681526000805460ff811660208401529282018590526060820187905260808201869052600183018155805280519091829160059091027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630190819062000e9a90826200153a565b5060208281015160018301805460ff92831660ff1990911617905560408401518051600285018054929094015183166101000261ffff19909216921691909117179055606082015160038201556080909101516004909101559050949350505050565b62000f486040805160c0810182526060815260006020808301829052835180850185528281529081019190915290918201908152600060208201526060604082018190529081015290565b60015460ff85811691161462000fa55760405162461bcd60e51b815260206004820152601c60248201527f7472616e73616374696f6e203d3e20656e756d206d69736d617463680000000060448201526064015b60405180910390fd5b60006040518060c001604052808881526020018660ff1681526020018481526020018560ff1681526020018760ff166001600160401b0381111562000fee5762000fee62001447565b60405190808252806020026020018201604052801562001018578160200160208202803683370190505b5081526020018760ff166001600160401b038111156200103c576200103c62001447565b60405190808252806020026020018201604052801562001066578160200160208202803683370190505b5090526001805480820182556000919091528151919250829160069091027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601908190620010b590826200153a565b5060208281015160018301805460ff92831660ff1991821617909155604085015180516002860180549286015185166101000261ffff1990931691851691909117919091179055606085015160038501805491909316911617905560808301518051620011299260048501920190620013f2565b5060a0820151805162001147916005840191602090910190620013f2565b509198975050505050505050565b60008313620011965760405162461bcd60e51b81526020600482015260126024820152600080516020620027d0833981519152604482015260640162000f9c565b826001836020015160ff1681548110620011b457620011b46200145d565b9060005260206000209060060201600401826020015160ff1681548110620011e057620011e06200145d565b600091825260209091200155505050565b60008313620012325760405162461bcd60e51b81526020600482015260126024820152600080516020620027d0833981519152604482015260640162000f9c565b6200123f83600062001606565b6001826020015160ff16815481106200125c576200125c6200145d565b9060005260206000209060060201600401836020015160ff1681548110620011e057620011e06200145d565b60008313620012c95760405162461bcd60e51b81526020600482015260126024820152600080516020620027d0833981519152604482015260640162000f9c565b826001836020015160ff1681548110620012e757620012e76200145d565b9060005260206000209060060201600501826020015160ff1681548110620011e057620011e06200145d565b60008313620013545760405162461bcd60e51b81526020600482015260126024820152600080516020620027d0833981519152604482015260640162000f9c565b6200136183600062001606565b6001826020015160ff16815481106200137e576200137e6200145d565b9060005260206000209060060201600501836020015160ff1681548110620011e057620011e06200145d565b82600a8101928215620013e0579160200282015b82811115620013e0578251829060ff16905591602001919060010190620013be565b50620013ee92915062001430565b5090565b828054828255906000526020600020908101928215620013e0579160200282015b82811115620013e057825182559160200191906001019062001413565b5b80821115620013ee576000815560010162001431565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600181811c908216806200148857607f821691505b602082108103620014a957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8103620014de57620014de620014af565b60010192915050565b601f8211156200153557600081815260208120601f850160051c81016020861015620015105750805b601f850160051c820191505b8181101562001531578281556001016200151c565b5050505b505050565b81516001600160401b0381111562001556576200155662001447565b6200156e8162001567845462001473565b84620014e7565b602080601f831160018114620015a657600084156200158d5750858301515b600019600386901b1c1916600185901b17855562001531565b600085815260208120601f198616915b82811015620015d757888601518255948401946001909101908401620015b6565b5085821015620015f65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8181036000831280158383131683831282161715620016295762001629620014af565b5092915050565b61119080620016406000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80633e4f49e614610067578063529d15cc1461008d5780636ee376e614610096578063d0496d6a146100a9578063ddc3b187146100be578063fff01fe2146100d3575b600080fd5b61007a610075366004610c44565b6100e6565b6040519081526020015b60405180910390f35b61007a60025481565b61007a6100a4366004610c44565b610107565b6100b161011e565b6040516100849190610e4f565b6100d16100cc366004610f04565b6104dc565b005b6100d16100e1366004610f7a565b6104f3565b600d81815481106100f657600080fd5b600091825260209091200154905081565b600381600a811061011757600080fd5b0154905081565b610126610bf0565b604080516101e081019091528060a081016003600a8282826020028201915b81548152602001906001019080831161014557505050505081526020016002548152602001600d8054806020026020016040519081016040528092919081815260200182805480156101b657602002820191906000526020600020905b8154815260200190600101908083116101a2575b505050505081526020016000805480602002602001604051908101604052809291908181526020016000905b828210156102f457838290600052602060002090600502016040518060a001604052908160008201805461021590610fe6565b80601f016020809104026020016040519081016040528092919081815260200182805461024190610fe6565b801561028e5780601f106102635761010080835404028352916020019161028e565b820191906000526020600020905b81548152906001019060200180831161027157829003601f168201915b505050918352505060018281015460ff9081166020808501919091526040805180820182526002870154808516825261010090049093168383015284019190915260038401546060840152600490930154608090920191909152918352920191016101e2565b5050505081526020016001805480602002602001604051908101604052809291908181526020016000905b828210156104d157838290600052602060002090600602016040518060c001604052908160008201805461035290610fe6565b80601f016020809104026020016040519081016040528092919081815260200182805461037e90610fe6565b80156103cb5780601f106103a0576101008083540402835291602001916103cb565b820191906000526020600020905b8154815290600101906020018083116103ae57829003601f168201915b5050509183525050600182015460ff9081166020808401919091526040805180820182526002860154808516825261010090048416818401528185015260038501549092166060840152600484018054835181840281018401909452808452608090940193909183018282801561046157602002820191906000526020600020905b81548152602001906001019080831161044d575b50505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156104b957602002820191906000526020600020905b8154815260200190600101908083116104a5575b5050505050815250508152602001906001019061031f565b505050915250919050565b6104e682826105bc565b6104ef4361085e565b5050565b8281146105475760405162461bcd60e51b815260206004820152601c60248201527f4d6f64656c52656769737472793a20696e76616c696420696e7075740000000060448201526064015b60405180910390fd5b60005b838110156105ac5761059a85858381811061056757610567611020565b905060200201602081019061057c9190611036565b84848481811061058e5761058e611020565b905060200201356105bc565b806105a48161106e565b91505061054a565b506105b64361085e565b50505050565b600060018360ff16815481106105d4576105d4611020565b90600052602060002090600602016040518060c00160405290816000820180546105fd90610fe6565b80601f016020809104026020016040519081016040528092919081815260200182805461062990610fe6565b80156106765780601f1061064b57610100808354040283529160200191610676565b820191906000526020600020905b81548152906001019060200180831161065957829003601f168201915b5050509183525050600182015460ff9081166020808401919091526040805180820182526002860154808516825261010090048416818401528185015260038501549092166060840152600484018054835181840281018401909452808452608090940193909183018282801561070c57602002820191906000526020600020905b8154815260200190600101908083116106f8575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561076457602002820191906000526020600020905b815481526020019060010190808311610750575b5050505050815250509050610778816108bf565b156107b15760405162461bcd60e51b81526020600482015260096024820152681a5b9a1a589a5d195960ba1b604482015260640161053e565b806020015160ff168360ff16146107ca576107ca611087565b60005b60005460ff90811690821610156107fb576107e98183856109f9565b806107f38161109d565b9150506107cd565b506002805490600061080c8361106e565b9190505550818360ff16826060015160ff167f50e4a52b0772bed9f06a7d3f7dfa66d73640067a5cc77a73c24556ccc900fa0860025460405161085191815260200190565b60405180910390a4505050565b60005b60098160ff1610156108b957600361087a8260016110bc565b60ff16600a811061088d5761088d611020565b015460038260ff16600a81106108a5576108a5611020565b0155806108b18161109d565b915050610861565b50600c55565b6000805b600160ff821610156109f0578260a001518160ff16815181106108e8576108e8611020565b60200260200101516000146109de5760008360a001518260ff168151811061091257610912611020565b602002602001015112156109815760008360a001518260ff168151811061093b5761093b611020565b6020026020010151600d8360ff168154811061095957610959611020565b906000526020600020015461096e91906110db565b1261097c5750600192915050565b6109de565b60008360a001518260ff168151811061099c5761099c611020565b6020026020010151600d8360ff16815481106109ba576109ba611020565b90600052602060002001546109cf9190611103565b12156109de5750600192915050565b806109e88161109d565b9150506108c3565b50600092915050565b60008111610a3a5760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21039b1b0b630b960911b604482015260640161053e565b81608001518360ff1681518110610a5357610a53611020565b6020026020010151600014610beb578082608001518460ff1681518110610a7c57610a7c611020565b6020026020010151610a8e919061112a565b600d8460ff1681548110610aa457610aa4611020565b9060005260206000200154610ab991906110db565b600d8460ff1681548110610acf57610acf611020565b90600052602060002001819055506000600d8460ff1681548110610af557610af5611020565b90600052602060002001541215610b3a5760405162461bcd60e51b8152602060048201526009602482015268756e646572666c6f7760b81b604482015260640161053e565b6000808460ff1681548110610b5157610b51611020565b9060005260206000209060050201600401541115610beb5760008360ff1681548110610b7f57610b7f611020565b906000526020600020906005020160040154600d8460ff1681548110610ba757610ba7611020565b90600052602060002001541315610beb5760405162461bcd60e51b81526020600482015260086024820152676f766572666c6f7760c01b604482015260640161053e565b505050565b6040518060a00160405280610c03610c25565b8152602001600081526020016060815260200160608152602001606081525090565b604051806101400160405280600a906020820280368337509192915050565b600060208284031215610c5657600080fd5b5035919050565b600081518084526020808501945080840160005b83811015610c8d57815187529582019590820190600101610c71565b509495945050505050565b6000815180845260005b81811015610cbe57602081850181015186830182015201610ca2565b506000602082860101526020601f19601f83011685010191505092915050565b600081518084526020808501808196508360051b8101915082860160005b85811015610d7b578284038952815160c08151818752610d1e82880182610c98565b91505060ff878301511687870152604080830151610d4e82890182805160ff908116835260209182015116910152565b505060608201516080878101919091529091015160a0909501949094529784019790840190600101610cfc565b5091979650505050505050565b600081518084526020808501808196508360051b8101915082860160005b85811015610d7b578284038952815160e08151818752610dc882880182610c98565b8389015160ff908116898b015260408086015180518316828c01526020810151831660608c015292945092509050606084015191506080818316818a0152808501519250505060a087830381890152610e218383610c5d565b93015187840360c0890152929150610e3b90508183610c5d565b9a87019a9550505090840190600101610da6565b6020808252825160009190828483015b600a821015610e7e578251815291830191600191909101908301610e5f565b50505083015161016083015260408301516101c06101808401819052610ea86101e0850183610c5d565b91506060850151601f1980868503016101a0870152610ec78483610cde565b93506080870151915080868503018387015250610ee48382610d88565b9695505050505050565b803560ff81168114610eff57600080fd5b919050565b60008060408385031215610f1757600080fd5b610f2083610eee565b946020939093013593505050565b60008083601f840112610f4057600080fd5b50813567ffffffffffffffff811115610f5857600080fd5b6020830191508360208260051b8501011115610f7357600080fd5b9250929050565b60008060008060408587031215610f9057600080fd5b843567ffffffffffffffff80821115610fa857600080fd5b610fb488838901610f2e565b90965094506020870135915080821115610fcd57600080fd5b50610fda87828801610f2e565b95989497509550505050565b600181811c90821680610ffa57607f821691505b60208210810361101a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561104857600080fd5b61105182610eee565b9392505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161108057611080611058565b5060010190565b634e487b7160e01b600052600160045260246000fd5b600060ff821660ff81036110b3576110b3611058565b60010192915050565b60ff81811683821601908111156110d5576110d5611058565b92915050565b80820182811260008312801582168215821617156110fb576110fb611058565b505092915050565b818103600083128015838313168383128216171561112357611123611058565b5092915050565b80820260008212600160ff1b8414161561114657611146611058565b81810583148215176110d5576110d561105856fea264697066735822122043ba8b6950a9cd68d9683da7a0084f28f874764923f90dd4f7cf017d084d479464736f6c63430008150033776569676874206d757374206265203e20300000000000000000000000000000 + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"`\0`\x02\x81\x90Ua\x01\xC0`@R`\x80\x81\x81R`\xA0\x82\x90R`\xC0\x82\x90R`\xE0\x82\x90Ra\x01\0\x82\x90Ra\x01 \x82\x90Ra\x01@\x82\x90Ra\x01`\x82\x90Ra\x01\x80\x82\x90Ra\x01\xA0\x91\x90\x91Rb\0\0U\x90`\x03\x90`\nb\0\x13\xAAV[P`@\x80Q`\x01\x80\x82R\x81\x83\x01\x90\x92R\x90` \x80\x83\x01\x90\x806\x837PP\x81Qb\0\0\x87\x92`\r\x92P` \x01\x90b\0\x13\xF2V[P4\x80\x15b\0\0\x95W`\0\x80\xFD[P`@\x80Q\x80\x82\x01\x82R`\x06\x81Re\x07\x06\xC6\x166S`\xD4\x1B` \x80\x83\x01\x91\x90\x91R\x82Q\x80\x84\x01\x90\x93R`\x01\x83R`\x02\x90\x83\x01Rb\0\0\xD9\x91`\0\x90`\x03\x90b\0\r\xE2V[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rc\x07G\x86\xE3`\xE4\x1B` \x82\x01Rb\0\x01\x1A\x90`\x01`\0\x80`@\x80Q\x80\x82\x01\x90\x91R`\0\x81R`\x01` \x82\x01Rb\0\x0E\xFDV[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rctxn1`\xE0\x1B` \x82\x01Rb\0\x01[\x90`\x01\x80`\0`@\x80Q\x80\x82\x01\x90\x91R`\x02\x81R`\x01` \x82\x01Rb\0\x0E\xFDV[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rc:<7\x19`\xE1\x1B` \x82\x01Rb\0\x01\x9D\x90`\x01`\x02`\0`@\x80Q\x80\x82\x01\x90\x91R`\0\x81R`\x03` \x82\x01Rb\0\x0E\xFDV[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rctxn3`\xE0\x1B` \x82\x01Rb\0\x01\xDF\x90`\x01`\x03`\0`@\x80Q\x80\x82\x01\x90\x91R`\x02\x81R`\x03` \x82\x01Rb\0\x0E\xFDV[Pb\0\x04\xBD`\x01\x80`\0\x81T\x81\x10b\0\x01\xFCWb\0\x01\xFCb\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x02'\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x02U\x90b\0\x14sV[\x80\x15b\0\x02\xA6W\x80`\x1F\x10b\0\x02zWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x02\xA6V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x02\x88W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x03>W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x03)W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\x03\x98W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x03\x83W[PPPPP\x81RPP`\0\x80\x81T\x81\x10b\0\x03\xB7Wb\0\x03\xB7b\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x03\xE2\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x04\x10\x90b\0\x14sV[\x80\x15b\0\x04aW\x80`\x1F\x10b\0\x045Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x04aV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x04CW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x82\x01R`\x03\x82\x01T``\x82\x01R`\x04\x90\x91\x01T`\x80\x90\x91\x01Rb\0\x11UV[b\0\x07\xA0`\x03`\0\x80\x81T\x81\x10b\0\x04\xD9Wb\0\x04\xD9b\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x05\x04\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x052\x90b\0\x14sV[\x80\x15b\0\x05\x83W\x80`\x1F\x10b\0\x05WWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x05\x83V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x05eW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x83\x01R`\x03\x83\x01T``\x83\x01R`\x04\x90\x92\x01T`\x80\x90\x91\x01R\x80T\x81\x90\x81\x10b\0\x05\xEFWb\0\x05\xEFb\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x06\x1A\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x06H\x90b\0\x14sV[\x80\x15b\0\x06\x99W\x80`\x1F\x10b\0\x06mWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x06\x99V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x06{W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x071W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x07\x1CW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\x07\x8BW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x07vW[PPPPP\x81RPPb\0\x11\xF1` \x1B` \x1CV[b\0\n~`\x03`\x01`\x02\x81T\x81\x10b\0\x07\xBDWb\0\x07\xBDb\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x07\xE8\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x08\x16\x90b\0\x14sV[\x80\x15b\0\x08gW\x80`\x1F\x10b\0\x08;Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x08gV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x08IW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x08\xFFW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x08\xEAW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\tYW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\tDW[PPPPP\x81RPP`\0\x80\x81T\x81\x10b\0\txWb\0\txb\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\t\xA3\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\t\xD1\x90b\0\x14sV[\x80\x15b\0\n\"W\x80`\x1F\x10b\0\t\xF6Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\n\"V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\n\x04W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x82\x01R`\x03\x82\x01T``\x82\x01R`\x04\x90\x91\x01T`\x80\x90\x91\x01Rb\0\x12\x88V[b\0\rf`\x01`\0\x80\x81T\x81\x10b\0\n\x9AWb\0\n\x9Ab\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\n\xC5\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\n\xF3\x90b\0\x14sV[\x80\x15b\0\x0BDW\x80`\x1F\x10b\0\x0B\x18Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x0BDV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x0B&W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x83\x01R`\x03\x80\x84\x01T``\x84\x01R`\x04\x90\x93\x01T`\x80\x90\x92\x01\x91\x90\x91R\x80T\x90\x91\x90\x81\x10b\0\x0B\xB5Wb\0\x0B\xB5b\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x0B\xE0\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x0C\x0E\x90b\0\x14sV[\x80\x15b\0\x0C_W\x80`\x1F\x10b\0\x0C3Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x0C_V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x0CAW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x0C\xF7W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x0C\xE2W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\rQW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\r enum mismatch\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0`@Q\x80`\xC0\x01`@R\x80\x88\x81R` \x01\x86`\xFF\x16\x81R` \x01\x84\x81R` \x01\x85`\xFF\x16\x81R` \x01\x87`\xFF\x16`\x01`\x01`@\x1B\x03\x81\x11\x15b\0\x0F\xEEWb\0\x0F\xEEb\0\x14GV[`@Q\x90\x80\x82R\x80` \x02` \x01\x82\x01`@R\x80\x15b\0\x10\x18W\x81` \x01` \x82\x02\x806\x837\x01\x90P[P\x81R` \x01\x87`\xFF\x16`\x01`\x01`@\x1B\x03\x81\x11\x15b\0\x10OI\xE6\x14a\0gW\x80cR\x9D\x15\xCC\x14a\0\x8DW\x80cn\xE3v\xE6\x14a\0\x96W\x80c\xD0Imj\x14a\0\xA9W\x80c\xDD\xC3\xB1\x87\x14a\0\xBEW\x80c\xFF\xF0\x1F\xE2\x14a\0\xD3W[`\0\x80\xFD[a\0za\0u6`\x04a\x0CDV[a\0\xE6V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0z`\x02T\x81V[a\0za\0\xA46`\x04a\x0CDV[a\x01\x07V[a\0\xB1a\x01\x1EV[`@Qa\0\x84\x91\x90a\x0EOV[a\0\xD1a\0\xCC6`\x04a\x0F\x04V[a\x04\xDCV[\0[a\0\xD1a\0\xE16`\x04a\x0FzV[a\x04\xF3V[`\r\x81\x81T\x81\x10a\0\xF6W`\0\x80\xFD[`\0\x91\x82R` \x90\x91 \x01T\x90P\x81V[`\x03\x81`\n\x81\x10a\x01\x17W`\0\x80\xFD[\x01T\x90P\x81V[a\x01&a\x0B\xF0V[`@\x80Qa\x01\xE0\x81\x01\x90\x91R\x80`\xA0\x81\x01`\x03`\n\x82\x82\x82` \x02\x82\x01\x91[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01EWPPPPP\x81R` \x01`\x02T\x81R` \x01`\r\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x01\xB6W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01\xA2W[PPPPP\x81R` \x01`\0\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x02\xF4W\x83\x82\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x02\x15\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02A\x90a\x0F\xE6V[\x80\x15a\x02\x8EW\x80`\x1F\x10a\x02cWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\x8EV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02qW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x83\x83\x01R\x84\x01\x91\x90\x91R`\x03\x84\x01T``\x84\x01R`\x04\x90\x93\x01T`\x80\x90\x92\x01\x91\x90\x91R\x91\x83R\x92\x01\x91\x01a\x01\xE2V[PPPP\x81R` \x01`\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x04\xD1W\x83\x82\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x03R\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03~\x90a\x0F\xE6V[\x80\x15a\x03\xCBW\x80`\x1F\x10a\x03\xA0Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xCBV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\xAEW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x04aW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04MW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x04\xB9W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04\xA5W[PPPPP\x81RPP\x81R` \x01\x90`\x01\x01\x90a\x03\x1FV[PPP\x91RP\x91\x90PV[a\x04\xE6\x82\x82a\x05\xBCV[a\x04\xEFCa\x08^V[PPV[\x82\x81\x14a\x05GW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FModelRegistry: invalid input\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0[\x83\x81\x10\x15a\x05\xACWa\x05\x9A\x85\x85\x83\x81\x81\x10a\x05gWa\x05ga\x10 V[\x90P` \x02\x01` \x81\x01\x90a\x05|\x91\x90a\x106V[\x84\x84\x84\x81\x81\x10a\x05\x8EWa\x05\x8Ea\x10 V[\x90P` \x02\x015a\x05\xBCV[\x80a\x05\xA4\x81a\x10nV[\x91PPa\x05JV[Pa\x05\xB6Ca\x08^V[PPPPV[`\0`\x01\x83`\xFF\x16\x81T\x81\x10a\x05\xD4Wa\x05\xD4a\x10 V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x05\xFD\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x06)\x90a\x0F\xE6V[\x80\x15a\x06vW\x80`\x1F\x10a\x06KWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x06vV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x06YW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x07\x0CW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x06\xF8W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x07dW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x07PW[PPPPP\x81RPP\x90Pa\x07x\x81a\x08\xBFV[\x15a\x07\xB1W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rh\x1A[\x9A\x1AX\x9A]\x19Y`\xBA\x1B`D\x82\x01R`d\x01a\x05>V[\x80` \x01Q`\xFF\x16\x83`\xFF\x16\x14a\x07\xCAWa\x07\xCAa\x10\x87V[`\0[`\0T`\xFF\x90\x81\x16\x90\x82\x16\x10\x15a\x07\xFBWa\x07\xE9\x81\x83\x85a\t\xF9V[\x80a\x07\xF3\x81a\x10\x9DV[\x91PPa\x07\xCDV[P`\x02\x80T\x90`\0a\x08\x0C\x83a\x10nV[\x91\x90PUP\x81\x83`\xFF\x16\x82``\x01Q`\xFF\x16\x7FP\xE4\xA5+\x07r\xBE\xD9\xF0j}?}\xFAf\xD76@\x06z\\\xC7zs\xC2EV\xCC\xC9\0\xFA\x08`\x02T`@Qa\x08Q\x91\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA4PPPV[`\0[`\t\x81`\xFF\x16\x10\x15a\x08\xB9W`\x03a\x08z\x82`\x01a\x10\xBCV[`\xFF\x16`\n\x81\x10a\x08\x8DWa\x08\x8Da\x10 V[\x01T`\x03\x82`\xFF\x16`\n\x81\x10a\x08\xA5Wa\x08\xA5a\x10 V[\x01U\x80a\x08\xB1\x81a\x10\x9DV[\x91PPa\x08aV[P`\x0CUV[`\0\x80[`\x01`\xFF\x82\x16\x10\x15a\t\xF0W\x82`\xA0\x01Q\x81`\xFF\x16\x81Q\x81\x10a\x08\xE8Wa\x08\xE8a\x10 V[` \x02` \x01\x01Q`\0\x14a\t\xDEW`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x12Wa\t\x12a\x10 V[` \x02` \x01\x01Q\x12\x15a\t\x81W`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t;Wa\t;a\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\tYWa\tYa\x10 V[\x90`\0R` `\0 \x01Ta\tn\x91\x90a\x10\xDBV[\x12a\t|WP`\x01\x92\x91PPV[a\t\xDEV[`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x9CWa\t\x9Ca\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\t\xBAWa\t\xBAa\x10 V[\x90`\0R` `\0 \x01Ta\t\xCF\x91\x90a\x11\x03V[\x12\x15a\t\xDEWP`\x01\x92\x91PPV[\x80a\t\xE8\x81a\x10\x9DV[\x91PPa\x08\xC3V[P`\0\x92\x91PPV[`\0\x81\x11a\n:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm4\xB7;0\xB64\xB2\x109\xB1\xB0\xB60\xB9`\x91\x1B`D\x82\x01R`d\x01a\x05>V[\x81`\x80\x01Q\x83`\xFF\x16\x81Q\x81\x10a\nSWa\nSa\x10 V[` \x02` \x01\x01Q`\0\x14a\x0B\xEBW\x80\x82`\x80\x01Q\x84`\xFF\x16\x81Q\x81\x10a\n|Wa\n|a\x10 V[` \x02` \x01\x01Qa\n\x8E\x91\x90a\x11*V[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xA4Wa\n\xA4a\x10 V[\x90`\0R` `\0 \x01Ta\n\xB9\x91\x90a\x10\xDBV[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xCFWa\n\xCFa\x10 V[\x90`\0R` `\0 \x01\x81\x90UP`\0`\r\x84`\xFF\x16\x81T\x81\x10a\n\xF5Wa\n\xF5a\x10 V[\x90`\0R` `\0 \x01T\x12\x15a\x0B:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rhunderflow`\xB8\x1B`D\x82\x01R`d\x01a\x05>V[`\0\x80\x84`\xFF\x16\x81T\x81\x10a\x0BQWa\x0BQa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T\x11\x15a\x0B\xEBW`\0\x83`\xFF\x16\x81T\x81\x10a\x0B\x7FWa\x0B\x7Fa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T`\r\x84`\xFF\x16\x81T\x81\x10a\x0B\xA7Wa\x0B\xA7a\x10 V[\x90`\0R` `\0 \x01T\x13\x15a\x0B\xEBW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x08`$\x82\x01Rgoverflow`\xC0\x1B`D\x82\x01R`d\x01a\x05>V[PPPV[`@Q\x80`\xA0\x01`@R\x80a\x0C\x03a\x0C%V[\x81R` \x01`\0\x81R` \x01``\x81R` \x01``\x81R` \x01``\x81RP\x90V[`@Q\x80a\x01@\x01`@R\x80`\n\x90` \x82\x02\x806\x837P\x91\x92\x91PPV[`\0` \x82\x84\x03\x12\x15a\x0CVW`\0\x80\xFD[P5\x91\x90PV[`\0\x81Q\x80\x84R` \x80\x85\x01\x94P\x80\x84\x01`\0[\x83\x81\x10\x15a\x0C\x8DW\x81Q\x87R\x95\x82\x01\x95\x90\x82\x01\x90`\x01\x01a\x0CqV[P\x94\x95\x94PPPPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\x0C\xBEW` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\x0C\xA2V[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xC0\x81Q\x81\x87Ra\r\x1E\x82\x88\x01\x82a\x0C\x98V[\x91PP`\xFF\x87\x83\x01Q\x16\x87\x87\x01R`@\x80\x83\x01Qa\rN\x82\x89\x01\x82\x80Q`\xFF\x90\x81\x16\x83R` \x91\x82\x01Q\x16\x91\x01RV[PP``\x82\x01Q`\x80\x87\x81\x01\x91\x90\x91R\x90\x91\x01Q`\xA0\x90\x95\x01\x94\x90\x94R\x97\x84\x01\x97\x90\x84\x01\x90`\x01\x01a\x0C\xFCV[P\x91\x97\x96PPPPPPPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xE0\x81Q\x81\x87Ra\r\xC8\x82\x88\x01\x82a\x0C\x98V[\x83\x89\x01Q`\xFF\x90\x81\x16\x89\x8B\x01R`@\x80\x86\x01Q\x80Q\x83\x16\x82\x8C\x01R` \x81\x01Q\x83\x16``\x8C\x01R\x92\x94P\x92P\x90P``\x84\x01Q\x91P`\x80\x81\x83\x16\x81\x8A\x01R\x80\x85\x01Q\x92PPP`\xA0\x87\x83\x03\x81\x89\x01Ra\x0E!\x83\x83a\x0C]V[\x93\x01Q\x87\x84\x03`\xC0\x89\x01R\x92\x91Pa\x0E;\x90P\x81\x83a\x0C]V[\x9A\x87\x01\x9A\x95PPP\x90\x84\x01\x90`\x01\x01a\r\xA6V[` \x80\x82R\x82Q`\0\x91\x90\x82\x84\x83\x01[`\n\x82\x10\x15a\x0E~W\x82Q\x81R\x91\x83\x01\x91`\x01\x91\x90\x91\x01\x90\x83\x01a\x0E_V[PPP\x83\x01Qa\x01`\x83\x01R`@\x83\x01Qa\x01\xC0a\x01\x80\x84\x01\x81\x90Ra\x0E\xA8a\x01\xE0\x85\x01\x83a\x0C]V[\x91P``\x85\x01Q`\x1F\x19\x80\x86\x85\x03\x01a\x01\xA0\x87\x01Ra\x0E\xC7\x84\x83a\x0C\xDEV[\x93P`\x80\x87\x01Q\x91P\x80\x86\x85\x03\x01\x83\x87\x01RPa\x0E\xE4\x83\x82a\r\x88V[\x96\x95PPPPPPV[\x805`\xFF\x81\x16\x81\x14a\x0E\xFFW`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0F\x17W`\0\x80\xFD[a\x0F \x83a\x0E\xEEV[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80\x83`\x1F\x84\x01\x12a\x0F@W`\0\x80\xFD[P\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0FXW`\0\x80\xFD[` \x83\x01\x91P\x83` \x82`\x05\x1B\x85\x01\x01\x11\x15a\x0FsW`\0\x80\xFD[\x92P\x92\x90PV[`\0\x80`\0\x80`@\x85\x87\x03\x12\x15a\x0F\x90W`\0\x80\xFD[\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0F\xA8W`\0\x80\xFD[a\x0F\xB4\x88\x83\x89\x01a\x0F.V[\x90\x96P\x94P` \x87\x015\x91P\x80\x82\x11\x15a\x0F\xCDW`\0\x80\xFD[Pa\x0F\xDA\x87\x82\x88\x01a\x0F.V[\x95\x98\x94\x97P\x95PPPPV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0F\xFAW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x10\x1AWcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[cNH{q`\xE0\x1B`\0R`2`\x04R`$`\0\xFD[`\0` \x82\x84\x03\x12\x15a\x10HW`\0\x80\xFD[a\x10Q\x82a\x0E\xEEV[\x93\x92PPPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\x10\x80Wa\x10\x80a\x10XV[P`\x01\x01\x90V[cNH{q`\xE0\x1B`\0R`\x01`\x04R`$`\0\xFD[`\0`\xFF\x82\x16`\xFF\x81\x03a\x10\xB3Wa\x10\xB3a\x10XV[`\x01\x01\x92\x91PPV[`\xFF\x81\x81\x16\x83\x82\x16\x01\x90\x81\x11\x15a\x10\xD5Wa\x10\xD5a\x10XV[\x92\x91PPV[\x80\x82\x01\x82\x81\x12`\0\x83\x12\x80\x15\x82\x16\x82\x15\x82\x16\x17\x15a\x10\xFBWa\x10\xFBa\x10XV[PP\x92\x91PPV[\x81\x81\x03`\0\x83\x12\x80\x15\x83\x83\x13\x16\x83\x83\x12\x82\x16\x17\x15a\x11#Wa\x11#a\x10XV[P\x92\x91PPV[\x80\x82\x02`\0\x82\x12`\x01`\xFF\x1B\x84\x14\x16\x15a\x11FWa\x11Fa\x10XV[\x81\x81\x05\x83\x14\x82\x15\x17a\x10\xD5Wa\x10\xD5a\x10XV\xFE\xA2dipfsX\"\x12 C\xBA\x8BiP\xA9\xCDh\xD9h=\xA7\xA0\x08O(\xF8tvI#\xF9\r\xD4\xF7\xCF\x01}\x08MG\x94dsolcC\0\x08\x15\x003weight must be > 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x608060405234801561001057600080fd5b50600436106100625760003560e01c80633e4f49e614610067578063529d15cc1461008d5780636ee376e614610096578063d0496d6a146100a9578063ddc3b187146100be578063fff01fe2146100d3575b600080fd5b61007a610075366004610c44565b6100e6565b6040519081526020015b60405180910390f35b61007a60025481565b61007a6100a4366004610c44565b610107565b6100b161011e565b6040516100849190610e4f565b6100d16100cc366004610f04565b6104dc565b005b6100d16100e1366004610f7a565b6104f3565b600d81815481106100f657600080fd5b600091825260209091200154905081565b600381600a811061011757600080fd5b0154905081565b610126610bf0565b604080516101e081019091528060a081016003600a8282826020028201915b81548152602001906001019080831161014557505050505081526020016002548152602001600d8054806020026020016040519081016040528092919081815260200182805480156101b657602002820191906000526020600020905b8154815260200190600101908083116101a2575b505050505081526020016000805480602002602001604051908101604052809291908181526020016000905b828210156102f457838290600052602060002090600502016040518060a001604052908160008201805461021590610fe6565b80601f016020809104026020016040519081016040528092919081815260200182805461024190610fe6565b801561028e5780601f106102635761010080835404028352916020019161028e565b820191906000526020600020905b81548152906001019060200180831161027157829003601f168201915b505050918352505060018281015460ff9081166020808501919091526040805180820182526002870154808516825261010090049093168383015284019190915260038401546060840152600490930154608090920191909152918352920191016101e2565b5050505081526020016001805480602002602001604051908101604052809291908181526020016000905b828210156104d157838290600052602060002090600602016040518060c001604052908160008201805461035290610fe6565b80601f016020809104026020016040519081016040528092919081815260200182805461037e90610fe6565b80156103cb5780601f106103a0576101008083540402835291602001916103cb565b820191906000526020600020905b8154815290600101906020018083116103ae57829003601f168201915b5050509183525050600182015460ff9081166020808401919091526040805180820182526002860154808516825261010090048416818401528185015260038501549092166060840152600484018054835181840281018401909452808452608090940193909183018282801561046157602002820191906000526020600020905b81548152602001906001019080831161044d575b50505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156104b957602002820191906000526020600020905b8154815260200190600101908083116104a5575b5050505050815250508152602001906001019061031f565b505050915250919050565b6104e682826105bc565b6104ef4361085e565b5050565b8281146105475760405162461bcd60e51b815260206004820152601c60248201527f4d6f64656c52656769737472793a20696e76616c696420696e7075740000000060448201526064015b60405180910390fd5b60005b838110156105ac5761059a85858381811061056757610567611020565b905060200201602081019061057c9190611036565b84848481811061058e5761058e611020565b905060200201356105bc565b806105a48161106e565b91505061054a565b506105b64361085e565b50505050565b600060018360ff16815481106105d4576105d4611020565b90600052602060002090600602016040518060c00160405290816000820180546105fd90610fe6565b80601f016020809104026020016040519081016040528092919081815260200182805461062990610fe6565b80156106765780601f1061064b57610100808354040283529160200191610676565b820191906000526020600020905b81548152906001019060200180831161065957829003601f168201915b5050509183525050600182015460ff9081166020808401919091526040805180820182526002860154808516825261010090048416818401528185015260038501549092166060840152600484018054835181840281018401909452808452608090940193909183018282801561070c57602002820191906000526020600020905b8154815260200190600101908083116106f8575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561076457602002820191906000526020600020905b815481526020019060010190808311610750575b5050505050815250509050610778816108bf565b156107b15760405162461bcd60e51b81526020600482015260096024820152681a5b9a1a589a5d195960ba1b604482015260640161053e565b806020015160ff168360ff16146107ca576107ca611087565b60005b60005460ff90811690821610156107fb576107e98183856109f9565b806107f38161109d565b9150506107cd565b506002805490600061080c8361106e565b9190505550818360ff16826060015160ff167f50e4a52b0772bed9f06a7d3f7dfa66d73640067a5cc77a73c24556ccc900fa0860025460405161085191815260200190565b60405180910390a4505050565b60005b60098160ff1610156108b957600361087a8260016110bc565b60ff16600a811061088d5761088d611020565b015460038260ff16600a81106108a5576108a5611020565b0155806108b18161109d565b915050610861565b50600c55565b6000805b600160ff821610156109f0578260a001518160ff16815181106108e8576108e8611020565b60200260200101516000146109de5760008360a001518260ff168151811061091257610912611020565b602002602001015112156109815760008360a001518260ff168151811061093b5761093b611020565b6020026020010151600d8360ff168154811061095957610959611020565b906000526020600020015461096e91906110db565b1261097c5750600192915050565b6109de565b60008360a001518260ff168151811061099c5761099c611020565b6020026020010151600d8360ff16815481106109ba576109ba611020565b90600052602060002001546109cf9190611103565b12156109de5750600192915050565b806109e88161109d565b9150506108c3565b50600092915050565b60008111610a3a5760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21039b1b0b630b960911b604482015260640161053e565b81608001518360ff1681518110610a5357610a53611020565b6020026020010151600014610beb578082608001518460ff1681518110610a7c57610a7c611020565b6020026020010151610a8e919061112a565b600d8460ff1681548110610aa457610aa4611020565b9060005260206000200154610ab991906110db565b600d8460ff1681548110610acf57610acf611020565b90600052602060002001819055506000600d8460ff1681548110610af557610af5611020565b90600052602060002001541215610b3a5760405162461bcd60e51b8152602060048201526009602482015268756e646572666c6f7760b81b604482015260640161053e565b6000808460ff1681548110610b5157610b51611020565b9060005260206000209060050201600401541115610beb5760008360ff1681548110610b7f57610b7f611020565b906000526020600020906005020160040154600d8460ff1681548110610ba757610ba7611020565b90600052602060002001541315610beb5760405162461bcd60e51b81526020600482015260086024820152676f766572666c6f7760c01b604482015260640161053e565b505050565b6040518060a00160405280610c03610c25565b8152602001600081526020016060815260200160608152602001606081525090565b604051806101400160405280600a906020820280368337509192915050565b600060208284031215610c5657600080fd5b5035919050565b600081518084526020808501945080840160005b83811015610c8d57815187529582019590820190600101610c71565b509495945050505050565b6000815180845260005b81811015610cbe57602081850181015186830182015201610ca2565b506000602082860101526020601f19601f83011685010191505092915050565b600081518084526020808501808196508360051b8101915082860160005b85811015610d7b578284038952815160c08151818752610d1e82880182610c98565b91505060ff878301511687870152604080830151610d4e82890182805160ff908116835260209182015116910152565b505060608201516080878101919091529091015160a0909501949094529784019790840190600101610cfc565b5091979650505050505050565b600081518084526020808501808196508360051b8101915082860160005b85811015610d7b578284038952815160e08151818752610dc882880182610c98565b8389015160ff908116898b015260408086015180518316828c01526020810151831660608c015292945092509050606084015191506080818316818a0152808501519250505060a087830381890152610e218383610c5d565b93015187840360c0890152929150610e3b90508183610c5d565b9a87019a9550505090840190600101610da6565b6020808252825160009190828483015b600a821015610e7e578251815291830191600191909101908301610e5f565b50505083015161016083015260408301516101c06101808401819052610ea86101e0850183610c5d565b91506060850151601f1980868503016101a0870152610ec78483610cde565b93506080870151915080868503018387015250610ee48382610d88565b9695505050505050565b803560ff81168114610eff57600080fd5b919050565b60008060408385031215610f1757600080fd5b610f2083610eee565b946020939093013593505050565b60008083601f840112610f4057600080fd5b50813567ffffffffffffffff811115610f5857600080fd5b6020830191508360208260051b8501011115610f7357600080fd5b9250929050565b60008060008060408587031215610f9057600080fd5b843567ffffffffffffffff80821115610fa857600080fd5b610fb488838901610f2e565b90965094506020870135915080821115610fcd57600080fd5b50610fda87828801610f2e565b95989497509550505050565b600181811c90821680610ffa57607f821691505b60208210810361101a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561104857600080fd5b61105182610eee565b9392505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161108057611080611058565b5060010190565b634e487b7160e01b600052600160045260246000fd5b600060ff821660ff81036110b3576110b3611058565b60010192915050565b60ff81811683821601908111156110d5576110d5611058565b92915050565b80820182811260008312801582168215821617156110fb576110fb611058565b505092915050565b818103600083128015838313168383128216171561112357611123611058565b5092915050565b80820260008212600160ff1b8414161561114657611146611058565b81810583148215176110d5576110d561105856fea264697066735822122043ba8b6950a9cd68d9683da7a0084f28f874764923f90dd4f7cf017d084d479464736f6c63430008150033 + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0bW`\x005`\xE0\x1C\x80c>OI\xE6\x14a\0gW\x80cR\x9D\x15\xCC\x14a\0\x8DW\x80cn\xE3v\xE6\x14a\0\x96W\x80c\xD0Imj\x14a\0\xA9W\x80c\xDD\xC3\xB1\x87\x14a\0\xBEW\x80c\xFF\xF0\x1F\xE2\x14a\0\xD3W[`\0\x80\xFD[a\0za\0u6`\x04a\x0CDV[a\0\xE6V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0z`\x02T\x81V[a\0za\0\xA46`\x04a\x0CDV[a\x01\x07V[a\0\xB1a\x01\x1EV[`@Qa\0\x84\x91\x90a\x0EOV[a\0\xD1a\0\xCC6`\x04a\x0F\x04V[a\x04\xDCV[\0[a\0\xD1a\0\xE16`\x04a\x0FzV[a\x04\xF3V[`\r\x81\x81T\x81\x10a\0\xF6W`\0\x80\xFD[`\0\x91\x82R` \x90\x91 \x01T\x90P\x81V[`\x03\x81`\n\x81\x10a\x01\x17W`\0\x80\xFD[\x01T\x90P\x81V[a\x01&a\x0B\xF0V[`@\x80Qa\x01\xE0\x81\x01\x90\x91R\x80`\xA0\x81\x01`\x03`\n\x82\x82\x82` \x02\x82\x01\x91[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01EWPPPPP\x81R` \x01`\x02T\x81R` \x01`\r\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x01\xB6W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01\xA2W[PPPPP\x81R` \x01`\0\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x02\xF4W\x83\x82\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x02\x15\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02A\x90a\x0F\xE6V[\x80\x15a\x02\x8EW\x80`\x1F\x10a\x02cWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\x8EV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02qW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x83\x83\x01R\x84\x01\x91\x90\x91R`\x03\x84\x01T``\x84\x01R`\x04\x90\x93\x01T`\x80\x90\x92\x01\x91\x90\x91R\x91\x83R\x92\x01\x91\x01a\x01\xE2V[PPPP\x81R` \x01`\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x04\xD1W\x83\x82\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x03R\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03~\x90a\x0F\xE6V[\x80\x15a\x03\xCBW\x80`\x1F\x10a\x03\xA0Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xCBV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\xAEW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x04aW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04MW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x04\xB9W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04\xA5W[PPPPP\x81RPP\x81R` \x01\x90`\x01\x01\x90a\x03\x1FV[PPP\x91RP\x91\x90PV[a\x04\xE6\x82\x82a\x05\xBCV[a\x04\xEFCa\x08^V[PPV[\x82\x81\x14a\x05GW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FModelRegistry: invalid input\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0[\x83\x81\x10\x15a\x05\xACWa\x05\x9A\x85\x85\x83\x81\x81\x10a\x05gWa\x05ga\x10 V[\x90P` \x02\x01` \x81\x01\x90a\x05|\x91\x90a\x106V[\x84\x84\x84\x81\x81\x10a\x05\x8EWa\x05\x8Ea\x10 V[\x90P` \x02\x015a\x05\xBCV[\x80a\x05\xA4\x81a\x10nV[\x91PPa\x05JV[Pa\x05\xB6Ca\x08^V[PPPPV[`\0`\x01\x83`\xFF\x16\x81T\x81\x10a\x05\xD4Wa\x05\xD4a\x10 V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x05\xFD\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x06)\x90a\x0F\xE6V[\x80\x15a\x06vW\x80`\x1F\x10a\x06KWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x06vV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x06YW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x07\x0CW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x06\xF8W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x07dW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x07PW[PPPPP\x81RPP\x90Pa\x07x\x81a\x08\xBFV[\x15a\x07\xB1W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rh\x1A[\x9A\x1AX\x9A]\x19Y`\xBA\x1B`D\x82\x01R`d\x01a\x05>V[\x80` \x01Q`\xFF\x16\x83`\xFF\x16\x14a\x07\xCAWa\x07\xCAa\x10\x87V[`\0[`\0T`\xFF\x90\x81\x16\x90\x82\x16\x10\x15a\x07\xFBWa\x07\xE9\x81\x83\x85a\t\xF9V[\x80a\x07\xF3\x81a\x10\x9DV[\x91PPa\x07\xCDV[P`\x02\x80T\x90`\0a\x08\x0C\x83a\x10nV[\x91\x90PUP\x81\x83`\xFF\x16\x82``\x01Q`\xFF\x16\x7FP\xE4\xA5+\x07r\xBE\xD9\xF0j}?}\xFAf\xD76@\x06z\\\xC7zs\xC2EV\xCC\xC9\0\xFA\x08`\x02T`@Qa\x08Q\x91\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA4PPPV[`\0[`\t\x81`\xFF\x16\x10\x15a\x08\xB9W`\x03a\x08z\x82`\x01a\x10\xBCV[`\xFF\x16`\n\x81\x10a\x08\x8DWa\x08\x8Da\x10 V[\x01T`\x03\x82`\xFF\x16`\n\x81\x10a\x08\xA5Wa\x08\xA5a\x10 V[\x01U\x80a\x08\xB1\x81a\x10\x9DV[\x91PPa\x08aV[P`\x0CUV[`\0\x80[`\x01`\xFF\x82\x16\x10\x15a\t\xF0W\x82`\xA0\x01Q\x81`\xFF\x16\x81Q\x81\x10a\x08\xE8Wa\x08\xE8a\x10 V[` \x02` \x01\x01Q`\0\x14a\t\xDEW`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x12Wa\t\x12a\x10 V[` \x02` \x01\x01Q\x12\x15a\t\x81W`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t;Wa\t;a\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\tYWa\tYa\x10 V[\x90`\0R` `\0 \x01Ta\tn\x91\x90a\x10\xDBV[\x12a\t|WP`\x01\x92\x91PPV[a\t\xDEV[`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x9CWa\t\x9Ca\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\t\xBAWa\t\xBAa\x10 V[\x90`\0R` `\0 \x01Ta\t\xCF\x91\x90a\x11\x03V[\x12\x15a\t\xDEWP`\x01\x92\x91PPV[\x80a\t\xE8\x81a\x10\x9DV[\x91PPa\x08\xC3V[P`\0\x92\x91PPV[`\0\x81\x11a\n:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm4\xB7;0\xB64\xB2\x109\xB1\xB0\xB60\xB9`\x91\x1B`D\x82\x01R`d\x01a\x05>V[\x81`\x80\x01Q\x83`\xFF\x16\x81Q\x81\x10a\nSWa\nSa\x10 V[` \x02` \x01\x01Q`\0\x14a\x0B\xEBW\x80\x82`\x80\x01Q\x84`\xFF\x16\x81Q\x81\x10a\n|Wa\n|a\x10 V[` \x02` \x01\x01Qa\n\x8E\x91\x90a\x11*V[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xA4Wa\n\xA4a\x10 V[\x90`\0R` `\0 \x01Ta\n\xB9\x91\x90a\x10\xDBV[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xCFWa\n\xCFa\x10 V[\x90`\0R` `\0 \x01\x81\x90UP`\0`\r\x84`\xFF\x16\x81T\x81\x10a\n\xF5Wa\n\xF5a\x10 V[\x90`\0R` `\0 \x01T\x12\x15a\x0B:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rhunderflow`\xB8\x1B`D\x82\x01R`d\x01a\x05>V[`\0\x80\x84`\xFF\x16\x81T\x81\x10a\x0BQWa\x0BQa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T\x11\x15a\x0B\xEBW`\0\x83`\xFF\x16\x81T\x81\x10a\x0B\x7FWa\x0B\x7Fa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T`\r\x84`\xFF\x16\x81T\x81\x10a\x0B\xA7Wa\x0B\xA7a\x10 V[\x90`\0R` `\0 \x01T\x13\x15a\x0B\xEBW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x08`$\x82\x01Rgoverflow`\xC0\x1B`D\x82\x01R`d\x01a\x05>V[PPPV[`@Q\x80`\xA0\x01`@R\x80a\x0C\x03a\x0C%V[\x81R` \x01`\0\x81R` \x01``\x81R` \x01``\x81R` \x01``\x81RP\x90V[`@Q\x80a\x01@\x01`@R\x80`\n\x90` \x82\x02\x806\x837P\x91\x92\x91PPV[`\0` \x82\x84\x03\x12\x15a\x0CVW`\0\x80\xFD[P5\x91\x90PV[`\0\x81Q\x80\x84R` \x80\x85\x01\x94P\x80\x84\x01`\0[\x83\x81\x10\x15a\x0C\x8DW\x81Q\x87R\x95\x82\x01\x95\x90\x82\x01\x90`\x01\x01a\x0CqV[P\x94\x95\x94PPPPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\x0C\xBEW` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\x0C\xA2V[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xC0\x81Q\x81\x87Ra\r\x1E\x82\x88\x01\x82a\x0C\x98V[\x91PP`\xFF\x87\x83\x01Q\x16\x87\x87\x01R`@\x80\x83\x01Qa\rN\x82\x89\x01\x82\x80Q`\xFF\x90\x81\x16\x83R` \x91\x82\x01Q\x16\x91\x01RV[PP``\x82\x01Q`\x80\x87\x81\x01\x91\x90\x91R\x90\x91\x01Q`\xA0\x90\x95\x01\x94\x90\x94R\x97\x84\x01\x97\x90\x84\x01\x90`\x01\x01a\x0C\xFCV[P\x91\x97\x96PPPPPPPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xE0\x81Q\x81\x87Ra\r\xC8\x82\x88\x01\x82a\x0C\x98V[\x83\x89\x01Q`\xFF\x90\x81\x16\x89\x8B\x01R`@\x80\x86\x01Q\x80Q\x83\x16\x82\x8C\x01R` \x81\x01Q\x83\x16``\x8C\x01R\x92\x94P\x92P\x90P``\x84\x01Q\x91P`\x80\x81\x83\x16\x81\x8A\x01R\x80\x85\x01Q\x92PPP`\xA0\x87\x83\x03\x81\x89\x01Ra\x0E!\x83\x83a\x0C]V[\x93\x01Q\x87\x84\x03`\xC0\x89\x01R\x92\x91Pa\x0E;\x90P\x81\x83a\x0C]V[\x9A\x87\x01\x9A\x95PPP\x90\x84\x01\x90`\x01\x01a\r\xA6V[` \x80\x82R\x82Q`\0\x91\x90\x82\x84\x83\x01[`\n\x82\x10\x15a\x0E~W\x82Q\x81R\x91\x83\x01\x91`\x01\x91\x90\x91\x01\x90\x83\x01a\x0E_V[PPP\x83\x01Qa\x01`\x83\x01R`@\x83\x01Qa\x01\xC0a\x01\x80\x84\x01\x81\x90Ra\x0E\xA8a\x01\xE0\x85\x01\x83a\x0C]V[\x91P``\x85\x01Q`\x1F\x19\x80\x86\x85\x03\x01a\x01\xA0\x87\x01Ra\x0E\xC7\x84\x83a\x0C\xDEV[\x93P`\x80\x87\x01Q\x91P\x80\x86\x85\x03\x01\x83\x87\x01RPa\x0E\xE4\x83\x82a\r\x88V[\x96\x95PPPPPPV[\x805`\xFF\x81\x16\x81\x14a\x0E\xFFW`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0F\x17W`\0\x80\xFD[a\x0F \x83a\x0E\xEEV[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80\x83`\x1F\x84\x01\x12a\x0F@W`\0\x80\xFD[P\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0FXW`\0\x80\xFD[` \x83\x01\x91P\x83` \x82`\x05\x1B\x85\x01\x01\x11\x15a\x0FsW`\0\x80\xFD[\x92P\x92\x90PV[`\0\x80`\0\x80`@\x85\x87\x03\x12\x15a\x0F\x90W`\0\x80\xFD[\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0F\xA8W`\0\x80\xFD[a\x0F\xB4\x88\x83\x89\x01a\x0F.V[\x90\x96P\x94P` \x87\x015\x91P\x80\x82\x11\x15a\x0F\xCDW`\0\x80\xFD[Pa\x0F\xDA\x87\x82\x88\x01a\x0F.V[\x95\x98\x94\x97P\x95PPPPV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0F\xFAW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x10\x1AWcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[cNH{q`\xE0\x1B`\0R`2`\x04R`$`\0\xFD[`\0` \x82\x84\x03\x12\x15a\x10HW`\0\x80\xFD[a\x10Q\x82a\x0E\xEEV[\x93\x92PPPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\x10\x80Wa\x10\x80a\x10XV[P`\x01\x01\x90V[cNH{q`\xE0\x1B`\0R`\x01`\x04R`$`\0\xFD[`\0`\xFF\x82\x16`\xFF\x81\x03a\x10\xB3Wa\x10\xB3a\x10XV[`\x01\x01\x92\x91PPV[`\xFF\x81\x81\x16\x83\x82\x16\x01\x90\x81\x11\x15a\x10\xD5Wa\x10\xD5a\x10XV[\x92\x91PPV[\x80\x82\x01\x82\x81\x12`\0\x83\x12\x80\x15\x82\x16\x82\x15\x82\x16\x17\x15a\x10\xFBWa\x10\xFBa\x10XV[PP\x92\x91PPV[\x81\x81\x03`\0\x83\x12\x80\x15\x83\x83\x13\x16\x83\x83\x12\x82\x16\x17\x15a\x11#Wa\x11#a\x10XV[P\x92\x91PPV[\x80\x82\x02`\0\x82\x12`\x01`\xFF\x1B\x84\x14\x16\x15a\x11FWa\x11Fa\x10XV[\x81\x81\x05\x83\x14\x82\x15\x17a\x10\xD5Wa\x10\xD5a\x10XV\xFE\xA2dipfsX\"\x12 C\xBA\x8BiP\xA9\xCDh\xD9h=\xA7\xA0\x08O(\xF8tvI#\xF9\r\xD4\xF7\xCF\x01}\x08MG\x94dsolcC\0\x08\x15\x003", + ); + /**```solidity +struct Head { uint256[10] latestBlocks; uint256 sequence; int256[] state; Place[] places; Transition[] transitions; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Head { + pub latestBlocks: [alloy::sol_types::private::U256; 10usize], + pub sequence: alloy::sol_types::private::U256, + pub state: alloy::sol_types::private::Vec, + pub places: alloy::sol_types::private::Vec< + ::RustType, + >, + pub transitions: alloy::sol_types::private::Vec< + ::RustType, + >, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedArray< + alloy::sol_types::sol_data::Uint<256>, + 10usize, + >, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array, + alloy::sol_types::sol_data::Array, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + [alloy::sol_types::private::U256; 10usize], + alloy::sol_types::private::U256, + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec< + ::RustType, + >, + alloy::sol_types::private::Vec< + ::RustType, + >, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Head) -> Self { + ( + value.latestBlocks, + value.sequence, + value.state, + value.places, + value.transitions, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Head { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + latestBlocks: tuple.0, + sequence: tuple.1, + state: tuple.2, + places: tuple.3, + transitions: tuple.4, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Head { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Head { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + , + 10usize, + > as alloy_sol_types::SolType>::tokenize(&self.latestBlocks), + as alloy_sol_types::SolType>::tokenize(&self.sequence), + , + > as alloy_sol_types::SolType>::tokenize(&self.state), + as alloy_sol_types::SolType>::tokenize(&self.places), + as alloy_sol_types::SolType>::tokenize(&self.transitions), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Head { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Head { + const NAME: &'static str = "Head"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Head(uint256[10] latestBlocks,uint256 sequence,int256[] state,Place[] places,Transition[] transitions)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(2); + components + .push(::eip712_root_type()); + components + .extend(::eip712_components()); + components + .push( + ::eip712_root_type(), + ); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + , + 10usize, + > as alloy_sol_types::SolType>::eip712_data_word(&self.latestBlocks) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.sequence) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.state) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.places) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.transitions) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Head { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + , + 10usize, + > as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.latestBlocks, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.sequence, + ) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.state) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.places, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.transitions, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + , + 10usize, + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.latestBlocks, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.sequence, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.state, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.places, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.transitions, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**```solidity +struct Place { string label; uint8 offset; Position position; uint256 initial; uint256 capacity; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Place { + pub label: alloy::sol_types::private::String, + pub offset: u8, + pub position: ::RustType, + pub initial: alloy::sol_types::private::U256, + pub capacity: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + Position, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + u8, + ::RustType, + alloy::sol_types::private::U256, + alloy::sol_types::private::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Place) -> Self { + ( + value.label, + value.offset, + value.position, + value.initial, + value.capacity, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Place { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + label: tuple.0, + offset: tuple.1, + position: tuple.2, + initial: tuple.3, + capacity: tuple.4, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Place { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Place { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + ::tokenize( + &self.label, + ), + as alloy_sol_types::SolType>::tokenize(&self.offset), + ::tokenize(&self.position), + as alloy_sol_types::SolType>::tokenize(&self.initial), + as alloy_sol_types::SolType>::tokenize(&self.capacity), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Place { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Place { + const NAME: &'static str = "Place"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Place(string label,uint8 offset,Position position,uint256 initial,uint256 capacity)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(1); + components + .push(::eip712_root_type()); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + ::eip712_data_word( + &self.label, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.offset) + .0, + ::eip712_data_word( + &self.position, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.initial) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.capacity) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Place { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + ::topic_preimage_length( + &rust.label, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.offset, + ) + + ::topic_preimage_length( + &rust.position, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.initial, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.capacity, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + ::encode_topic_preimage( + &rust.label, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.offset, + out, + ); + ::encode_topic_preimage( + &rust.position, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.initial, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.capacity, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**```solidity +struct Position { uint8 x; uint8 y; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Position { + pub x: u8, + pub y: u8, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<8>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8, u8); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Position) -> Self { + (value.x, value.y) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Position { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { x: tuple.0, y: tuple.1 } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Position { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Position { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.x), + as alloy_sol_types::SolType>::tokenize(&self.y), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Position { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Position { + const NAME: &'static str = "Position"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed("Position(uint8 x,uint8 y)") + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + alloy_sol_types::private::Vec::new() + } + #[inline] + fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + as alloy_sol_types::SolType>::eip712_data_word(&self.x) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.y) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Position { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.x) + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.y) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage(&rust.x, out); + as alloy_sol_types::EventTopic>::encode_topic_preimage(&rust.y, out); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**```solidity +struct Transition { string label; uint8 offset; Position position; uint8 role; int256[] delta; int256[] guard; } +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct Transition { + pub label: alloy::sol_types::private::String, + pub offset: u8, + pub position: ::RustType, + pub role: u8, + pub delta: alloy::sol_types::private::Vec, + pub guard: alloy::sol_types::private::Vec, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + Position, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + u8, + ::RustType, + u8, + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Transition) -> Self { + ( + value.label, + value.offset, + value.position, + value.role, + value.delta, + value.guard, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Transition { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + label: tuple.0, + offset: tuple.1, + position: tuple.2, + role: tuple.3, + delta: tuple.4, + guard: tuple.5, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Transition { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Transition { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + ::tokenize( + &self.label, + ), + as alloy_sol_types::SolType>::tokenize(&self.offset), + ::tokenize(&self.position), + as alloy_sol_types::SolType>::tokenize(&self.role), + , + > as alloy_sol_types::SolType>::tokenize(&self.delta), + , + > as alloy_sol_types::SolType>::tokenize(&self.guard), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Transition { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Transition { + const NAME: &'static str = "Transition"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Transition(string label,uint8 offset,Position position,uint8 role,int256[] delta,int256[] guard)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(1); + components + .push(::eip712_root_type()); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + ::eip712_data_word( + &self.label, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.offset) + .0, + ::eip712_data_word( + &self.position, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.role) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.delta) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.guard) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Transition { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + ::topic_preimage_length( + &rust.label, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.offset, + ) + + ::topic_preimage_length( + &rust.position, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.role) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.delta) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.guard) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + ::encode_topic_preimage( + &rust.label, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.offset, + out, + ); + ::encode_topic_preimage( + &rust.position, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.role, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.delta, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.guard, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + /**Event with signature `SignaledEvent(uint8,uint8,uint256,uint256)` and selector `0x50e4a52b0772bed9f06a7d3f7dfa66d73640067a5cc77a73c24556ccc900fa08`. +```solidity +event SignaledEvent(uint8 indexed role, uint8 indexed actionId, uint256 indexed scalar, uint256 sequence); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + #[derive(Clone)] + pub struct SignaledEvent { + #[allow(missing_docs)] + pub role: u8, + #[allow(missing_docs)] + pub actionId: u8, + #[allow(missing_docs)] + pub scalar: alloy::sol_types::private::U256, + #[allow(missing_docs)] + pub sequence: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for SignaledEvent { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "SignaledEvent(uint8,uint8,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 80u8, + 228u8, + 165u8, + 43u8, + 7u8, + 114u8, + 190u8, + 217u8, + 240u8, + 106u8, + 125u8, + 63u8, + 125u8, + 250u8, + 102u8, + 215u8, + 54u8, + 64u8, + 6u8, + 122u8, + 92u8, + 199u8, + 122u8, + 115u8, + 194u8, + 69u8, + 86u8, + 204u8, + 201u8, + 0u8, + 250u8, + 8u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + actionId: topics.2, + scalar: topics.3, + sequence: data.0, + } + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.sequence), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.actionId.clone(), + self.scalar.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.actionId); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.scalar); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for SignaledEvent { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&SignaledEvent> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &SignaledEvent) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Function with signature `context()` and selector `0xd0496d6a`. +```solidity +function context() external view returns (Head memory); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct contextCall {} + ///Container type for the return parameters of the [`context()`](contextCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct contextReturn { + pub _0: ::RustType, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: contextCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for contextCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (Head,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: contextReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for contextReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for contextCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = contextReturn; + type ReturnTuple<'a> = (Head,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "context()"; + const SELECTOR: [u8; 4] = [208u8, 73u8, 109u8, 106u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `latestBlocks(uint256)` and selector `0x6ee376e6`. +```solidity +function latestBlocks(uint256) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct latestBlocksCall { + pub _0: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`latestBlocks(uint256)`](latestBlocksCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct latestBlocksReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: latestBlocksCall) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for latestBlocksCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: latestBlocksReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for latestBlocksReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for latestBlocksCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = latestBlocksReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "latestBlocks(uint256)"; + const SELECTOR: [u8; 4] = [110u8, 227u8, 118u8, 230u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._0), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `sequence()` and selector `0x529d15cc`. +```solidity +function sequence() external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct sequenceCall {} + ///Container type for the return parameters of the [`sequence()`](sequenceCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct sequenceReturn { + pub _0: alloy::sol_types::private::U256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: sequenceCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for sequenceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: sequenceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for sequenceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for sequenceCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = sequenceReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "sequence()"; + const SELECTOR: [u8; 4] = [82u8, 157u8, 21u8, 204u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `signal(uint8,uint256)` and selector `0xddc3b187`. +```solidity +function signal(uint8 action, uint256 scalar) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalCall { + pub action: u8, + pub scalar: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`signal(uint8,uint256)`](signalCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8, alloy::sol_types::private::U256); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalCall) -> Self { + (value.action, value.scalar) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + action: tuple.0, + scalar: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for signalCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = signalReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "signal(uint8,uint256)"; + const SELECTOR: [u8; 4] = [221u8, 195u8, 177u8, 135u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.action), + as alloy_sol_types::SolType>::tokenize(&self.scalar), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2`. +```solidity +function signalMany(uint8[] memory actions, uint256[] memory scalars) external; +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalManyCall { + pub actions: alloy::sol_types::private::Vec, + pub scalars: alloy::sol_types::private::Vec, + } + ///Container type for the return parameters of the [`signalMany(uint8[],uint256[])`](signalManyCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct signalManyReturn {} + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Vec, + alloy::sol_types::private::Vec, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalManyCall) -> Self { + (value.actions, value.scalars) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalManyCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + actions: tuple.0, + scalars: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: signalManyReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for signalManyReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for signalManyCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Array>, + alloy::sol_types::sol_data::Array>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = signalManyReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "signalMany(uint8[],uint256[])"; + const SELECTOR: [u8; 4] = [255u8, 240u8, 31u8, 226u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + , + > as alloy_sol_types::SolType>::tokenize(&self.actions), + , + > as alloy_sol_types::SolType>::tokenize(&self.scalars), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + /**Function with signature `state(uint256)` and selector `0x3e4f49e6`. +```solidity +function state(uint256) external view returns (int256); +```*/ + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct stateCall { + pub _0: alloy::sol_types::private::U256, + } + ///Container type for the return parameters of the [`state(uint256)`](stateCall) function. + #[allow(non_camel_case_types, non_snake_case)] + #[derive(Clone)] + pub struct stateReturn { + pub _0: alloy::sol_types::private::I256, + } + #[allow(non_camel_case_types, non_snake_case, clippy::style)] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::U256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: stateCall) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for stateCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Int<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::I256,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: stateReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for stateReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for stateCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = stateReturn; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Int<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "state(uint256)"; + const SELECTOR: [u8; 4] = [62u8, 79u8, 73u8, 230u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self._0), + ) + } + #[inline] + fn abi_decode_returns( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data, validate) + .map(Into::into) + } + } + }; + ///Container for all the [`MyStateMachine`](self) function calls. + pub enum MyStateMachineCalls { + context(contextCall), + latestBlocks(latestBlocksCall), + sequence(sequenceCall), + signal(signalCall), + signalMany(signalManyCall), + state(stateCall), + } + #[automatically_derived] + impl MyStateMachineCalls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [62u8, 79u8, 73u8, 230u8], + [82u8, 157u8, 21u8, 204u8], + [110u8, 227u8, 118u8, 230u8], + [208u8, 73u8, 109u8, 106u8], + [221u8, 195u8, 177u8, 135u8], + [255u8, 240u8, 31u8, 226u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for MyStateMachineCalls { + const NAME: &'static str = "MyStateMachineCalls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 6usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::context(_) => ::SELECTOR, + Self::latestBlocks(_) => { + ::SELECTOR + } + Self::sequence(_) => ::SELECTOR, + Self::signal(_) => ::SELECTOR, + Self::signalMany(_) => { + ::SELECTOR + } + Self::state(_) => ::SELECTOR, + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(unsafe_code, non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + bool, + ) -> alloy_sol_types::Result] = &[ + { + fn state( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyStateMachineCalls::state) + } + state + }, + { + fn sequence( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyStateMachineCalls::sequence) + } + sequence + }, + { + fn latestBlocks( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyStateMachineCalls::latestBlocks) + } + latestBlocks + }, + { + fn context( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyStateMachineCalls::context) + } + context + }, + { + fn signal( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyStateMachineCalls::signal) + } + signal + }, + { + fn signalMany( + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + validate, + ) + .map(MyStateMachineCalls::signalMany) + } + signalMany + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + (unsafe { DECODE_SHIMS.get_unchecked(idx) })(data, validate) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::context(inner) => { + ::abi_encoded_size(inner) + } + Self::latestBlocks(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::sequence(inner) => { + ::abi_encoded_size(inner) + } + Self::signal(inner) => { + ::abi_encoded_size(inner) + } + Self::signalMany(inner) => { + ::abi_encoded_size(inner) + } + Self::state(inner) => { + ::abi_encoded_size(inner) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::context(inner) => { + ::abi_encode_raw(inner, out) + } + Self::latestBlocks(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::sequence(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::signal(inner) => { + ::abi_encode_raw(inner, out) + } + Self::signalMany(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::state(inner) => { + ::abi_encode_raw(inner, out) + } + } + } + } + ///Container for all the [`MyStateMachine`](self) events. + pub enum MyStateMachineEvents { + SignaledEvent(SignaledEvent), + } + #[automatically_derived] + impl MyStateMachineEvents { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 80u8, + 228u8, + 165u8, + 43u8, + 7u8, + 114u8, + 190u8, + 217u8, + 240u8, + 106u8, + 125u8, + 63u8, + 125u8, + 250u8, + 102u8, + 215u8, + 54u8, + 64u8, + 6u8, + 122u8, + 92u8, + 199u8, + 122u8, + 115u8, + 194u8, + 69u8, + 86u8, + 204u8, + 201u8, + 0u8, + 250u8, + 8u8, + ], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for MyStateMachineEvents { + const NAME: &'static str = "MyStateMachineEvents"; + const COUNT: usize = 1usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + validate: bool, + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + validate, + ) + .map(Self::SignaledEvent) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for MyStateMachineEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::SignaledEvent(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::SignaledEvent(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`MyStateMachine`](self) contract instance. + +See the [wrapper's documentation](`MyStateMachineInstance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> MyStateMachineInstance { + MyStateMachineInstance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + MyStateMachineInstance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + MyStateMachineInstance::::deploy_builder(provider) + } + /**A [`MyStateMachine`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`MyStateMachine`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct MyStateMachineInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for MyStateMachineInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("MyStateMachineInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MyStateMachineInstance { + /**Creates a new wrapper around an on-chain [`MyStateMachine`](self) contract instance. + +See the [wrapper's documentation](`MyStateMachineInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl MyStateMachineInstance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> MyStateMachineInstance { + MyStateMachineInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MyStateMachineInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`context`] function. + pub fn context(&self) -> alloy_contract::SolCallBuilder { + self.call_builder(&contextCall {}) + } + ///Creates a new call builder for the [`latestBlocks`] function. + pub fn latestBlocks( + &self, + _0: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&latestBlocksCall { _0 }) + } + ///Creates a new call builder for the [`sequence`] function. + pub fn sequence( + &self, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&sequenceCall {}) + } + ///Creates a new call builder for the [`signal`] function. + pub fn signal( + &self, + action: u8, + scalar: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&signalCall { action, scalar }) + } + ///Creates a new call builder for the [`signalMany`] function. + pub fn signalMany( + &self, + actions: alloy::sol_types::private::Vec, + scalars: alloy::sol_types::private::Vec, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&signalManyCall { actions, scalars }) + } + ///Creates a new call builder for the [`state`] function. + pub fn state( + &self, + _0: alloy::sol_types::private::U256, + ) -> alloy_contract::SolCallBuilder { + self.call_builder(&stateCall { _0 }) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MyStateMachineInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`SignaledEvent`] event. + pub fn SignaledEvent_filter( + &self, + ) -> alloy_contract::Event { + self.event_filter::() + } + } +} diff --git a/crates/bindings/src/pflow_dsl.rs b/crates/bindings/src/pflow_dsl.rs deleted file mode 100644 index b199d30..0000000 --- a/crates/bindings/src/pflow_dsl.rs +++ /dev/null @@ -1,72 +0,0 @@ -pub use pflow_dsl::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod pflow_dsl { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::std::collections::BTreeMap::new(), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static PFLOWDSL_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct PflowDSL(::ethers::contract::Contract); - impl ::core::clone::Clone for PflowDSL { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for PflowDSL { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for PflowDSL { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for PflowDSL { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(PflowDSL)).field(&self.address()).finish() - } - } - impl PflowDSL { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - PFLOWDSL_ABI.clone(), - client, - ), - ) - } - } - impl From<::ethers::contract::Contract> - for PflowDSL { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } -} diff --git a/crates/bindings/src/pflowdsl.rs b/crates/bindings/src/pflowdsl.rs new file mode 100644 index 0000000..6bee7a6 --- /dev/null +++ b/crates/bindings/src/pflowdsl.rs @@ -0,0 +1,218 @@ +/** + +Generated by the following Solidity interface... +```solidity +interface PflowDSL {} +``` + +...which was generated by the following JSON ABI: +```json +[] +```*/ +#[allow(non_camel_case_types, non_snake_case, clippy::style)] +pub mod PflowDSL { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"", + ); + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`PflowDSL`](self) contract instance. + +See the [wrapper's documentation](`PflowDSLInstance`) for more details.*/ + #[inline] + pub const fn new< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> PflowDSLInstance { + PflowDSLInstance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + PflowDSLInstance::::deploy(provider) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(provider: P) -> alloy_contract::RawCallBuilder { + PflowDSLInstance::::deploy_builder(provider) + } + /**A [`PflowDSL`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`PflowDSL`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct PflowDSLInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network_transport: ::core::marker::PhantomData<(N, T)>, + } + #[automatically_derived] + impl ::core::fmt::Debug for PflowDSLInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("PflowDSLInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > PflowDSLInstance { + /**Creates a new wrapper around an on-chain [`PflowDSL`](self) contract instance. + +See the [wrapper's documentation](`PflowDSLInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network_transport: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + ::core::clone::Clone::clone(&BYTECODE), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl PflowDSLInstance { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> PflowDSLInstance { + PflowDSLInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network_transport: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > PflowDSLInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + } + /// Event filters. + #[automatically_derived] + impl< + T: alloy_contract::private::Transport + ::core::clone::Clone, + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > PflowDSLInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + } +} diff --git a/crates/bindings/src/shared_types.rs b/crates/bindings/src/shared_types.rs deleted file mode 100644 index f89d4ea..0000000 --- a/crates/bindings/src/shared_types.rs +++ /dev/null @@ -1,78 +0,0 @@ -///`Head(uint256[10],uint256,int256[],(string,uint8,(uint8,uint8),uint256,uint256)[],(string,uint8,(uint8,uint8),uint8,int256[],int256[])[])` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash -)] -pub struct Head { - pub latest_blocks: [::ethers::core::types::U256; 10], - pub sequence: ::ethers::core::types::U256, - pub state: ::std::vec::Vec<::ethers::core::types::I256>, - pub places: ::std::vec::Vec, - pub transitions: ::std::vec::Vec, -} -///`Place(string,uint8,(uint8,uint8),uint256,uint256)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash -)] -pub struct Place { - pub label: ::std::string::String, - pub offset: u8, - pub position: Position, - pub initial: ::ethers::core::types::U256, - pub capacity: ::ethers::core::types::U256, -} -///`Position(uint8,uint8)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash -)] -pub struct Position { - pub x: u8, - pub y: u8, -} -///`Transition(string,uint8,(uint8,uint8),uint8,int256[],int256[])` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash -)] -pub struct Transition { - pub label: ::std::string::String, - pub offset: u8, - pub position: Position, - pub role: u8, - pub delta: ::std::vec::Vec<::ethers::core::types::I256>, - pub guard: ::std::vec::Vec<::ethers::core::types::I256>, -} diff --git a/crates/src/ierc165.rs b/crates/src/ierc165.rs deleted file mode 100644 index 13e0228..0000000 --- a/crates/src/ierc165.rs +++ /dev/null @@ -1,143 +0,0 @@ -pub use ierc165::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc165 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("supportsInterface"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("supportsInterface"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("interfaceID"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ]), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static IERC165_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct IERC165(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC165 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for IERC165 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for IERC165 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for IERC165 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC165)).field(&self.address()).finish() - } - } - impl IERC165 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC165_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - } - impl From<::ethers::contract::Contract> - for IERC165 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); -} diff --git a/crates/src/ierc20.rs b/crates/src/ierc20.rs deleted file mode 100644 index 76378d6..0000000 --- a/crates/src/ierc20.rs +++ /dev/null @@ -1,1027 +0,0 @@ -pub use ierc20::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc20 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("allowance"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("allowance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("account"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("decimals"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("decimals"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("name"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("name"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("symbol"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("symbol"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("totalSupply"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("totalSupply"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static IERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct IERC20(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC20 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for IERC20 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for IERC20 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for IERC20 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC20)).field(&self.address()).finish() - } - } - impl IERC20 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC20_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `allowance` (0xdd62ed3e) function - pub fn allowance( - &self, - owner: ::ethers::core::types::Address, - spender: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 98, 237, 62], (owner, spender)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - spender: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (spender, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - account: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], account) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `decimals` (0x313ce567) function - pub fn decimals(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([49, 60, 229, 103], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `name` (0x06fdde03) function - pub fn name( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([6, 253, 222, 3], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `symbol` (0x95d89b41) function - pub fn symbol( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([149, 216, 155, 65], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `totalSupply` (0x18160ddd) function - pub fn total_supply( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([24, 22, 13, 221], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transfer` (0xa9059cbb) function - pub fn transfer( - &self, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 5, 156, 187], (to, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, amount)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, IERC20Events> { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for IERC20 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub spender: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC20Events { - ApprovalFilter(ApprovalFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for IERC20Events { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(IERC20Events::ApprovalFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(IERC20Events::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for IERC20Events { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC20Events { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for IERC20Events { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "allowance", abi = "allowance(address,address)")] - pub struct AllowanceCall { - pub owner: ::ethers::core::types::Address, - pub spender: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub spender: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub account: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "decimals", abi = "decimals()")] - pub struct DecimalsCall; - ///Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "name", abi = "name()")] - pub struct NameCall; - ///Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "symbol", abi = "symbol()")] - pub struct SymbolCall; - ///Container type for all input parameters for the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "totalSupply", abi = "totalSupply()")] - pub struct TotalSupplyCall; - ///Container type for all input parameters for the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transfer", abi = "transfer(address,uint256)")] - pub struct TransferCall { - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC20Calls { - Allowance(AllowanceCall), - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - Decimals(DecimalsCall), - Name(NameCall), - Symbol(SymbolCall), - TotalSupply(TotalSupplyCall), - Transfer(TransferCall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for IERC20Calls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Allowance(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Decimals(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Name(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Symbol(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TotalSupply(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Transfer(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IERC20Calls { - fn encode(self) -> Vec { - match self { - Self::Allowance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Decimals(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TotalSupply(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Transfer(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for IERC20Calls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Allowance(element) => ::core::fmt::Display::fmt(element, f), - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::Decimals(element) => ::core::fmt::Display::fmt(element, f), - Self::Name(element) => ::core::fmt::Display::fmt(element, f), - Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), - Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f), - Self::Transfer(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC20Calls { - fn from(value: AllowanceCall) -> Self { - Self::Allowance(value) - } - } - impl ::core::convert::From for IERC20Calls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for IERC20Calls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for IERC20Calls { - fn from(value: DecimalsCall) -> Self { - Self::Decimals(value) - } - } - impl ::core::convert::From for IERC20Calls { - fn from(value: NameCall) -> Self { - Self::Name(value) - } - } - impl ::core::convert::From for IERC20Calls { - fn from(value: SymbolCall) -> Self { - Self::Symbol(value) - } - } - impl ::core::convert::From for IERC20Calls { - fn from(value: TotalSupplyCall) -> Self { - Self::TotalSupply(value) - } - } - impl ::core::convert::From for IERC20Calls { - fn from(value: TransferCall) -> Self { - Self::Transfer(value) - } - } - impl ::core::convert::From for IERC20Calls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct AllowanceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ApproveReturn(pub bool); - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DecimalsReturn(pub u8); - ///Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NameReturn(pub ::std::string::String); - ///Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SymbolReturn(pub ::std::string::String); - ///Container type for all return fields from the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TotalSupplyReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferReturn(pub bool); - ///Container type for all return fields from the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferFromReturn(pub bool); -} diff --git a/crates/src/ierc721.rs b/crates/src/ierc721.rs deleted file mode 100644 index 6b79dd0..0000000 --- a/crates/src/ierc721.rs +++ /dev/null @@ -1,1177 +0,0 @@ -pub use ierc721::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc721 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getApproved"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getApproved"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ownerOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("ownerOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("supportsInterface"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("supportsInterface"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("interfaceID"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static IERC721_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct IERC721(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC721 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for IERC721 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for IERC721 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for IERC721 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC721)).field(&self.address()).finish() - } - } - impl IERC721 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC721_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - approved: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (approved, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], owner) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getApproved` (0x081812fc) function - pub fn get_approved( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([8, 24, 18, 252], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `isApprovedForAll` (0xe985e9c5) function - pub fn is_approved_for_all( - &self, - owner: ::ethers::core::types::Address, - operator: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([233, 133, 233, 197], (owner, operator)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `ownerOf` (0x6352211e) function - pub fn owner_of( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([99, 82, 33, 30], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0x42842e0e) function - pub fn safe_transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([66, 132, 46, 14], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0xb88d4fde) function - pub fn safe_transfer_from_with_from_and_to_and_data( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([184, 141, 79, 222], (from, to, token_id, data)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setApprovalForAll` (0xa22cb465) function - pub fn set_approval_for_all( - &self, - operator: ::ethers::core::types::Address, - approved: bool, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([162, 44, 180, 101], (operator, approved)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `ApprovalForAll` event - pub fn approval_for_all_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalForAllFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event<::std::sync::Arc, M, IERC721Events> { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for IERC721 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub approved: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")] - pub struct ApprovalForAllFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721Events { - ApprovalFilter(ApprovalFilter), - ApprovalForAllFilter(ApprovalForAllFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for IERC721Events { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(IERC721Events::ApprovalFilter(decoded)); - } - if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) { - return Ok(IERC721Events::ApprovalForAllFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(IERC721Events::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for IERC721Events { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ApprovalForAllFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC721Events { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for IERC721Events { - fn from(value: ApprovalForAllFilter) -> Self { - Self::ApprovalForAllFilter(value) - } - } - impl ::core::convert::From for IERC721Events { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub approved: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getApproved", abi = "getApproved(uint256)")] - pub struct GetApprovedCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")] - pub struct IsApprovedForAllCall { - pub owner: ::ethers::core::types::Address, - pub operator: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")] - pub struct OwnerOfCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256)" - )] - pub struct SafeTransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256,bytes)" - )] - pub struct SafeTransferFromWithFromAndToAndDataCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")] - pub struct SetApprovalForAllCall { - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721Calls { - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - GetApproved(GetApprovedCall), - IsApprovedForAll(IsApprovedForAllCall), - OwnerOf(OwnerOfCall), - SafeTransferFrom(SafeTransferFromCall), - SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall), - SetApprovalForAll(SetApprovalForAllCall), - SupportsInterface(SupportsInterfaceCall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for IERC721Calls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetApproved(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IsApprovedForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OwnerOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFrom(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetApprovalForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SupportsInterface(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IERC721Calls { - fn encode(self) -> Vec { - match self { - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetApproved(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::IsApprovedForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OwnerOf(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SafeTransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SetApprovalForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for IERC721Calls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f), - Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC721Calls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for IERC721Calls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for IERC721Calls { - fn from(value: GetApprovedCall) -> Self { - Self::GetApproved(value) - } - } - impl ::core::convert::From for IERC721Calls { - fn from(value: IsApprovedForAllCall) -> Self { - Self::IsApprovedForAll(value) - } - } - impl ::core::convert::From for IERC721Calls { - fn from(value: OwnerOfCall) -> Self { - Self::OwnerOf(value) - } - } - impl ::core::convert::From for IERC721Calls { - fn from(value: SafeTransferFromCall) -> Self { - Self::SafeTransferFrom(value) - } - } - impl ::core::convert::From - for IERC721Calls { - fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self { - Self::SafeTransferFromWithFromAndToAndData(value) - } - } - impl ::core::convert::From for IERC721Calls { - fn from(value: SetApprovalForAllCall) -> Self { - Self::SetApprovalForAll(value) - } - } - impl ::core::convert::From for IERC721Calls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) - } - } - impl ::core::convert::From for IERC721Calls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetApprovedReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct IsApprovedForAllReturn(pub bool); - ///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct OwnerOfReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); -} diff --git a/crates/src/ierc721_enumerable.rs b/crates/src/ierc721_enumerable.rs deleted file mode 100644 index 77ee05f..0000000 --- a/crates/src/ierc721_enumerable.rs +++ /dev/null @@ -1,1447 +0,0 @@ -pub use ierc721_enumerable::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc721_enumerable { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getApproved"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getApproved"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ownerOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("ownerOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("supportsInterface"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("supportsInterface"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("interfaceID"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("tokenByIndex"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("tokenByIndex"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_index"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("tokenOfOwnerByIndex"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned( - "tokenOfOwnerByIndex", - ), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_index"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("totalSupply"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("totalSupply"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static IERC721ENUMERABLE_ABI: ::ethers::contract::Lazy< - ::ethers::core::abi::Abi, - > = ::ethers::contract::Lazy::new(__abi); - pub struct IERC721Enumerable(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC721Enumerable { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for IERC721Enumerable { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for IERC721Enumerable { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for IERC721Enumerable { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC721Enumerable)) - .field(&self.address()) - .finish() - } - } - impl IERC721Enumerable { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC721ENUMERABLE_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - approved: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (approved, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], owner) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getApproved` (0x081812fc) function - pub fn get_approved( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([8, 24, 18, 252], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `isApprovedForAll` (0xe985e9c5) function - pub fn is_approved_for_all( - &self, - owner: ::ethers::core::types::Address, - operator: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([233, 133, 233, 197], (owner, operator)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `ownerOf` (0x6352211e) function - pub fn owner_of( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([99, 82, 33, 30], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0x42842e0e) function - pub fn safe_transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([66, 132, 46, 14], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0xb88d4fde) function - pub fn safe_transfer_from_with_from_and_to_and_data( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([184, 141, 79, 222], (from, to, token_id, data)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setApprovalForAll` (0xa22cb465) function - pub fn set_approval_for_all( - &self, - operator: ::ethers::core::types::Address, - approved: bool, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([162, 44, 180, 101], (operator, approved)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `tokenByIndex` (0x4f6ccce7) function - pub fn token_by_index( - &self, - index: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([79, 108, 204, 231], index) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `tokenOfOwnerByIndex` (0x2f745c59) function - pub fn token_of_owner_by_index( - &self, - owner: ::ethers::core::types::Address, - index: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([47, 116, 92, 89], (owner, index)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `totalSupply` (0x18160ddd) function - pub fn total_supply( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([24, 22, 13, 221], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `ApprovalForAll` event - pub fn approval_for_all_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalForAllFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - IERC721EnumerableEvents, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for IERC721Enumerable { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub approved: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")] - pub struct ApprovalForAllFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721EnumerableEvents { - ApprovalFilter(ApprovalFilter), - ApprovalForAllFilter(ApprovalForAllFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for IERC721EnumerableEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(IERC721EnumerableEvents::ApprovalFilter(decoded)); - } - if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) { - return Ok(IERC721EnumerableEvents::ApprovalForAllFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(IERC721EnumerableEvents::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for IERC721EnumerableEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ApprovalForAllFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC721EnumerableEvents { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for IERC721EnumerableEvents { - fn from(value: ApprovalForAllFilter) -> Self { - Self::ApprovalForAllFilter(value) - } - } - impl ::core::convert::From for IERC721EnumerableEvents { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub approved: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getApproved", abi = "getApproved(uint256)")] - pub struct GetApprovedCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")] - pub struct IsApprovedForAllCall { - pub owner: ::ethers::core::types::Address, - pub operator: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")] - pub struct OwnerOfCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256)" - )] - pub struct SafeTransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256,bytes)" - )] - pub struct SafeTransferFromWithFromAndToAndDataCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")] - pub struct SetApprovalForAllCall { - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all input parameters for the `tokenByIndex` function with signature `tokenByIndex(uint256)` and selector `0x4f6ccce7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "tokenByIndex", abi = "tokenByIndex(uint256)")] - pub struct TokenByIndexCall { - pub index: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `tokenOfOwnerByIndex` function with signature `tokenOfOwnerByIndex(address,uint256)` and selector `0x2f745c59` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "tokenOfOwnerByIndex", - abi = "tokenOfOwnerByIndex(address,uint256)" - )] - pub struct TokenOfOwnerByIndexCall { - pub owner: ::ethers::core::types::Address, - pub index: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "totalSupply", abi = "totalSupply()")] - pub struct TotalSupplyCall; - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721EnumerableCalls { - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - GetApproved(GetApprovedCall), - IsApprovedForAll(IsApprovedForAllCall), - OwnerOf(OwnerOfCall), - SafeTransferFrom(SafeTransferFromCall), - SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall), - SetApprovalForAll(SetApprovalForAllCall), - SupportsInterface(SupportsInterfaceCall), - TokenByIndex(TokenByIndexCall), - TokenOfOwnerByIndex(TokenOfOwnerByIndexCall), - TotalSupply(TotalSupplyCall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for IERC721EnumerableCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetApproved(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IsApprovedForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OwnerOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFrom(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetApprovalForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SupportsInterface(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TokenByIndex(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TokenOfOwnerByIndex(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TotalSupply(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IERC721EnumerableCalls { - fn encode(self) -> Vec { - match self { - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetApproved(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::IsApprovedForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::OwnerOf(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SafeTransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SetApprovalForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TokenByIndex(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TokenOfOwnerByIndex(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TotalSupply(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for IERC721EnumerableCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f), - Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - Self::TokenByIndex(element) => ::core::fmt::Display::fmt(element, f), - Self::TokenOfOwnerByIndex(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: GetApprovedCall) -> Self { - Self::GetApproved(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: IsApprovedForAllCall) -> Self { - Self::IsApprovedForAll(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: OwnerOfCall) -> Self { - Self::OwnerOf(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: SafeTransferFromCall) -> Self { - Self::SafeTransferFrom(value) - } - } - impl ::core::convert::From - for IERC721EnumerableCalls { - fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self { - Self::SafeTransferFromWithFromAndToAndData(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: SetApprovalForAllCall) -> Self { - Self::SetApprovalForAll(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: TokenByIndexCall) -> Self { - Self::TokenByIndex(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: TokenOfOwnerByIndexCall) -> Self { - Self::TokenOfOwnerByIndex(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: TotalSupplyCall) -> Self { - Self::TotalSupply(value) - } - } - impl ::core::convert::From for IERC721EnumerableCalls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetApprovedReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct IsApprovedForAllReturn(pub bool); - ///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct OwnerOfReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); - ///Container type for all return fields from the `tokenByIndex` function with signature `tokenByIndex(uint256)` and selector `0x4f6ccce7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TokenByIndexReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `tokenOfOwnerByIndex` function with signature `tokenOfOwnerByIndex(address,uint256)` and selector `0x2f745c59` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TokenOfOwnerByIndexReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TotalSupplyReturn(pub ::ethers::core::types::U256); -} diff --git a/crates/src/ierc721_metadata.rs b/crates/src/ierc721_metadata.rs deleted file mode 100644 index 6f150e7..0000000 --- a/crates/src/ierc721_metadata.rs +++ /dev/null @@ -1,1412 +0,0 @@ -pub use ierc721_metadata::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc721_metadata { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getApproved"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getApproved"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("name"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("name"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_name"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ownerOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("ownerOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("supportsInterface"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("supportsInterface"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("interfaceID"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("symbol"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("symbol"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_symbol"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("tokenURI"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("tokenURI"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static IERC721METADATA_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct IERC721Metadata(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC721Metadata { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for IERC721Metadata { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for IERC721Metadata { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for IERC721Metadata { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC721Metadata)) - .field(&self.address()) - .finish() - } - } - impl IERC721Metadata { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC721METADATA_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - approved: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (approved, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], owner) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getApproved` (0x081812fc) function - pub fn get_approved( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([8, 24, 18, 252], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `isApprovedForAll` (0xe985e9c5) function - pub fn is_approved_for_all( - &self, - owner: ::ethers::core::types::Address, - operator: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([233, 133, 233, 197], (owner, operator)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `name` (0x06fdde03) function - pub fn name( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([6, 253, 222, 3], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `ownerOf` (0x6352211e) function - pub fn owner_of( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([99, 82, 33, 30], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0x42842e0e) function - pub fn safe_transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([66, 132, 46, 14], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0xb88d4fde) function - pub fn safe_transfer_from_with_from_and_to_and_data( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([184, 141, 79, 222], (from, to, token_id, data)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setApprovalForAll` (0xa22cb465) function - pub fn set_approval_for_all( - &self, - operator: ::ethers::core::types::Address, - approved: bool, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([162, 44, 180, 101], (operator, approved)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `symbol` (0x95d89b41) function - pub fn symbol( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([149, 216, 155, 65], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `tokenURI` (0xc87b56dd) function - pub fn token_uri( - &self, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([200, 123, 86, 221], token_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, token_id)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `ApprovalForAll` event - pub fn approval_for_all_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalForAllFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - IERC721MetadataEvents, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for IERC721Metadata { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub approved: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")] - pub struct ApprovalForAllFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721MetadataEvents { - ApprovalFilter(ApprovalFilter), - ApprovalForAllFilter(ApprovalForAllFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for IERC721MetadataEvents { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(IERC721MetadataEvents::ApprovalFilter(decoded)); - } - if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) { - return Ok(IERC721MetadataEvents::ApprovalForAllFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(IERC721MetadataEvents::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for IERC721MetadataEvents { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ApprovalForAllFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC721MetadataEvents { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for IERC721MetadataEvents { - fn from(value: ApprovalForAllFilter) -> Self { - Self::ApprovalForAllFilter(value) - } - } - impl ::core::convert::From for IERC721MetadataEvents { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub approved: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getApproved", abi = "getApproved(uint256)")] - pub struct GetApprovedCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")] - pub struct IsApprovedForAllCall { - pub owner: ::ethers::core::types::Address, - pub operator: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "name", abi = "name()")] - pub struct NameCall; - ///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")] - pub struct OwnerOfCall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256)" - )] - pub struct SafeTransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256,bytes)" - )] - pub struct SafeTransferFromWithFromAndToAndDataCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")] - pub struct SetApprovalForAllCall { - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "symbol", abi = "symbol()")] - pub struct SymbolCall; - ///Container type for all input parameters for the `tokenURI` function with signature `tokenURI(uint256)` and selector `0xc87b56dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "tokenURI", abi = "tokenURI(uint256)")] - pub struct TokenURICall { - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum IERC721MetadataCalls { - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - GetApproved(GetApprovedCall), - IsApprovedForAll(IsApprovedForAllCall), - Name(NameCall), - OwnerOf(OwnerOfCall), - SafeTransferFrom(SafeTransferFromCall), - SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall), - SetApprovalForAll(SetApprovalForAllCall), - SupportsInterface(SupportsInterfaceCall), - Symbol(SymbolCall), - TokenURI(TokenURICall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for IERC721MetadataCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetApproved(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IsApprovedForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Name(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OwnerOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFrom(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetApprovalForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SupportsInterface(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Symbol(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TokenURI(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for IERC721MetadataCalls { - fn encode(self) -> Vec { - match self { - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetApproved(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::IsApprovedForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OwnerOf(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SafeTransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SetApprovalForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TokenURI(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for IERC721MetadataCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f), - Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::Name(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), - Self::TokenURI(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: GetApprovedCall) -> Self { - Self::GetApproved(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: IsApprovedForAllCall) -> Self { - Self::IsApprovedForAll(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: NameCall) -> Self { - Self::Name(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: OwnerOfCall) -> Self { - Self::OwnerOf(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: SafeTransferFromCall) -> Self { - Self::SafeTransferFrom(value) - } - } - impl ::core::convert::From - for IERC721MetadataCalls { - fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self { - Self::SafeTransferFromWithFromAndToAndData(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: SetApprovalForAllCall) -> Self { - Self::SetApprovalForAll(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: SymbolCall) -> Self { - Self::Symbol(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: TokenURICall) -> Self { - Self::TokenURI(value) - } - } - impl ::core::convert::From for IERC721MetadataCalls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetApprovedReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct IsApprovedForAllReturn(pub bool); - ///Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NameReturn { - pub name: ::std::string::String, - } - ///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct OwnerOfReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); - ///Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SymbolReturn { - pub symbol: ::std::string::String, - } - ///Container type for all return fields from the `tokenURI` function with signature `tokenURI(uint256)` and selector `0xc87b56dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TokenURIReturn(pub ::std::string::String); -} diff --git a/crates/src/ierc721_token_receiver.rs b/crates/src/ierc721_token_receiver.rs deleted file mode 100644 index c2a4062..0000000 --- a/crates/src/ierc721_token_receiver.rs +++ /dev/null @@ -1,177 +0,0 @@ -pub use ierc721_token_receiver::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod ierc721_token_receiver { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("onERC721Received"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("onERC721Received"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("_data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static IERC721TOKENRECEIVER_ABI: ::ethers::contract::Lazy< - ::ethers::core::abi::Abi, - > = ::ethers::contract::Lazy::new(__abi); - pub struct IERC721TokenReceiver(::ethers::contract::Contract); - impl ::core::clone::Clone for IERC721TokenReceiver { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for IERC721TokenReceiver { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for IERC721TokenReceiver { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for IERC721TokenReceiver { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(IERC721TokenReceiver)) - .field(&self.address()) - .finish() - } - } - impl IERC721TokenReceiver { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - IERC721TOKENRECEIVER_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `onERC721Received` (0x150b7a02) function - pub fn on_erc721_received( - &self, - operator: ::ethers::core::types::Address, - from: ::ethers::core::types::Address, - token_id: ::ethers::core::types::U256, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([21, 11, 122, 2], (operator, from, token_id, data)) - .expect("method not found (this should never happen)") - } - } - impl From<::ethers::contract::Contract> - for IERC721TokenReceiver { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Container type for all input parameters for the `onERC721Received` function with signature `onERC721Received(address,address,uint256,bytes)` and selector `0x150b7a02` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "onERC721Received", - abi = "onERC721Received(address,address,uint256,bytes)" - )] - pub struct OnERC721ReceivedCall { - pub operator: ::ethers::core::types::Address, - pub from: ::ethers::core::types::Address, - pub token_id: ::ethers::core::types::U256, - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all return fields from the `onERC721Received` function with signature `onERC721Received(address,address,uint256,bytes)` and selector `0x150b7a02` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct OnERC721ReceivedReturn(pub [u8; 4]); -} diff --git a/crates/src/lib.rs b/crates/src/lib.rs deleted file mode 100644 index 8409bd9..0000000 --- a/crates/src/lib.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![allow(clippy::all)] -//! This lib contains abigen! generated bindings for solidity contracts. -//! This is autogenerated code. -//! Do not manually edit these files. -//! These files may be overwritten by the codegen system at any time. -pub mod ierc165; -pub mod ierc20; -pub mod ierc721; -pub mod ierc721_enumerable; -pub mod ierc721_metadata; -pub mod ierc721_token_receiver; -pub mod metamodel; -pub mod mock_erc20; -pub mod mock_erc721; -pub mod model; -pub mod model_interface; -pub mod my_model_contract; -pub mod my_state_machine; -pub mod pflow_dsl; -pub mod shared_types; diff --git a/crates/src/metamodel.rs b/crates/src/metamodel.rs deleted file mode 100644 index a54531c..0000000 --- a/crates/src/metamodel.rs +++ /dev/null @@ -1,623 +0,0 @@ -pub use metamodel::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod metamodel { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("context"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("context"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedArray( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - 10usize, - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ], - ), - ), - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct Model.Head"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("latestBlocks"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("latestBlocks"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("sequence"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("sequence"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signal"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signal"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("action"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signalMany"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signalMany"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("actions"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalars"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256[]"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("SignaledEvent"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("SignaledEvent"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("role"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("actionId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static METAMODEL_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct Metamodel(::ethers::contract::Contract); - impl ::core::clone::Clone for Metamodel { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for Metamodel { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for Metamodel { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for Metamodel { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(Metamodel)).field(&self.address()).finish() - } - } - impl Metamodel { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - METAMODEL_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `context` (0xd0496d6a) function - pub fn context(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([208, 73, 109, 106], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `latestBlocks` (0x6ee376e6) function - pub fn latest_blocks( - &self, - p0: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([110, 227, 118, 230], p0) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `sequence` (0x529d15cc) function - pub fn sequence( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([82, 157, 21, 204], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signal` (0xddc3b187) function - pub fn signal( - &self, - action: u8, - scalar: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 195, 177, 135], (action, scalar)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signalMany` (0xfff01fe2) function - pub fn signal_many( - &self, - actions: ::std::vec::Vec, - scalars: ::std::vec::Vec<::ethers::core::types::U256>, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([255, 240, 31, 226], (actions, scalars)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `SignaledEvent` event - pub fn signaled_event_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for Metamodel { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "SignaledEvent", - abi = "SignaledEvent(uint8,uint8,uint256,uint256)" - )] - pub struct SignaledEventFilter { - #[ethevent(indexed)] - pub role: u8, - #[ethevent(indexed)] - pub action_id: u8, - #[ethevent(indexed)] - pub scalar: ::ethers::core::types::U256, - pub sequence: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "context", abi = "context()")] - pub struct ContextCall; - ///Container type for all input parameters for the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "latestBlocks", abi = "latestBlocks(uint256)")] - pub struct LatestBlocksCall(pub ::ethers::core::types::U256); - ///Container type for all input parameters for the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "sequence", abi = "sequence()")] - pub struct SequenceCall; - ///Container type for all input parameters for the `signal` function with signature `signal(uint8,uint256)` and selector `0xddc3b187` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signal", abi = "signal(uint8,uint256)")] - pub struct SignalCall { - pub action: u8, - pub scalar: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `signalMany` function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signalMany", abi = "signalMany(uint8[],uint256[])")] - pub struct SignalManyCall { - pub actions: ::std::vec::Vec, - pub scalars: ::std::vec::Vec<::ethers::core::types::U256>, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MetamodelCalls { - Context(ContextCall), - LatestBlocks(LatestBlocksCall), - Sequence(SequenceCall), - Signal(SignalCall), - SignalMany(SignalManyCall), - } - impl ::ethers::core::abi::AbiDecode for MetamodelCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Context(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::LatestBlocks(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Sequence(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Signal(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SignalMany(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for MetamodelCalls { - fn encode(self) -> Vec { - match self { - Self::Context(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::LatestBlocks(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Sequence(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Signal(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SignalMany(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for MetamodelCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Context(element) => ::core::fmt::Display::fmt(element, f), - Self::LatestBlocks(element) => ::core::fmt::Display::fmt(element, f), - Self::Sequence(element) => ::core::fmt::Display::fmt(element, f), - Self::Signal(element) => ::core::fmt::Display::fmt(element, f), - Self::SignalMany(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MetamodelCalls { - fn from(value: ContextCall) -> Self { - Self::Context(value) - } - } - impl ::core::convert::From for MetamodelCalls { - fn from(value: LatestBlocksCall) -> Self { - Self::LatestBlocks(value) - } - } - impl ::core::convert::From for MetamodelCalls { - fn from(value: SequenceCall) -> Self { - Self::Sequence(value) - } - } - impl ::core::convert::From for MetamodelCalls { - fn from(value: SignalCall) -> Self { - Self::Signal(value) - } - } - impl ::core::convert::From for MetamodelCalls { - fn from(value: SignalManyCall) -> Self { - Self::SignalMany(value) - } - } - ///Container type for all return fields from the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ContextReturn(pub Head); - ///Container type for all return fields from the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct LatestBlocksReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SequenceReturn(pub ::ethers::core::types::U256); -} diff --git a/crates/src/mock_erc20.rs b/crates/src/mock_erc20.rs deleted file mode 100644 index 27d958c..0000000 --- a/crates/src/mock_erc20.rs +++ /dev/null @@ -1,1443 +0,0 @@ -pub use mock_erc20::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod mock_erc20 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("DOMAIN_SEPARATOR"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("DOMAIN_SEPARATOR"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("allowance"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("allowance"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("decimals"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("decimals"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("initialize"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("initialize"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("name_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("symbol_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("decimals_"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("name"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("name"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("nonces"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("nonces"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("permit"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("permit"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("deadline"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("v"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("r"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("s"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 32usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes32"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("symbol"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("symbol"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("totalSupply"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("totalSupply"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("amount"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("value"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MOCKERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - #[rustfmt::skip] - const __BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[Pa\x0Eu\x80a\0 `\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xCFW`\x005`\xE0\x1C\x80c6D\xE5\x15\x11a\0\x8CW\x80c\x95\xD8\x9BA\x11a\0fW\x80c\x95\xD8\x9BA\x14a\x01\xB5W\x80c\xA9\x05\x9C\xBB\x14a\x01\xBDW\x80c\xD5\x05\xAC\xCF\x14a\x01\xD0W\x80c\xDDb\xED>\x14a\x01\xE3W`\0\x80\xFD[\x80c6D\xE5\x15\x14a\x01dW\x80cp\xA0\x821\x14a\x01lW\x80c~\xCE\xBE\0\x14a\x01\x95W`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xD4W\x80c\t^\xA7\xB3\x14a\0\xF2W\x80c\x16$\xF6\xC6\x14a\x01\x15W\x80c\x18\x16\r\xDD\x14a\x01*W\x80c#\xB8r\xDD\x14a\x01=`\0\xFD[PP`@Q`\x1F\x19\x01Q\x91PP`\x01`\x01`\xA0\x1B\x03\x81\x16\x15\x80\x15\x90a\x07RWP\x87`\x01`\x01`\xA0\x1B\x03\x16\x81`\x01`\x01`\xA0\x1B\x03\x16\x14[a\x07\x8FW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm$\xA7+ \xA6$\xA2/\xA9\xA4\xA3\xA7\"\xA9`\x91\x1B`D\x82\x01R`d\x01a\x03`V[`\x01`\x01`\xA0\x1B\x03\x81\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x8B\x85\x16\x80\x85R\x90\x83R\x92\x81\x90 \x8A\x90UQ\x89\x81R\x91\x92\x8B\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPPPPPPV[`\0a\tw\x80a\x08\x0Bc\xFF\xFF\xFF\xFF\x82\x16V[\x92PPP\x90V[`\0\x7F\x8Bs\xC3\xC6\x9B\xB8\xFE=Q.\xCCL\xF7Y\xCCy#\x9F{\x17\x9B\x0F\xFA\xCA\xA9\xA7]R+9@\x0F`\0`@Qa\x08D\x91\x90a\r\xA3V[`@Q\x80\x91\x03\x90 \x7F\xC8\x9E\xFD\xAAT\xC0\xF2\x0Cz\xDFa(\x82\xDF\tP\xF5\xA9Qc~\x03\x07\xCD\xCBLg/)\x8B\x8B\xC6a\x08ua\x07\xF9V[`@\x80Q` \x81\x01\x95\x90\x95R\x84\x01\x92\x90\x92R``\x83\x01R`\x80\x82\x01R0`\xA0\x82\x01R`\xC0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 \x90P\x90V[`\0\x81\x83\x10\x15a\t\x07W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FERC20: subtraction underflow\0\0\0\0`D\x82\x01R`d\x01a\x03`V[a\t\x11\x82\x84a\x0E\x19V[\x93\x92PPPV[`\0\x80a\t%\x83\x85a\x0E,V[\x90P\x83\x81\x10\x15a\t\x11W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x18`$\x82\x01R\x7FERC20: addition overflow\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03`V[F\x90V[`\0` \x80\x83R\x83Q\x80\x82\x85\x01R`\0[\x81\x81\x10\x15a\t\xA8W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\t\x8CV[P`\0`@\x82\x86\x01\x01R`@`\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\t\xF8W`\0\x80\xFD[a\n\x01\x83a\t\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0\x82`\x1F\x83\x01\x12a\n6W`\0\x80\xFD[\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\nQWa\nQa\n\x0FV[`@Q`\x1F\x83\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\nyWa\nya\n\x0FV[\x81`@R\x83\x81R\x86` \x85\x88\x01\x01\x11\x15a\n\x92W`\0\x80\xFD[\x83` \x87\x01` \x83\x017`\0` \x85\x83\x01\x01R\x80\x94PPPPP\x92\x91PPV[\x805`\xFF\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[`\0\x80`\0``\x84\x86\x03\x12\x15a\n\xD8W`\0\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\n\xF0W`\0\x80\xFD[a\n\xFC\x87\x83\x88\x01a\n%V[\x94P` \x86\x015\x91P\x80\x82\x11\x15a\x0B\x12W`\0\x80\xFD[Pa\x0B\x1F\x86\x82\x87\x01a\n%V[\x92PPa\x0B.`@\x85\x01a\n\xB2V[\x90P\x92P\x92P\x92V[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0BLW`\0\x80\xFD[a\x0BU\x84a\t\xC9V[\x92Pa\x0Bc` \x85\x01a\t\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\x0B\x85W`\0\x80\xFD[a\t\x11\x82a\t\xC9V[`\0\x80`\0\x80`\0\x80`\0`\xE0\x88\x8A\x03\x12\x15a\x0B\xA9W`\0\x80\xFD[a\x0B\xB2\x88a\t\xC9V[\x96Pa\x0B\xC0` \x89\x01a\t\xC9V[\x95P`@\x88\x015\x94P``\x88\x015\x93Pa\x0B\xDC`\x80\x89\x01a\n\xB2V[\x92P`\xA0\x88\x015\x91P`\xC0\x88\x015\x90P\x92\x95\x98\x91\x94\x97P\x92\x95PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x0BW`\0\x80\xFD[a\x0C\x14\x83a\t\xC9V[\x91Pa\x0C\"` \x84\x01a\t\xC9V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0C?W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x0C_WcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x0C\xAFW`\0\x81\x81R` \x81 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x0C\x8CWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x0C\xABW\x82\x81U`\x01\x01a\x0C\x98V[PPP[PPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xCEWa\x0C\xCEa\n\x0FV[a\x0C\xE2\x81a\x0C\xDC\x84Ta\x0C+V[\x84a\x0CeV[` \x80`\x1F\x83\x11`\x01\x81\x14a\r\x17W`\0\x84\x15a\x0C\xFFWP\x85\x83\x01Q[`\0\x19`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x0C\xABV[`\0\x85\x81R` \x81 `\x1F\x19\x86\x16\x91[\x82\x81\x10\x15a\rFW\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\r'V[P\x85\x82\x10\x15a\rdW\x87\x85\x01Q`\0\x19`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\r\x9CWa\r\x9Ca\rtV[P`\x01\x01\x90V[`\0\x80\x83Ta\r\xB1\x81a\x0C+V[`\x01\x82\x81\x16\x80\x15a\r\xC9W`\x01\x81\x14a\r\xDEWa\x0E\rV[`\xFF\x19\x84\x16\x87R\x82\x15\x15\x83\x02\x87\x01\x94Pa\x0E\rV[\x87`\0R` \x80`\0 `\0[\x85\x81\x10\x15a\x0E\x04W\x81T\x8A\x82\x01R\x90\x84\x01\x90\x82\x01a\r\xEBV[PPP\x82\x87\x01\x94P[P\x92\x96\x95PPPPPPV[\x81\x81\x03\x81\x81\x11\x15a\x03\x15Wa\x03\x15a\rtV[\x80\x82\x01\x80\x82\x11\x15a\x03\x15Wa\x03\x15a\rtV\xFE\xA2dipfsX\"\x12 \xA7\x1D\x19E/\xC8,\xBA\x84\xFC\xB8\xA0\x07k\x18\x825l\xCE\"\x88\xA8\x16\xE333L\xDF\xEE\xB5\xB4\xB6dsolcC\0\x08\x15\x003"; - /// The bytecode of the contract. - pub static MOCKERC20_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __BYTECODE, - ); - #[rustfmt::skip] - const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xCFW`\x005`\xE0\x1C\x80c6D\xE5\x15\x11a\0\x8CW\x80c\x95\xD8\x9BA\x11a\0fW\x80c\x95\xD8\x9BA\x14a\x01\xB5W\x80c\xA9\x05\x9C\xBB\x14a\x01\xBDW\x80c\xD5\x05\xAC\xCF\x14a\x01\xD0W\x80c\xDDb\xED>\x14a\x01\xE3W`\0\x80\xFD[\x80c6D\xE5\x15\x14a\x01dW\x80cp\xA0\x821\x14a\x01lW\x80c~\xCE\xBE\0\x14a\x01\x95W`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xD4W\x80c\t^\xA7\xB3\x14a\0\xF2W\x80c\x16$\xF6\xC6\x14a\x01\x15W\x80c\x18\x16\r\xDD\x14a\x01*W\x80c#\xB8r\xDD\x14a\x01=`\0\xFD[PP`@Q`\x1F\x19\x01Q\x91PP`\x01`\x01`\xA0\x1B\x03\x81\x16\x15\x80\x15\x90a\x07RWP\x87`\x01`\x01`\xA0\x1B\x03\x16\x81`\x01`\x01`\xA0\x1B\x03\x16\x14[a\x07\x8FW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm$\xA7+ \xA6$\xA2/\xA9\xA4\xA3\xA7\"\xA9`\x91\x1B`D\x82\x01R`d\x01a\x03`V[`\x01`\x01`\xA0\x1B\x03\x81\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x8B\x85\x16\x80\x85R\x90\x83R\x92\x81\x90 \x8A\x90UQ\x89\x81R\x91\x92\x8B\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPPPPPPV[`\0a\tw\x80a\x08\x0Bc\xFF\xFF\xFF\xFF\x82\x16V[\x92PPP\x90V[`\0\x7F\x8Bs\xC3\xC6\x9B\xB8\xFE=Q.\xCCL\xF7Y\xCCy#\x9F{\x17\x9B\x0F\xFA\xCA\xA9\xA7]R+9@\x0F`\0`@Qa\x08D\x91\x90a\r\xA3V[`@Q\x80\x91\x03\x90 \x7F\xC8\x9E\xFD\xAAT\xC0\xF2\x0Cz\xDFa(\x82\xDF\tP\xF5\xA9Qc~\x03\x07\xCD\xCBLg/)\x8B\x8B\xC6a\x08ua\x07\xF9V[`@\x80Q` \x81\x01\x95\x90\x95R\x84\x01\x92\x90\x92R``\x83\x01R`\x80\x82\x01R0`\xA0\x82\x01R`\xC0\x01`@Q` \x81\x83\x03\x03\x81R\x90`@R\x80Q\x90` \x01 \x90P\x90V[`\0\x81\x83\x10\x15a\t\x07W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FERC20: subtraction underflow\0\0\0\0`D\x82\x01R`d\x01a\x03`V[a\t\x11\x82\x84a\x0E\x19V[\x93\x92PPPV[`\0\x80a\t%\x83\x85a\x0E,V[\x90P\x83\x81\x10\x15a\t\x11W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x18`$\x82\x01R\x7FERC20: addition overflow\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x03`V[F\x90V[`\0` \x80\x83R\x83Q\x80\x82\x85\x01R`\0[\x81\x81\x10\x15a\t\xA8W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\t\x8CV[P`\0`@\x82\x86\x01\x01R`@`\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x92PPP\x92\x91PPV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\t\xF8W`\0\x80\xFD[a\n\x01\x83a\t\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0\x82`\x1F\x83\x01\x12a\n6W`\0\x80\xFD[\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\nQWa\nQa\n\x0FV[`@Q`\x1F\x83\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\nyWa\nya\n\x0FV[\x81`@R\x83\x81R\x86` \x85\x88\x01\x01\x11\x15a\n\x92W`\0\x80\xFD[\x83` \x87\x01` \x83\x017`\0` \x85\x83\x01\x01R\x80\x94PPPPP\x92\x91PPV[\x805`\xFF\x81\x16\x81\x14a\t\xE0W`\0\x80\xFD[`\0\x80`\0``\x84\x86\x03\x12\x15a\n\xD8W`\0\x80\xFD[\x835g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\n\xF0W`\0\x80\xFD[a\n\xFC\x87\x83\x88\x01a\n%V[\x94P` \x86\x015\x91P\x80\x82\x11\x15a\x0B\x12W`\0\x80\xFD[Pa\x0B\x1F\x86\x82\x87\x01a\n%V[\x92PPa\x0B.`@\x85\x01a\n\xB2V[\x90P\x92P\x92P\x92V[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0BLW`\0\x80\xFD[a\x0BU\x84a\t\xC9V[\x92Pa\x0Bc` \x85\x01a\t\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\x0B\x85W`\0\x80\xFD[a\t\x11\x82a\t\xC9V[`\0\x80`\0\x80`\0\x80`\0`\xE0\x88\x8A\x03\x12\x15a\x0B\xA9W`\0\x80\xFD[a\x0B\xB2\x88a\t\xC9V[\x96Pa\x0B\xC0` \x89\x01a\t\xC9V[\x95P`@\x88\x015\x94P``\x88\x015\x93Pa\x0B\xDC`\x80\x89\x01a\n\xB2V[\x92P`\xA0\x88\x015\x91P`\xC0\x88\x015\x90P\x92\x95\x98\x91\x94\x97P\x92\x95PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x0BW`\0\x80\xFD[a\x0C\x14\x83a\t\xC9V[\x91Pa\x0C\"` \x84\x01a\t\xC9V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0C?W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x0C_WcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\x1F\x82\x11\x15a\x0C\xAFW`\0\x81\x81R` \x81 `\x1F\x85\x01`\x05\x1C\x81\x01` \x86\x10\x15a\x0C\x8CWP\x80[`\x1F\x85\x01`\x05\x1C\x82\x01\x91P[\x81\x81\x10\x15a\x0C\xABW\x82\x81U`\x01\x01a\x0C\x98V[PPP[PPPV[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xCEWa\x0C\xCEa\n\x0FV[a\x0C\xE2\x81a\x0C\xDC\x84Ta\x0C+V[\x84a\x0CeV[` \x80`\x1F\x83\x11`\x01\x81\x14a\r\x17W`\0\x84\x15a\x0C\xFFWP\x85\x83\x01Q[`\0\x19`\x03\x86\x90\x1B\x1C\x19\x16`\x01\x85\x90\x1B\x17\x85Ua\x0C\xABV[`\0\x85\x81R` \x81 `\x1F\x19\x86\x16\x91[\x82\x81\x10\x15a\rFW\x88\x86\x01Q\x82U\x94\x84\x01\x94`\x01\x90\x91\x01\x90\x84\x01a\r'V[P\x85\x82\x10\x15a\rdW\x87\x85\x01Q`\0\x19`\x03\x88\x90\x1B`\xF8\x16\x1C\x19\x16\x81U[PPPPP`\x01\x90\x81\x1B\x01\x90UPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\r\x9CWa\r\x9Ca\rtV[P`\x01\x01\x90V[`\0\x80\x83Ta\r\xB1\x81a\x0C+V[`\x01\x82\x81\x16\x80\x15a\r\xC9W`\x01\x81\x14a\r\xDEWa\x0E\rV[`\xFF\x19\x84\x16\x87R\x82\x15\x15\x83\x02\x87\x01\x94Pa\x0E\rV[\x87`\0R` \x80`\0 `\0[\x85\x81\x10\x15a\x0E\x04W\x81T\x8A\x82\x01R\x90\x84\x01\x90\x82\x01a\r\xEBV[PPP\x82\x87\x01\x94P[P\x92\x96\x95PPPPPPV[\x81\x81\x03\x81\x81\x11\x15a\x03\x15Wa\x03\x15a\rtV[\x80\x82\x01\x80\x82\x11\x15a\x03\x15Wa\x03\x15a\rtV\xFE\xA2dipfsX\"\x12 \xA7\x1D\x19E/\xC8,\xBA\x84\xFC\xB8\xA0\x07k\x18\x825l\xCE\"\x88\xA8\x16\xE333L\xDF\xEE\xB5\xB4\xB6dsolcC\0\x08\x15\x003"; - /// The deployed bytecode of the contract. - pub static MOCKERC20_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __DEPLOYED_BYTECODE, - ); - pub struct MockERC20(::ethers::contract::Contract); - impl ::core::clone::Clone for MockERC20 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for MockERC20 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for MockERC20 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for MockERC20 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(MockERC20)).field(&self.address()).finish() - } - } - impl MockERC20 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MOCKERC20_ABI.clone(), - client, - ), - ) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - MOCKERC20_ABI.clone(), - MOCKERC20_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - ///Calls the contract's `DOMAIN_SEPARATOR` (0x3644e515) function - pub fn domain_separator( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([54, 68, 229, 21], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `allowance` (0xdd62ed3e) function - pub fn allowance( - &self, - owner: ::ethers::core::types::Address, - spender: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 98, 237, 62], (owner, spender)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - spender: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (spender, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], owner) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `decimals` (0x313ce567) function - pub fn decimals(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([49, 60, 229, 103], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `initialize` (0x1624f6c6) function - pub fn initialize( - &self, - name: ::std::string::String, - symbol: ::std::string::String, - decimals: u8, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([22, 36, 246, 198], (name, symbol, decimals)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `name` (0x06fdde03) function - pub fn name( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([6, 253, 222, 3], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `nonces` (0x7ecebe00) function - pub fn nonces( - &self, - p0: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([126, 206, 190, 0], p0) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `permit` (0xd505accf) function - pub fn permit( - &self, - owner: ::ethers::core::types::Address, - spender: ::ethers::core::types::Address, - value: ::ethers::core::types::U256, - deadline: ::ethers::core::types::U256, - v: u8, - r: [u8; 32], - s: [u8; 32], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash( - [213, 5, 172, 207], - (owner, spender, value, deadline, v, r, s), - ) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `symbol` (0x95d89b41) function - pub fn symbol( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([149, 216, 155, 65], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `totalSupply` (0x18160ddd) function - pub fn total_supply( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([24, 22, 13, 221], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transfer` (0xa9059cbb) function - pub fn transfer( - &self, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([169, 5, 156, 187], (to, amount)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - amount: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, amount)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - MockERC20Events, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for MockERC20 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub spender: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MockERC20Events { - ApprovalFilter(ApprovalFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for MockERC20Events { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(MockERC20Events::ApprovalFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(MockERC20Events::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for MockERC20Events { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MockERC20Events { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for MockERC20Events { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `DOMAIN_SEPARATOR` function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "DOMAIN_SEPARATOR", abi = "DOMAIN_SEPARATOR()")] - pub struct DomainSeparatorCall; - ///Container type for all input parameters for the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "allowance", abi = "allowance(address,address)")] - pub struct AllowanceCall { - pub owner: ::ethers::core::types::Address, - pub spender: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub spender: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "decimals", abi = "decimals()")] - pub struct DecimalsCall; - ///Container type for all input parameters for the `initialize` function with signature `initialize(string,string,uint8)` and selector `0x1624f6c6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "initialize", abi = "initialize(string,string,uint8)")] - pub struct InitializeCall { - pub name: ::std::string::String, - pub symbol: ::std::string::String, - pub decimals: u8, - } - ///Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "name", abi = "name()")] - pub struct NameCall; - ///Container type for all input parameters for the `nonces` function with signature `nonces(address)` and selector `0x7ecebe00` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "nonces", abi = "nonces(address)")] - pub struct NoncesCall(pub ::ethers::core::types::Address); - ///Container type for all input parameters for the `permit` function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "permit", - abi = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)" - )] - pub struct PermitCall { - pub owner: ::ethers::core::types::Address, - pub spender: ::ethers::core::types::Address, - pub value: ::ethers::core::types::U256, - pub deadline: ::ethers::core::types::U256, - pub v: u8, - pub r: [u8; 32], - pub s: [u8; 32], - } - ///Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "symbol", abi = "symbol()")] - pub struct SymbolCall; - ///Container type for all input parameters for the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "totalSupply", abi = "totalSupply()")] - pub struct TotalSupplyCall; - ///Container type for all input parameters for the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transfer", abi = "transfer(address,uint256)")] - pub struct TransferCall { - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub amount: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MockERC20Calls { - DomainSeparator(DomainSeparatorCall), - Allowance(AllowanceCall), - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - Decimals(DecimalsCall), - Initialize(InitializeCall), - Name(NameCall), - Nonces(NoncesCall), - Permit(PermitCall), - Symbol(SymbolCall), - TotalSupply(TotalSupplyCall), - Transfer(TransferCall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for MockERC20Calls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::DomainSeparator(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Allowance(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Decimals(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Initialize(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Name(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Nonces(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Permit(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Symbol(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TotalSupply(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Transfer(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for MockERC20Calls { - fn encode(self) -> Vec { - match self { - Self::DomainSeparator(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Allowance(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Decimals(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Initialize(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Nonces(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Permit(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TotalSupply(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Transfer(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for MockERC20Calls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::DomainSeparator(element) => ::core::fmt::Display::fmt(element, f), - Self::Allowance(element) => ::core::fmt::Display::fmt(element, f), - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::Decimals(element) => ::core::fmt::Display::fmt(element, f), - Self::Initialize(element) => ::core::fmt::Display::fmt(element, f), - Self::Name(element) => ::core::fmt::Display::fmt(element, f), - Self::Nonces(element) => ::core::fmt::Display::fmt(element, f), - Self::Permit(element) => ::core::fmt::Display::fmt(element, f), - Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), - Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f), - Self::Transfer(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: DomainSeparatorCall) -> Self { - Self::DomainSeparator(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: AllowanceCall) -> Self { - Self::Allowance(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: DecimalsCall) -> Self { - Self::Decimals(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: InitializeCall) -> Self { - Self::Initialize(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: NameCall) -> Self { - Self::Name(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: NoncesCall) -> Self { - Self::Nonces(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: PermitCall) -> Self { - Self::Permit(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: SymbolCall) -> Self { - Self::Symbol(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: TotalSupplyCall) -> Self { - Self::TotalSupply(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: TransferCall) -> Self { - Self::Transfer(value) - } - } - impl ::core::convert::From for MockERC20Calls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `DOMAIN_SEPARATOR` function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DomainSeparatorReturn(pub [u8; 32]); - ///Container type for all return fields from the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct AllowanceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ApproveReturn(pub bool); - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `decimals` function with signature `decimals()` and selector `0x313ce567` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct DecimalsReturn(pub u8); - ///Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NameReturn(pub ::std::string::String); - ///Container type for all return fields from the `nonces` function with signature `nonces(address)` and selector `0x7ecebe00` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NoncesReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SymbolReturn(pub ::std::string::String); - ///Container type for all return fields from the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TotalSupplyReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferReturn(pub bool); - ///Container type for all return fields from the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TransferFromReturn(pub bool); -} diff --git a/crates/src/mock_erc721.rs b/crates/src/mock_erc721.rs deleted file mode 100644 index a705596..0000000 --- a/crates/src/mock_erc721.rs +++ /dev/null @@ -1,1529 +0,0 @@ -pub use mock_erc721::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod mock_erc721 { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("approve"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("approve"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("spender"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("balanceOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("balanceOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("getApproved"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("getApproved"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("initialize"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("initialize"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("name_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("symbol_"), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("isApprovedForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("name"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("name"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ownerOf"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("ownerOf"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("safeTransferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("data"), - kind: ::ethers::core::abi::ethabi::ParamType::Bytes, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("setApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("supportsInterface"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("supportsInterface"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("interfaceId"), - kind: ::ethers::core::abi::ethabi::ParamType::FixedBytes( - 4usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bytes4"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("bool"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("symbol"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("symbol"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("tokenURI"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("tokenURI"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::String, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("string"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("transferFrom"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("transferFrom"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("address"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("id"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::Payable, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("Approval"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Approval"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("ApprovalForAll"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_owner"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_operator"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_approved"), - kind: ::ethers::core::abi::ethabi::ParamType::Bool, - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("Transfer"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("Transfer"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_from"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_to"), - kind: ::ethers::core::abi::ethabi::ParamType::Address, - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("_tokenId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MOCKERC721_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - #[rustfmt::skip] - const __BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[Pa\x0Fz\x80a\0 `\09`\0\xF3\xFE`\x80`@R`\x046\x10a\0\xDDW`\x005`\xE0\x1C\x80ccR!\x1E\x11a\0\x7FW\x80c\xA2,\xB4e\x11a\0YW\x80c\xA2,\xB4e\x14a\x02EW\x80c\xB8\x8DO\xDE\x14a\x02eW\x80c\xC8{V\xDD\x14a\x02xW\x80c\xE9\x85\xE9\xC5\x14a\x02\x99W`\0\x80\xFD[\x80ccR!\x1E\x14a\x01\xE2W\x80cp\xA0\x821\x14a\x02\x02W\x80c\x95\xD8\x9BA\x14a\x020W`\0\x80\xFD[\x80c\t^\xA7\xB3\x11a\0\xBBW\x80c\t^\xA7\xB3\x14a\x01\x87W\x80c#\xB8r\xDD\x14a\x01\x9CW\x80cB\x84.\x0E\x14a\x01\xAFW\x80cL\xD8\x8Bv\x14a\x01\xC2W`\0\x80\xFD[\x80c\x01\xFF\xC9\xA7\x14a\0\xE2W\x80c\x06\xFD\xDE\x03\x14a\x01\x17W\x80c\x08\x18\x12\xFC\x14a\x019W[`\0\x80\xFD[4\x80\x15a\0\xEEW`\0\x80\xFD[Pa\x01\x02a\0\xFD6`\x04a\n3V[a\x02\xE2V[`@Q\x90\x15\x15\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[4\x80\x15a\x01#W`\0\x80\xFD[Pa\x01,a\x034V[`@Qa\x01\x0E\x91\x90a\n\x9DV[4\x80\x15a\x01EW`\0\x80\xFD[Pa\x01oa\x01T6`\x04a\n\xB0V[`\0\x90\x81R`\x04` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x16\x90V[`@Q`\x01`\x01`\xA0\x1B\x03\x90\x91\x16\x81R` \x01a\x01\x0EV[a\x01\x9Aa\x01\x956`\x04a\n\xE0V[a\x03\xC6V[\0[a\x01\x9Aa\x01\xAA6`\x04a\x0B\nV[a\x04\xADV[a\x01\x9Aa\x01\xBD6`\x04a\x0B\nV[a\x06\xA6V[4\x80\x15a\x01\xCEW`\0\x80\xFD[Pa\x01\x9Aa\x01\xDD6`\x04a\x0B\xF2V[a\x07\x95V[4\x80\x15a\x01\xEEW`\0\x80\xFD[Pa\x01oa\x01\xFD6`\x04a\n\xB0V[a\x08\tV[4\x80\x15a\x02\x0EW`\0\x80\xFD[Pa\x02\"a\x02\x1D6`\x04a\x0CVV[a\x08`V[`@Q\x90\x81R` \x01a\x01\x0EV[4\x80\x15a\x02V[4\x80\x15a\x02\x84W`\0\x80\xFD[Pa\x01,a\x02\x936`\x04a\n\xB0V[P``\x90V[4\x80\x15a\x02\xA5W`\0\x80\xFD[Pa\x01\x02a\x02\xB46`\x04a\r)V[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T`\xFF\x16\x90V[`\0c\x01\xFF\xC9\xA7`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14\x80a\x03\x13WPc\x80\xACX\xCD`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x80a\x03.WPc[^\x13\x9F`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x92\x91PPV[```\0\x80Ta\x03C\x90a\r\\V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03o\x90a\r\\V[\x80\x15a\x03\xBCW\x80`\x1F\x10a\x03\x91Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xBCV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\x9FW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x81\x14\x80a\x04\x0FWP`\x01`\x01`\xA0\x1B\x03\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[a\x04QW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0\x82\x81R`\x04` R`@\x80\x82 \x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x87\x81\x16\x91\x82\x17\x90\x92U\x91Q\x85\x93\x91\x85\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\xA4PPPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x84\x81\x16\x91\x16\x14a\x05\x03W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01RiWRONG_FROM`\xB0\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x05MW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x11`$\x82\x01Rp\x12S\x95\x90S\x12Q\x17\xD4\x91P\xD2T\x12QS\x95`z\x1B`D\x82\x01R`d\x01a\x04HV[3`\x01`\x01`\xA0\x1B\x03\x84\x16\x14\x80a\x05\x87WP`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[\x80a\x05\xA8WP`\0\x81\x81R`\x04` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x14[a\x05\xE5W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x06\t\x83a\r\xACV[\x90\x91UPP`\x01`\x01`\xA0\x1B\x03\x82\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x062\x83a\r\xC3V[\x90\x91UPP`\0\x81\x81R`\x02` \x90\x81R`@\x80\x83 \x80T`\x01`\x01`\xA0\x1B\x03\x80\x88\x16`\x01`\x01`\xA0\x1B\x03\x19\x92\x83\x16\x81\x17\x90\x93U`\x04\x90\x94R\x82\x85 \x80T\x90\x91\x16\x90U\x90Q\x84\x93\x91\x92\x87\x16\x91\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\xA4PPPV[a\x06\xB1\x83\x83\x83a\x04\xADV[\x81;\x15\x80a\x07QWP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R3`\x04\x83\x01R`\x01`\x01`\xA0\x1B\x03\x85\x81\x16`$\x84\x01R`D\x83\x01\x84\x90R`\x80`d\x84\x01R`\0`\x84\x84\x01R\x90\x91\x90\x84\x16\x90c\x15\x0Bz\x02\x90`\xA4\x01` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\x07!W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x07E\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\x07\x90W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPV[`\x06T`\xFF\x16\x15a\x07\xDEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x13`$\x82\x01Rr\x10S\x14\x91PQ\x16W\xD2S\x92U\x12PS\x12V\x91Q`j\x1B`D\x82\x01R`d\x01a\x04HV[`\0a\x07\xEA\x83\x82a\x0EGV[P`\x01a\x07\xF7\x82\x82a\x0EGV[PP`\x06\x80T`\xFF\x19\x16`\x01\x17\x90UPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x16\x80a\x08[W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01Ri\x13\x93\xD5\x17\xD3RS\x95\x11Q`\xB2\x1B`D\x82\x01R`d\x01a\x04HV[\x91\x90PV[`\0`\x01`\x01`\xA0\x1B\x03\x82\x16a\x08\xA7W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0C`$\x82\x01RkZERO_ADDRESS`\xA0\x1B`D\x82\x01R`d\x01a\x04HV[P`\x01`\x01`\xA0\x1B\x03\x16`\0\x90\x81R`\x03` R`@\x90 T\x90V[```\x01\x80Ta\x03C\x90a\r\\V[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 `\x01`\x01`\xA0\x1B\x03\x87\x16\x80\x85R\x90\x83R\x92\x81\x90 \x80T`\xFF\x19\x16\x86\x15\x15\x90\x81\x17\x90\x91U\x90Q\x90\x81R\x91\x92\x91\x7F\x170~\xAB9\xABa\x07\xE8\x89\x98E\xAD=Y\xBD\x96S\xF2\0\xF2 \x92\x04\x89\xCA+Y7il1\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[a\tI\x84\x84\x84a\x04\xADV[\x82;\x15\x80a\t\xD5WP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R\x90`\x01`\x01`\xA0\x1B\x03\x85\x16\x90c\x15\x0Bz\x02\x90a\t\x86\x903\x90\x89\x90\x88\x90\x88\x90`\x04\x01a\x0F\x07V[` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\t\xA5W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t\xC9\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\n\x14W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPPV[`\x01`\x01`\xE0\x1B\x03\x19\x81\x16\x81\x14a\n0W`\0\x80\xFD[PV[`\0` \x82\x84\x03\x12\x15a\nEW`\0\x80\xFD[\x815a\nP\x81a\n\x1AV[\x93\x92PPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\n}W` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\naV[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[` \x81R`\0a\nP` \x83\x01\x84a\nWV[`\0` \x82\x84\x03\x12\x15a\n\xC2W`\0\x80\xFD[P5\x91\x90PV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x08[W`\0\x80\xFD[`\0\x80`@\x83\x85\x03\x12\x15a\n\xF3W`\0\x80\xFD[a\n\xFC\x83a\n\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0B\x1FW`\0\x80\xFD[a\x0B(\x84a\n\xC9V[\x92Pa\x0B6` \x85\x01a\n\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x11\x15a\x0BwWa\x0Bwa\x0BFV[`@Q`\x1F\x85\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\x0B\x9FWa\x0B\x9Fa\x0BFV[\x81`@R\x80\x93P\x85\x81R\x86\x86\x86\x01\x11\x15a\x0B\xB8W`\0\x80\xFD[\x85\x85` \x83\x017`\0` \x87\x83\x01\x01RPPP\x93\x92PPPV[`\0\x82`\x1F\x83\x01\x12a\x0B\xE3W`\0\x80\xFD[a\nP\x83\x835` \x85\x01a\x0B\\V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x05W`\0\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0C\x1DW`\0\x80\xFD[a\x0C)\x86\x83\x87\x01a\x0B\xD2V[\x93P` \x85\x015\x91P\x80\x82\x11\x15a\x0C?W`\0\x80\xFD[Pa\x0CL\x85\x82\x86\x01a\x0B\xD2V[\x91PP\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x0ChW`\0\x80\xFD[a\nP\x82a\n\xC9V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x84W`\0\x80\xFD[a\x0C\x8D\x83a\n\xC9V[\x91P` \x83\x015\x80\x15\x15\x81\x14a\x0C\xA2W`\0\x80\xFD[\x80\x91PP\x92P\x92\x90PV[`\0\x80`\0\x80`\x80\x85\x87\x03\x12\x15a\x0C\xC3W`\0\x80\xFD[a\x0C\xCC\x85a\n\xC9V[\x93Pa\x0C\xDA` \x86\x01a\n\xC9V[\x92P`@\x85\x015\x91P``\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xFDW`\0\x80\xFD[\x85\x01`\x1F\x81\x01\x87\x13a\r\x0EW`\0\x80\xFD[a\r\x1D\x87\x825` \x84\x01a\x0B\\V[\x91PP\x92\x95\x91\x94P\x92PV[`\0\x80`@\x83\x85\x03\x12\x15a\rV[4\x80\x15a\x02\x84W`\0\x80\xFD[Pa\x01,a\x02\x936`\x04a\n\xB0V[P``\x90V[4\x80\x15a\x02\xA5W`\0\x80\xFD[Pa\x01\x02a\x02\xB46`\x04a\r)V[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T`\xFF\x16\x90V[`\0c\x01\xFF\xC9\xA7`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14\x80a\x03\x13WPc\x80\xACX\xCD`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x80a\x03.WPc[^\x13\x9F`\xE0\x1B`\x01`\x01`\xE0\x1B\x03\x19\x83\x16\x14[\x92\x91PPV[```\0\x80Ta\x03C\x90a\r\\V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03o\x90a\r\\V[\x80\x15a\x03\xBCW\x80`\x1F\x10a\x03\x91Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xBCV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\x9FW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x81\x14\x80a\x04\x0FWP`\x01`\x01`\xA0\x1B\x03\x81\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[a\x04QW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0\x82\x81R`\x04` R`@\x80\x82 \x80T`\x01`\x01`\xA0\x1B\x03\x19\x16`\x01`\x01`\xA0\x1B\x03\x87\x81\x16\x91\x82\x17\x90\x92U\x91Q\x85\x93\x91\x85\x16\x91\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\xA4PPPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x84\x81\x16\x91\x16\x14a\x05\x03W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01RiWRONG_FROM`\xB0\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x05MW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x11`$\x82\x01Rp\x12S\x95\x90S\x12Q\x17\xD4\x91P\xD2T\x12QS\x95`z\x1B`D\x82\x01R`d\x01a\x04HV[3`\x01`\x01`\xA0\x1B\x03\x84\x16\x14\x80a\x05\x87WP`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x05` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T`\xFF\x16[\x80a\x05\xA8WP`\0\x81\x81R`\x04` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x163\x14[a\x05\xE5W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm\x13\x93\xD5\x17\xD0UU\x12\x13\xD4\x92V\x91Q`\x92\x1B`D\x82\x01R`d\x01a\x04HV[`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x06\t\x83a\r\xACV[\x90\x91UPP`\x01`\x01`\xA0\x1B\x03\x82\x16`\0\x90\x81R`\x03` R`@\x81 \x80T\x91a\x062\x83a\r\xC3V[\x90\x91UPP`\0\x81\x81R`\x02` \x90\x81R`@\x80\x83 \x80T`\x01`\x01`\xA0\x1B\x03\x80\x88\x16`\x01`\x01`\xA0\x1B\x03\x19\x92\x83\x16\x81\x17\x90\x93U`\x04\x90\x94R\x82\x85 \x80T\x90\x91\x16\x90U\x90Q\x84\x93\x91\x92\x87\x16\x91\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\xA4PPPV[a\x06\xB1\x83\x83\x83a\x04\xADV[\x81;\x15\x80a\x07QWP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R3`\x04\x83\x01R`\x01`\x01`\xA0\x1B\x03\x85\x81\x16`$\x84\x01R`D\x83\x01\x84\x90R`\x80`d\x84\x01R`\0`\x84\x84\x01R\x90\x91\x90\x84\x16\x90c\x15\x0Bz\x02\x90`\xA4\x01` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\x07!W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x07E\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\x07\x90W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPV[`\x06T`\xFF\x16\x15a\x07\xDEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x13`$\x82\x01Rr\x10S\x14\x91PQ\x16W\xD2S\x92U\x12PS\x12V\x91Q`j\x1B`D\x82\x01R`d\x01a\x04HV[`\0a\x07\xEA\x83\x82a\x0EGV[P`\x01a\x07\xF7\x82\x82a\x0EGV[PP`\x06\x80T`\xFF\x19\x16`\x01\x17\x90UPV[`\0\x81\x81R`\x02` R`@\x90 T`\x01`\x01`\xA0\x1B\x03\x16\x80a\x08[W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\n`$\x82\x01Ri\x13\x93\xD5\x17\xD3RS\x95\x11Q`\xB2\x1B`D\x82\x01R`d\x01a\x04HV[\x91\x90PV[`\0`\x01`\x01`\xA0\x1B\x03\x82\x16a\x08\xA7W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0C`$\x82\x01RkZERO_ADDRESS`\xA0\x1B`D\x82\x01R`d\x01a\x04HV[P`\x01`\x01`\xA0\x1B\x03\x16`\0\x90\x81R`\x03` R`@\x90 T\x90V[```\x01\x80Ta\x03C\x90a\r\\V[3`\0\x81\x81R`\x05` \x90\x81R`@\x80\x83 `\x01`\x01`\xA0\x1B\x03\x87\x16\x80\x85R\x90\x83R\x92\x81\x90 \x80T`\xFF\x19\x16\x86\x15\x15\x90\x81\x17\x90\x91U\x90Q\x90\x81R\x91\x92\x91\x7F\x170~\xAB9\xABa\x07\xE8\x89\x98E\xAD=Y\xBD\x96S\xF2\0\xF2 \x92\x04\x89\xCA+Y7il1\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[a\tI\x84\x84\x84a\x04\xADV[\x82;\x15\x80a\t\xD5WP`@Qc\n\x85\xBD\x01`\xE1\x1B\x80\x82R\x90`\x01`\x01`\xA0\x1B\x03\x85\x16\x90c\x15\x0Bz\x02\x90a\t\x86\x903\x90\x89\x90\x88\x90\x88\x90`\x04\x01a\x0F\x07V[` `@Q\x80\x83\x03\x81`\0\x87Z\xF1\x15\x80\x15a\t\xA5W=`\0\x80>=`\0\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\t\xC9\x91\x90a\r\xDCV[`\x01`\x01`\xE0\x1B\x03\x19\x16\x14[a\n\x14W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x10`$\x82\x01Ro\x15S\x94\xD0Q\x91W\xD4\x91P\xD2T\x12QS\x95`\x82\x1B`D\x82\x01R`d\x01a\x04HV[PPPPV[`\x01`\x01`\xE0\x1B\x03\x19\x81\x16\x81\x14a\n0W`\0\x80\xFD[PV[`\0` \x82\x84\x03\x12\x15a\nEW`\0\x80\xFD[\x815a\nP\x81a\n\x1AV[\x93\x92PPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\n}W` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\naV[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[` \x81R`\0a\nP` \x83\x01\x84a\nWV[`\0` \x82\x84\x03\x12\x15a\n\xC2W`\0\x80\xFD[P5\x91\x90PV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x08[W`\0\x80\xFD[`\0\x80`@\x83\x85\x03\x12\x15a\n\xF3W`\0\x80\xFD[a\n\xFC\x83a\n\xC9V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\x0B\x1FW`\0\x80\xFD[a\x0B(\x84a\n\xC9V[\x92Pa\x0B6` \x85\x01a\n\xC9V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x11\x15a\x0BwWa\x0Bwa\x0BFV[`@Q`\x1F\x85\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15a\x0B\x9FWa\x0B\x9Fa\x0BFV[\x81`@R\x80\x93P\x85\x81R\x86\x86\x86\x01\x11\x15a\x0B\xB8W`\0\x80\xFD[\x85\x85` \x83\x017`\0` \x87\x83\x01\x01RPPP\x93\x92PPPV[`\0\x82`\x1F\x83\x01\x12a\x0B\xE3W`\0\x80\xFD[a\nP\x83\x835` \x85\x01a\x0B\\V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x05W`\0\x80\xFD[\x825g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0C\x1DW`\0\x80\xFD[a\x0C)\x86\x83\x87\x01a\x0B\xD2V[\x93P` \x85\x015\x91P\x80\x82\x11\x15a\x0C?W`\0\x80\xFD[Pa\x0CL\x85\x82\x86\x01a\x0B\xD2V[\x91PP\x92P\x92\x90PV[`\0` \x82\x84\x03\x12\x15a\x0ChW`\0\x80\xFD[a\nP\x82a\n\xC9V[`\0\x80`@\x83\x85\x03\x12\x15a\x0C\x84W`\0\x80\xFD[a\x0C\x8D\x83a\n\xC9V[\x91P` \x83\x015\x80\x15\x15\x81\x14a\x0C\xA2W`\0\x80\xFD[\x80\x91PP\x92P\x92\x90PV[`\0\x80`\0\x80`\x80\x85\x87\x03\x12\x15a\x0C\xC3W`\0\x80\xFD[a\x0C\xCC\x85a\n\xC9V[\x93Pa\x0C\xDA` \x86\x01a\n\xC9V[\x92P`@\x85\x015\x91P``\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0C\xFDW`\0\x80\xFD[\x85\x01`\x1F\x81\x01\x87\x13a\r\x0EW`\0\x80\xFD[a\r\x1D\x87\x825` \x84\x01a\x0B\\V[\x91PP\x92\x95\x91\x94P\x92PV[`\0\x80`@\x83\x85\x03\x12\x15a\r(::ethers::contract::Contract); - impl ::core::clone::Clone for MockERC721 { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for MockERC721 { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for MockERC721 { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for MockERC721 { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(MockERC721)).field(&self.address()).finish() - } - } - impl MockERC721 { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MOCKERC721_ABI.clone(), - client, - ), - ) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - MOCKERC721_ABI.clone(), - MOCKERC721_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - ///Calls the contract's `approve` (0x095ea7b3) function - pub fn approve( - &self, - spender: ::ethers::core::types::Address, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([9, 94, 167, 179], (spender, id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `balanceOf` (0x70a08231) function - pub fn balance_of( - &self, - owner: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([112, 160, 130, 49], owner) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `getApproved` (0x081812fc) function - pub fn get_approved( - &self, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([8, 24, 18, 252], id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `initialize` (0x4cd88b76) function - pub fn initialize( - &self, - name: ::std::string::String, - symbol: ::std::string::String, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([76, 216, 139, 118], (name, symbol)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `isApprovedForAll` (0xe985e9c5) function - pub fn is_approved_for_all( - &self, - owner: ::ethers::core::types::Address, - operator: ::ethers::core::types::Address, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([233, 133, 233, 197], (owner, operator)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `name` (0x06fdde03) function - pub fn name( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([6, 253, 222, 3], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `ownerOf` (0x6352211e) function - pub fn owner_of( - &self, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall< - M, - ::ethers::core::types::Address, - > { - self.0 - .method_hash([99, 82, 33, 30], id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0x42842e0e) function - pub fn safe_transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([66, 132, 46, 14], (from, to, id)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `safeTransferFrom` (0xb88d4fde) function - pub fn safe_transfer_from_with_from_and_to_and_data( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - id: ::ethers::core::types::U256, - data: ::ethers::core::types::Bytes, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([184, 141, 79, 222], (from, to, id, data)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `setApprovalForAll` (0xa22cb465) function - pub fn set_approval_for_all( - &self, - operator: ::ethers::core::types::Address, - approved: bool, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([162, 44, 180, 101], (operator, approved)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `supportsInterface` (0x01ffc9a7) function - pub fn supports_interface( - &self, - interface_id: [u8; 4], - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([1, 255, 201, 167], interface_id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `symbol` (0x95d89b41) function - pub fn symbol( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([149, 216, 155, 65], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `tokenURI` (0xc87b56dd) function - pub fn token_uri( - &self, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([200, 123, 86, 221], id) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `transferFrom` (0x23b872dd) function - pub fn transfer_from( - &self, - from: ::ethers::core::types::Address, - to: ::ethers::core::types::Address, - id: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([35, 184, 114, 221], (from, to, id)) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `Approval` event - pub fn approval_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalFilter, - > { - self.0.event() - } - ///Gets the contract's `ApprovalForAll` event - pub fn approval_for_all_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - ApprovalForAllFilter, - > { - self.0.event() - } - ///Gets the contract's `Transfer` event - pub fn transfer_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - TransferFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - MockERC721Events, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for MockERC721 { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")] - pub struct ApprovalFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub approved: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")] - pub struct ApprovalForAllFilter { - #[ethevent(indexed)] - pub owner: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")] - pub struct TransferFilter { - #[ethevent(indexed)] - pub from: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub to: ::ethers::core::types::Address, - #[ethevent(indexed)] - pub token_id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's events - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MockERC721Events { - ApprovalFilter(ApprovalFilter), - ApprovalForAllFilter(ApprovalForAllFilter), - TransferFilter(TransferFilter), - } - impl ::ethers::contract::EthLogDecode for MockERC721Events { - fn decode_log( - log: &::ethers::core::abi::RawLog, - ) -> ::core::result::Result { - if let Ok(decoded) = ApprovalFilter::decode_log(log) { - return Ok(MockERC721Events::ApprovalFilter(decoded)); - } - if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) { - return Ok(MockERC721Events::ApprovalForAllFilter(decoded)); - } - if let Ok(decoded) = TransferFilter::decode_log(log) { - return Ok(MockERC721Events::TransferFilter(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData) - } - } - impl ::core::fmt::Display for MockERC721Events { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f), - Self::ApprovalForAllFilter(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MockERC721Events { - fn from(value: ApprovalFilter) -> Self { - Self::ApprovalFilter(value) - } - } - impl ::core::convert::From for MockERC721Events { - fn from(value: ApprovalForAllFilter) -> Self { - Self::ApprovalForAllFilter(value) - } - } - impl ::core::convert::From for MockERC721Events { - fn from(value: TransferFilter) -> Self { - Self::TransferFilter(value) - } - } - ///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "approve", abi = "approve(address,uint256)")] - pub struct ApproveCall { - pub spender: ::ethers::core::types::Address, - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "balanceOf", abi = "balanceOf(address)")] - pub struct BalanceOfCall { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "getApproved", abi = "getApproved(uint256)")] - pub struct GetApprovedCall { - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `initialize` function with signature `initialize(string,string)` and selector `0x4cd88b76` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "initialize", abi = "initialize(string,string)")] - pub struct InitializeCall { - pub name: ::std::string::String, - pub symbol: ::std::string::String, - } - ///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")] - pub struct IsApprovedForAllCall { - pub owner: ::ethers::core::types::Address, - pub operator: ::ethers::core::types::Address, - } - ///Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "name", abi = "name()")] - pub struct NameCall; - ///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")] - pub struct OwnerOfCall { - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256)" - )] - pub struct SafeTransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall( - name = "safeTransferFrom", - abi = "safeTransferFrom(address,address,uint256,bytes)" - )] - pub struct SafeTransferFromWithFromAndToAndDataCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub id: ::ethers::core::types::U256, - pub data: ::ethers::core::types::Bytes, - } - ///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")] - pub struct SetApprovalForAllCall { - pub operator: ::ethers::core::types::Address, - pub approved: bool, - } - ///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")] - pub struct SupportsInterfaceCall { - pub interface_id: [u8; 4], - } - ///Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "symbol", abi = "symbol()")] - pub struct SymbolCall; - ///Container type for all input parameters for the `tokenURI` function with signature `tokenURI(uint256)` and selector `0xc87b56dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "tokenURI", abi = "tokenURI(uint256)")] - pub struct TokenURICall { - pub id: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")] - pub struct TransferFromCall { - pub from: ::ethers::core::types::Address, - pub to: ::ethers::core::types::Address, - pub id: ::ethers::core::types::U256, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MockERC721Calls { - Approve(ApproveCall), - BalanceOf(BalanceOfCall), - GetApproved(GetApprovedCall), - Initialize(InitializeCall), - IsApprovedForAll(IsApprovedForAllCall), - Name(NameCall), - OwnerOf(OwnerOfCall), - SafeTransferFrom(SafeTransferFromCall), - SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall), - SetApprovalForAll(SetApprovalForAllCall), - SupportsInterface(SupportsInterfaceCall), - Symbol(SymbolCall), - TokenURI(TokenURICall), - TransferFrom(TransferFromCall), - } - impl ::ethers::core::abi::AbiDecode for MockERC721Calls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Approve(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::BalanceOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::GetApproved(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Initialize(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::IsApprovedForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Name(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::OwnerOf(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFrom(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SetApprovalForAll(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SupportsInterface(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Symbol(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TokenURI(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::TransferFrom(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for MockERC721Calls { - fn encode(self) -> Vec { - match self { - Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::BalanceOf(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::GetApproved(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Initialize(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::IsApprovedForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::OwnerOf(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SafeTransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SetApprovalForAll(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::SupportsInterface(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::TokenURI(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::TransferFrom(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for MockERC721Calls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Approve(element) => ::core::fmt::Display::fmt(element, f), - Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f), - Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f), - Self::Initialize(element) => ::core::fmt::Display::fmt(element, f), - Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::Name(element) => ::core::fmt::Display::fmt(element, f), - Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f), - Self::SafeTransferFromWithFromAndToAndData(element) => { - ::core::fmt::Display::fmt(element, f) - } - Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f), - Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f), - Self::Symbol(element) => ::core::fmt::Display::fmt(element, f), - Self::TokenURI(element) => ::core::fmt::Display::fmt(element, f), - Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: ApproveCall) -> Self { - Self::Approve(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: BalanceOfCall) -> Self { - Self::BalanceOf(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: GetApprovedCall) -> Self { - Self::GetApproved(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: InitializeCall) -> Self { - Self::Initialize(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: IsApprovedForAllCall) -> Self { - Self::IsApprovedForAll(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: NameCall) -> Self { - Self::Name(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: OwnerOfCall) -> Self { - Self::OwnerOf(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: SafeTransferFromCall) -> Self { - Self::SafeTransferFrom(value) - } - } - impl ::core::convert::From - for MockERC721Calls { - fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self { - Self::SafeTransferFromWithFromAndToAndData(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: SetApprovalForAllCall) -> Self { - Self::SetApprovalForAll(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: SupportsInterfaceCall) -> Self { - Self::SupportsInterface(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: SymbolCall) -> Self { - Self::Symbol(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: TokenURICall) -> Self { - Self::TokenURI(value) - } - } - impl ::core::convert::From for MockERC721Calls { - fn from(value: TransferFromCall) -> Self { - Self::TransferFrom(value) - } - } - ///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct BalanceOfReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct GetApprovedReturn(pub ::ethers::core::types::Address); - ///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct IsApprovedForAllReturn(pub bool); - ///Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct NameReturn(pub ::std::string::String); - ///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct OwnerOfReturn { - pub owner: ::ethers::core::types::Address, - } - ///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SupportsInterfaceReturn(pub bool); - ///Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SymbolReturn(pub ::std::string::String); - ///Container type for all return fields from the `tokenURI` function with signature `tokenURI(uint256)` and selector `0xc87b56dd` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct TokenURIReturn(pub ::std::string::String); -} diff --git a/crates/src/model.rs b/crates/src/model.rs deleted file mode 100644 index 8817ef9..0000000 --- a/crates/src/model.rs +++ /dev/null @@ -1,204 +0,0 @@ -pub use model::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod model { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::std::collections::BTreeMap::new(), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("SignaledEvent"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("SignaledEvent"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("role"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("actionId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MODEL_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - #[rustfmt::skip] - const __BYTECODE: &[u8] = b"`V`7`\x0B\x82\x82\x829\x80Q`\0\x1A`s\x14`*WcNH{q`\xE0\x1B`\0R`\0`\x04R`$`\0\xFD[0`\0R`s\x81S\x82\x81\xF3\xFEs\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x000\x14`\x80`@R`\0\x80\xFD\xFE\xA2dipfsX\"\x12 \xC8\0\xAE\xB6-\x18&}\xCF\xC3\x05#\xB9\xD5\x19\x95\xFE\xDF(\xF1\x84\x95\xCDu\x01\xFFSK\xB3\xF2\xA2\x85dsolcC\0\x08\x15\x003"; - /// The bytecode of the contract. - pub static MODEL_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __BYTECODE, - ); - #[rustfmt::skip] - const __DEPLOYED_BYTECODE: &[u8] = b"s\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x000\x14`\x80`@R`\0\x80\xFD\xFE\xA2dipfsX\"\x12 \xC8\0\xAE\xB6-\x18&}\xCF\xC3\x05#\xB9\xD5\x19\x95\xFE\xDF(\xF1\x84\x95\xCDu\x01\xFFSK\xB3\xF2\xA2\x85dsolcC\0\x08\x15\x003"; - /// The deployed bytecode of the contract. - pub static MODEL_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __DEPLOYED_BYTECODE, - ); - pub struct Model(::ethers::contract::Contract); - impl ::core::clone::Clone for Model { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for Model { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for Model { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for Model { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(Model)).field(&self.address()).finish() - } - } - impl Model { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MODEL_ABI.clone(), - client, - ), - ) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - MODEL_ABI.clone(), - MODEL_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - ///Gets the contract's `SignaledEvent` event - pub fn signaled_event_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for Model { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "SignaledEvent", - abi = "SignaledEvent(uint8,uint8,uint256,uint256)" - )] - pub struct SignaledEventFilter { - #[ethevent(indexed)] - pub role: u8, - #[ethevent(indexed)] - pub action_id: u8, - #[ethevent(indexed)] - pub scalar: ::ethers::core::types::U256, - pub sequence: ::ethers::core::types::U256, - } -} diff --git a/crates/src/model_interface.rs b/crates/src/model_interface.rs deleted file mode 100644 index b8db454..0000000 --- a/crates/src/model_interface.rs +++ /dev/null @@ -1,385 +0,0 @@ -pub use model_interface::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod model_interface { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("context"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("context"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedArray( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - 10usize, - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ], - ), - ), - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct Model.Head"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signal"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signal"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("action"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signalMany"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signalMany"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("actions"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalars"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256[]"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ]), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MODELINTERFACE_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct ModelInterface(::ethers::contract::Contract); - impl ::core::clone::Clone for ModelInterface { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for ModelInterface { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for ModelInterface { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for ModelInterface { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(ModelInterface)) - .field(&self.address()) - .finish() - } - } - impl ModelInterface { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MODELINTERFACE_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `context` (0xd0496d6a) function - pub fn context(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([208, 73, 109, 106], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signal` (0xddc3b187) function - pub fn signal( - &self, - action: u8, - scalar: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 195, 177, 135], (action, scalar)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signalMany` (0xfff01fe2) function - pub fn signal_many( - &self, - actions: ::std::vec::Vec, - scalars: ::std::vec::Vec<::ethers::core::types::U256>, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([255, 240, 31, 226], (actions, scalars)) - .expect("method not found (this should never happen)") - } - } - impl From<::ethers::contract::Contract> - for ModelInterface { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - ///Container type for all input parameters for the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "context", abi = "context()")] - pub struct ContextCall; - ///Container type for all input parameters for the `signal` function with signature `signal(uint8,uint256)` and selector `0xddc3b187` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signal", abi = "signal(uint8,uint256)")] - pub struct SignalCall { - pub action: u8, - pub scalar: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `signalMany` function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signalMany", abi = "signalMany(uint8[],uint256[])")] - pub struct SignalManyCall { - pub actions: ::std::vec::Vec, - pub scalars: ::std::vec::Vec<::ethers::core::types::U256>, - } - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum ModelInterfaceCalls { - Context(ContextCall), - Signal(SignalCall), - SignalMany(SignalManyCall), - } - impl ::ethers::core::abi::AbiDecode for ModelInterfaceCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Context(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Signal(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SignalMany(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for ModelInterfaceCalls { - fn encode(self) -> Vec { - match self { - Self::Context(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::Signal(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SignalMany(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - } - } - } - impl ::core::fmt::Display for ModelInterfaceCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Context(element) => ::core::fmt::Display::fmt(element, f), - Self::Signal(element) => ::core::fmt::Display::fmt(element, f), - Self::SignalMany(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for ModelInterfaceCalls { - fn from(value: ContextCall) -> Self { - Self::Context(value) - } - } - impl ::core::convert::From for ModelInterfaceCalls { - fn from(value: SignalCall) -> Self { - Self::Signal(value) - } - } - impl ::core::convert::From for ModelInterfaceCalls { - fn from(value: SignalManyCall) -> Self { - Self::SignalMany(value) - } - } - ///Container type for all return fields from the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ContextReturn(pub Head); -} diff --git a/crates/src/my_model_contract.rs b/crates/src/my_model_contract.rs deleted file mode 100644 index 4ce835c..0000000 --- a/crates/src/my_model_contract.rs +++ /dev/null @@ -1,706 +0,0 @@ -pub use my_model_contract::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod my_model_contract { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("context"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("context"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedArray( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - 10usize, - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ], - ), - ), - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct Model.Head"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("latestBlocks"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("latestBlocks"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("sequence"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("sequence"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signal"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signal"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("action"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signalMany"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signalMany"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("actions"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalars"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256[]"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("state"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("state"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Int(256usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("int256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("SignaledEvent"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("SignaledEvent"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("role"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("actionId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MYMODELCONTRACT_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct MyModelContract(::ethers::contract::Contract); - impl ::core::clone::Clone for MyModelContract { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for MyModelContract { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for MyModelContract { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for MyModelContract { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(MyModelContract)) - .field(&self.address()) - .finish() - } - } - impl MyModelContract { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MYMODELCONTRACT_ABI.clone(), - client, - ), - ) - } - ///Calls the contract's `context` (0xd0496d6a) function - pub fn context(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([208, 73, 109, 106], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `latestBlocks` (0x6ee376e6) function - pub fn latest_blocks( - &self, - p0: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([110, 227, 118, 230], p0) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `sequence` (0x529d15cc) function - pub fn sequence( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([82, 157, 21, 204], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signal` (0xddc3b187) function - pub fn signal( - &self, - action: u8, - scalar: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 195, 177, 135], (action, scalar)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signalMany` (0xfff01fe2) function - pub fn signal_many( - &self, - actions: ::std::vec::Vec, - scalars: ::std::vec::Vec<::ethers::core::types::U256>, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([255, 240, 31, 226], (actions, scalars)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `state` (0x3e4f49e6) function - pub fn state( - &self, - p0: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([62, 79, 73, 230], p0) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `SignaledEvent` event - pub fn signaled_event_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for MyModelContract { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "SignaledEvent", - abi = "SignaledEvent(uint8,uint8,uint256,uint256)" - )] - pub struct SignaledEventFilter { - #[ethevent(indexed)] - pub role: u8, - #[ethevent(indexed)] - pub action_id: u8, - #[ethevent(indexed)] - pub scalar: ::ethers::core::types::U256, - pub sequence: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "context", abi = "context()")] - pub struct ContextCall; - ///Container type for all input parameters for the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "latestBlocks", abi = "latestBlocks(uint256)")] - pub struct LatestBlocksCall(pub ::ethers::core::types::U256); - ///Container type for all input parameters for the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "sequence", abi = "sequence()")] - pub struct SequenceCall; - ///Container type for all input parameters for the `signal` function with signature `signal(uint8,uint256)` and selector `0xddc3b187` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signal", abi = "signal(uint8,uint256)")] - pub struct SignalCall { - pub action: u8, - pub scalar: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `signalMany` function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signalMany", abi = "signalMany(uint8[],uint256[])")] - pub struct SignalManyCall { - pub actions: ::std::vec::Vec, - pub scalars: ::std::vec::Vec<::ethers::core::types::U256>, - } - ///Container type for all input parameters for the `state` function with signature `state(uint256)` and selector `0x3e4f49e6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "state", abi = "state(uint256)")] - pub struct StateCall(pub ::ethers::core::types::U256); - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MyModelContractCalls { - Context(ContextCall), - LatestBlocks(LatestBlocksCall), - Sequence(SequenceCall), - Signal(SignalCall), - SignalMany(SignalManyCall), - State(StateCall), - } - impl ::ethers::core::abi::AbiDecode for MyModelContractCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Context(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::LatestBlocks(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Sequence(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Signal(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SignalMany(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::State(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for MyModelContractCalls { - fn encode(self) -> Vec { - match self { - Self::Context(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::LatestBlocks(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Sequence(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Signal(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SignalMany(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::State(element) => ::ethers::core::abi::AbiEncode::encode(element), - } - } - } - impl ::core::fmt::Display for MyModelContractCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Context(element) => ::core::fmt::Display::fmt(element, f), - Self::LatestBlocks(element) => ::core::fmt::Display::fmt(element, f), - Self::Sequence(element) => ::core::fmt::Display::fmt(element, f), - Self::Signal(element) => ::core::fmt::Display::fmt(element, f), - Self::SignalMany(element) => ::core::fmt::Display::fmt(element, f), - Self::State(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: ContextCall) -> Self { - Self::Context(value) - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: LatestBlocksCall) -> Self { - Self::LatestBlocks(value) - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: SequenceCall) -> Self { - Self::Sequence(value) - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: SignalCall) -> Self { - Self::Signal(value) - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: SignalManyCall) -> Self { - Self::SignalMany(value) - } - } - impl ::core::convert::From for MyModelContractCalls { - fn from(value: StateCall) -> Self { - Self::State(value) - } - } - ///Container type for all return fields from the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ContextReturn(pub Head); - ///Container type for all return fields from the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct LatestBlocksReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SequenceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `state` function with signature `state(uint256)` and selector `0x3e4f49e6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct StateReturn(pub ::ethers::core::types::I256); -} diff --git a/crates/src/my_state_machine.rs b/crates/src/my_state_machine.rs deleted file mode 100644 index 5b9cc8d..0000000 --- a/crates/src/my_state_machine.rs +++ /dev/null @@ -1,757 +0,0 @@ -pub use my_state_machine::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod my_state_machine { - pub use super::super::shared_types::*; - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("context"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("context"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::FixedArray( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - 10usize, - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ], - ), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::String, - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Tuple( - ::std::vec![ - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ], - ), - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Int(256usize), - ), - ), - ], - ), - ), - ), - ], - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("struct Model.Head"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("latestBlocks"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("latestBlocks"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("sequence"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("sequence"), - inputs: ::std::vec![], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signal"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signal"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("action"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("signalMany"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("signalMany"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("actions"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint8[]"), - ), - }, - ::ethers::core::abi::ethabi::Param { - name: ::std::borrow::ToOwned::to_owned("scalars"), - kind: ::ethers::core::abi::ethabi::ParamType::Array( - ::std::boxed::Box::new( - ::ethers::core::abi::ethabi::ParamType::Uint(256usize), - ), - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256[]"), - ), - }, - ], - outputs: ::std::vec![], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable, - }, - ], - ), - ( - ::std::borrow::ToOwned::to_owned("state"), - ::std::vec![ - ::ethers::core::abi::ethabi::Function { - name: ::std::borrow::ToOwned::to_owned("state"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("uint256"), - ), - }, - ], - outputs: ::std::vec![ - ::ethers::core::abi::ethabi::Param { - name: ::std::string::String::new(), - kind: ::ethers::core::abi::ethabi::ParamType::Int(256usize), - internal_type: ::core::option::Option::Some( - ::std::borrow::ToOwned::to_owned("int256"), - ), - }, - ], - constant: ::core::option::Option::None, - state_mutability: ::ethers::core::abi::ethabi::StateMutability::View, - }, - ], - ), - ]), - events: ::core::convert::From::from([ - ( - ::std::borrow::ToOwned::to_owned("SignaledEvent"), - ::std::vec![ - ::ethers::core::abi::ethabi::Event { - name: ::std::borrow::ToOwned::to_owned("SignaledEvent"), - inputs: ::std::vec![ - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("role"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("actionId"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("scalar"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: true, - }, - ::ethers::core::abi::ethabi::EventParam { - name: ::std::borrow::ToOwned::to_owned("sequence"), - kind: ::ethers::core::abi::ethabi::ParamType::Uint( - 256usize, - ), - indexed: false, - }, - ], - anonymous: false, - }, - ], - ), - ]), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static MYSTATEMACHINE_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - #[rustfmt::skip] - const __BYTECODE: &[u8] = b"`\0`\x02\x81\x90Ua\x01\xC0`@R`\x80\x81\x81R`\xA0\x82\x90R`\xC0\x82\x90R`\xE0\x82\x90Ra\x01\0\x82\x90Ra\x01 \x82\x90Ra\x01@\x82\x90Ra\x01`\x82\x90Ra\x01\x80\x82\x90Ra\x01\xA0\x91\x90\x91Rb\0\0U\x90`\x03\x90`\nb\0\x13\xAAV[P`@\x80Q`\x01\x80\x82R\x81\x83\x01\x90\x92R\x90` \x80\x83\x01\x90\x806\x837PP\x81Qb\0\0\x87\x92`\r\x92P` \x01\x90b\0\x13\xF2V[P4\x80\x15b\0\0\x95W`\0\x80\xFD[P`@\x80Q\x80\x82\x01\x82R`\x06\x81Re\x07\x06\xC6\x166S`\xD4\x1B` \x80\x83\x01\x91\x90\x91R\x82Q\x80\x84\x01\x90\x93R`\x01\x83R`\x02\x90\x83\x01Rb\0\0\xD9\x91`\0\x90`\x03\x90b\0\r\xE2V[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rc\x07G\x86\xE3`\xE4\x1B` \x82\x01Rb\0\x01\x1A\x90`\x01`\0\x80`@\x80Q\x80\x82\x01\x90\x91R`\0\x81R`\x01` \x82\x01Rb\0\x0E\xFDV[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rctxn1`\xE0\x1B` \x82\x01Rb\0\x01[\x90`\x01\x80`\0`@\x80Q\x80\x82\x01\x90\x91R`\x02\x81R`\x01` \x82\x01Rb\0\x0E\xFDV[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rc:<7\x19`\xE1\x1B` \x82\x01Rb\0\x01\x9D\x90`\x01`\x02`\0`@\x80Q\x80\x82\x01\x90\x91R`\0\x81R`\x03` \x82\x01Rb\0\x0E\xFDV[P`@\x80Q\x80\x82\x01\x90\x91R`\x04\x81Rctxn3`\xE0\x1B` \x82\x01Rb\0\x01\xDF\x90`\x01`\x03`\0`@\x80Q\x80\x82\x01\x90\x91R`\x02\x81R`\x03` \x82\x01Rb\0\x0E\xFDV[Pb\0\x04\xBD`\x01\x80`\0\x81T\x81\x10b\0\x01\xFCWb\0\x01\xFCb\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x02'\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x02U\x90b\0\x14sV[\x80\x15b\0\x02\xA6W\x80`\x1F\x10b\0\x02zWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x02\xA6V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x02\x88W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x03>W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x03)W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\x03\x98W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x03\x83W[PPPPP\x81RPP`\0\x80\x81T\x81\x10b\0\x03\xB7Wb\0\x03\xB7b\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x03\xE2\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x04\x10\x90b\0\x14sV[\x80\x15b\0\x04aW\x80`\x1F\x10b\0\x045Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x04aV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x04CW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x82\x01R`\x03\x82\x01T``\x82\x01R`\x04\x90\x91\x01T`\x80\x90\x91\x01Rb\0\x11UV[b\0\x07\xA0`\x03`\0\x80\x81T\x81\x10b\0\x04\xD9Wb\0\x04\xD9b\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x05\x04\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x052\x90b\0\x14sV[\x80\x15b\0\x05\x83W\x80`\x1F\x10b\0\x05WWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x05\x83V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x05eW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x83\x01R`\x03\x83\x01T``\x83\x01R`\x04\x90\x92\x01T`\x80\x90\x91\x01R\x80T\x81\x90\x81\x10b\0\x05\xEFWb\0\x05\xEFb\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x06\x1A\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x06H\x90b\0\x14sV[\x80\x15b\0\x06\x99W\x80`\x1F\x10b\0\x06mWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x06\x99V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x06{W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x071W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x07\x1CW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\x07\x8BW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x07vW[PPPPP\x81RPPb\0\x11\xF1` \x1B` \x1CV[b\0\n~`\x03`\x01`\x02\x81T\x81\x10b\0\x07\xBDWb\0\x07\xBDb\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x07\xE8\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x08\x16\x90b\0\x14sV[\x80\x15b\0\x08gW\x80`\x1F\x10b\0\x08;Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x08gV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x08IW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x08\xFFW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x08\xEAW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\tYW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\tDW[PPPPP\x81RPP`\0\x80\x81T\x81\x10b\0\txWb\0\txb\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\t\xA3\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\t\xD1\x90b\0\x14sV[\x80\x15b\0\n\"W\x80`\x1F\x10b\0\t\xF6Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\n\"V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\n\x04W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x82\x01R`\x03\x82\x01T``\x82\x01R`\x04\x90\x91\x01T`\x80\x90\x91\x01Rb\0\x12\x88V[b\0\rf`\x01`\0\x80\x81T\x81\x10b\0\n\x9AWb\0\n\x9Ab\0\x14]V[\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\n\xC5\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\n\xF3\x90b\0\x14sV[\x80\x15b\0\x0BDW\x80`\x1F\x10b\0\x0B\x18Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x0BDV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x0B&W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x91\x83\x01\x91\x90\x91R\x83\x01R`\x03\x80\x84\x01T``\x84\x01R`\x04\x90\x93\x01T`\x80\x90\x92\x01\x91\x90\x91R\x80T\x90\x91\x90\x81\x10b\0\x0B\xB5Wb\0\x0B\xB5b\0\x14]V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Tb\0\x0B\xE0\x90b\0\x14sV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Tb\0\x0C\x0E\x90b\0\x14sV[\x80\x15b\0\x0C_W\x80`\x1F\x10b\0\x0C3Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91b\0\x0C_V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11b\0\x0CAW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15b\0\x0C\xF7W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\x0C\xE2W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15b\0\rQW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11b\0\r enum mismatch\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0`@Q\x80`\xC0\x01`@R\x80\x88\x81R` \x01\x86`\xFF\x16\x81R` \x01\x84\x81R` \x01\x85`\xFF\x16\x81R` \x01\x87`\xFF\x16`\x01`\x01`@\x1B\x03\x81\x11\x15b\0\x0F\xEEWb\0\x0F\xEEb\0\x14GV[`@Q\x90\x80\x82R\x80` \x02` \x01\x82\x01`@R\x80\x15b\0\x10\x18W\x81` \x01` \x82\x02\x806\x837\x01\x90P[P\x81R` \x01\x87`\xFF\x16`\x01`\x01`@\x1B\x03\x81\x11\x15b\0\x10OI\xE6\x14a\0gW\x80cR\x9D\x15\xCC\x14a\0\x8DW\x80cn\xE3v\xE6\x14a\0\x96W\x80c\xD0Imj\x14a\0\xA9W\x80c\xDD\xC3\xB1\x87\x14a\0\xBEW\x80c\xFF\xF0\x1F\xE2\x14a\0\xD3W[`\0\x80\xFD[a\0za\0u6`\x04a\x0CDV[a\0\xE6V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0z`\x02T\x81V[a\0za\0\xA46`\x04a\x0CDV[a\x01\x07V[a\0\xB1a\x01\x1EV[`@Qa\0\x84\x91\x90a\x0EOV[a\0\xD1a\0\xCC6`\x04a\x0F\x04V[a\x04\xDCV[\0[a\0\xD1a\0\xE16`\x04a\x0FzV[a\x04\xF3V[`\r\x81\x81T\x81\x10a\0\xF6W`\0\x80\xFD[`\0\x91\x82R` \x90\x91 \x01T\x90P\x81V[`\x03\x81`\n\x81\x10a\x01\x17W`\0\x80\xFD[\x01T\x90P\x81V[a\x01&a\x0B\xF0V[`@\x80Qa\x01\xE0\x81\x01\x90\x91R\x80`\xA0\x81\x01`\x03`\n\x82\x82\x82` \x02\x82\x01\x91[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01EWPPPPP\x81R` \x01`\x02T\x81R` \x01`\r\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x01\xB6W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01\xA2W[PPPPP\x81R` \x01`\0\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x02\xF4W\x83\x82\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x02\x15\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02A\x90a\x0F\xE6V[\x80\x15a\x02\x8EW\x80`\x1F\x10a\x02cWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\x8EV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02qW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x83\x83\x01R\x84\x01\x91\x90\x91R`\x03\x84\x01T``\x84\x01R`\x04\x90\x93\x01T`\x80\x90\x92\x01\x91\x90\x91R\x91\x83R\x92\x01\x91\x01a\x01\xE2V[PPPP\x81R` \x01`\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x04\xD1W\x83\x82\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x03R\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03~\x90a\x0F\xE6V[\x80\x15a\x03\xCBW\x80`\x1F\x10a\x03\xA0Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xCBV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\xAEW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x04aW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04MW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x04\xB9W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04\xA5W[PPPPP\x81RPP\x81R` \x01\x90`\x01\x01\x90a\x03\x1FV[PPP\x91RP\x91\x90PV[a\x04\xE6\x82\x82a\x05\xBCV[a\x04\xEFCa\x08^V[PPV[\x82\x81\x14a\x05GW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FModelRegistry: invalid input\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0[\x83\x81\x10\x15a\x05\xACWa\x05\x9A\x85\x85\x83\x81\x81\x10a\x05gWa\x05ga\x10 V[\x90P` \x02\x01` \x81\x01\x90a\x05|\x91\x90a\x106V[\x84\x84\x84\x81\x81\x10a\x05\x8EWa\x05\x8Ea\x10 V[\x90P` \x02\x015a\x05\xBCV[\x80a\x05\xA4\x81a\x10nV[\x91PPa\x05JV[Pa\x05\xB6Ca\x08^V[PPPPV[`\0`\x01\x83`\xFF\x16\x81T\x81\x10a\x05\xD4Wa\x05\xD4a\x10 V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x05\xFD\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x06)\x90a\x0F\xE6V[\x80\x15a\x06vW\x80`\x1F\x10a\x06KWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x06vV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x06YW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x07\x0CW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x06\xF8W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x07dW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x07PW[PPPPP\x81RPP\x90Pa\x07x\x81a\x08\xBFV[\x15a\x07\xB1W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rh\x1A[\x9A\x1AX\x9A]\x19Y`\xBA\x1B`D\x82\x01R`d\x01a\x05>V[\x80` \x01Q`\xFF\x16\x83`\xFF\x16\x14a\x07\xCAWa\x07\xCAa\x10\x87V[`\0[`\0T`\xFF\x90\x81\x16\x90\x82\x16\x10\x15a\x07\xFBWa\x07\xE9\x81\x83\x85a\t\xF9V[\x80a\x07\xF3\x81a\x10\x9DV[\x91PPa\x07\xCDV[P`\x02\x80T\x90`\0a\x08\x0C\x83a\x10nV[\x91\x90PUP\x81\x83`\xFF\x16\x82``\x01Q`\xFF\x16\x7FP\xE4\xA5+\x07r\xBE\xD9\xF0j}?}\xFAf\xD76@\x06z\\\xC7zs\xC2EV\xCC\xC9\0\xFA\x08`\x02T`@Qa\x08Q\x91\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA4PPPV[`\0[`\t\x81`\xFF\x16\x10\x15a\x08\xB9W`\x03a\x08z\x82`\x01a\x10\xBCV[`\xFF\x16`\n\x81\x10a\x08\x8DWa\x08\x8Da\x10 V[\x01T`\x03\x82`\xFF\x16`\n\x81\x10a\x08\xA5Wa\x08\xA5a\x10 V[\x01U\x80a\x08\xB1\x81a\x10\x9DV[\x91PPa\x08aV[P`\x0CUV[`\0\x80[`\x01`\xFF\x82\x16\x10\x15a\t\xF0W\x82`\xA0\x01Q\x81`\xFF\x16\x81Q\x81\x10a\x08\xE8Wa\x08\xE8a\x10 V[` \x02` \x01\x01Q`\0\x14a\t\xDEW`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x12Wa\t\x12a\x10 V[` \x02` \x01\x01Q\x12\x15a\t\x81W`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t;Wa\t;a\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\tYWa\tYa\x10 V[\x90`\0R` `\0 \x01Ta\tn\x91\x90a\x10\xDBV[\x12a\t|WP`\x01\x92\x91PPV[a\t\xDEV[`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x9CWa\t\x9Ca\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\t\xBAWa\t\xBAa\x10 V[\x90`\0R` `\0 \x01Ta\t\xCF\x91\x90a\x11\x03V[\x12\x15a\t\xDEWP`\x01\x92\x91PPV[\x80a\t\xE8\x81a\x10\x9DV[\x91PPa\x08\xC3V[P`\0\x92\x91PPV[`\0\x81\x11a\n:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm4\xB7;0\xB64\xB2\x109\xB1\xB0\xB60\xB9`\x91\x1B`D\x82\x01R`d\x01a\x05>V[\x81`\x80\x01Q\x83`\xFF\x16\x81Q\x81\x10a\nSWa\nSa\x10 V[` \x02` \x01\x01Q`\0\x14a\x0B\xEBW\x80\x82`\x80\x01Q\x84`\xFF\x16\x81Q\x81\x10a\n|Wa\n|a\x10 V[` \x02` \x01\x01Qa\n\x8E\x91\x90a\x11*V[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xA4Wa\n\xA4a\x10 V[\x90`\0R` `\0 \x01Ta\n\xB9\x91\x90a\x10\xDBV[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xCFWa\n\xCFa\x10 V[\x90`\0R` `\0 \x01\x81\x90UP`\0`\r\x84`\xFF\x16\x81T\x81\x10a\n\xF5Wa\n\xF5a\x10 V[\x90`\0R` `\0 \x01T\x12\x15a\x0B:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rhunderflow`\xB8\x1B`D\x82\x01R`d\x01a\x05>V[`\0\x80\x84`\xFF\x16\x81T\x81\x10a\x0BQWa\x0BQa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T\x11\x15a\x0B\xEBW`\0\x83`\xFF\x16\x81T\x81\x10a\x0B\x7FWa\x0B\x7Fa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T`\r\x84`\xFF\x16\x81T\x81\x10a\x0B\xA7Wa\x0B\xA7a\x10 V[\x90`\0R` `\0 \x01T\x13\x15a\x0B\xEBW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x08`$\x82\x01Rgoverflow`\xC0\x1B`D\x82\x01R`d\x01a\x05>V[PPPV[`@Q\x80`\xA0\x01`@R\x80a\x0C\x03a\x0C%V[\x81R` \x01`\0\x81R` \x01``\x81R` \x01``\x81R` \x01``\x81RP\x90V[`@Q\x80a\x01@\x01`@R\x80`\n\x90` \x82\x02\x806\x837P\x91\x92\x91PPV[`\0` \x82\x84\x03\x12\x15a\x0CVW`\0\x80\xFD[P5\x91\x90PV[`\0\x81Q\x80\x84R` \x80\x85\x01\x94P\x80\x84\x01`\0[\x83\x81\x10\x15a\x0C\x8DW\x81Q\x87R\x95\x82\x01\x95\x90\x82\x01\x90`\x01\x01a\x0CqV[P\x94\x95\x94PPPPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\x0C\xBEW` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\x0C\xA2V[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xC0\x81Q\x81\x87Ra\r\x1E\x82\x88\x01\x82a\x0C\x98V[\x91PP`\xFF\x87\x83\x01Q\x16\x87\x87\x01R`@\x80\x83\x01Qa\rN\x82\x89\x01\x82\x80Q`\xFF\x90\x81\x16\x83R` \x91\x82\x01Q\x16\x91\x01RV[PP``\x82\x01Q`\x80\x87\x81\x01\x91\x90\x91R\x90\x91\x01Q`\xA0\x90\x95\x01\x94\x90\x94R\x97\x84\x01\x97\x90\x84\x01\x90`\x01\x01a\x0C\xFCV[P\x91\x97\x96PPPPPPPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xE0\x81Q\x81\x87Ra\r\xC8\x82\x88\x01\x82a\x0C\x98V[\x83\x89\x01Q`\xFF\x90\x81\x16\x89\x8B\x01R`@\x80\x86\x01Q\x80Q\x83\x16\x82\x8C\x01R` \x81\x01Q\x83\x16``\x8C\x01R\x92\x94P\x92P\x90P``\x84\x01Q\x91P`\x80\x81\x83\x16\x81\x8A\x01R\x80\x85\x01Q\x92PPP`\xA0\x87\x83\x03\x81\x89\x01Ra\x0E!\x83\x83a\x0C]V[\x93\x01Q\x87\x84\x03`\xC0\x89\x01R\x92\x91Pa\x0E;\x90P\x81\x83a\x0C]V[\x9A\x87\x01\x9A\x95PPP\x90\x84\x01\x90`\x01\x01a\r\xA6V[` \x80\x82R\x82Q`\0\x91\x90\x82\x84\x83\x01[`\n\x82\x10\x15a\x0E~W\x82Q\x81R\x91\x83\x01\x91`\x01\x91\x90\x91\x01\x90\x83\x01a\x0E_V[PPP\x83\x01Qa\x01`\x83\x01R`@\x83\x01Qa\x01\xC0a\x01\x80\x84\x01\x81\x90Ra\x0E\xA8a\x01\xE0\x85\x01\x83a\x0C]V[\x91P``\x85\x01Q`\x1F\x19\x80\x86\x85\x03\x01a\x01\xA0\x87\x01Ra\x0E\xC7\x84\x83a\x0C\xDEV[\x93P`\x80\x87\x01Q\x91P\x80\x86\x85\x03\x01\x83\x87\x01RPa\x0E\xE4\x83\x82a\r\x88V[\x96\x95PPPPPPV[\x805`\xFF\x81\x16\x81\x14a\x0E\xFFW`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0F\x17W`\0\x80\xFD[a\x0F \x83a\x0E\xEEV[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80\x83`\x1F\x84\x01\x12a\x0F@W`\0\x80\xFD[P\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0FXW`\0\x80\xFD[` \x83\x01\x91P\x83` \x82`\x05\x1B\x85\x01\x01\x11\x15a\x0FsW`\0\x80\xFD[\x92P\x92\x90PV[`\0\x80`\0\x80`@\x85\x87\x03\x12\x15a\x0F\x90W`\0\x80\xFD[\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0F\xA8W`\0\x80\xFD[a\x0F\xB4\x88\x83\x89\x01a\x0F.V[\x90\x96P\x94P` \x87\x015\x91P\x80\x82\x11\x15a\x0F\xCDW`\0\x80\xFD[Pa\x0F\xDA\x87\x82\x88\x01a\x0F.V[\x95\x98\x94\x97P\x95PPPPV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0F\xFAW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x10\x1AWcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[cNH{q`\xE0\x1B`\0R`2`\x04R`$`\0\xFD[`\0` \x82\x84\x03\x12\x15a\x10HW`\0\x80\xFD[a\x10Q\x82a\x0E\xEEV[\x93\x92PPPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\x10\x80Wa\x10\x80a\x10XV[P`\x01\x01\x90V[cNH{q`\xE0\x1B`\0R`\x01`\x04R`$`\0\xFD[`\0`\xFF\x82\x16`\xFF\x81\x03a\x10\xB3Wa\x10\xB3a\x10XV[`\x01\x01\x92\x91PPV[`\xFF\x81\x81\x16\x83\x82\x16\x01\x90\x81\x11\x15a\x10\xD5Wa\x10\xD5a\x10XV[\x92\x91PPV[\x80\x82\x01\x82\x81\x12`\0\x83\x12\x80\x15\x82\x16\x82\x15\x82\x16\x17\x15a\x10\xFBWa\x10\xFBa\x10XV[PP\x92\x91PPV[\x81\x81\x03`\0\x83\x12\x80\x15\x83\x83\x13\x16\x83\x83\x12\x82\x16\x17\x15a\x11#Wa\x11#a\x10XV[P\x92\x91PPV[\x80\x82\x02`\0\x82\x12`\x01`\xFF\x1B\x84\x14\x16\x15a\x11FWa\x11Fa\x10XV[\x81\x81\x05\x83\x14\x82\x15\x17a\x10\xD5Wa\x10\xD5a\x10XV\xFE\xA2dipfsX\"\x12 C\xBA\x8BiP\xA9\xCDh\xD9h=\xA7\xA0\x08O(\xF8tvI#\xF9\r\xD4\xF7\xCF\x01}\x08MG\x94dsolcC\0\x08\x15\x003weight must be > 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; - /// The bytecode of the contract. - pub static MYSTATEMACHINE_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __BYTECODE, - ); - #[rustfmt::skip] - const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0bW`\x005`\xE0\x1C\x80c>OI\xE6\x14a\0gW\x80cR\x9D\x15\xCC\x14a\0\x8DW\x80cn\xE3v\xE6\x14a\0\x96W\x80c\xD0Imj\x14a\0\xA9W\x80c\xDD\xC3\xB1\x87\x14a\0\xBEW\x80c\xFF\xF0\x1F\xE2\x14a\0\xD3W[`\0\x80\xFD[a\0za\0u6`\x04a\x0CDV[a\0\xE6V[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0z`\x02T\x81V[a\0za\0\xA46`\x04a\x0CDV[a\x01\x07V[a\0\xB1a\x01\x1EV[`@Qa\0\x84\x91\x90a\x0EOV[a\0\xD1a\0\xCC6`\x04a\x0F\x04V[a\x04\xDCV[\0[a\0\xD1a\0\xE16`\x04a\x0FzV[a\x04\xF3V[`\r\x81\x81T\x81\x10a\0\xF6W`\0\x80\xFD[`\0\x91\x82R` \x90\x91 \x01T\x90P\x81V[`\x03\x81`\n\x81\x10a\x01\x17W`\0\x80\xFD[\x01T\x90P\x81V[a\x01&a\x0B\xF0V[`@\x80Qa\x01\xE0\x81\x01\x90\x91R\x80`\xA0\x81\x01`\x03`\n\x82\x82\x82` \x02\x82\x01\x91[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01EWPPPPP\x81R` \x01`\x02T\x81R` \x01`\r\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x01\xB6W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x01\xA2W[PPPPP\x81R` \x01`\0\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x02\xF4W\x83\x82\x90`\0R` `\0 \x90`\x05\x02\x01`@Q\x80`\xA0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x02\x15\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02A\x90a\x0F\xE6V[\x80\x15a\x02\x8EW\x80`\x1F\x10a\x02cWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\x8EV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02qW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x81\x01T`\xFF\x90\x81\x16` \x80\x85\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x87\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x90\x93\x16\x83\x83\x01R\x84\x01\x91\x90\x91R`\x03\x84\x01T``\x84\x01R`\x04\x90\x93\x01T`\x80\x90\x92\x01\x91\x90\x91R\x91\x83R\x92\x01\x91\x01a\x01\xE2V[PPPP\x81R` \x01`\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01`\0\x90[\x82\x82\x10\x15a\x04\xD1W\x83\x82\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x03R\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x03~\x90a\x0F\xE6V[\x80\x15a\x03\xCBW\x80`\x1F\x10a\x03\xA0Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x03\xCBV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x03\xAEW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x04aW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04MW[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x04\xB9W` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x04\xA5W[PPPPP\x81RPP\x81R` \x01\x90`\x01\x01\x90a\x03\x1FV[PPP\x91RP\x91\x90PV[a\x04\xE6\x82\x82a\x05\xBCV[a\x04\xEFCa\x08^V[PPV[\x82\x81\x14a\x05GW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1C`$\x82\x01R\x7FModelRegistry: invalid input\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[`\0[\x83\x81\x10\x15a\x05\xACWa\x05\x9A\x85\x85\x83\x81\x81\x10a\x05gWa\x05ga\x10 V[\x90P` \x02\x01` \x81\x01\x90a\x05|\x91\x90a\x106V[\x84\x84\x84\x81\x81\x10a\x05\x8EWa\x05\x8Ea\x10 V[\x90P` \x02\x015a\x05\xBCV[\x80a\x05\xA4\x81a\x10nV[\x91PPa\x05JV[Pa\x05\xB6Ca\x08^V[PPPPV[`\0`\x01\x83`\xFF\x16\x81T\x81\x10a\x05\xD4Wa\x05\xD4a\x10 V[\x90`\0R` `\0 \x90`\x06\x02\x01`@Q\x80`\xC0\x01`@R\x90\x81`\0\x82\x01\x80Ta\x05\xFD\x90a\x0F\xE6V[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x06)\x90a\x0F\xE6V[\x80\x15a\x06vW\x80`\x1F\x10a\x06KWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x06vV[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x06YW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPP\x91\x83RPP`\x01\x82\x01T`\xFF\x90\x81\x16` \x80\x84\x01\x91\x90\x91R`@\x80Q\x80\x82\x01\x82R`\x02\x86\x01T\x80\x85\x16\x82Ra\x01\0\x90\x04\x84\x16\x81\x84\x01R\x81\x85\x01R`\x03\x85\x01T\x90\x92\x16``\x84\x01R`\x04\x84\x01\x80T\x83Q\x81\x84\x02\x81\x01\x84\x01\x90\x94R\x80\x84R`\x80\x90\x94\x01\x93\x90\x91\x83\x01\x82\x82\x80\x15a\x07\x0CW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x06\xF8W[PPPPP\x81R` \x01`\x05\x82\x01\x80T\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80T\x80\x15a\x07dW` \x02\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R` \x01\x90`\x01\x01\x90\x80\x83\x11a\x07PW[PPPPP\x81RPP\x90Pa\x07x\x81a\x08\xBFV[\x15a\x07\xB1W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rh\x1A[\x9A\x1AX\x9A]\x19Y`\xBA\x1B`D\x82\x01R`d\x01a\x05>V[\x80` \x01Q`\xFF\x16\x83`\xFF\x16\x14a\x07\xCAWa\x07\xCAa\x10\x87V[`\0[`\0T`\xFF\x90\x81\x16\x90\x82\x16\x10\x15a\x07\xFBWa\x07\xE9\x81\x83\x85a\t\xF9V[\x80a\x07\xF3\x81a\x10\x9DV[\x91PPa\x07\xCDV[P`\x02\x80T\x90`\0a\x08\x0C\x83a\x10nV[\x91\x90PUP\x81\x83`\xFF\x16\x82``\x01Q`\xFF\x16\x7FP\xE4\xA5+\x07r\xBE\xD9\xF0j}?}\xFAf\xD76@\x06z\\\xC7zs\xC2EV\xCC\xC9\0\xFA\x08`\x02T`@Qa\x08Q\x91\x81R` \x01\x90V[`@Q\x80\x91\x03\x90\xA4PPPV[`\0[`\t\x81`\xFF\x16\x10\x15a\x08\xB9W`\x03a\x08z\x82`\x01a\x10\xBCV[`\xFF\x16`\n\x81\x10a\x08\x8DWa\x08\x8Da\x10 V[\x01T`\x03\x82`\xFF\x16`\n\x81\x10a\x08\xA5Wa\x08\xA5a\x10 V[\x01U\x80a\x08\xB1\x81a\x10\x9DV[\x91PPa\x08aV[P`\x0CUV[`\0\x80[`\x01`\xFF\x82\x16\x10\x15a\t\xF0W\x82`\xA0\x01Q\x81`\xFF\x16\x81Q\x81\x10a\x08\xE8Wa\x08\xE8a\x10 V[` \x02` \x01\x01Q`\0\x14a\t\xDEW`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x12Wa\t\x12a\x10 V[` \x02` \x01\x01Q\x12\x15a\t\x81W`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t;Wa\t;a\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\tYWa\tYa\x10 V[\x90`\0R` `\0 \x01Ta\tn\x91\x90a\x10\xDBV[\x12a\t|WP`\x01\x92\x91PPV[a\t\xDEV[`\0\x83`\xA0\x01Q\x82`\xFF\x16\x81Q\x81\x10a\t\x9CWa\t\x9Ca\x10 V[` \x02` \x01\x01Q`\r\x83`\xFF\x16\x81T\x81\x10a\t\xBAWa\t\xBAa\x10 V[\x90`\0R` `\0 \x01Ta\t\xCF\x91\x90a\x11\x03V[\x12\x15a\t\xDEWP`\x01\x92\x91PPV[\x80a\t\xE8\x81a\x10\x9DV[\x91PPa\x08\xC3V[P`\0\x92\x91PPV[`\0\x81\x11a\n:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x0E`$\x82\x01Rm4\xB7;0\xB64\xB2\x109\xB1\xB0\xB60\xB9`\x91\x1B`D\x82\x01R`d\x01a\x05>V[\x81`\x80\x01Q\x83`\xFF\x16\x81Q\x81\x10a\nSWa\nSa\x10 V[` \x02` \x01\x01Q`\0\x14a\x0B\xEBW\x80\x82`\x80\x01Q\x84`\xFF\x16\x81Q\x81\x10a\n|Wa\n|a\x10 V[` \x02` \x01\x01Qa\n\x8E\x91\x90a\x11*V[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xA4Wa\n\xA4a\x10 V[\x90`\0R` `\0 \x01Ta\n\xB9\x91\x90a\x10\xDBV[`\r\x84`\xFF\x16\x81T\x81\x10a\n\xCFWa\n\xCFa\x10 V[\x90`\0R` `\0 \x01\x81\x90UP`\0`\r\x84`\xFF\x16\x81T\x81\x10a\n\xF5Wa\n\xF5a\x10 V[\x90`\0R` `\0 \x01T\x12\x15a\x0B:W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\t`$\x82\x01Rhunderflow`\xB8\x1B`D\x82\x01R`d\x01a\x05>V[`\0\x80\x84`\xFF\x16\x81T\x81\x10a\x0BQWa\x0BQa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T\x11\x15a\x0B\xEBW`\0\x83`\xFF\x16\x81T\x81\x10a\x0B\x7FWa\x0B\x7Fa\x10 V[\x90`\0R` `\0 \x90`\x05\x02\x01`\x04\x01T`\r\x84`\xFF\x16\x81T\x81\x10a\x0B\xA7Wa\x0B\xA7a\x10 V[\x90`\0R` `\0 \x01T\x13\x15a\x0B\xEBW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x08`$\x82\x01Rgoverflow`\xC0\x1B`D\x82\x01R`d\x01a\x05>V[PPPV[`@Q\x80`\xA0\x01`@R\x80a\x0C\x03a\x0C%V[\x81R` \x01`\0\x81R` \x01``\x81R` \x01``\x81R` \x01``\x81RP\x90V[`@Q\x80a\x01@\x01`@R\x80`\n\x90` \x82\x02\x806\x837P\x91\x92\x91PPV[`\0` \x82\x84\x03\x12\x15a\x0CVW`\0\x80\xFD[P5\x91\x90PV[`\0\x81Q\x80\x84R` \x80\x85\x01\x94P\x80\x84\x01`\0[\x83\x81\x10\x15a\x0C\x8DW\x81Q\x87R\x95\x82\x01\x95\x90\x82\x01\x90`\x01\x01a\x0CqV[P\x94\x95\x94PPPPPV[`\0\x81Q\x80\x84R`\0[\x81\x81\x10\x15a\x0C\xBEW` \x81\x85\x01\x81\x01Q\x86\x83\x01\x82\x01R\x01a\x0C\xA2V[P`\0` \x82\x86\x01\x01R` `\x1F\x19`\x1F\x83\x01\x16\x85\x01\x01\x91PP\x92\x91PPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xC0\x81Q\x81\x87Ra\r\x1E\x82\x88\x01\x82a\x0C\x98V[\x91PP`\xFF\x87\x83\x01Q\x16\x87\x87\x01R`@\x80\x83\x01Qa\rN\x82\x89\x01\x82\x80Q`\xFF\x90\x81\x16\x83R` \x91\x82\x01Q\x16\x91\x01RV[PP``\x82\x01Q`\x80\x87\x81\x01\x91\x90\x91R\x90\x91\x01Q`\xA0\x90\x95\x01\x94\x90\x94R\x97\x84\x01\x97\x90\x84\x01\x90`\x01\x01a\x0C\xFCV[P\x91\x97\x96PPPPPPPV[`\0\x81Q\x80\x84R` \x80\x85\x01\x80\x81\x96P\x83`\x05\x1B\x81\x01\x91P\x82\x86\x01`\0[\x85\x81\x10\x15a\r{W\x82\x84\x03\x89R\x81Q`\xE0\x81Q\x81\x87Ra\r\xC8\x82\x88\x01\x82a\x0C\x98V[\x83\x89\x01Q`\xFF\x90\x81\x16\x89\x8B\x01R`@\x80\x86\x01Q\x80Q\x83\x16\x82\x8C\x01R` \x81\x01Q\x83\x16``\x8C\x01R\x92\x94P\x92P\x90P``\x84\x01Q\x91P`\x80\x81\x83\x16\x81\x8A\x01R\x80\x85\x01Q\x92PPP`\xA0\x87\x83\x03\x81\x89\x01Ra\x0E!\x83\x83a\x0C]V[\x93\x01Q\x87\x84\x03`\xC0\x89\x01R\x92\x91Pa\x0E;\x90P\x81\x83a\x0C]V[\x9A\x87\x01\x9A\x95PPP\x90\x84\x01\x90`\x01\x01a\r\xA6V[` \x80\x82R\x82Q`\0\x91\x90\x82\x84\x83\x01[`\n\x82\x10\x15a\x0E~W\x82Q\x81R\x91\x83\x01\x91`\x01\x91\x90\x91\x01\x90\x83\x01a\x0E_V[PPP\x83\x01Qa\x01`\x83\x01R`@\x83\x01Qa\x01\xC0a\x01\x80\x84\x01\x81\x90Ra\x0E\xA8a\x01\xE0\x85\x01\x83a\x0C]V[\x91P``\x85\x01Q`\x1F\x19\x80\x86\x85\x03\x01a\x01\xA0\x87\x01Ra\x0E\xC7\x84\x83a\x0C\xDEV[\x93P`\x80\x87\x01Q\x91P\x80\x86\x85\x03\x01\x83\x87\x01RPa\x0E\xE4\x83\x82a\r\x88V[\x96\x95PPPPPPV[\x805`\xFF\x81\x16\x81\x14a\x0E\xFFW`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\x0F\x17W`\0\x80\xFD[a\x0F \x83a\x0E\xEEV[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80\x83`\x1F\x84\x01\x12a\x0F@W`\0\x80\xFD[P\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x0FXW`\0\x80\xFD[` \x83\x01\x91P\x83` \x82`\x05\x1B\x85\x01\x01\x11\x15a\x0FsW`\0\x80\xFD[\x92P\x92\x90PV[`\0\x80`\0\x80`@\x85\x87\x03\x12\x15a\x0F\x90W`\0\x80\xFD[\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x0F\xA8W`\0\x80\xFD[a\x0F\xB4\x88\x83\x89\x01a\x0F.V[\x90\x96P\x94P` \x87\x015\x91P\x80\x82\x11\x15a\x0F\xCDW`\0\x80\xFD[Pa\x0F\xDA\x87\x82\x88\x01a\x0F.V[\x95\x98\x94\x97P\x95PPPPV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\x0F\xFAW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x10\x1AWcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[cNH{q`\xE0\x1B`\0R`2`\x04R`$`\0\xFD[`\0` \x82\x84\x03\x12\x15a\x10HW`\0\x80\xFD[a\x10Q\x82a\x0E\xEEV[\x93\x92PPPV[cNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[`\0`\x01\x82\x01a\x10\x80Wa\x10\x80a\x10XV[P`\x01\x01\x90V[cNH{q`\xE0\x1B`\0R`\x01`\x04R`$`\0\xFD[`\0`\xFF\x82\x16`\xFF\x81\x03a\x10\xB3Wa\x10\xB3a\x10XV[`\x01\x01\x92\x91PPV[`\xFF\x81\x81\x16\x83\x82\x16\x01\x90\x81\x11\x15a\x10\xD5Wa\x10\xD5a\x10XV[\x92\x91PPV[\x80\x82\x01\x82\x81\x12`\0\x83\x12\x80\x15\x82\x16\x82\x15\x82\x16\x17\x15a\x10\xFBWa\x10\xFBa\x10XV[PP\x92\x91PPV[\x81\x81\x03`\0\x83\x12\x80\x15\x83\x83\x13\x16\x83\x83\x12\x82\x16\x17\x15a\x11#Wa\x11#a\x10XV[P\x92\x91PPV[\x80\x82\x02`\0\x82\x12`\x01`\xFF\x1B\x84\x14\x16\x15a\x11FWa\x11Fa\x10XV[\x81\x81\x05\x83\x14\x82\x15\x17a\x10\xD5Wa\x10\xD5a\x10XV\xFE\xA2dipfsX\"\x12 C\xBA\x8BiP\xA9\xCDh\xD9h=\xA7\xA0\x08O(\xF8tvI#\xF9\r\xD4\xF7\xCF\x01}\x08MG\x94dsolcC\0\x08\x15\x003"; - /// The deployed bytecode of the contract. - pub static MYSTATEMACHINE_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static( - __DEPLOYED_BYTECODE, - ); - pub struct MyStateMachine(::ethers::contract::Contract); - impl ::core::clone::Clone for MyStateMachine { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for MyStateMachine { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for MyStateMachine { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for MyStateMachine { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(MyStateMachine)) - .field(&self.address()) - .finish() - } - } - impl MyStateMachine { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - MYSTATEMACHINE_ABI.clone(), - client, - ), - ) - } - /// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it. - /// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction - /// - /// Notes: - /// - If there are no constructor arguments, you should pass `()` as the argument. - /// - The default poll duration is 7 seconds. - /// - The default number of confirmations is 1 block. - /// - /// - /// # Example - /// - /// Generate contract bindings with `abigen!` and deploy a new contract instance. - /// - /// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact. - /// - /// ```ignore - /// # async fn deploy(client: ::std::sync::Arc) { - /// abigen!(Greeter, "../greeter.json"); - /// - /// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap(); - /// let msg = greeter_contract.greet().call().await.unwrap(); - /// # } - /// ``` - pub fn deploy( - client: ::std::sync::Arc, - constructor_args: T, - ) -> ::core::result::Result< - ::ethers::contract::builders::ContractDeployer, - ::ethers::contract::ContractError, - > { - let factory = ::ethers::contract::ContractFactory::new( - MYSTATEMACHINE_ABI.clone(), - MYSTATEMACHINE_BYTECODE.clone().into(), - client, - ); - let deployer = factory.deploy(constructor_args)?; - let deployer = ::ethers::contract::ContractDeployer::new(deployer); - Ok(deployer) - } - ///Calls the contract's `context` (0xd0496d6a) function - pub fn context(&self) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([208, 73, 109, 106], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `latestBlocks` (0x6ee376e6) function - pub fn latest_blocks( - &self, - p0: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([110, 227, 118, 230], p0) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `sequence` (0x529d15cc) function - pub fn sequence( - &self, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([82, 157, 21, 204], ()) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signal` (0xddc3b187) function - pub fn signal( - &self, - action: u8, - scalar: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([221, 195, 177, 135], (action, scalar)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `signalMany` (0xfff01fe2) function - pub fn signal_many( - &self, - actions: ::std::vec::Vec, - scalars: ::std::vec::Vec<::ethers::core::types::U256>, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([255, 240, 31, 226], (actions, scalars)) - .expect("method not found (this should never happen)") - } - ///Calls the contract's `state` (0x3e4f49e6) function - pub fn state( - &self, - p0: ::ethers::core::types::U256, - ) -> ::ethers::contract::builders::ContractCall { - self.0 - .method_hash([62, 79, 73, 230], p0) - .expect("method not found (this should never happen)") - } - ///Gets the contract's `SignaledEvent` event - pub fn signaled_event_filter( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event() - } - /// Returns an `Event` builder for all the events of this contract. - pub fn events( - &self, - ) -> ::ethers::contract::builders::Event< - ::std::sync::Arc, - M, - SignaledEventFilter, - > { - self.0.event_with_filter(::core::default::Default::default()) - } - } - impl From<::ethers::contract::Contract> - for MyStateMachine { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } - #[derive( - Clone, - ::ethers::contract::EthEvent, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethevent( - name = "SignaledEvent", - abi = "SignaledEvent(uint8,uint8,uint256,uint256)" - )] - pub struct SignaledEventFilter { - #[ethevent(indexed)] - pub role: u8, - #[ethevent(indexed)] - pub action_id: u8, - #[ethevent(indexed)] - pub scalar: ::ethers::core::types::U256, - pub sequence: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "context", abi = "context()")] - pub struct ContextCall; - ///Container type for all input parameters for the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "latestBlocks", abi = "latestBlocks(uint256)")] - pub struct LatestBlocksCall(pub ::ethers::core::types::U256); - ///Container type for all input parameters for the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "sequence", abi = "sequence()")] - pub struct SequenceCall; - ///Container type for all input parameters for the `signal` function with signature `signal(uint8,uint256)` and selector `0xddc3b187` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signal", abi = "signal(uint8,uint256)")] - pub struct SignalCall { - pub action: u8, - pub scalar: ::ethers::core::types::U256, - } - ///Container type for all input parameters for the `signalMany` function with signature `signalMany(uint8[],uint256[])` and selector `0xfff01fe2` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "signalMany", abi = "signalMany(uint8[],uint256[])")] - pub struct SignalManyCall { - pub actions: ::std::vec::Vec, - pub scalars: ::std::vec::Vec<::ethers::core::types::U256>, - } - ///Container type for all input parameters for the `state` function with signature `state(uint256)` and selector `0x3e4f49e6` - #[derive( - Clone, - ::ethers::contract::EthCall, - ::ethers::contract::EthDisplay, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - #[ethcall(name = "state", abi = "state(uint256)")] - pub struct StateCall(pub ::ethers::core::types::U256); - ///Container type for all of the contract's call - #[derive( - Clone, - ::ethers::contract::EthAbiType, - serde::Serialize, - serde::Deserialize, - Debug, - PartialEq, - Eq, - Hash - )] - pub enum MyStateMachineCalls { - Context(ContextCall), - LatestBlocks(LatestBlocksCall), - Sequence(SequenceCall), - Signal(SignalCall), - SignalMany(SignalManyCall), - State(StateCall), - } - impl ::ethers::core::abi::AbiDecode for MyStateMachineCalls { - fn decode( - data: impl AsRef<[u8]>, - ) -> ::core::result::Result { - let data = data.as_ref(); - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Context(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::LatestBlocks(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Sequence(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::Signal(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::SignalMany(decoded)); - } - if let Ok(decoded) = ::decode( - data, - ) { - return Ok(Self::State(decoded)); - } - Err(::ethers::core::abi::Error::InvalidData.into()) - } - } - impl ::ethers::core::abi::AbiEncode for MyStateMachineCalls { - fn encode(self) -> Vec { - match self { - Self::Context(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::LatestBlocks(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Sequence(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::Signal(element) => ::ethers::core::abi::AbiEncode::encode(element), - Self::SignalMany(element) => { - ::ethers::core::abi::AbiEncode::encode(element) - } - Self::State(element) => ::ethers::core::abi::AbiEncode::encode(element), - } - } - } - impl ::core::fmt::Display for MyStateMachineCalls { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - match self { - Self::Context(element) => ::core::fmt::Display::fmt(element, f), - Self::LatestBlocks(element) => ::core::fmt::Display::fmt(element, f), - Self::Sequence(element) => ::core::fmt::Display::fmt(element, f), - Self::Signal(element) => ::core::fmt::Display::fmt(element, f), - Self::SignalMany(element) => ::core::fmt::Display::fmt(element, f), - Self::State(element) => ::core::fmt::Display::fmt(element, f), - } - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: ContextCall) -> Self { - Self::Context(value) - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: LatestBlocksCall) -> Self { - Self::LatestBlocks(value) - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: SequenceCall) -> Self { - Self::Sequence(value) - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: SignalCall) -> Self { - Self::Signal(value) - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: SignalManyCall) -> Self { - Self::SignalMany(value) - } - } - impl ::core::convert::From for MyStateMachineCalls { - fn from(value: StateCall) -> Self { - Self::State(value) - } - } - ///Container type for all return fields from the `context` function with signature `context()` and selector `0xd0496d6a` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct ContextReturn(pub Head); - ///Container type for all return fields from the `latestBlocks` function with signature `latestBlocks(uint256)` and selector `0x6ee376e6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct LatestBlocksReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `sequence` function with signature `sequence()` and selector `0x529d15cc` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct SequenceReturn(pub ::ethers::core::types::U256); - ///Container type for all return fields from the `state` function with signature `state(uint256)` and selector `0x3e4f49e6` - #[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash - )] - pub struct StateReturn(pub ::ethers::core::types::I256); -} diff --git a/crates/src/pflow_dsl.rs b/crates/src/pflow_dsl.rs deleted file mode 100644 index b199d30..0000000 --- a/crates/src/pflow_dsl.rs +++ /dev/null @@ -1,72 +0,0 @@ -pub use pflow_dsl::*; -/// This module was auto-generated with ethers-rs Abigen. -/// More information at: -#[allow( - clippy::enum_variant_names, - clippy::too_many_arguments, - clippy::upper_case_acronyms, - clippy::type_complexity, - dead_code, - non_camel_case_types, -)] -pub mod pflow_dsl { - #[allow(deprecated)] - fn __abi() -> ::ethers::core::abi::Abi { - ::ethers::core::abi::ethabi::Contract { - constructor: ::core::option::Option::None, - functions: ::std::collections::BTreeMap::new(), - events: ::std::collections::BTreeMap::new(), - errors: ::std::collections::BTreeMap::new(), - receive: false, - fallback: false, - } - } - ///The parsed JSON ABI of the contract. - pub static PFLOWDSL_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> = ::ethers::contract::Lazy::new( - __abi, - ); - pub struct PflowDSL(::ethers::contract::Contract); - impl ::core::clone::Clone for PflowDSL { - fn clone(&self) -> Self { - Self(::core::clone::Clone::clone(&self.0)) - } - } - impl ::core::ops::Deref for PflowDSL { - type Target = ::ethers::contract::Contract; - fn deref(&self) -> &Self::Target { - &self.0 - } - } - impl ::core::ops::DerefMut for PflowDSL { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } - } - impl ::core::fmt::Debug for PflowDSL { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple(::core::stringify!(PflowDSL)).field(&self.address()).finish() - } - } - impl PflowDSL { - /// Creates a new contract instance with the specified `ethers` client at - /// `address`. The contract derefs to a `ethers::Contract` object. - pub fn new>( - address: T, - client: ::std::sync::Arc, - ) -> Self { - Self( - ::ethers::contract::Contract::new( - address.into(), - PFLOWDSL_ABI.clone(), - client, - ), - ) - } - } - impl From<::ethers::contract::Contract> - for PflowDSL { - fn from(contract: ::ethers::contract::Contract) -> Self { - Self::new(contract.address(), contract.client()) - } - } -} diff --git a/crates/src/shared_types.rs b/crates/src/shared_types.rs deleted file mode 100644 index f89d4ea..0000000 --- a/crates/src/shared_types.rs +++ /dev/null @@ -1,78 +0,0 @@ -///`Head(uint256[10],uint256,int256[],(string,uint8,(uint8,uint8),uint256,uint256)[],(string,uint8,(uint8,uint8),uint8,int256[],int256[])[])` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash -)] -pub struct Head { - pub latest_blocks: [::ethers::core::types::U256; 10], - pub sequence: ::ethers::core::types::U256, - pub state: ::std::vec::Vec<::ethers::core::types::I256>, - pub places: ::std::vec::Vec, - pub transitions: ::std::vec::Vec, -} -///`Place(string,uint8,(uint8,uint8),uint256,uint256)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash -)] -pub struct Place { - pub label: ::std::string::String, - pub offset: u8, - pub position: Position, - pub initial: ::ethers::core::types::U256, - pub capacity: ::ethers::core::types::U256, -} -///`Position(uint8,uint8)` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash -)] -pub struct Position { - pub x: u8, - pub y: u8, -} -///`Transition(string,uint8,(uint8,uint8),uint8,int256[],int256[])` -#[derive( - Clone, - ::ethers::contract::EthAbiType, - ::ethers::contract::EthAbiCodec, - serde::Serialize, - serde::Deserialize, - Default, - Debug, - PartialEq, - Eq, - Hash -)] -pub struct Transition { - pub label: ::std::string::String, - pub offset: u8, - pub position: Position, - pub role: u8, - pub delta: ::std::vec::Vec<::ethers::core::types::I256>, - pub guard: ::std::vec::Vec<::ethers::core::types::I256>, -}