diff --git a/Cargo.lock b/Cargo.lock index 570bb45..465bace 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,11 +12,37 @@ dependencies = [ "regex", ] +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aes" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +dependencies = [ + "cfg-if 1.0.0", + "cipher", + "cpufeatures", +] + [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -42,12 +68,6 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.2" @@ -60,6 +80,15 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + [[package]] name = "async-io" version = "1.12.0" @@ -75,9 +104,9 @@ dependencies = [ "parking", "polling", "slab", - "socket2", + "socket2 0.4.7", "waker-fn", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -92,13 +121,24 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.61" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705339e0e4a9690e2908d2b3d049d85682cf19fbd5782494498fbf7003a6a282" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", +] + +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures 0.3.25", + "pharos", + "rustc_version", ] [[package]] @@ -112,6 +152,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "auto_impl" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -123,10 +174,11 @@ name = "availability-oracle" version = "0.3.4" dependencies = [ "async-trait", - "bytes 1.3.0", + "bytes", "clap", "common", "ethabi 17.2.0", + "ethers", "graphql-parser", "hex", "moka", @@ -141,9 +193,25 @@ dependencies = [ "structopt", "tiny-cid", "tokio", + "url", "wasmparser", ] +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base-x" version = "0.2.11" @@ -151,10 +219,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" [[package]] -name = "base64" -version = "0.12.3" +name = "base16ct" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" @@ -162,6 +230,39 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64ct" +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 = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -169,16 +270,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "bitvec" -version = "0.20.4" +name = "bitflags" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" -dependencies = [ - "funty 1.1.0", - "radium 0.6.2", - "tap", - "wyz 0.2.0", -] +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitvec" @@ -186,10 +281,10 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "funty 2.0.0", - "radium 0.7.0", + "funty", + "radium", "tap", - "wyz 0.5.1", + "wyz", ] [[package]] @@ -199,21 +294,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" dependencies = [ "arrayref", - "arrayvec 0.7.2", + "arrayvec", "cc", "cfg-if 1.0.0", - "constant_time_eq", - "digest 0.10.6", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding", - "generic-array", + "constant_time_eq 0.2.4", + "digest", ] [[package]] @@ -226,10 +311,14 @@ dependencies = [ ] [[package]] -name = "block-padding" -version = "0.2.1" +name = "bs58" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "sha2", + "tinyvec", +] [[package]] name = "buf_redux" @@ -267,15 +356,33 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "0.5.6" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +dependencies = [ + "serde", +] [[package]] -name = "bytes" -version = "1.3.0" +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] [[package]] name = "camino" @@ -308,11 +415,29 @@ dependencies = [ "serde_json", ] +[[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", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "cc" -version = "1.0.78" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "jobserver", + "libc", +] [[package]] name = "cfg-if" @@ -326,6 +451,25 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" +dependencies = [ + "num-traits", +] + +[[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 = "clap" version = "2.34.0" @@ -334,7 +478,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "strsim", "textwrap", "unicode-width", @@ -342,12 +486,55 @@ dependencies = [ ] [[package]] -name = "clear_on_drop" -version = "0.2.5" +name = "coins-bip32" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38508a63f4979f0048febc9966fadbd48e5dab31fd0ec6a3f151bbf4a74f7423" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" dependencies = [ - "cc", + "bs58", + "coins-core", + "digest", + "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", + "generic-array", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2", + "sha3", + "thiserror", ] [[package]] @@ -370,7 +557,6 @@ dependencies = [ "anyhow", "async-trait", "blake3", - "eip-712-derive", "futures 0.3.25", "lazy_static", "never", @@ -381,11 +567,9 @@ dependencies = [ "slog", "slog-async", "slog-term", - "solidity-bindgen", "structopt", "tokio", "warp", - "web3", ] [[package]] @@ -394,20 +578,39 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd7bef69dc86e3c610e4e7aed41035e2a7ed12e72dd7530f61327a6579a4390b" dependencies = [ - "crossbeam-utils 0.8.14", + "crossbeam-utils 0.8.19", +] + +[[package]] +name = "const-hex" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "hex", + "proptest", + "serde", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "constant_time_eq" -version = "0.2.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] -name = "convert_case" -version = "0.4.0" +name = "constant_time_eq" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" [[package]] name = "core-foundation" @@ -434,6 +637,15 @@ dependencies = [ "libc", ] +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "crossbeam-channel" version = "0.5.6" @@ -441,7 +653,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.14", + "crossbeam-utils 0.8.19", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch 0.9.18", + "crossbeam-utils 0.8.19", ] [[package]] @@ -459,6 +681,15 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils 0.8.19", +] + [[package]] name = "crossbeam-utils" version = "0.7.2" @@ -472,12 +703,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -485,6 +713,18 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -496,13 +736,12 @@ dependencies = [ ] [[package]] -name = "crypto-mac" -version = "0.8.0" +name = "ctr" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "generic-array", - "subtle", + "cipher", ] [[package]] @@ -528,7 +767,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" dependencies = [ "data-encoding", - "syn", + "syn 1.0.107", +] + +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", ] [[package]] @@ -537,33 +786,38 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "convert_case", "proc-macro2", "quote", - "rustc_version", - "syn", + "syn 1.0.107", ] [[package]] -name = "digest" -version = "0.9.0" +name = "diff" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.3", + "block-buffer", + "const-oid", "crypto-common", "subtle", ] +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + [[package]] name = "dirs-next" version = "2.0.0" @@ -574,6 +828,18 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -586,23 +852,23 @@ dependencies = [ ] [[package]] -name = "ed25519" -version = "1.5.2" +name = "dunce" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" -dependencies = [ - "signature", -] +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] -name = "eip-712-derive" -version = "0.4.0" -source = "git+https://github.com/graphprotocol/eip-712-derive#0ce4f89c98d0b56d9d67c16b732425e7f2fd14b3" +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "clear_on_drop", - "keccak-hash", - "lazy_static", - "libsecp256k1", + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", ] [[package]] @@ -611,6 +877,34 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "ena" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +dependencies = [ + "log", +] + [[package]] name = "encoding_rs" version = "0.8.31" @@ -620,6 +914,40 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "enr" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" +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.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "error-chain" version = "0.12.4" @@ -630,19 +958,25 @@ dependencies = [ ] [[package]] -name = "ethabi" -version = "14.1.0" +name = "eth-keystore" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01317735d563b3bad2d5f90d2e1799f414165408251abb762510f40e790e69a" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" dependencies = [ - "anyhow", - "ethereum-types 0.11.0", + "aes", + "ctr", + "digest", "hex", + "hmac", + "pbkdf2 0.11.0", + "rand", + "scrypt", "serde", "serde_json", - "sha3 0.9.1", + "sha2", + "sha3", "thiserror", - "uint", + "uuid 0.8.2", ] [[package]] @@ -657,22 +991,26 @@ dependencies = [ "regex", "serde", "serde_json", - "sha3 0.10.6", + "sha3", "thiserror", "uint", ] [[package]] -name = "ethbloom" -version = "0.11.1" +name = "ethabi" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" dependencies = [ - "crunchy", - "fixed-hash 0.7.0", - "impl-rlp", - "impl-serde", - "tiny-keccak", + "ethereum-types 0.14.1", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror", + "uint", ] [[package]] @@ -684,22 +1022,23 @@ dependencies = [ "crunchy", "fixed-hash 0.7.0", "impl-rlp", - "impl-serde", + "impl-serde 0.3.2", "tiny-keccak", ] [[package]] -name = "ethereum-types" -version = "0.11.0" +name = "ethbloom" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64b5df66a228d85e4b17e5d6c6aa43b0310898ffe8a85988c4c032357aaabfd" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ - "ethbloom 0.11.1", - "fixed-hash 0.7.0", + "crunchy", + "fixed-hash 0.8.0", + "impl-codec", "impl-rlp", - "impl-serde", - "primitive-types 0.9.1", - "uint", + "impl-serde 0.4.0", + "scale-info", + "tiny-keccak", ] [[package]] @@ -711,17 +1050,291 @@ dependencies = [ "ethbloom 0.12.1", "fixed-hash 0.7.0", "impl-rlp", - "impl-serde", + "impl-serde 0.3.2", "primitive-types 0.11.1", "uint", ] +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom 0.13.0", + "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde 0.4.0", + "primitive-types 0.12.2", + "scale-info", + "uint", +] + +[[package]] +name = "ethers" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c7cd562832e2ff584fa844cd2f6e5d4f35bbe11b28c7c9b8df957b2e1d0c701" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35dc9a249c066d17e8947ff52a4116406163cf92c7f0763cb8c001760b26403f" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43304317c7f776876e47f2f637859f6d0701c1ec7930a150f169d5fbe7d76f5a" +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.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f96502317bf34f6d71a3e3d270defaa9485d754d789e15a8e04a84161c95eb" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest", + "serde", + "serde_json", + "syn 2.0.48", + "toml 0.8.10", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "452ff6b0a64507ce8d67ffd48b1da3b42f03680dcf5382244e9c93822cbbf5de" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.48", +] + +[[package]] +name = "ethers-core" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aab3cef6cc1c9fd7f787043c81ad3052eff2b96a3878ef1526aa446311bdbfc9" +dependencies = [ + "arrayvec", + "bytes", + "cargo_metadata 0.18.1", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi 18.0.0", + "generic-array", + "k256", + "num_enum", + "once_cell", + "open-fastrlp", + "rand", + "rlp", + "serde", + "serde_json", + "strum", + "syn 2.0.48", + "tempfile", + "thiserror", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "ethers-etherscan" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d45b981f5fa769e1d0343ebc2a44cfa88c9bc312eb681b676318b40cef6fb1" +dependencies = [ + "chrono", + "ethers-core", + "reqwest", + "semver", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "145211f34342487ef83a597c1e69f0d3e01512217a7c72cc8a25931854c7dca0" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb6b15393996e3b8a78ef1332d6483c11d839042c17be58decc92fa8b1c3508a" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", + "ethers-core", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http", + "instant", + "jsonwebtoken", + "once_cell", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-tungstenite 0.20.1", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3b125a103b56aef008af5d5fb48191984aa326b50bfd2557d231dc499833de3" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand", + "sha2", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d21df08582e0a43005018a858cc9b465c5fff9cf4056651be64f844e57d1f55f" +dependencies = [ + "cfg-if 1.0.0", + "const-hex", + "dirs", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror", + "tiny-keccak", + "tokio", + "tracing", + "walkdir", + "yansi", +] + [[package]] name = "event-listener" version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + [[package]] name = "fastrand" version = "1.8.0" @@ -731,6 +1344,22 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + [[package]] name = "fixed-hash" version = "0.7.0" @@ -738,7 +1367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -749,9 +1378,28 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ + "byteorder", + "rand", + "rustc-hex", "static_assertions", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" @@ -775,18 +1423,22 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] -name = "funty" -version = "1.1.0" +name = "fs2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] [[package]] name = "funty" @@ -817,9 +1469,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -827,9 +1479,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" @@ -844,9 +1496,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" @@ -854,7 +1506,7 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" dependencies = [ - "fastrand", + "fastrand 1.8.0", "futures-core", "futures-io", "memchr", @@ -863,40 +1515,54 @@ dependencies = [ "waker-fn", ] +[[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.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures 0.1.31", "futures-channel", @@ -912,43 +1578,60 @@ dependencies = [ ] [[package]] -name = "generic-array" -version = "0.14.6" +name = "fxhash" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" dependencies = [ - "typenum", - "version_check", + "byteorder", ] [[package]] -name = "getrandom" -version = "0.1.16" +name = "generic-array" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "typenum", + "version_check", + "zeroize", ] [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if 1.0.0", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "glob" 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 = "graphql-parser" version = "0.4.0" @@ -959,22 +1642,33 @@ dependencies = [ "thiserror", ] +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + [[package]] name = "h2" version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ - "bytes 1.3.0", + "bytes", "fnv", "futures-core", "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.2", "slab", "tokio", - "tokio-util 0.7.4", + "tokio-util", "tracing", ] @@ -984,6 +1678,21 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + [[package]] name = "headers" version = "0.3.8" @@ -991,8 +1700,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", - "bitflags", - "bytes 1.3.0", + "bitflags 1.3.2", + "bytes", "headers-core", "http", "httpdate", @@ -1018,6 +1727,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -1029,12 +1744,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" [[package]] name = "hex" @@ -1044,23 +1756,20 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.8.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac", - "digest 0.9.0", + "digest", ] [[package]] -name = "hmac-drbg" -version = "0.3.0" +name = "home" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac", + "windows-sys 0.52.0", ] [[package]] @@ -1069,7 +1778,7 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ - "bytes 1.3.0", + "bytes", "fnv", "itoa", ] @@ -1080,7 +1789,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.3.0", + "bytes", "http", "pin-project-lite", ] @@ -1103,7 +1812,7 @@ version = "0.14.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" dependencies = [ - "bytes 1.3.0", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -1114,20 +1823,34 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.7", "tokio", "tower-service", "tracing", "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + [[package]] name = "hyper-tls" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.3.0", + "bytes", "hyper", "native-tls", "tokio", @@ -1136,30 +1859,21 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", ] -[[package]] -name = "impl-codec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" -dependencies = [ - "parity-scale-codec 2.3.1", -] - [[package]] name = "impl-codec" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.2.1", + "parity-scale-codec", ] [[package]] @@ -1180,6 +1894,15 @@ dependencies = [ "serde", ] +[[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" @@ -1188,9 +1911,15 @@ checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + [[package]] name = "indexmap" version = "1.9.2" @@ -1198,7 +1927,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", ] [[package]] @@ -1216,12 +1964,50 @@ version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +[[package]] +name = "is-terminal" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +dependencies = [ + "hermit-abi 0.3.5", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.60" @@ -1232,18 +2018,31 @@ dependencies = [ ] [[package]] -name = "jsonrpc-core" -version = "17.1.0" +name = "jsonwebtoken" +version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4467ab6dfa369b69e52bd0692e480c4d117410538526a57a304a0f2250fd95e" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "futures 0.3.25", - "futures-executor", - "futures-util", - "log", + "base64 0.21.7", + "pem", + "ring 0.16.20", "serde", - "serde_derive", "serde_json", + "simple_asn1", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if 1.0.0", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", ] [[package]] @@ -1256,86 +2055,56 @@ dependencies = [ ] [[package]] -name = "keccak-hash" -version = "0.10.0" +name = "lalrpop" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b286e6b663fb926e1eeb68528e69cb70ed46c6d65871a21b2215ae8154c6d3c" +checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" dependencies = [ - "primitive-types 0.12.2", + "ascii-canvas", + "bit-set", + "diff", + "ena", + "is-terminal", + "itertools 0.10.5", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax 0.7.5", + "string_cache", + "term", "tiny-keccak", + "unicode-xid", ] [[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.139" +name = "lalrpop-util" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" [[package]] -name = "libsecp256k1" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" -dependencies = [ - "arrayref", - "base64 0.13.1", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.8.5", - "serde", - "sha2", - "typenum", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.3.0" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.3.0" +name = "libc" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" -dependencies = [ - "libsecp256k1-core", -] +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] -name = "libsecp256k1-gen-genmult" -version = "0.3.0" +name = "libm" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" -dependencies = [ - "libsecp256k1-core", -] +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] -name = "libsodium-sys" -version = "0.2.7" +name = "linux-raw-sys" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b779387cd56adfbc02ea4a668e704f729be8d6a6abd2c27ca5ee537849a92fd" -dependencies = [ - "cc", - "libc", - "pkg-config", - "walkdir", -] +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -1371,6 +2140,16 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if 1.0.0", + "digest", +] + [[package]] name = "memchr" version = "2.5.0" @@ -1402,16 +2181,24 @@ dependencies = [ "unicase", ] +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + [[package]] name = "mio" -version = "0.8.5" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1423,8 +2210,8 @@ dependencies = [ "async-io", "async-lock", "crossbeam-channel", - "crossbeam-epoch", - "crossbeam-utils 0.8.14", + "crossbeam-epoch 0.8.2", + "crossbeam-utils 0.8.19", "futures-util", "num_cpus", "once_cell", @@ -1436,7 +2223,7 @@ dependencies = [ "tagptr", "thiserror", "triomphe", - "uuid", + "uuid 1.2.2", ] [[package]] @@ -1462,7 +2249,7 @@ dependencies = [ "mime", "mime_guess", "quick-error", - "rand 0.8.5", + "rand", "safemem", "tempfile", "twoway", @@ -1492,16 +2279,74 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c96aba5aa877601bb3f6dd6a63a969e1f82e60646e81e71b14496995e9853c91" +[[package]] +name = "new_debug_unreachable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", + "libm", +] + [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.5", "libc", ] +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate 1.2.1", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "num_threads" version = "0.1.6" @@ -1511,17 +2356,45 @@ dependencies = [ "libc", ] +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.17.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] -name = "opaque-debug" -version = "0.3.0" +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 0.14.1", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.107", +] [[package]] name = "openssl" @@ -1529,7 +2402,7 @@ version = "0.10.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -1546,7 +2419,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1569,18 +2442,10 @@ dependencies = [ ] [[package]] -name = "parity-scale-codec" -version = "2.3.1" +name = "option-ext" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec 0.7.2", - "bitvec 0.20.4", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive 2.3.1", - "serde", -] +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "parity-scale-codec" @@ -1588,26 +2453,14 @@ version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "366e44391a8af4cfd6002ef6ba072bae071a96aafca98d7d448a34c5dca38b6a" dependencies = [ - "arrayvec 0.7.2", - "bitvec 1.0.1", + "arrayvec", + "bitvec", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive 3.1.3", + "parity-scale-codec-derive", "serde", ] -[[package]] -name = "parity-scale-codec-derive" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" -dependencies = [ - "proc-macro-crate 1.2.1", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "parity-scale-codec-derive" version = "3.1.3" @@ -1617,7 +2470,7 @@ dependencies = [ "proc-macro-crate 1.2.1", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1671,40 +2524,159 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-sys 0.42.0", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "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.2.0" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap 2.2.2", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures 0.3.25", + "rustc_version", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared 0.11.2", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1712,6 +2684,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.26" @@ -1729,7 +2711,7 @@ dependencies = [ "libc", "log", "wepoll-ffi", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -1739,16 +2721,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] -name = "primitive-types" -version = "0.9.1" +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettyplease" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06345ee39fbccfb06ab45f3a1a5798d9dafa04cb8921a76d227040003a234b0e" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ - "fixed-hash 0.7.0", - "impl-codec 0.5.1", - "impl-rlp", - "impl-serde", - "uint", + "proc-macro2", + "syn 2.0.48", ] [[package]] @@ -1758,9 +2743,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" dependencies = [ "fixed-hash 0.7.0", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", - "impl-serde", + "impl-serde 0.3.2", "uint", ] @@ -1771,6 +2756,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde 0.4.0", + "scale-info", "uint", ] @@ -1780,7 +2769,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.10", ] [[package]] @@ -1791,7 +2780,7 @@ checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" dependencies = [ "once_cell", "thiserror", - "toml", + "toml 0.5.10", ] [[package]] @@ -1803,7 +2792,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.107", "version_check", ] @@ -1820,9 +2809,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.49" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -1842,6 +2831,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bitflags 2.4.2", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.2", + "unarray", +] + [[package]] name = "protobuf" version = "2.28.0" @@ -1854,7 +2859,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63" dependencies = [ - "bitflags", + "bitflags 1.3.2", "memchr", "unicase", ] @@ -1865,7 +2870,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7e31331286705f455e56cca62e0e717158474ff02b7936c1fa596d983f4ae27" dependencies = [ - "crossbeam-utils 0.8.14", + "crossbeam-utils 0.8.19", "libc", "mach", "once_cell", @@ -1883,38 +2888,19 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.23" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" - [[package]] name = "radium" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -1922,64 +2908,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "rand_chacha", + "rand_core", ] [[package]] name = "rand_chacha" -version = "0.2.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.5.1", + "rand_core", ] [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "rand_core" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "getrandom", ] [[package]] -name = "rand_core" -version = "0.5.1" +name = "rand_xorshift" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] -name = "rand_core" -version = "0.6.4" +name = "raw-cpuid" +version = "10.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "a6823ea29436221176fe662da99998ad3b4db2c7f31e7b6f5fe43adccd6320bb" dependencies = [ - "getrandom 0.2.8", + "bitflags 1.3.2", ] [[package]] -name = "rand_hc" -version = "0.2.0" +name = "rayon" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ - "rand_core 0.5.1", + "either", + "rayon-core", ] [[package]] -name = "raw-cpuid" -version = "10.6.0" +name = "rayon-core" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6823ea29436221176fe662da99998ad3b4db2c7f31e7b6f5fe43adccd6320bb" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "bitflags", + "crossbeam-deque", + "crossbeam-utils 0.8.19", ] [[package]] @@ -1988,7 +2975,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1997,45 +2984,54 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.8", + "getrandom", "redox_syscall", "thiserror", ] [[package]] name = "regex" -version = "1.7.1" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-automata", + "regex-syntax 0.7.5", +] + +[[package]] +name = "regex-automata" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.5", ] [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "regex-syntax" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.13" +version = "0.11.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" +checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" dependencies = [ - "base64 0.13.1", - "bytes 1.3.0", + "base64 0.21.7", + "bytes", "encoding_rs", "futures-core", "futures-util", @@ -2043,6 +3039,7 @@ dependencies = [ "http", "http-body", "hyper", + "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -2052,29 +3049,101 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", + "system-configuration", "tokio", "tokio-native-tls", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots", "winreg", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest", +] + [[package]] name = "rlp" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ - "bytes 1.3.0", + "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.107", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -2090,6 +3159,31 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +dependencies = [ + "bitflags 2.4.2", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-webpki", + "sct", +] + [[package]] name = "rustls-pemfile" version = "0.2.1" @@ -2099,6 +3193,25 @@ dependencies = [ "base64 0.13.1", ] +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.11" @@ -2117,6 +3230,15 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +[[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" @@ -2126,13 +3248,37 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scale-info" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +dependencies = [ + "cfg-if 1.0.0", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +dependencies = [ + "proc-macro-crate 1.2.1", + "proc-macro2", + "quote", + "syn 1.0.107", +] + [[package]] name = "schannel" version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -2156,6 +3302,42 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[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 = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "secp256k1" version = "0.20.3" @@ -2180,7 +3362,7 @@ version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2206,6 +3388,18 @@ dependencies = [ "serde", ] +[[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.152" @@ -2223,7 +3417,7 @@ checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2237,6 +3431,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2255,26 +3458,13 @@ version = "0.9.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" dependencies = [ - "indexmap", + "indexmap 1.9.2", "itoa", "ryu", "serde", "unsafe-libyaml", ] -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha-1" version = "0.10.1" @@ -2283,7 +3473,7 @@ checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.6", + "digest", ] [[package]] @@ -2294,58 +3484,57 @@ checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.6", + "digest", ] [[package]] name = "sha2" -version = "0.9.9" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "block-buffer 0.9.0", "cfg-if 1.0.0", "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest", ] [[package]] name = "sha3" -version = "0.9.1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", + "digest", "keccak", - "opaque-debug", ] [[package]] -name = "sha3" -version = "0.10.6" +name = "signature" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest 0.10.6", - "keccak", + "digest", + "rand_core", ] [[package]] -name = "signal-hook-registry" -version = "1.4.0" +name = "simple_asn1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ - "libc", + "num-bigint", + "num-traits", + "thiserror", + "time", ] [[package]] -name = "signature" -version = "1.6.4" +name = "siphasher" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "skeptic" @@ -2354,7 +3543,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16d23b015676c90a0f01c197bfdc786c20342c73a0afdda9025adb0bc42940a8" dependencies = [ "bytecount", - "cargo_metadata", + "cargo_metadata 0.14.2", "error-chain", "glob", "pulldown-cmark", @@ -2419,61 +3608,49 @@ dependencies = [ ] [[package]] -name = "sodiumoxide" -version = "0.2.7" +name = "socket2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e26be3acb6c2d9a7aac28482586a7856436af4cfe7100031d219de2d2ecb0028" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ - "ed25519", "libc", - "libsodium-sys", - "serde", + "windows-sys 0.48.0", ] [[package]] -name = "soketto" -version = "0.4.2" +name = "solang-parser" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c71ed3d54db0a699f4948e1bb3e45b450fa31fe602621dee6680361d569c88" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" dependencies = [ - "base64 0.12.3", - "bytes 0.5.6", - "futures 0.3.25", - "httparse", - "log", - "rand 0.7.3", - "sha-1 0.9.8", + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf", + "thiserror", + "unicode-xid", ] [[package]] -name = "solidity-bindgen" -version = "0.1.0" +name = "spin" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2edba1a61f570aeb31ec8ed04da957da41c06a29e056871084971c6c30c272a" -dependencies = [ - "async-trait", - "ethabi 14.1.0", - "futures 0.3.25", - "secp256k1", - "sodiumoxide", - "solidity-bindgen-macros", - "web3", - "zeroize", -] +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "solidity-bindgen-macros" -version = "0.1.0" +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f3354acbd11b16d261b3e2d041824aa8e97b68b3fbcce94e6de09310d7879c0" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ - "Inflector", - "ethabi 14.1.0", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn", + "base64ct", + "der", ] [[package]] @@ -2482,6 +3659,19 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot 0.12.1", + "phf_shared 0.10.0", + "precomputed-hash", +] + [[package]] name = "strsim" version = "0.8.0" @@ -2505,11 +3695,33 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.107", +] + +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.48", ] [[package]] @@ -2518,6 +3730,26 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "svm-rs" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +dependencies = [ + "dirs", + "fs2", + "hex", + "once_cell", + "reqwest", + "semver", + "serde", + "serde_json", + "sha2", + "thiserror", + "url", + "zip", +] + [[package]] name = "syn" version = "1.0.107" @@ -2529,6 +3761,23 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "synstructure" version = "0.12.6" @@ -2537,10 +3786,31 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", "unicode-xid", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tagptr" version = "0.2.0" @@ -2561,16 +3831,14 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.3.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" -dependencies = [ - "cfg-if 1.0.0", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +dependencies = [ + "cfg-if 1.0.0", + "fastrand 2.0.1", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -2610,7 +3878,7 @@ checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2692,7 +3960,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.107", "synstructure", ] @@ -2713,33 +3981,30 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.24.1" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ - "autocfg", - "bytes 1.3.0", + "backtrace", + "bytes", "libc", - "memchr", "mio", "num_cpus", - "parking_lot 0.12.1", "pin-project-lite", - "signal-hook-registry", - "socket2", + "socket2 0.5.5", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] @@ -2752,6 +4017,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.11" @@ -2772,22 +4047,22 @@ dependencies = [ "futures-util", "log", "tokio", - "tungstenite", + "tungstenite 0.17.3", ] [[package]] -name = "tokio-util" -version = "0.6.10" +name = "tokio-tungstenite" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ - "bytes 1.3.0", - "futures-core", - "futures-io", - "futures-sink", + "futures-util", "log", - "pin-project-lite", + "rustls", "tokio", + "tokio-rustls", + "tungstenite 0.20.1", + "webpki-roots", ] [[package]] @@ -2796,7 +4071,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ - "bytes 1.3.0", + "bytes", "futures-core", "futures-sink", "pin-project-lite", @@ -2813,6 +4088,40 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951" +dependencies = [ + "indexmap 2.2.2", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tower-service" version = "0.3.2" @@ -2828,9 +4137,21 @@ dependencies = [ "cfg-if 1.0.0", "log", "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "tracing-core" version = "0.1.30" @@ -2840,6 +4161,16 @@ dependencies = [ "once_cell", ] +[[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 = "triomphe" version = "0.1.8" @@ -2860,12 +4191,32 @@ checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.3.0", + "bytes", + "http", + "httparse", + "log", + "rand", + "sha-1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", "http", "httparse", "log", - "rand 0.8.5", - "sha-1 0.10.1", + "rand", + "rustls", + "sha1", "thiserror", "url", "utf-8", @@ -2898,6 +4249,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicase" version = "2.6.0" @@ -2909,9 +4266,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -2967,11 +4324,23 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35" +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -2984,13 +4353,23 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom", + "serde", +] + [[package]] name = "uuid" version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ - "getrandom 0.2.8", + "getrandom", ] [[package]] @@ -3050,7 +4429,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed7b8be92646fc3d18b06147664ebc5f48d222686cb11a8755e561a735aacc6d" dependencies = [ - "bytes 1.3.0", + "bytes", "futures-channel", "futures-util", "headers", @@ -3062,25 +4441,19 @@ dependencies = [ "multipart", "percent-encoding", "pin-project", - "rustls-pemfile", + "rustls-pemfile 0.2.1", "scoped-tls", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-stream", - "tokio-tungstenite", - "tokio-util 0.7.4", + "tokio-tungstenite 0.17.2", + "tokio-util", "tower-service", "tracing", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.10.2+wasi-snapshot-preview1" @@ -3114,7 +4487,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-shared", ] @@ -3148,7 +4521,7 @@ checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3176,50 +4549,10 @@ dependencies = [ ] [[package]] -name = "web3" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc4c18ae15621f764fab919f7e4a83d87163494cbc3460884debef7c6bc1bc6b" -dependencies = [ - "arrayvec 0.5.2", - "base64 0.13.1", - "bytes 1.3.0", - "derive_more", - "ethabi 14.1.0", - "ethereum-types 0.11.0", - "futures 0.3.25", - "futures-timer", - "headers", - "hex", - "jsonrpc-core", - "log", - "parking_lot 0.11.2", - "pin-project", - "reqwest", - "rlp", - "secp256k1", - "serde", - "serde_json", - "soketto", - "tiny-keccak", - "tokio", - "tokio-stream", - "tokio-util 0.6.10", - "url", - "web3-async-native-tls", -] - -[[package]] -name = "web3-async-native-tls" -version = "0.4.0" +name = "webpki-roots" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f6d8d1636b2627fe63518d5a9b38a569405d9c9bc665c43c9c341de57227ebb" -dependencies = [ - "native-tls", - "thiserror", - "tokio", - "url", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "wepoll-ffi" @@ -3267,13 +4600,61 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.1", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", + "windows_x86_64_gnullvm 0.42.1", + "windows_x86_64_msvc 0.42.1", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -3282,56 +4663,163 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a665c9321a199a107f7d84ab7b179ab738c460bf8a8f90f121cdd087b569fd5" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if 1.0.0", + "windows-sys 0.48.0", ] [[package]] -name = "wyz" -version = "0.2.0" +name = "ws_stream_wasm" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures 0.3.25", + "js-sys", + "log", + "pharos", + "rustc_version", + "send_wrapper 0.6.0", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] [[package]] name = "wyz" @@ -3342,8 +4830,63 @@ dependencies = [ "tap", ] +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + [[package]] name = "zeroize" -version = "1.5.7" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq 0.1.5", + "crc32fast", + "crossbeam-utils 0.8.19", + "flate2", + "hmac", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 7b707e1..6e95db5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,9 +3,3 @@ members = [ "common", "availability-oracle", ] - -[patch.'https://github.com/graphprotocol/eip-712-derive'] -#eip-712-derive = { path = "../eip-712-derive" } - -[patch.'https://github.com/graphprotocol/solidity-bindgen'] -#solidity-bindgen = { path = "../solidity-bindgen/solidity-bindgen" } diff --git a/README.md b/README.md index 4b5912f..a0f9c27 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ The Subgraph Oracle verifies the availability of the subgraph files and does oth ``` USAGE: - availability-oracle [FLAGS] [OPTIONS] --contracts --ipfs --signing-key --subgraph + availability-oracle [FLAGS] [OPTIONS] --rewards-manager-contract \ + --url --ipfs --signing-key --subgraph FLAGS: --dry-run log the results but not send a transaction to the rewards manager @@ -11,9 +12,10 @@ FLAGS: -V, --version Prints version information OPTIONS: - -c, --contracts - One of: `mainnet`, `goerli`, `arbitrum-one`, `arbitrum-goerli`, `ganache/mainnet`, `sepolia` or `arbitrum-sepolia`. See - `common/src/contracts/config.rs` for the respective configurations [env: ORACLE_CONTRACTS=] + --rewards-manager-contract + Address of the Graph Protocol RewardsManager contract [env: REWARDS_MANAGER_CONTRACT=] + --url + RPC URL for EVM-compatible netwrok, must be a valid URL [env: RPC_URL=] --grace-period Grace period, in seconds from subgraph creation, for which subgraphs will not be checked [env: ORACLE_GRACE_PERIOD=] [default: 0] diff --git a/availability-oracle/Cargo.toml b/availability-oracle/Cargo.toml index 924225b..57c0457 100644 --- a/availability-oracle/Cargo.toml +++ b/availability-oracle/Cargo.toml @@ -27,3 +27,5 @@ multibase = "0.8.0" moka = { version = "0.8", features = ["future"] } graphql-parser = "0.4.0" secp256k1 = "0.20.3" +ethers = "2.0.10" +url = "2.5.0" diff --git a/availability-oracle/src/abi/RewardsManager.abi.json b/availability-oracle/src/abi/RewardsManager.abi.json new file mode 100644 index 0000000..561f045 --- /dev/null +++ b/availability-oracle/src/abi/RewardsManager.abi.json @@ -0,0 +1,569 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "nameHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "ContractSynced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "param", + "type": "string" + } + ], + "name": "ParameterUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationID", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RewardsAssigned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationID", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "RewardsDenied", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "subgraphDeploymentID", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sinceBlock", + "type": "uint256" + } + ], + "name": "RewardsDenylistUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "controller", + "type": "address" + } + ], + "name": "SetController", + "type": "event" + }, + { + "inputs": [], + "name": "accRewardsPerSignal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accRewardsPerSignalLastBlockUpdated", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IGraphProxy", + "name": "_proxy", + "type": "address" + } + ], + "name": "acceptProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IGraphProxy", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "acceptProxyAndCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "contract IController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "denylist", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_subgraphDeploymentID", + "type": "bytes32" + } + ], + "name": "getAccRewardsForSubgraph", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_subgraphDeploymentID", + "type": "bytes32" + } + ], + "name": "getAccRewardsPerAllocatedToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAccRewardsPerSignal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNewRewardsPerSignal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_allocationID", + "type": "address" + } + ], + "name": "getRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_subgraphDeploymentID", + "type": "bytes32" + } + ], + "name": "isDenied", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "issuancePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minimumSubgraphSignal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_subgraphDeploymentID", + "type": "bytes32" + } + ], + "name": "onSubgraphAllocationUpdate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_subgraphDeploymentID", + "type": "bytes32" + } + ], + "name": "onSubgraphSignalUpdate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + } + ], + "name": "setController", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_subgraphDeploymentID", + "type": "bytes32" + }, + { + "internalType": "bool", + "name": "_deny", + "type": "bool" + } + ], + "name": "setDenied", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_subgraphDeploymentID", + "type": "bytes32[]" + }, + { + "internalType": "bool[]", + "name": "_deny", + "type": "bool[]" + } + ], + "name": "setDeniedMany", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_issuancePerBlock", + "type": "uint256" + } + ], + "name": "setIssuancePerBlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minimumSubgraphSignal", + "type": "uint256" + } + ], + "name": "setMinimumSubgraphSignal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_subgraphAvailabilityOracle", + "type": "address" + } + ], + "name": "setSubgraphAvailabilityOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "subgraphAvailabilityOracle", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "subgraphs", + "outputs": [ + { + "internalType": "uint256", + "name": "accRewardsForSubgraph", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardsForSubgraphSnapshot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardsPerSignalSnapshot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardsPerAllocatedToken", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "syncAllContracts", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_allocationID", + "type": "address" + } + ], + "name": "takeRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateAccRewardsPerSignal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/availability-oracle/src/contract.rs b/availability-oracle/src/contract.rs index 41e6746..e5a79ae 100644 --- a/availability-oracle/src/contract.rs +++ b/availability-oracle/src/contract.rs @@ -1,7 +1,17 @@ use async_trait::async_trait; use common::prelude::*; use common::prometheus; -use common::web3::contract::Options; +use ethers::{ + abi::Address, + contract::abigen, + middleware::SignerMiddleware, + providers::{Http, Middleware, Provider}, + signers::{LocalWallet, Signer}, +}; +use secp256k1::key::SecretKey; +use std::sync::Arc; +use std::time::Duration; +use url::Url; #[async_trait] pub trait RewardsManager { @@ -9,15 +19,33 @@ pub trait RewardsManager { async fn set_denied_many(&self, denied_status: Vec<([u8; 32], bool)>) -> Result<(), Error>; } -type Contracts = common::contracts::Contracts; +abigen!(RewardsManagerABI, "src/abi/RewardsManager.abi.json"); pub struct RewardsManagerContract { - contracts: Contracts, + contract: RewardsManagerABI, LocalWallet>>, + logger: Logger, } impl RewardsManagerContract { - pub fn new(contracts: Contracts) -> Self { - Self { contracts } + pub async fn new( + signing_key: &SecretKey, + url: Url, + rewards_manager_contract: Address, + logger: Logger, + ) -> Self { + let http_client = reqwest::ClientBuilder::new() + .tcp_nodelay(true) + .timeout(Duration::from_secs(10)) + .build() + .unwrap(); + let provider = Provider::new(Http::new_with_client(url, http_client)); + let chain_id = provider.get_chainid().await.unwrap().as_u64(); + let wallet = LocalWallet::from_bytes(signing_key.as_ref()) + .unwrap() + .with_chain_id(chain_id); + let provider = Arc::new(SignerMiddleware::new(provider, wallet)); + let contract = RewardsManagerABI::new(rewards_manager_contract, provider.clone()); + Self { contract, logger } } } @@ -36,14 +64,21 @@ impl RewardsManager for RewardsManagerContract { let ids: Vec<[u8; 32usize]> = chunk.iter().map(|s| s.0).collect(); let statuses: Vec = chunk.iter().map(|s| s.1).collect(); let num_subgraphs = ids.len() as u64; - // To avoid gas estimation errors, we use a high enough gas limit for 100 items - let options = Options::with(|opt| opt.gas = Some(3_000_000.into())); - self.contracts - .rewards_manager() - .send("setDeniedMany", (ids, statuses), Some(options), Some(4)) - .await?; + let tx = self + .contract + .set_denied_many(ids, statuses) + // To avoid gas estimation errors, we use a high enough gas limit for 100 items + .gas(ethers::core::types::U256::from(3_000_000u64)); - METRICS.denied_subgraphs_total.inc_by(num_subgraphs); + if let Err(err) = tx.call().await { + let message = err.decode_revert::().unwrap(); + error!(self.logger, "Transaction failed"; + "message" => message, + ); + } else { + tx.send().await?.await?; + METRICS.denied_subgraphs_total.inc_by(num_subgraphs); + } } Ok(()) diff --git a/availability-oracle/src/main.rs b/availability-oracle/src/main.rs index 8034aac..92ddc7d 100644 --- a/availability-oracle/src/main.rs +++ b/availability-oracle/src/main.rs @@ -7,8 +7,8 @@ mod util; use common::prelude::*; use common::prometheus; -use common::web3::signing::Key; use contract::*; +use ethers::abi::Address; use ipfs::*; use manifest::{Abi, DataSource, Manifest, Mapping}; use network_subgraph::*; @@ -19,6 +19,7 @@ use std::{fmt::Display, str::FromStr}; use structopt::StructOpt; use tiny_cid::Cid; use tokio::time::MissedTickBehavior; +use url::Url; use util::bytes32_to_cid_v0; fn parse_secs(secs: &str) -> Result { @@ -84,18 +85,6 @@ struct Config { )] ipfs_timeout: Duration, - #[structopt( - short, - long, - env = "ORACLE_CONTRACTS", - required_unless("dry-run"), - help = "One of: `mainnet`, `goerli`, `arbitrum-one`, `arbitrum-goerli`, `ganache/mainnet` \ - `sepolia` or `arbitrum-sepolia`. \ - See `common/src/contracts/config.rs` for the respective \ - configurations" - )] - contracts: Option, - #[structopt( long, env = "ORACLE_SIGNING_KEY", @@ -132,6 +121,16 @@ struct Config { help = "a comma separated list of the supported data source kinds" )] supported_data_source_kinds: Vec, + + #[structopt( + long, + env = "REWARDS_MANAGER_CONTRACT", + help = "The address of the rewards manager contract" + )] + pub rewards_manager_contract: Address, + + #[structopt(long, env = "RPC_URL", help = "RPC url for the network")] + pub url: Url, } #[tokio::main] @@ -145,11 +144,15 @@ async fn run(logger: Logger, config: Config) -> Result<()> { let contract: Box = match config.dry_run { false => { let signing_key: &SecretKey = &config.signing_key.unwrap().parse()?; - let contracts_config = config.contracts.unwrap(); - let web3_context = - Web3Context::new(&contracts_config.url, signing_key.address(), signing_key)?; - let contracts = Contracts::new(contracts_config, web3_context); - Box::new(RewardsManagerContract::new(contracts)) + Box::new( + RewardsManagerContract::new( + signing_key, + config.url, + config.rewards_manager_contract, + logger.clone(), + ) + .await, + ) } true => Box::new(RewardsManagerDryRun::new(logger.clone())), }; diff --git a/common/Cargo.toml b/common/Cargo.toml index 1362983..f0bdcd0 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -9,16 +9,13 @@ publish = false [dependencies] anyhow = "1.0.31" async-trait = "0.1.50" -eip-712-derive = { git = "https://github.com/graphprotocol/eip-712-derive" } slog = { version = "2.5.2", features = ["release_max_level_trace", "max_level_trace"] } slog-term = "2.6.0" slog-async = "2.5.0" futures = { version="0.3.5", features=["compat"] } warp = "0.3.1" prometheus = "0.12.0" -tokio = { version="1.10", features=["sync", "time"] } -web3 = "0.16.0" -solidity-bindgen = "0.1.0" +tokio = { version="1.10", features=["sync", "time", "rt-multi-thread"] } structopt = "0.3.14" never = "0.1.0" secp256k1 = "0.20.3" diff --git a/common/src/chain_id.rs b/common/src/chain_id.rs deleted file mode 100644 index d2b6e5e..0000000 --- a/common/src/chain_id.rs +++ /dev/null @@ -1,33 +0,0 @@ -use eip_712_derive::U256; - -pub const MAIN_NET: U256 = U256([ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -]); - -pub const GOERLI: U256 = U256([ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, -]); - -// 421613 = 0x66EED is the chain ID for Arbitrum Goerli -pub const ARBITRUM_GOERLI: U256 = U256([ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 110, - 237, -]); - -// 42161 = 0xA4B1 is the chain ID for Arbitrum One -pub const ARBITRUM_ONE: U256 = U256([ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, - 177, -]); - -// 111551111 = 0xAA36A7 is the chain ID for Sepolia -pub const SEPOLIA: U256 = U256([ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 54, - 167, -]); - -// 421614 = 0x66EEE is the chain ID for Arbitrum Sepolia -pub const ARBITRUM_SEPOLIA: U256 = U256([ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 110, - 238, -]); diff --git a/common/src/contracts/abis.rs b/common/src/contracts/abis.rs deleted file mode 100644 index 17a3a86..0000000 --- a/common/src/contracts/abis.rs +++ /dev/null @@ -1,8679 +0,0 @@ -// WARNING! The rest of this module was auto-generated from a combination of built contract abis, -// and a proc_macro. The choice to put the autogenerated code here oldschool style is because -// it is not yet reasonable to try and build the contracts or pull in an npm dependency as a part -// of the build process, and the proc_macro itself doesn't have a way to describe that the dependencies -// changed. One advantage of putting the generated file here is that is is more browsable and IDE friendly -// -// To regenerate when either the contracts or solidity_bindgen changes: -// 1. Rebuild the contracts: -// a. npm install -// If you get the error "'@graphprotocol/common-ts@0.0.31' is not in the npm registry." then: -// Create an npm account -// Have someone add you to the graphprotocol npm organization -// `npm login` locally and try again -// b. npm run compile -// c. npm run abi:extract -// 2. Delete all the "live" auto-generated code in this file. -// 3. Uncomment the below macro invocation, modifying the path to be a relative directory from -// the workspace to the /build/abis directory created in step 1.b -// 4. Using `cargo-expand contracts::abis > temp.rs`, output the expanded proc macro to a temporary file -// 5. Copy the contents of the temporary file created in step 4 here, leaving the instructions intact -// 7. Remove the unnecessary mod created by cargo_expand -// 8. Comment out the proc_macro invocation again. -// 9. Run cargo fmt -// It aint pretty, but it works. -#![allow( - dead_code, - non_camel_case_types, - clippy::too_many_arguments, - clippy::type_complexity -)] -//solidity_bindgen::contract_abis!("../contracts/build/abis/"); - -pub struct IController { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IController { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IController { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_id\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getContractProxy\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getGovernor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"partialPaused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_id\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_partialPaused\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPartialPaused\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newPauseGuardian\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setPauseGuardian\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_paused\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPaused\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_id\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"unsetContractProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_id\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"updateController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IController -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_contract_proxy( - &self, - id: [u8; 32usize], - contract_address: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setContractProxy", (id, contract_address), None, None) - .await - } - pub async fn update_controller( - &self, - id: [u8; 32usize], - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("updateController", (id, controller), None, None) - .await - } - pub async fn unset_contract_proxy( - &self, - id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("unsetContractProxy", id, None, None) - .await - } - pub async fn set_partial_paused( - &self, - partial_paused: bool, - ) -> ::std::result::Result { - self.provider - .send("setPartialPaused", partial_paused, None, None) - .await - } - pub async fn set_paused( - &self, - paused: bool, - ) -> ::std::result::Result { - self.provider.send("setPaused", paused, None, None).await - } - pub async fn set_pause_guardian( - &self, - new_pause_guardian: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setPauseGuardian", new_pause_guardian, None, None) - .await - } -} -impl IController -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn partial_paused(&self) -> ::std::result::Result { - self.provider.call("partialPaused", ()).await - } - pub async fn paused(&self) -> ::std::result::Result { - self.provider.call("paused", ()).await - } - pub async fn get_contract_proxy( - &self, - id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("getContractProxy", id).await - } - pub async fn get_governor( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("getGovernor", ()).await - } -} -pub struct IENS { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IENS { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IENS { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"node\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"label\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint64\",\n \"name\": \"ttl\",\n \"type\": \"uint64\"\n }\n ],\n \"name\": \"setSubnodeRecord\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IENS -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_subnode_record( - &self, - node: [u8; 32usize], - label: [u8; 32usize], - owner: ::web3::types::Address, - resolver: ::web3::types::Address, - ttl: u64, - ) -> ::std::result::Result { - self.provider - .send( - "setSubnodeRecord", - (node, label, owner, resolver, ttl), - None, - None, - ) - .await - } -} -impl IENS -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn owner( - &self, - node: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("owner", node).await - } -} -pub struct GraphUpgradeable { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for GraphUpgradeable { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl GraphUpgradeable { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"acceptProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptProxyAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl GraphUpgradeable -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn accept_proxy( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("acceptProxy", proxy, None, None).await - } - pub async fn accept_proxy_and_call( - &self, - proxy: ::web3::types::Address, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("acceptProxyAndCall", (proxy, data), None, None) - .await - } -} -impl GraphUpgradeable where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider -{ -} -pub struct GraphProxyAdmin { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for GraphProxyAdmin { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl GraphProxyAdmin { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewPendingOwnership\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"acceptOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract GraphUpgradeable\",\n \"name\": \"_implementation\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"acceptProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract GraphUpgradeable\",\n \"name\": \"_implementation\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptProxyAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"changeProxyAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getProxyAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getProxyImplementation\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getProxyPendingImplementation\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"governor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pendingGovernor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newGovernor\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_implementation\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"upgrade\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl GraphProxyAdmin -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn accept_ownership( - &self, - ) -> ::std::result::Result { - self.provider.send("acceptOwnership", (), None, None).await - } - pub async fn transfer_ownership( - &self, - new_governor: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("transferOwnership", new_governor, None, None) - .await - } - pub async fn accept_proxy_and_call( - &self, - implementation: ::web3::types::Address, - proxy: ::web3::types::Address, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "acceptProxyAndCall", - (implementation, proxy, data), - None, - None, - ) - .await - } - pub async fn upgrade( - &self, - proxy: ::web3::types::Address, - implementation: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("upgrade", (proxy, implementation), None, None) - .await - } - pub async fn accept_proxy( - &self, - implementation: ::web3::types::Address, - proxy: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("acceptProxy", (implementation, proxy), None, None) - .await - } - pub async fn change_proxy_admin( - &self, - proxy: ::web3::types::Address, - new_admin: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("changeProxyAdmin", (proxy, new_admin), None, None) - .await - } -} -impl GraphProxyAdmin -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn governor(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("governor", ()).await - } - pub async fn pending_governor( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("pendingGovernor", ()).await - } - pub async fn get_proxy_pending_implementation( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider - .call("getProxyPendingImplementation", proxy) - .await - } - pub async fn get_proxy_admin( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("getProxyAdmin", proxy).await - } - pub async fn get_proxy_implementation( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("getProxyImplementation", proxy).await - } -} -pub struct GraphToken { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for GraphToken { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl GraphToken { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_initialSupply\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MinterAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MinterRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewPendingOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"acceptOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addMinter\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"governor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isMinter\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pendingGovernor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"_v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeMinter\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceMinter\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newGovernor\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl GraphToken -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn transfer_ownership( - &self, - new_governor: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("transferOwnership", new_governor, None, None) - .await - } - pub async fn add_minter( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("addMinter", account, None, None).await - } - pub async fn remove_minter( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("removeMinter", account, None, None) - .await - } - pub async fn burn_from( - &self, - account: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("burnFrom", (account, amount), None, None) - .await - } - pub async fn transfer_from( - &self, - sender: ::web3::types::Address, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transferFrom", (sender, recipient, amount), None, None) - .await - } - pub async fn burn( - &self, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("burn", amount, None, None).await - } - pub async fn transfer( - &self, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transfer", (recipient, amount), None, None) - .await - } - - pub async fn permit( - &self, - owner: ::web3::types::Address, - spender: ::web3::types::Address, - value: ::web3::types::U256, - deadline: ::web3::types::U256, - v: u8, - r: [u8; 32usize], - s: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send( - "permit", - (owner, spender, value, deadline, v, r, s), - None, - None, - ) - .await - } - pub async fn mint( - &self, - to: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("mint", (to, amount), None, None).await - } - pub async fn increase_allowance( - &self, - spender: ::web3::types::Address, - added_value: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("increaseAllowance", (spender, added_value), None, None) - .await - } - pub async fn approve( - &self, - spender: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("approve", (spender, amount), None, None) - .await - } - pub async fn decrease_allowance( - &self, - spender: ::web3::types::Address, - subtracted_value: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("decreaseAllowance", (spender, subtracted_value), None, None) - .await - } - pub async fn renounce_minter( - &self, - ) -> ::std::result::Result { - self.provider.send("renounceMinter", (), None, None).await - } - pub async fn accept_ownership( - &self, - ) -> ::std::result::Result { - self.provider.send("acceptOwnership", (), None, None).await - } -} -impl GraphToken -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn symbol(&self) -> ::std::result::Result<::std::string::String, ::web3::Error> { - self.provider.call("symbol", ()).await - } - pub async fn balance_of( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("balanceOf", account).await - } - pub async fn name(&self) -> ::std::result::Result<::std::string::String, ::web3::Error> { - self.provider.call("name", ()).await - } - pub async fn pending_governor( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("pendingGovernor", ()).await - } - pub async fn decimals(&self) -> ::std::result::Result { - self.provider.call("decimals", ()).await - } - pub async fn is_minter( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isMinter", account).await - } - pub async fn allowance( - &self, - owner: ::web3::types::Address, - spender: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("allowance", (owner, spender)).await - } - pub async fn governor(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("governor", ()).await - } - pub async fn nonces( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("nonces", input_0).await - } - pub async fn total_supply(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("totalSupply", ()).await - } -} -pub struct GNSV1Storage { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for GNSV1Storage { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl GNSV1Storage { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"bondingCurve\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"erc1056Registry\",\n \"outputs\": [\n {\n \"internalType\": \"contract IEthereumDIDRegistry\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"graphAccountSubgraphNumbers\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"nameSignals\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"vSignal\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nSignal\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"reserveRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"disabled\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"withdrawableGRT\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ownerTaxPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"subgraphs\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl GNSV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } -} -impl GNSV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn bonding_curve( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("bondingCurve", ()).await - } - pub async fn owner_tax_percentage(&self) -> ::std::result::Result { - self.provider.call("ownerTaxPercentage", ()).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn erc_1056_registry( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("erc1056Registry", ()).await - } - pub async fn graph_account_subgraph_numbers( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("graphAccountSubgraphNumbers", input_0) - .await - } - pub async fn subgraphs( - &self, - input_0: ::web3::types::Address, - input_1: ::web3::types::U256, - ) -> ::std::result::Result<[u8; 32usize], ::web3::Error> { - self.provider.call("subgraphs", (input_0, input_1)).await - } - pub async fn name_signals( - &self, - input_0: ::web3::types::Address, - input_1: ::web3::types::U256, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - [u8; 32usize], - u32, - bool, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("nameSignals", (input_0, input_1)).await - } -} -pub struct IStaking { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IStaking { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IStaking { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"allocate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"allocateFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_restake\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"claim\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_allocationID\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_restake\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"claimMany\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_poi\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"closeAllocation\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"poi\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct IStakingData.CloseAllocationRequest[]\",\n \"name\": \"_requests\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"closeAllocationMany\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_oldAllocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_poi\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"closeAndAllocate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"collect\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getAllocation\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"createdAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"closedAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"collectedFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocation\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerAllocatedToken\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IStakingData.Allocation\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getAllocationState\",\n \"outputs\": [\n {\n \"internalType\": \"enum IStaking.AllocationState\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_delegator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getDelegation\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLocked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLockedUntil\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IStakingData.Delegation\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getIndexerCapacity\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getIndexerStakedTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getSubgraphAllocatedTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasStake\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isAllocation\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_delegator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isDelegator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isOperator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_assetHolder\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAssetHolder\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_channelDisputeEpochs\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setChannelDisputeEpochs\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setCurationPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_indexingRewardCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_queryFeeCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_cooldownBlocks\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationParameters\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_blocks\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationParametersCooldown\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationRatio\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationRatio\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationTaxPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationUnbondingPeriod\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationUnbondingPeriod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_maxAllocationEpochs\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setMaxAllocationEpochs\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumIndexerStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumIndexerStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setOperator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setProtocolPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setRebateRatio\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_destination\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setRewardsDestination\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_slasher\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setSlasher\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_thawingPeriod\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setThawingPeriod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_beneficiary\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"slash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeTo\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_shares\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"undelegate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"unstake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_newIndexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawDelegated\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IStaking -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_delegation_tax_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationTaxPercentage", percentage, None, None) - .await - } - pub async fn unstake( - &self, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("unstake", tokens, None, None).await - } - pub async fn set_rewards_destination( - &self, - destination: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setRewardsDestination", destination, None, None) - .await - } - pub async fn close_and_allocate( - &self, - old_allocation_id: ::web3::types::Address, - poi: [u8; 32usize], - indexer: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "closeAndAllocate", - ( - old_allocation_id, - poi, - indexer, - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn set_minimum_indexer_stake( - &self, - minimum_indexer_stake: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("setMinimumIndexerStake", minimum_indexer_stake, None, None) - .await - } - pub async fn undelegate( - &self, - indexer: ::web3::types::Address, - shares: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("undelegate", (indexer, shares), None, None) - .await - } - pub async fn claim( - &self, - allocation_id: ::web3::types::Address, - restake: bool, - ) -> ::std::result::Result { - self.provider - .send("claim", (allocation_id, restake), None, None) - .await - } - pub async fn set_channel_dispute_epochs( - &self, - channel_dispute_epochs: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setChannelDisputeEpochs", - channel_dispute_epochs, - None, - None, - ) - .await - } - pub async fn withdraw( - &self, - ) -> ::std::result::Result { - self.provider.send("withdraw", (), None, None).await - } - pub async fn set_slasher( - &self, - slasher: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setSlasher", (slasher, allowed), None, None) - .await - } - pub async fn set_delegation_unbonding_period( - &self, - delegation_unbonding_period: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setDelegationUnbondingPeriod", - delegation_unbonding_period, - None, - None, - ) - .await - } - pub async fn collect( - &self, - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("collect", (tokens, allocation_id), None, None) - .await - } - pub async fn allocate( - &self, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "allocate", - ( - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn withdraw_delegated( - &self, - indexer: ::web3::types::Address, - new_indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("withdrawDelegated", (indexer, new_indexer), None, None) - .await - } - pub async fn delegate( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("delegate", (indexer, tokens), None, None) - .await - } - pub async fn close_allocation( - &self, - allocation_id: ::web3::types::Address, - poi: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("closeAllocation", (allocation_id, poi), None, None) - .await - } - pub async fn slash( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - reward: ::web3::types::U256, - beneficiary: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("slash", (indexer, tokens, reward, beneficiary), None, None) - .await - } - pub async fn allocate_from( - &self, - indexer: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "allocateFrom", - ( - indexer, - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn close_allocation_many( - &self, - requests: ::solidity_bindgen::internal::Unimplemented, - ) -> ::std::result::Result { - self.provider - .send("closeAllocationMany", requests, None, None) - .await - } - pub async fn claim_many( - &self, - allocation_id: ::std::vec::Vec<::web3::types::Address>, - restake: bool, - ) -> ::std::result::Result { - self.provider - .send("claimMany", (allocation_id, restake), None, None) - .await - } - pub async fn set_delegation_parameters_cooldown( - &self, - blocks: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationParametersCooldown", blocks, None, None) - .await - } - pub async fn set_protocol_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setProtocolPercentage", percentage, None, None) - .await - } - pub async fn set_rebate_ratio( - &self, - alpha_numerator: u32, - alpha_denominator: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setRebateRatio", - (alpha_numerator, alpha_denominator), - None, - None, - ) - .await - } - pub async fn stake_to( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("stakeTo", (indexer, tokens), None, None) - .await - } - pub async fn set_asset_holder( - &self, - asset_holder: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setAssetHolder", (asset_holder, allowed), None, None) - .await - } - pub async fn set_max_allocation_epochs( - &self, - max_allocation_epochs: u32, - ) -> ::std::result::Result { - self.provider - .send("setMaxAllocationEpochs", max_allocation_epochs, None, None) - .await - } - pub async fn set_delegation_parameters( - &self, - indexing_reward_cut: u32, - query_fee_cut: u32, - cooldown_blocks: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setDelegationParameters", - (indexing_reward_cut, query_fee_cut, cooldown_blocks), - None, - None, - ) - .await - } - pub async fn set_operator( - &self, - operator: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setOperator", (operator, allowed), None, None) - .await - } - pub async fn set_thawing_period( - &self, - thawing_period: u32, - ) -> ::std::result::Result { - self.provider - .send("setThawingPeriod", thawing_period, None, None) - .await - } - pub async fn stake( - &self, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("stake", tokens, None, None).await - } - pub async fn set_curation_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setCurationPercentage", percentage, None, None) - .await - } - pub async fn set_delegation_ratio( - &self, - delegation_ratio: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationRatio", delegation_ratio, None, None) - .await - } -} -impl IStaking -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn is_allocation( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isAllocation", allocation_id).await - } - pub async fn get_subgraph_allocated_tokens( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getSubgraphAllocatedTokens", subgraph_deployment_id) - .await - } - pub async fn is_delegator( - &self, - indexer: ::web3::types::Address, - delegator: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .call("isDelegator", (indexer, delegator)) - .await - } - pub async fn get_delegation( - &self, - indexer: ::web3::types::Address, - delegator: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider - .call("getDelegation", (indexer, delegator)) - .await - } - pub async fn get_allocation_state( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .call("getAllocationState", allocation_id) - .await - } - pub async fn has_stake( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("hasStake", indexer).await - } - pub async fn get_indexer_capacity( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getIndexerCapacity", indexer).await - } - pub async fn get_allocation( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::Address, - [u8; 32usize], - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("getAllocation", allocation_id).await - } - pub async fn get_indexer_staked_tokens( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getIndexerStakedTokens", indexer).await - } - pub async fn is_operator( - &self, - operator: ::web3::types::Address, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isOperator", (operator, indexer)).await - } -} -pub struct IGraphProxy { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IGraphProxy { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IGraphProxy { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [],\n \"name\": \"acceptUpgrade\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptUpgradeAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"admin\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"implementation\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pendingImplementation\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newImplementation\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"upgradeTo\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IGraphProxy -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn upgrade_to( - &self, - new_implementation: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("upgradeTo", new_implementation, None, None) - .await - } - pub async fn accept_upgrade( - &self, - ) -> ::std::result::Result { - self.provider.send("acceptUpgrade", (), None, None).await - } - pub async fn accept_upgrade_and_call( - &self, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("acceptUpgradeAndCall", data, None, None) - .await - } - pub async fn implementation( - &self, - ) -> ::std::result::Result { - self.provider.send("implementation", (), None, None).await - } - pub async fn admin( - &self, - ) -> ::std::result::Result { - self.provider.send("admin", (), None, None).await - } - pub async fn pending_implementation( - &self, - ) -> ::std::result::Result { - self.provider - .send("pendingImplementation", (), None, None) - .await - } - pub async fn set_admin( - &self, - new_admin: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("setAdmin", new_admin, None, None).await - } -} -impl IGraphProxy where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider -{ -} -pub struct IServiceRegistry { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IServiceRegistry { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IServiceRegistry { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRegistered\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"_url\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_geohash\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"register\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_url\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_geohash\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"registerFor\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unregister\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"unregisterFor\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IServiceRegistry -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn register_for( - &self, - indexer: ::web3::types::Address, - url: ::std::string::String, - geohash: ::std::string::String, - ) -> ::std::result::Result { - self.provider - .send("registerFor", (indexer, url, geohash), None, None) - .await - } - pub async fn register( - &self, - url: ::std::string::String, - geohash: ::std::string::String, - ) -> ::std::result::Result { - self.provider - .send("register", (url, geohash), None, None) - .await - } - pub async fn unregister( - &self, - ) -> ::std::result::Result { - self.provider.send("unregister", (), None, None).await - } - pub async fn unregister_for( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("unregisterFor", indexer, None, None) - .await - } -} -impl IServiceRegistry -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn is_registered( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isRegistered", indexer).await - } -} -pub struct Curation { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for Curation { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl Curation { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"curator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"signal\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Burned\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Collected\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"curator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"signal\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"curationTax\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Signalled\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"acceptProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptProxyAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"bondingCurve\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_signalIn\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensOutMin\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"collect\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"curationTaxPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultReserveRatio\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getCurationPoolSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getCurationPoolTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_curator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getCuratorSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_bondingCurve\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_defaultReserveRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_curationTaxPercentage\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumCurationDeposit\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isCurated\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumCurationDeposit\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensIn\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_signalOutMin\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"pools\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"reserveRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"contract IGraphCurationToken\",\n \"name\": \"gcs\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setCurationTaxPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_defaultReserveRatio\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDefaultReserveRatio\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumCurationDeposit\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumCurationDeposit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_signalIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalToTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokensToSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl Curation -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn initialize( - &self, - controller: ::web3::types::Address, - bonding_curve: ::web3::types::Address, - default_reserve_ratio: u32, - curation_tax_percentage: u32, - minimum_curation_deposit: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "initialize", - ( - controller, - bonding_curve, - default_reserve_ratio, - curation_tax_percentage, - minimum_curation_deposit, - ), - None, - None, - ) - .await - } - pub async fn collect( - &self, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("collect", (subgraph_deployment_id, tokens), None, None) - .await - } - pub async fn set_curation_tax_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setCurationTaxPercentage", percentage, None, None) - .await - } - pub async fn accept_proxy_and_call( - &self, - proxy: ::web3::types::Address, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("acceptProxyAndCall", (proxy, data), None, None) - .await - } - pub async fn accept_proxy( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("acceptProxy", proxy, None, None).await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } - pub async fn set_default_reserve_ratio( - &self, - default_reserve_ratio: u32, - ) -> ::std::result::Result { - self.provider - .send("setDefaultReserveRatio", default_reserve_ratio, None, None) - .await - } - pub async fn mint( - &self, - subgraph_deployment_id: [u8; 32usize], - tokens_in: ::web3::types::U256, - signal_out_min: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "mint", - (subgraph_deployment_id, tokens_in, signal_out_min), - None, - None, - ) - .await - } - pub async fn set_minimum_curation_deposit( - &self, - minimum_curation_deposit: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "setMinimumCurationDeposit", - minimum_curation_deposit, - None, - None, - ) - .await - } - pub async fn burn( - &self, - subgraph_deployment_id: [u8; 32usize], - signal_in: ::web3::types::U256, - tokens_out_min: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "burn", - (subgraph_deployment_id, signal_in, tokens_out_min), - None, - None, - ) - .await - } -} -impl Curation -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn bonding_curve( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("bondingCurve", ()).await - } - pub async fn get_curation_pool_tokens( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getCurationPoolTokens", subgraph_deployment_id) - .await - } - pub async fn is_curated( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .call("isCurated", subgraph_deployment_id) - .await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn minimum_curation_deposit( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("minimumCurationDeposit", ()).await - } - pub async fn pools( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<(::web3::types::U256, u32, ::web3::types::Address), ::web3::Error> - { - self.provider.call("pools", input_0).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn curation_tax_percentage(&self) -> ::std::result::Result { - self.provider.call("curationTaxPercentage", ()).await - } - pub async fn default_reserve_ratio(&self) -> ::std::result::Result { - self.provider.call("defaultReserveRatio", ()).await - } - pub async fn signal_to_tokens( - &self, - subgraph_deployment_id: [u8; 32usize], - signal_in: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("signalToTokens", (subgraph_deployment_id, signal_in)) - .await - } - pub async fn tokens_to_signal( - &self, - subgraph_deployment_id: [u8; 32usize], - tokens_in: ::web3::types::U256, - ) -> ::std::result::Result<(::web3::types::U256, ::web3::types::U256), ::web3::Error> { - self.provider - .call("tokensToSignal", (subgraph_deployment_id, tokens_in)) - .await - } - pub async fn get_curation_pool_signal( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getCurationPoolSignal", subgraph_deployment_id) - .await - } - pub async fn get_curator_signal( - &self, - curator: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getCuratorSignal", (curator, subgraph_deployment_id)) - .await - } -} -pub struct IGNS { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IGNS { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IGNS { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [],\n \"name\": \"approveAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_nSignal\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensOutMin\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnNSignal\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"deprecateSubgraph\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_curator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getCuratorNSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPublished\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensIn\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_nSignalOutMin\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNSignal\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_nSignalIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"nSignalToTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_nSignalIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"nSignalToVSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_versionMetadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphMetadata\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"publishNewSubgraph\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_versionMetadata\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"publishNewVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"_nameSystem\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_nameIdentifier\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_name\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setDefaultName\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_ownerTaxPercentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setOwnerTaxPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokensToNSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphMetadata\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"updateSubgraphMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_vSignalIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"vSignalToNSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IGNS -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_owner_tax_percentage( - &self, - owner_tax_percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setOwnerTaxPercentage", owner_tax_percentage, None, None) - .await - } - pub async fn deprecate_subgraph( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "deprecateSubgraph", - (graph_account, subgraph_number), - None, - None, - ) - .await - } - pub async fn mint_n_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - tokens_in: ::web3::types::U256, - n_signal_out_min: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "mintNSignal", - (graph_account, subgraph_number, tokens_in, n_signal_out_min), - None, - None, - ) - .await - } - pub async fn publish_new_subgraph( - &self, - graph_account: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - version_metadata: [u8; 32usize], - subgraph_metadata: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send( - "publishNewSubgraph", - ( - graph_account, - subgraph_deployment_id, - version_metadata, - subgraph_metadata, - ), - None, - None, - ) - .await - } - pub async fn set_default_name( - &self, - graph_account: ::web3::types::Address, - name_system: u8, - name_identifier: [u8; 32usize], - name: ::std::string::String, - ) -> ::std::result::Result { - self.provider - .send( - "setDefaultName", - (graph_account, name_system, name_identifier, name), - None, - None, - ) - .await - } - pub async fn withdraw( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("withdraw", (graph_account, subgraph_number), None, None) - .await - } - pub async fn approve_all( - &self, - ) -> ::std::result::Result { - self.provider.send("approveAll", (), None, None).await - } - pub async fn update_subgraph_metadata( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - subgraph_metadata: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send( - "updateSubgraphMetadata", - (graph_account, subgraph_number, subgraph_metadata), - None, - None, - ) - .await - } - pub async fn publish_new_version( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - subgraph_deployment_id: [u8; 32usize], - version_metadata: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send( - "publishNewVersion", - ( - graph_account, - subgraph_number, - subgraph_deployment_id, - version_metadata, - ), - None, - None, - ) - .await - } - pub async fn burn_n_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - n_signal: ::web3::types::U256, - tokens_out_min: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "burnNSignal", - (graph_account, subgraph_number, n_signal, tokens_out_min), - None, - None, - ) - .await - } -} -impl IGNS -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn tokens_to_n_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - tokens_in: ::web3::types::U256, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider - .call( - "tokensToNSignal", - (graph_account, subgraph_number, tokens_in), - ) - .await - } - pub async fn n_signal_to_tokens( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - n_signal_in: ::web3::types::U256, - ) -> ::std::result::Result<(::web3::types::U256, ::web3::types::U256), ::web3::Error> { - self.provider - .call( - "nSignalToTokens", - (graph_account, subgraph_number, n_signal_in), - ) - .await - } - pub async fn is_published( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .call("isPublished", (graph_account, subgraph_number)) - .await - } - pub async fn v_signal_to_n_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - v_signal_in: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "vSignalToNSignal", - (graph_account, subgraph_number, v_signal_in), - ) - .await - } - pub async fn get_curator_n_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - curator: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "getCuratorNSignal", - (graph_account, subgraph_number, curator), - ) - .await - } - pub async fn n_signal_to_v_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - n_signal_in: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "nSignalToVSignal", - (graph_account, subgraph_number, n_signal_in), - ) - .await - } -} -pub struct Managed { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for Managed { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl Managed { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl Managed -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } -} -impl Managed -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } -} -pub struct ERC20Burnable { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for ERC20Burnable { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl ERC20Burnable { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl ERC20Burnable -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn transfer_from( - &self, - sender: ::web3::types::Address, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transferFrom", (sender, recipient, amount), None, None) - .await - } - pub async fn burn_from( - &self, - account: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("burnFrom", (account, amount), None, None) - .await - } - pub async fn increase_allowance( - &self, - spender: ::web3::types::Address, - added_value: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("increaseAllowance", (spender, added_value), None, None) - .await - } - pub async fn approve( - &self, - spender: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("approve", (spender, amount), None, None) - .await - } - pub async fn transfer( - &self, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transfer", (recipient, amount), None, None) - .await - } - pub async fn burn( - &self, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("burn", amount, None, None).await - } - pub async fn decrease_allowance( - &self, - spender: ::web3::types::Address, - subtracted_value: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("decreaseAllowance", (spender, subtracted_value), None, None) - .await - } -} -impl ERC20Burnable -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn name(&self) -> ::std::result::Result<::std::string::String, ::web3::Error> { - self.provider.call("name", ()).await - } - pub async fn allowance( - &self, - owner: ::web3::types::Address, - spender: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("allowance", (owner, spender)).await - } - pub async fn decimals(&self) -> ::std::result::Result { - self.provider.call("decimals", ()).await - } - pub async fn symbol(&self) -> ::std::result::Result<::std::string::String, ::web3::Error> { - self.provider.call("symbol", ()).await - } - pub async fn balance_of( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("balanceOf", account).await - } - pub async fn total_supply(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("totalSupply", ()).await - } -} -pub struct IStakingV1 { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IStakingV1 { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IStakingV1 { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"allocate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"allocateFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_restake\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"claim\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_allocationID\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_restake\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"claimMany\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_poi\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"closeAllocation\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"poi\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct IStakingData.CloseAllocationRequest[]\",\n \"name\": \"_requests\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"closeAllocationMany\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_oldAllocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_poi\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"closeAndAllocate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"collect\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getAllocation\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"createdAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"closedAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"collectedFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocation\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerAllocatedToken\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IStakingData.Allocation\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getAllocationState\",\n \"outputs\": [\n {\n \"internalType\": \"enum IStakingV1.AllocationState\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_delegator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getDelegation\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLocked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLockedUntil\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IStakingData.Delegation\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getIndexerCapacity\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getIndexerStakedTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getSubgraphAllocatedTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasStake\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isAllocation\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_delegator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isDelegator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isOperator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_assetHolder\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAssetHolder\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_channelDisputeEpochs\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setChannelDisputeEpochs\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setCurationPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_indexingRewardCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_queryFeeCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_cooldownBlocks\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationParameters\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_blocks\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationParametersCooldown\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationRatio\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationRatio\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationTaxPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationUnbondingPeriod\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationUnbondingPeriod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_maxAllocationEpochs\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setMaxAllocationEpochs\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumIndexerStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumIndexerStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setOperator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setProtocolPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setRebateRatio\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_slasher\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setSlasher\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_thawingPeriod\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setThawingPeriod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_beneficiary\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"slash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeTo\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_shares\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"undelegate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"unstake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_newIndexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawDelegated\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IStakingV1 -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_minimum_indexer_stake( - &self, - minimum_indexer_stake: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("setMinimumIndexerStake", minimum_indexer_stake, None, None) - .await - } - pub async fn set_delegation_parameters( - &self, - indexing_reward_cut: u32, - query_fee_cut: u32, - cooldown_blocks: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setDelegationParameters", - (indexing_reward_cut, query_fee_cut, cooldown_blocks), - None, - None, - ) - .await - } - pub async fn claim( - &self, - allocation_id: ::web3::types::Address, - restake: bool, - ) -> ::std::result::Result { - self.provider - .send("claim", (allocation_id, restake), None, None) - .await - } - pub async fn set_delegation_parameters_cooldown( - &self, - blocks: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationParametersCooldown", blocks, None, None) - .await - } - pub async fn stake_to( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("stakeTo", (indexer, tokens), None, None) - .await - } - pub async fn allocate( - &self, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "allocate", - ( - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn close_and_allocate( - &self, - old_allocation_id: ::web3::types::Address, - poi: [u8; 32usize], - indexer: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "closeAndAllocate", - ( - old_allocation_id, - poi, - indexer, - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn close_allocation_many( - &self, - requests: ::solidity_bindgen::internal::Unimplemented, - ) -> ::std::result::Result { - self.provider - .send("closeAllocationMany", requests, None, None) - .await - } - pub async fn set_channel_dispute_epochs( - &self, - channel_dispute_epochs: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setChannelDisputeEpochs", - channel_dispute_epochs, - None, - None, - ) - .await - } - pub async fn withdraw( - &self, - ) -> ::std::result::Result { - self.provider.send("withdraw", (), None, None).await - } - pub async fn withdraw_delegated( - &self, - indexer: ::web3::types::Address, - new_indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("withdrawDelegated", (indexer, new_indexer), None, None) - .await - } - pub async fn set_delegation_unbonding_period( - &self, - delegation_unbonding_period: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setDelegationUnbondingPeriod", - delegation_unbonding_period, - None, - None, - ) - .await - } - pub async fn close_allocation( - &self, - allocation_id: ::web3::types::Address, - poi: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("closeAllocation", (allocation_id, poi), None, None) - .await - } - pub async fn set_slasher( - &self, - slasher: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setSlasher", (slasher, allowed), None, None) - .await - } - pub async fn set_delegation_ratio( - &self, - delegation_ratio: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationRatio", delegation_ratio, None, None) - .await - } - pub async fn set_max_allocation_epochs( - &self, - max_allocation_epochs: u32, - ) -> ::std::result::Result { - self.provider - .send("setMaxAllocationEpochs", max_allocation_epochs, None, None) - .await - } - pub async fn allocate_from( - &self, - indexer: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "allocateFrom", - ( - indexer, - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn set_operator( - &self, - operator: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setOperator", (operator, allowed), None, None) - .await - } - pub async fn set_protocol_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setProtocolPercentage", percentage, None, None) - .await - } - pub async fn set_delegation_tax_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationTaxPercentage", percentage, None, None) - .await - } - pub async fn claim_many( - &self, - allocation_id: ::std::vec::Vec<::web3::types::Address>, - restake: bool, - ) -> ::std::result::Result { - self.provider - .send("claimMany", (allocation_id, restake), None, None) - .await - } - pub async fn delegate( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("delegate", (indexer, tokens), None, None) - .await - } - pub async fn collect( - &self, - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("collect", (tokens, allocation_id), None, None) - .await - } - pub async fn unstake( - &self, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("unstake", tokens, None, None).await - } - pub async fn set_rebate_ratio( - &self, - alpha_numerator: u32, - alpha_denominator: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setRebateRatio", - (alpha_numerator, alpha_denominator), - None, - None, - ) - .await - } - pub async fn set_asset_holder( - &self, - asset_holder: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setAssetHolder", (asset_holder, allowed), None, None) - .await - } - pub async fn set_thawing_period( - &self, - thawing_period: u32, - ) -> ::std::result::Result { - self.provider - .send("setThawingPeriod", thawing_period, None, None) - .await - } - pub async fn slash( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - reward: ::web3::types::U256, - beneficiary: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("slash", (indexer, tokens, reward, beneficiary), None, None) - .await - } - pub async fn set_curation_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setCurationPercentage", percentage, None, None) - .await - } - pub async fn stake( - &self, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("stake", tokens, None, None).await - } - pub async fn undelegate( - &self, - indexer: ::web3::types::Address, - shares: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("undelegate", (indexer, shares), None, None) - .await - } -} -impl IStakingV1 -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn get_subgraph_allocated_tokens( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getSubgraphAllocatedTokens", subgraph_deployment_id) - .await - } - pub async fn has_stake( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("hasStake", indexer).await - } - pub async fn get_allocation_state( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .call("getAllocationState", allocation_id) - .await - } - pub async fn is_operator( - &self, - operator: ::web3::types::Address, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isOperator", (operator, indexer)).await - } - pub async fn get_delegation( - &self, - indexer: ::web3::types::Address, - delegator: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider - .call("getDelegation", (indexer, delegator)) - .await - } - pub async fn get_indexer_staked_tokens( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getIndexerStakedTokens", indexer).await - } - pub async fn get_indexer_capacity( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getIndexerCapacity", indexer).await - } - pub async fn is_allocation( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isAllocation", allocation_id).await - } - pub async fn is_delegator( - &self, - indexer: ::web3::types::Address, - delegator: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .call("isDelegator", (indexer, delegator)) - .await - } - pub async fn get_allocation( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::Address, - [u8; 32usize], - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("getAllocation", allocation_id).await - } -} -pub struct ICuration { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for ICuration { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl ICuration { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_signalIn\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensOutMin\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"collect\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"curationTaxPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getCurationPoolSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getCurationPoolTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_curator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getCuratorSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isCurated\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensIn\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_signalOutMin\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setCurationTaxPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_defaultReserveRatio\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDefaultReserveRatio\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumCurationDeposit\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumCurationDeposit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_signalIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalToTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokensToSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl ICuration -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn burn( - &self, - subgraph_deployment_id: [u8; 32usize], - signal_in: ::web3::types::U256, - tokens_out_min: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "burn", - (subgraph_deployment_id, signal_in, tokens_out_min), - None, - None, - ) - .await - } - pub async fn set_default_reserve_ratio( - &self, - default_reserve_ratio: u32, - ) -> ::std::result::Result { - self.provider - .send("setDefaultReserveRatio", default_reserve_ratio, None, None) - .await - } - pub async fn set_minimum_curation_deposit( - &self, - minimum_curation_deposit: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "setMinimumCurationDeposit", - minimum_curation_deposit, - None, - None, - ) - .await - } - pub async fn mint( - &self, - subgraph_deployment_id: [u8; 32usize], - tokens_in: ::web3::types::U256, - signal_out_min: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "mint", - (subgraph_deployment_id, tokens_in, signal_out_min), - None, - None, - ) - .await - } - pub async fn set_curation_tax_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setCurationTaxPercentage", percentage, None, None) - .await - } - pub async fn collect( - &self, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("collect", (subgraph_deployment_id, tokens), None, None) - .await - } -} -impl ICuration -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn get_curation_pool_signal( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getCurationPoolSignal", subgraph_deployment_id) - .await - } - pub async fn get_curation_pool_tokens( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getCurationPoolTokens", subgraph_deployment_id) - .await - } - pub async fn is_curated( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .call("isCurated", subgraph_deployment_id) - .await - } - pub async fn curation_tax_percentage(&self) -> ::std::result::Result { - self.provider.call("curationTaxPercentage", ()).await - } - pub async fn tokens_to_signal( - &self, - subgraph_deployment_id: [u8; 32usize], - tokens_in: ::web3::types::U256, - ) -> ::std::result::Result<(::web3::types::U256, ::web3::types::U256), ::web3::Error> { - self.provider - .call("tokensToSignal", (subgraph_deployment_id, tokens_in)) - .await - } - pub async fn get_curator_signal( - &self, - curator: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getCuratorSignal", (curator, subgraph_deployment_id)) - .await - } - pub async fn signal_to_tokens( - &self, - subgraph_deployment_id: [u8; 32usize], - signal_in: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("signalToTokens", (subgraph_deployment_id, signal_in)) - .await - } -} -pub struct GDAI { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for GDAI { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl GDAI { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewPendingOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"GSR\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"acceptOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"governor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pendingGovernor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_GSR\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setGSR\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newGovernor\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl GDAI -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_gsr( - &self, - gsr: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("setGSR", gsr, None, None).await - } - pub async fn transfer_ownership( - &self, - new_governor: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("transferOwnership", new_governor, None, None) - .await - } - pub async fn burn( - &self, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("burn", amount, None, None).await - } - pub async fn transfer( - &self, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transfer", (recipient, amount), None, None) - .await - } - pub async fn burn_from( - &self, - account: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("burnFrom", (account, amount), None, None) - .await - } - pub async fn approve( - &self, - spender: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("approve", (spender, amount), None, None) - .await - } - pub async fn decrease_allowance( - &self, - spender: ::web3::types::Address, - subtracted_value: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("decreaseAllowance", (spender, subtracted_value), None, None) - .await - } - pub async fn mint( - &self, - to: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("mint", (to, amount), None, None).await - } - pub async fn transfer_from( - &self, - sender: ::web3::types::Address, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transferFrom", (sender, recipient, amount), None, None) - .await - } - pub async fn increase_allowance( - &self, - spender: ::web3::types::Address, - added_value: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("increaseAllowance", (spender, added_value), None, None) - .await - } - pub async fn accept_ownership( - &self, - ) -> ::std::result::Result { - self.provider.send("acceptOwnership", (), None, None).await - } -} -impl GDAI -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn gsr(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("GSR", ()).await - } - pub async fn name(&self) -> ::std::result::Result<::std::string::String, ::web3::Error> { - self.provider.call("name", ()).await - } - pub async fn allowance( - &self, - owner: ::web3::types::Address, - spender: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("allowance", (owner, spender)).await - } - pub async fn decimals(&self) -> ::std::result::Result { - self.provider.call("decimals", ()).await - } - pub async fn governor(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("governor", ()).await - } - pub async fn symbol(&self) -> ::std::result::Result<::std::string::String, ::web3::Error> { - self.provider.call("symbol", ()).await - } - pub async fn balance_of( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("balanceOf", account).await - } - pub async fn total_supply(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("totalSupply", ()).await - } - pub async fn pending_governor( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("pendingGovernor", ()).await - } -} -pub struct IPublicResolver { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IPublicResolver { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IPublicResolver { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"key\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"value\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setText\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"node\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"key\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"text\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IPublicResolver -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_text( - &self, - node: [u8; 32usize], - key: ::std::string::String, - value: ::std::string::String, - ) -> ::std::result::Result { - self.provider - .send("setText", (node, key, value), None, None) - .await - } -} -impl IPublicResolver -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn text( - &self, - node: [u8; 32usize], - key: ::std::string::String, - ) -> ::std::result::Result<::std::string::String, ::web3::Error> { - self.provider.call("text", (node, key)).await - } -} -pub struct ServiceRegistryV1Storage { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone - for ServiceRegistryV1Storage -{ - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl ServiceRegistryV1Storage { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"services\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"geohash\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl ServiceRegistryV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } -} -impl ServiceRegistryV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn services( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result<(::std::string::String, ::std::string::String), ::web3::Error> { - self.provider.call("services", input_0).await - } -} -pub struct IGraphCurationToken { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IGraphCurationToken { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IGraphCurationToken { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IGraphCurationToken -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn transfer( - &self, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transfer", (recipient, amount), None, None) - .await - } - pub async fn approve( - &self, - spender: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("approve", (spender, amount), None, None) - .await - } - pub async fn burn_from( - &self, - account: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("burnFrom", (account, amount), None, None) - .await - } - pub async fn mint( - &self, - to: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("mint", (to, amount), None, None).await - } - pub async fn transfer_from( - &self, - sender: ::web3::types::Address, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transferFrom", (sender, recipient, amount), None, None) - .await - } -} -impl IGraphCurationToken -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn allowance( - &self, - owner: ::web3::types::Address, - spender: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("allowance", (owner, spender)).await - } - pub async fn balance_of( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("balanceOf", account).await - } - pub async fn total_supply(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("totalSupply", ()).await - } -} -pub struct DisputeManager { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for DisputeManager { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl DisputeManager { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"disputeID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fisherman\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DisputeAccepted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"disputeID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fisherman\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DisputeDrawn\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"disputeID1\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"disputeID2\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"DisputeLinked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"disputeID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fisherman\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DisputeRejected\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"disputeID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fisherman\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"IndexingDisputeCreated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"disputeID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fisherman\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"attestation\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"QueryDisputeCreated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_disputeID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"acceptDispute\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"acceptProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptProxyAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"arbitrator\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"requestCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"responseCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IDisputeManager.Attestation\",\n \"name\": \"_attestation1\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"requestCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"responseCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IDisputeManager.Attestation\",\n \"name\": \"_attestation2\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"areConflictingAttestations\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_deposit\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"createIndexingDispute\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"_attestationData\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_deposit\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"createQueryDispute\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"_attestationData1\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_attestationData2\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"createQueryDisputeConflict\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"disputes\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"fisherman\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deposit\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"relatedDisputeID\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_disputeID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"drawDispute\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"requestCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"responseCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct IDisputeManager.Receipt\",\n \"name\": \"_receipt\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"encodeHashReceipt\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"fishermanRewardPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"requestCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"responseCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IDisputeManager.Attestation\",\n \"name\": \"_attestation\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"getAttestationIndexer\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getTokensToReward\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getTokensToSlash\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_arbitrator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumDeposit\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_fishermanRewardPercentage\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_slashingPercentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_disputeID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isDisputeCreated\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumDeposit\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_disputeID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"rejectDispute\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_arbitrator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setArbitrator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setFishermanRewardPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumDeposit\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumDeposit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setSlashingPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"slashingPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl DisputeManager -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn create_query_dispute( - &self, - attestation_data: ::std::vec::Vec, - deposit: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "createQueryDispute", - (attestation_data, deposit), - None, - None, - ) - .await - } - pub async fn accept_proxy( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("acceptProxy", proxy, None, None).await - } - pub async fn create_indexing_dispute( - &self, - allocation_id: ::web3::types::Address, - deposit: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "createIndexingDispute", - (allocation_id, deposit), - None, - None, - ) - .await - } - pub async fn draw_dispute( - &self, - dispute_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("drawDispute", dispute_id, None, None) - .await - } - pub async fn set_fisherman_reward_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setFishermanRewardPercentage", percentage, None, None) - .await - } - pub async fn reject_dispute( - &self, - dispute_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("rejectDispute", dispute_id, None, None) - .await - } - pub async fn initialize( - &self, - controller: ::web3::types::Address, - arbitrator: ::web3::types::Address, - minimum_deposit: ::web3::types::U256, - fisherman_reward_percentage: u32, - slashing_percentage: u32, - ) -> ::std::result::Result { - self.provider - .send( - "initialize", - ( - controller, - arbitrator, - minimum_deposit, - fisherman_reward_percentage, - slashing_percentage, - ), - None, - None, - ) - .await - } - pub async fn accept_proxy_and_call( - &self, - proxy: ::web3::types::Address, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("acceptProxyAndCall", (proxy, data), None, None) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } - pub async fn set_minimum_deposit( - &self, - minimum_deposit: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("setMinimumDeposit", minimum_deposit, None, None) - .await - } - pub async fn set_slashing_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setSlashingPercentage", percentage, None, None) - .await - } - pub async fn set_arbitrator( - &self, - arbitrator: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setArbitrator", arbitrator, None, None) - .await - } - pub async fn accept_dispute( - &self, - dispute_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("acceptDispute", dispute_id, None, None) - .await - } - pub async fn create_query_dispute_conflict( - &self, - attestation_data_1: ::std::vec::Vec, - attestation_data_2: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "createQueryDisputeConflict", - (attestation_data_1, attestation_data_2), - None, - None, - ) - .await - } -} -impl DisputeManager -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn arbitrator(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("arbitrator", ()).await - } - pub async fn get_tokens_to_reward( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getTokensToReward", indexer).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn get_tokens_to_slash( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getTokensToSlash", indexer).await - } - pub async fn is_dispute_created( - &self, - dispute_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider.call("isDisputeCreated", dispute_id).await - } - pub async fn minimum_deposit( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("minimumDeposit", ()).await - } - pub async fn get_attestation_indexer( - &self, - attestation: ( - [u8; 32usize], - [u8; 32usize], - [u8; 32usize], - [u8; 32usize], - [u8; 32usize], - u8, - ), - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider - .call("getAttestationIndexer", attestation) - .await - } - pub async fn slashing_percentage(&self) -> ::std::result::Result { - self.provider.call("slashingPercentage", ()).await - } - pub async fn disputes( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result< - ( - ::web3::types::Address, - ::web3::types::Address, - ::web3::types::U256, - [u8; 32usize], - ), - ::web3::Error, - > { - self.provider.call("disputes", input_0).await - } - pub async fn encode_hash_receipt( - &self, - receipt: ([u8; 32usize], [u8; 32usize], [u8; 32usize]), - ) -> ::std::result::Result<[u8; 32usize], ::web3::Error> { - self.provider.call("encodeHashReceipt", receipt).await - } - pub async fn are_conflicting_attestations( - &self, - attestation_1: ::solidity_bindgen::internal::Unimplemented, - attestation_2: ::solidity_bindgen::internal::Unimplemented, - ) -> ::std::result::Result { - self.provider - .call("areConflictingAttestations", (attestation_1, attestation_2)) - .await - } - pub async fn fisherman_reward_percentage(&self) -> ::std::result::Result { - self.provider.call("fishermanRewardPercentage", ()).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } -} -pub struct CurationV1Storage { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for CurationV1Storage { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl CurationV1Storage { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"bondingCurve\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultReserveRatio\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumCurationDeposit\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"pools\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"reserveRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"contract IGraphCurationToken\",\n \"name\": \"gcs\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl CurationV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } -} -impl CurationV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn minimum_curation_deposit( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("minimumCurationDeposit", ()).await - } - pub async fn pools( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<(::web3::types::U256, u32, ::web3::types::Address), ::web3::Error> - { - self.provider.call("pools", input_0).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn bonding_curve( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("bondingCurve", ()).await - } - pub async fn default_reserve_ratio(&self) -> ::std::result::Result { - self.provider.call("defaultReserveRatio", ()).await - } -} -pub struct IGraphToken { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IGraphToken { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IGraphToken { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addMinter\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isMinter\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"_v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeMinter\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceMinter\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IGraphToken -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn add_minter( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("addMinter", account, None, None).await - } - pub async fn transfer( - &self, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transfer", (recipient, amount), None, None) - .await - } - pub async fn transfer_from( - &self, - sender: ::web3::types::Address, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transferFrom", (sender, recipient, amount), None, None) - .await - } - pub async fn mint( - &self, - to: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("mint", (to, amount), None, None).await - } - pub async fn burn( - &self, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("burn", amount, None, None).await - } - pub async fn remove_minter( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("removeMinter", account, None, None) - .await - } - pub async fn renounce_minter( - &self, - ) -> ::std::result::Result { - self.provider.send("renounceMinter", (), None, None).await - } - pub async fn approve( - &self, - spender: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("approve", (spender, amount), None, None) - .await - } - pub async fn permit( - &self, - owner: ::web3::types::Address, - spender: ::web3::types::Address, - value: ::web3::types::U256, - deadline: ::web3::types::U256, - v: u8, - r: [u8; 32usize], - s: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send( - "permit", - (owner, spender, value, deadline, v, r, s), - None, - None, - ) - .await - } -} -impl IGraphToken -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn balance_of( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("balanceOf", account).await - } - pub async fn is_minter( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isMinter", account).await - } - pub async fn allowance( - &self, - owner: ::web3::types::Address, - spender: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("allowance", (owner, spender)).await - } - pub async fn total_supply(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("totalSupply", ()).await - } -} -pub struct Controller { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for Controller { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl Controller { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"oldPauseGuardian\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"pauseGuardian\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewPauseGuardian\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewPendingOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"isPaused\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PartialPauseChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"isPaused\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PauseChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"id\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"contractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetContractProxy\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"acceptOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_id\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getContractProxy\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getGovernor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"governor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lastPausePartialTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lastPauseTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"partialPaused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pauseGuardian\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pendingGovernor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_id\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_partialPaused\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPartialPaused\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newPauseGuardian\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setPauseGuardian\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_paused\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPaused\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newGovernor\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_id\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"unsetContractProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_id\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"updateController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl Controller -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_pause_guardian( - &self, - new_pause_guardian: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setPauseGuardian", new_pause_guardian, None, None) - .await - } - pub async fn set_contract_proxy( - &self, - id: [u8; 32usize], - contract_address: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setContractProxy", (id, contract_address), None, None) - .await - } - pub async fn set_paused( - &self, - paused: bool, - ) -> ::std::result::Result { - self.provider.send("setPaused", paused, None, None).await - } - pub async fn set_partial_paused( - &self, - partial_paused: bool, - ) -> ::std::result::Result { - self.provider - .send("setPartialPaused", partial_paused, None, None) - .await - } - pub async fn update_controller( - &self, - id: [u8; 32usize], - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("updateController", (id, controller), None, None) - .await - } - pub async fn accept_ownership( - &self, - ) -> ::std::result::Result { - self.provider.send("acceptOwnership", (), None, None).await - } - pub async fn transfer_ownership( - &self, - new_governor: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("transferOwnership", new_governor, None, None) - .await - } - pub async fn unset_contract_proxy( - &self, - id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("unsetContractProxy", id, None, None) - .await - } -} -impl Controller -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn last_pause_partial_time( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("lastPausePartialTime", ()).await - } - pub async fn partial_paused(&self) -> ::std::result::Result { - self.provider.call("partialPaused", ()).await - } - pub async fn get_contract_proxy( - &self, - id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("getContractProxy", id).await - } - pub async fn last_pause_time( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("lastPauseTime", ()).await - } - pub async fn paused(&self) -> ::std::result::Result { - self.provider.call("paused", ()).await - } - pub async fn get_governor( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("getGovernor", ()).await - } - pub async fn pending_governor( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("pendingGovernor", ()).await - } - pub async fn pause_guardian( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("pauseGuardian", ()).await - } - pub async fn governor(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("governor", ()).await - } -} -pub struct DisputeManagerV1Storage { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone - for DisputeManagerV1Storage -{ - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl DisputeManagerV1Storage { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"arbitrator\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"disputes\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"fisherman\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deposit\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"relatedDisputeID\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"fishermanRewardPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumDeposit\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"slashingPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl DisputeManagerV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } -} -impl DisputeManagerV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn disputes( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result< - ( - ::web3::types::Address, - ::web3::types::Address, - ::web3::types::U256, - [u8; 32usize], - ), - ::web3::Error, - > { - self.provider.call("disputes", input_0).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn arbitrator(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("arbitrator", ()).await - } - pub async fn minimum_deposit( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("minimumDeposit", ()).await - } - pub async fn slashing_percentage(&self) -> ::std::result::Result { - self.provider.call("slashingPercentage", ()).await - } - pub async fn fisherman_reward_percentage(&self) -> ::std::result::Result { - self.provider.call("fishermanRewardPercentage", ()).await - } -} -pub struct GraphProxy { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for GraphProxy { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl GraphProxy { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_impl\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_admin\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"oldAdmin\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"oldImplementation\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newImplementation\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ImplementationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"oldPendingImplementation\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newPendingImplementation\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PendingImplementationUpdated\",\n \"type\": \"event\"\n },\n {\n \"stateMutability\": \"payable\",\n \"type\": \"fallback\"\n },\n {\n \"inputs\": [],\n \"name\": \"acceptUpgrade\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptUpgradeAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"admin\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"implementation\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pendingImplementation\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newImplementation\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"upgradeTo\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"stateMutability\": \"payable\",\n \"type\": \"receive\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl GraphProxy -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn pending_implementation( - &self, - ) -> ::std::result::Result { - self.provider - .send("pendingImplementation", (), None, None) - .await - } - pub async fn admin( - &self, - ) -> ::std::result::Result { - self.provider.send("admin", (), None, None).await - } - pub async fn accept_upgrade( - &self, - ) -> ::std::result::Result { - self.provider.send("acceptUpgrade", (), None, None).await - } - pub async fn upgrade_to( - &self, - new_implementation: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("upgradeTo", new_implementation, None, None) - .await - } - pub async fn set_admin( - &self, - new_admin: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("setAdmin", new_admin, None, None).await - } - pub async fn accept_upgrade_and_call( - &self, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("acceptUpgradeAndCall", data, None, None) - .await - } - pub async fn implementation( - &self, - ) -> ::std::result::Result { - self.provider.send("implementation", (), None, None).await - } -} -impl GraphProxy where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider -{ -} -pub struct IDisputeManager { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IDisputeManager { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IDisputeManager { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_disputeID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"acceptDispute\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"requestCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"responseCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IDisputeManager.Attestation\",\n \"name\": \"_attestation1\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"requestCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"responseCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IDisputeManager.Attestation\",\n \"name\": \"_attestation2\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"areConflictingAttestations\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_deposit\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"createIndexingDispute\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"_attestationData\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_deposit\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"createQueryDispute\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"_attestationData1\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_attestationData2\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"createQueryDisputeConflict\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_disputeID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"drawDispute\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"requestCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"responseCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct IDisputeManager.Receipt\",\n \"name\": \"_receipt\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"encodeHashReceipt\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"requestCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"responseCID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IDisputeManager.Attestation\",\n \"name\": \"_attestation\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"getAttestationIndexer\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getTokensToReward\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getTokensToSlash\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_disputeID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isDisputeCreated\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_disputeID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"rejectDispute\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_arbitrator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setArbitrator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setFishermanRewardPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumDeposit\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumDeposit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setSlashingPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IDisputeManager -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_slashing_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setSlashingPercentage", percentage, None, None) - .await - } - pub async fn create_query_dispute( - &self, - attestation_data: ::std::vec::Vec, - deposit: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "createQueryDispute", - (attestation_data, deposit), - None, - None, - ) - .await - } - pub async fn set_arbitrator( - &self, - arbitrator: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setArbitrator", arbitrator, None, None) - .await - } - pub async fn set_fisherman_reward_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setFishermanRewardPercentage", percentage, None, None) - .await - } - pub async fn accept_dispute( - &self, - dispute_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("acceptDispute", dispute_id, None, None) - .await - } - pub async fn create_indexing_dispute( - &self, - allocation_id: ::web3::types::Address, - deposit: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "createIndexingDispute", - (allocation_id, deposit), - None, - None, - ) - .await - } - pub async fn reject_dispute( - &self, - dispute_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("rejectDispute", dispute_id, None, None) - .await - } - pub async fn create_query_dispute_conflict( - &self, - attestation_data_1: ::std::vec::Vec, - attestation_data_2: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "createQueryDisputeConflict", - (attestation_data_1, attestation_data_2), - None, - None, - ) - .await - } - pub async fn set_minimum_deposit( - &self, - minimum_deposit: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("setMinimumDeposit", minimum_deposit, None, None) - .await - } - pub async fn draw_dispute( - &self, - dispute_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("drawDispute", dispute_id, None, None) - .await - } -} -impl IDisputeManager -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn get_tokens_to_reward( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getTokensToReward", indexer).await - } - pub async fn is_dispute_created( - &self, - dispute_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider.call("isDisputeCreated", dispute_id).await - } - pub async fn get_tokens_to_slash( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getTokensToSlash", indexer).await - } - pub async fn get_attestation_indexer( - &self, - attestation: ( - [u8; 32usize], - [u8; 32usize], - [u8; 32usize], - [u8; 32usize], - [u8; 32usize], - u8, - ), - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider - .call("getAttestationIndexer", attestation) - .await - } - pub async fn are_conflicting_attestations( - &self, - attestation_1: ::solidity_bindgen::internal::Unimplemented, - attestation_2: ::solidity_bindgen::internal::Unimplemented, - ) -> ::std::result::Result { - self.provider - .call("areConflictingAttestations", (attestation_1, attestation_2)) - .await - } - pub async fn encode_hash_receipt( - &self, - receipt: ([u8; 32usize], [u8; 32usize], [u8; 32usize]), - ) -> ::std::result::Result<[u8; 32usize], ::web3::Error> { - self.provider.call("encodeHashReceipt", receipt).await - } -} -pub struct GSRManager { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for GSRManager { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl GSRManager { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_savingsRate\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_gdai\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"cumulativeInterestRate\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"lastDripTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Drip\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"gsrBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"gdai\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Exit\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"gdai\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"gsrBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Join\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewPendingOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRate\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SetRate\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"acceptOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balances\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"calcReturn\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"totalBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"calcUpdatedRate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"updatedRate\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cumulativeInterestRate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"drip\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"updatedRate\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"governor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"join\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lastDripTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pendingGovernor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"reserves\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"savingsRate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_newRate\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"token\",\n \"outputs\": [\n {\n \"internalType\": \"contract GDAI\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newGovernor\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl GSRManager -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn transfer_ownership( - &self, - new_governor: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("transferOwnership", new_governor, None, None) - .await - } - pub async fn join( - &self, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("join", amount, None, None).await - } - pub async fn exit( - &self, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("exit", amount, None, None).await - } - pub async fn set_rate( - &self, - new_rate: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("setRate", new_rate, None, None).await - } - pub async fn drip(&self) -> ::std::result::Result { - self.provider.send("drip", (), None, None).await - } - pub async fn accept_ownership( - &self, - ) -> ::std::result::Result { - self.provider.send("acceptOwnership", (), None, None).await - } -} -impl GSRManager -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn reserves(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("reserves", ()).await - } - pub async fn cumulative_interest_rate( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("cumulativeInterestRate", ()).await - } - pub async fn governor(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("governor", ()).await - } - pub async fn balances( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("balances", input_0).await - } - pub async fn calc_updated_rate( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("calcUpdatedRate", ()).await - } - pub async fn token(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("token", ()).await - } - pub async fn pending_governor( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("pendingGovernor", ()).await - } - pub async fn savings_rate(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("savingsRate", ()).await - } - pub async fn calc_return( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("calcReturn", account).await - } - pub async fn last_drip_time( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("lastDripTime", ()).await - } -} -pub struct ITestRegistrar { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for ITestRegistrar { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl ITestRegistrar { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"label\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"register\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl ITestRegistrar -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn register( - &self, - label: [u8; 32usize], - owner: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("register", (label, owner), None, None) - .await - } -} -impl ITestRegistrar where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider -{ -} -pub struct EpochManagerV1Storage { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone - for EpochManagerV1Storage -{ - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl EpochManagerV1Storage { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lastLengthUpdateBlock\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lastLengthUpdateEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lastRunEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl EpochManagerV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } -} -impl EpochManagerV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn last_length_update_epoch( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("lastLengthUpdateEpoch", ()).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn last_run_epoch( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("lastRunEpoch", ()).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn epoch_length(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("epochLength", ()).await - } - pub async fn last_length_update_block( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("lastLengthUpdateBlock", ()).await - } -} -pub struct StakingV1 { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for StakingV1 { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl StakingV1 { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocation\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"poi\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"isDelegator\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"AllocationClosed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"curationFees\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"rebateFees\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AllocationCollected\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"metadata\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"AllocationCreated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"caller\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"assetHolder\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"AssetHolderUpdate\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint32\",\n \"name\": \"indexingRewardCut\",\n \"type\": \"uint32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint32\",\n \"name\": \"queryFeeCut\",\n \"type\": \"uint32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint32\",\n \"name\": \"cooldownBlocks\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"DelegationParametersUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"forEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"unclaimedAllocationsCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"delegationFees\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RebateClaimed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"SetOperator\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"caller\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"slasher\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"SlasherUpdate\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeDelegated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"until\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeDelegatedLocked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeDelegatedWithdrawn\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeDeposited\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"until\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeLocked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"beneficiary\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakeSlashed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeWithdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"acceptProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptProxyAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"allocate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"allocateFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allocations\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"createdAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"closedAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"collectedFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocation\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerAllocatedToken\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"alphaDenominator\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"alphaNumerator\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"assetHolders\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"channelDisputeEpochs\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_restake\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"claim\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_allocationID\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_restake\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"claimMany\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_poi\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"closeAllocation\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"poi\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct IStakingData.CloseAllocationRequest[]\",\n \"name\": \"_requests\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"closeAllocationMany\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_closingAllocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_poi\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"closeAndAllocate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"collect\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"curationPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationParametersCooldown\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegationPools\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"cooldownBlocks\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"indexingRewardCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"queryFeeCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"updatedAtBlock\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationRatio\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationTaxPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationUnbondingPeriod\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getAllocation\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"createdAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"closedAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"collectedFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocation\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerAllocatedToken\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IStakingData.Allocation\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getAllocationState\",\n \"outputs\": [\n {\n \"internalType\": \"enum IStakingV1.AllocationState\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_delegator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getDelegation\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLocked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLockedUntil\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IStakingData.Delegation\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getIndexerCapacity\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getIndexerStakedTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getSubgraphAllocatedTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLocked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLockedUntil\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IStakingData.Delegation\",\n \"name\": \"_delegation\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"getWithdraweableDelegatedTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasStake\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumIndexerStake\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_thawingPeriod\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_protocolPercentage\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_curationPercentage\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_channelDisputeEpochs\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_maxAllocationEpochs\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationUnbondingPeriod\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_rebateAlphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_rebateAlphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isAllocation\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_delegator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isDelegator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isOperator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxAllocationEpochs\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumIndexerStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"operatorAuth\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"protocolPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"rebates\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"fees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocatedStake\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"claimedRewards\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"unclaimedAllocationsCount\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_assetHolder\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAssetHolder\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_channelDisputeEpochs\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setChannelDisputeEpochs\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setCurationPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_indexingRewardCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_queryFeeCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_cooldownBlocks\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationParameters\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_blocks\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationParametersCooldown\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationRatio\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationRatio\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationTaxPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationUnbondingPeriod\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationUnbondingPeriod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_maxAllocationEpochs\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setMaxAllocationEpochs\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumIndexerStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumIndexerStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setOperator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setProtocolPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setRebateRatio\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_slasher\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setSlasher\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_thawingPeriod\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setThawingPeriod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_beneficiary\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"slash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"slashers\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeTo\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensAllocated\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLocked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLockedUntil\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"subgraphAllocations\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"thawingPeriod\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_shares\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"undelegate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"unstake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_delegateToIndexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawDelegated\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl StakingV1 -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn initialize( - &self, - controller: ::web3::types::Address, - minimum_indexer_stake: ::web3::types::U256, - thawing_period: u32, - protocol_percentage: u32, - curation_percentage: u32, - channel_dispute_epochs: u32, - max_allocation_epochs: u32, - delegation_unbonding_period: u32, - delegation_ratio: u32, - rebate_alpha_numerator: u32, - rebate_alpha_denominator: u32, - ) -> ::std::result::Result { - self.provider - .send( - "initialize", - ( - controller, - minimum_indexer_stake, - thawing_period, - protocol_percentage, - curation_percentage, - channel_dispute_epochs, - max_allocation_epochs, - delegation_unbonding_period, - delegation_ratio, - rebate_alpha_numerator, - rebate_alpha_denominator, - ), - None, - None, - ) - .await - } - pub async fn collect( - &self, - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("collect", (tokens, allocation_id), None, None) - .await - } - pub async fn set_delegation_unbonding_period( - &self, - delegation_unbonding_period: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setDelegationUnbondingPeriod", - delegation_unbonding_period, - None, - None, - ) - .await - } - pub async fn set_operator( - &self, - operator: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setOperator", (operator, allowed), None, None) - .await - } - pub async fn set_protocol_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setProtocolPercentage", percentage, None, None) - .await - } - pub async fn undelegate( - &self, - indexer: ::web3::types::Address, - shares: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("undelegate", (indexer, shares), None, None) - .await - } - pub async fn close_and_allocate( - &self, - closing_allocation_id: ::web3::types::Address, - poi: [u8; 32usize], - indexer: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "closeAndAllocate", - ( - closing_allocation_id, - poi, - indexer, - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn allocate_from( - &self, - indexer: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "allocateFrom", - ( - indexer, - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn set_rebate_ratio( - &self, - alpha_numerator: u32, - alpha_denominator: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setRebateRatio", - (alpha_numerator, alpha_denominator), - None, - None, - ) - .await - } - pub async fn slash( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - reward: ::web3::types::U256, - beneficiary: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("slash", (indexer, tokens, reward, beneficiary), None, None) - .await - } - pub async fn set_delegation_ratio( - &self, - delegation_ratio: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationRatio", delegation_ratio, None, None) - .await - } - pub async fn withdraw( - &self, - ) -> ::std::result::Result { - self.provider.send("withdraw", (), None, None).await - } - pub async fn close_allocation( - &self, - allocation_id: ::web3::types::Address, - poi: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("closeAllocation", (allocation_id, poi), None, None) - .await - } - pub async fn set_asset_holder( - &self, - asset_holder: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setAssetHolder", (asset_holder, allowed), None, None) - .await - } - pub async fn set_minimum_indexer_stake( - &self, - minimum_indexer_stake: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("setMinimumIndexerStake", minimum_indexer_stake, None, None) - .await - } - pub async fn set_delegation_parameters_cooldown( - &self, - blocks: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationParametersCooldown", blocks, None, None) - .await - } - pub async fn set_delegation_parameters( - &self, - indexing_reward_cut: u32, - query_fee_cut: u32, - cooldown_blocks: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setDelegationParameters", - (indexing_reward_cut, query_fee_cut, cooldown_blocks), - None, - None, - ) - .await - } - pub async fn stake( - &self, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("stake", tokens, None, None).await - } - pub async fn close_allocation_many( - &self, - requests: ::solidity_bindgen::internal::Unimplemented, - ) -> ::std::result::Result { - self.provider - .send("closeAllocationMany", requests, None, None) - .await - } - pub async fn delegate( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("delegate", (indexer, tokens), None, None) - .await - } - pub async fn accept_proxy_and_call( - &self, - proxy: ::web3::types::Address, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("acceptProxyAndCall", (proxy, data), None, None) - .await - } - pub async fn set_thawing_period( - &self, - thawing_period: u32, - ) -> ::std::result::Result { - self.provider - .send("setThawingPeriod", thawing_period, None, None) - .await - } - pub async fn stake_to( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("stakeTo", (indexer, tokens), None, None) - .await - } - pub async fn set_delegation_tax_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationTaxPercentage", percentage, None, None) - .await - } - pub async fn claim( - &self, - allocation_id: ::web3::types::Address, - restake: bool, - ) -> ::std::result::Result { - self.provider - .send("claim", (allocation_id, restake), None, None) - .await - } - pub async fn set_slasher( - &self, - slasher: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setSlasher", (slasher, allowed), None, None) - .await - } - pub async fn accept_proxy( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("acceptProxy", proxy, None, None).await - } - pub async fn claim_many( - &self, - allocation_id: ::std::vec::Vec<::web3::types::Address>, - restake: bool, - ) -> ::std::result::Result { - self.provider - .send("claimMany", (allocation_id, restake), None, None) - .await - } - pub async fn unstake( - &self, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("unstake", tokens, None, None).await - } - pub async fn set_curation_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setCurationPercentage", percentage, None, None) - .await - } - pub async fn allocate( - &self, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "allocate", - ( - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn set_max_allocation_epochs( - &self, - max_allocation_epochs: u32, - ) -> ::std::result::Result { - self.provider - .send("setMaxAllocationEpochs", max_allocation_epochs, None, None) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } - pub async fn set_channel_dispute_epochs( - &self, - channel_dispute_epochs: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setChannelDisputeEpochs", - channel_dispute_epochs, - None, - None, - ) - .await - } - pub async fn withdraw_delegated( - &self, - indexer: ::web3::types::Address, - delegate_to_indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send( - "withdrawDelegated", - (indexer, delegate_to_indexer), - None, - None, - ) - .await - } -} -impl StakingV1 -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn max_allocation_epochs(&self) -> ::std::result::Result { - self.provider.call("maxAllocationEpochs", ()).await - } - pub async fn get_withdraweable_delegated_tokens( - &self, - delegation: ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getWithdraweableDelegatedTokens", delegation) - .await - } - pub async fn delegation_tax_percentage(&self) -> ::std::result::Result { - self.provider.call("delegationTaxPercentage", ()).await - } - pub async fn allocations( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::Address, - [u8; 32usize], - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("allocations", input_0).await - } - pub async fn delegation_ratio(&self) -> ::std::result::Result { - self.provider.call("delegationRatio", ()).await - } - pub async fn operator_auth( - &self, - input_0: ::web3::types::Address, - input_1: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("operatorAuth", (input_0, input_1)).await - } - pub async fn thawing_period(&self) -> ::std::result::Result { - self.provider.call("thawingPeriod", ()).await - } - pub async fn is_allocation( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isAllocation", allocation_id).await - } - pub async fn asset_holders( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("assetHolders", input_0).await - } - pub async fn alpha_denominator(&self) -> ::std::result::Result { - self.provider.call("alphaDenominator", ()).await - } - pub async fn delegation_parameters_cooldown( - &self, - ) -> ::std::result::Result { - self.provider.call("delegationParametersCooldown", ()).await - } - pub async fn get_subgraph_allocated_tokens( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getSubgraphAllocatedTokens", subgraph_deployment_id) - .await - } - pub async fn subgraph_allocations( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("subgraphAllocations", input_0).await - } - pub async fn alpha_numerator(&self) -> ::std::result::Result { - self.provider.call("alphaNumerator", ()).await - } - pub async fn get_delegation( - &self, - indexer: ::web3::types::Address, - delegator: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider - .call("getDelegation", (indexer, delegator)) - .await - } - pub async fn protocol_percentage(&self) -> ::std::result::Result { - self.provider.call("protocolPercentage", ()).await - } - pub async fn curation_percentage(&self) -> ::std::result::Result { - self.provider.call("curationPercentage", ()).await - } - pub async fn delegation_unbonding_period(&self) -> ::std::result::Result { - self.provider.call("delegationUnbondingPeriod", ()).await - } - pub async fn get_indexer_capacity( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getIndexerCapacity", indexer).await - } - pub async fn has_stake( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("hasStake", indexer).await - } - pub async fn channel_dispute_epochs(&self) -> ::std::result::Result { - self.provider.call("channelDisputeEpochs", ()).await - } - pub async fn get_indexer_staked_tokens( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getIndexerStakedTokens", indexer).await - } - pub async fn is_operator( - &self, - operator: ::web3::types::Address, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isOperator", (operator, indexer)).await - } - pub async fn get_allocation_state( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .call("getAllocationState", allocation_id) - .await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn delegation_pools( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - u32, - u32, - u32, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("delegationPools", input_0).await - } - pub async fn is_delegator( - &self, - indexer: ::web3::types::Address, - delegator: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .call("isDelegator", (indexer, delegator)) - .await - } - pub async fn stakes( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("stakes", input_0).await - } - pub async fn get_allocation( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::Address, - [u8; 32usize], - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("getAllocation", allocation_id).await - } - pub async fn minimum_indexer_stake( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("minimumIndexerStake", ()).await - } - pub async fn slashers( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("slashers", input_0).await - } - pub async fn rebates( - &self, - input_0: ::web3::types::U256, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - u32, - u32, - u32, - ), - ::web3::Error, - > { - self.provider.call("rebates", input_0).await - } -} -pub struct ServiceRegistry { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for ServiceRegistry { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl ServiceRegistry { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"geohash\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ServiceRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ServiceUnregistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"acceptProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptProxyAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRegistered\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"_url\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_geohash\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"register\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_url\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_geohash\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"registerFor\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"services\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"geohash\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unregister\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"unregisterFor\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl ServiceRegistry -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn unregister_for( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("unregisterFor", indexer, None, None) - .await - } - pub async fn accept_proxy_and_call( - &self, - proxy: ::web3::types::Address, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("acceptProxyAndCall", (proxy, data), None, None) - .await - } - pub async fn accept_proxy( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("acceptProxy", proxy, None, None).await - } - pub async fn register_for( - &self, - indexer: ::web3::types::Address, - url: ::std::string::String, - geohash: ::std::string::String, - ) -> ::std::result::Result { - self.provider - .send("registerFor", (indexer, url, geohash), None, None) - .await - } - pub async fn register( - &self, - url: ::std::string::String, - geohash: ::std::string::String, - ) -> ::std::result::Result { - self.provider - .send("register", (url, geohash), None, None) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } - pub async fn initialize( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("initialize", controller, None, None) - .await - } - pub async fn unregister( - &self, - ) -> ::std::result::Result { - self.provider.send("unregister", (), None, None).await - } -} -impl ServiceRegistry -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn is_registered( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isRegistered", indexer).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn services( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result<(::std::string::String, ::std::string::String), ::web3::Error> { - self.provider.call("services", input_0).await - } -} -pub struct RewardsManagerV1Storage { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone - for RewardsManagerV1Storage -{ - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl RewardsManagerV1Storage { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"accRewardsPerSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"accRewardsPerSignalLastBlockUpdated\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"denylist\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"issuanceRate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"subgraphAvailabilityOracle\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"subgraphs\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsForSubgraph\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsForSubgraphSnapshot\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerSignalSnapshot\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerAllocatedToken\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl RewardsManagerV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } -} -impl RewardsManagerV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn acc_rewards_per_signal( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("accRewardsPerSignal", ()).await - } - pub async fn acc_rewards_per_signal_last_block_updated( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("accRewardsPerSignalLastBlockUpdated", ()) - .await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn issuance_rate(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("issuanceRate", ()).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn subgraphs( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("subgraphs", input_0).await - } - pub async fn subgraph_availability_oracle( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("subgraphAvailabilityOracle", ()).await - } - pub async fn denylist( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("denylist", input_0).await - } -} -pub struct IEpochManager { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IEpochManager { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IEpochManager { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_block\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"blockHash\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"blockNum\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentEpochBlock\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentEpochBlockSinceStart\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_epoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"epochsSince\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epochsSinceUpdate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isCurrentEpochRun\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"runEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_epochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IEpochManager -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn run_epoch( - &self, - ) -> ::std::result::Result { - self.provider.send("runEpoch", (), None, None).await - } - pub async fn set_epoch_length( - &self, - epoch_length: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("setEpochLength", epoch_length, None, None) - .await - } -} -impl IEpochManager -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn current_epoch(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("currentEpoch", ()).await - } - pub async fn block_num(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("blockNum", ()).await - } - pub async fn epochs_since( - &self, - epoch: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("epochsSince", epoch).await - } - pub async fn current_epoch_block( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("currentEpochBlock", ()).await - } - pub async fn current_epoch_block_since_start( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("currentEpochBlockSinceStart", ()).await - } - pub async fn epochs_since_update( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("epochsSinceUpdate", ()).await - } - pub async fn is_current_epoch_run(&self) -> ::std::result::Result { - self.provider.call("isCurrentEpochRun", ()).await - } - pub async fn block_hash( - &self, - block: ::web3::types::U256, - ) -> ::std::result::Result<[u8; 32usize], ::web3::Error> { - self.provider.call("blockHash", block).await - } -} -pub struct EthereumDIDRegistry { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for EthereumDIDRegistry { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl EthereumDIDRegistry { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"name\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"value\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"validTo\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousChange\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DIDAttributeChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"delegateType\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"validTo\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousChange\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DIDDelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousChange\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DIDOwnerChanged\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"delegateType\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"validity\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addDelegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"sigV\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sigR\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sigS\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"delegateType\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"validity\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addDelegateSigned\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"changeOwner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"sigV\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sigR\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sigS\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"changeOwnerSigned\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"changed\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"identityOwner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonce\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"owners\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"name\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"value\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"revokeAttribute\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"sigV\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sigR\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sigS\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"name\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"value\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"revokeAttributeSigned\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"delegateType\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeDelegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"sigV\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sigR\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sigS\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"delegateType\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeDelegateSigned\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"name\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"value\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"validity\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAttribute\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"sigV\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sigR\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sigS\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"name\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"value\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"validity\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAttributeSigned\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"delegateType\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validDelegate\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl EthereumDIDRegistry -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn revoke_attribute_signed( - &self, - identity: ::web3::types::Address, - sig_v: u8, - sig_r: [u8; 32usize], - sig_s: [u8; 32usize], - name: [u8; 32usize], - value: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "revokeAttributeSigned", - (identity, sig_v, sig_r, sig_s, name, value), - None, - None, - ) - .await - } - pub async fn revoke_attribute( - &self, - identity: ::web3::types::Address, - name: [u8; 32usize], - value: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("revokeAttribute", (identity, name, value), None, None) - .await - } - pub async fn add_delegate_signed( - &self, - identity: ::web3::types::Address, - sig_v: u8, - sig_r: [u8; 32usize], - sig_s: [u8; 32usize], - delegate_type: [u8; 32usize], - delegate: ::web3::types::Address, - validity: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "addDelegateSigned", - ( - identity, - sig_v, - sig_r, - sig_s, - delegate_type, - delegate, - validity, - ), - None, - None, - ) - .await - } - pub async fn set_attribute_signed( - &self, - identity: ::web3::types::Address, - sig_v: u8, - sig_r: [u8; 32usize], - sig_s: [u8; 32usize], - name: [u8; 32usize], - value: ::std::vec::Vec, - validity: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "setAttributeSigned", - (identity, sig_v, sig_r, sig_s, name, value, validity), - None, - None, - ) - .await - } - pub async fn set_attribute( - &self, - identity: ::web3::types::Address, - name: [u8; 32usize], - value: ::std::vec::Vec, - validity: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "setAttribute", - (identity, name, value, validity), - None, - None, - ) - .await - } - pub async fn revoke_delegate( - &self, - identity: ::web3::types::Address, - delegate_type: [u8; 32usize], - delegate: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send( - "revokeDelegate", - (identity, delegate_type, delegate), - None, - None, - ) - .await - } - pub async fn change_owner( - &self, - identity: ::web3::types::Address, - new_owner: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("changeOwner", (identity, new_owner), None, None) - .await - } - pub async fn change_owner_signed( - &self, - identity: ::web3::types::Address, - sig_v: u8, - sig_r: [u8; 32usize], - sig_s: [u8; 32usize], - new_owner: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send( - "changeOwnerSigned", - (identity, sig_v, sig_r, sig_s, new_owner), - None, - None, - ) - .await - } - pub async fn revoke_delegate_signed( - &self, - identity: ::web3::types::Address, - sig_v: u8, - sig_r: [u8; 32usize], - sig_s: [u8; 32usize], - delegate_type: [u8; 32usize], - delegate: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send( - "revokeDelegateSigned", - (identity, sig_v, sig_r, sig_s, delegate_type, delegate), - None, - None, - ) - .await - } - pub async fn add_delegate( - &self, - identity: ::web3::types::Address, - delegate_type: [u8; 32usize], - delegate: ::web3::types::Address, - validity: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "addDelegate", - (identity, delegate_type, delegate, validity), - None, - None, - ) - .await - } -} -impl EthereumDIDRegistry -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn changed( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("changed", input_0).await - } - pub async fn owners( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("owners", input_0).await - } - pub async fn identity_owner( - &self, - identity: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("identityOwner", identity).await - } - pub async fn nonce( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("nonce", input_0).await - } - pub async fn valid_delegate( - &self, - identity: ::web3::types::Address, - delegate_type: [u8; 32usize], - delegate: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .call("validDelegate", (identity, delegate_type, delegate)) - .await - } - pub async fn delegates( - &self, - input_0: ::web3::types::Address, - input_1: [u8; 32usize], - input_2: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("delegates", (input_0, input_1, input_2)) - .await - } -} -pub struct GraphProxyStorage { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for GraphProxyStorage { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl GraphProxyStorage { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"oldAdmin\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"oldImplementation\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newImplementation\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ImplementationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"oldPendingImplementation\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newPendingImplementation\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PendingImplementationUpdated\",\n \"type\": \"event\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl GraphProxyStorage -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } -} -impl GraphProxyStorage where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider -{ -} -pub struct RewardsManagerMock { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for RewardsManagerMock { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl RewardsManagerMock { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"x\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"n\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"base\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"z\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl RewardsManagerMock -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } -} -impl RewardsManagerMock -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn pow( - &self, - x: ::web3::types::U256, - n: ::web3::types::U256, - base: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("pow", (x, n, base)).await - } -} -pub struct StakingV2Storage { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for StakingV2Storage { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl StakingV2Storage { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allocations\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"createdAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"closedAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"collectedFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocation\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerAllocatedToken\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"alphaDenominator\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"alphaNumerator\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"assetHolders\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"channelDisputeEpochs\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"curationPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationParametersCooldown\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegationPools\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"cooldownBlocks\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"indexingRewardCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"queryFeeCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"updatedAtBlock\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationRatio\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationTaxPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationUnbondingPeriod\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxAllocationEpochs\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumIndexerStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"operatorAuth\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"protocolPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"rebates\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"fees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocatedStake\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"claimedRewards\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"unclaimedAllocationsCount\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardsDestination\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"slashers\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensAllocated\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLocked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLockedUntil\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"subgraphAllocations\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"thawingPeriod\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl StakingV2Storage -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } -} -impl StakingV2Storage -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn max_allocation_epochs(&self) -> ::std::result::Result { - self.provider.call("maxAllocationEpochs", ()).await - } - pub async fn rebates( - &self, - input_0: ::web3::types::U256, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - u32, - u32, - u32, - ), - ::web3::Error, - > { - self.provider.call("rebates", input_0).await - } - pub async fn slashers( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("slashers", input_0).await - } - pub async fn delegation_tax_percentage(&self) -> ::std::result::Result { - self.provider.call("delegationTaxPercentage", ()).await - } - pub async fn delegation_unbonding_period(&self) -> ::std::result::Result { - self.provider.call("delegationUnbondingPeriod", ()).await - } - pub async fn minimum_indexer_stake( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("minimumIndexerStake", ()).await - } - pub async fn channel_dispute_epochs(&self) -> ::std::result::Result { - self.provider.call("channelDisputeEpochs", ()).await - } - pub async fn stakes( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("stakes", input_0).await - } - pub async fn thawing_period(&self) -> ::std::result::Result { - self.provider.call("thawingPeriod", ()).await - } - pub async fn delegation_parameters_cooldown( - &self, - ) -> ::std::result::Result { - self.provider.call("delegationParametersCooldown", ()).await - } - pub async fn asset_holders( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("assetHolders", input_0).await - } - pub async fn curation_percentage(&self) -> ::std::result::Result { - self.provider.call("curationPercentage", ()).await - } - pub async fn alpha_numerator(&self) -> ::std::result::Result { - self.provider.call("alphaNumerator", ()).await - } - pub async fn subgraph_allocations( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("subgraphAllocations", input_0).await - } - pub async fn delegation_ratio(&self) -> ::std::result::Result { - self.provider.call("delegationRatio", ()).await - } - pub async fn alpha_denominator(&self) -> ::std::result::Result { - self.provider.call("alphaDenominator", ()).await - } - pub async fn delegation_pools( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - u32, - u32, - u32, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("delegationPools", input_0).await - } - pub async fn rewards_destination( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("rewardsDestination", input_0).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn operator_auth( - &self, - input_0: ::web3::types::Address, - input_1: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("operatorAuth", (input_0, input_1)).await - } - pub async fn allocations( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::Address, - [u8; 32usize], - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("allocations", input_0).await - } - pub async fn protocol_percentage(&self) -> ::std::result::Result { - self.provider.call("protocolPercentage", ()).await - } -} -pub struct IEthereumDIDRegistry { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone - for IEthereumDIDRegistry -{ - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IEthereumDIDRegistry { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"identityOwner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"identity\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"name\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"value\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"validity\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAttribute\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IEthereumDIDRegistry -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_attribute( - &self, - identity: ::web3::types::Address, - name: [u8; 32usize], - value: ::std::vec::Vec, - validity: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "setAttribute", - (identity, name, value, validity), - None, - None, - ) - .await - } -} -impl IEthereumDIDRegistry -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn identity_owner( - &self, - identity: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("identityOwner", identity).await - } -} -pub struct BancorFormula { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for BancorFormula { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl BancorFormula { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_fromConnectorBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_fromConnectorWeight\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_toConnectorBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_toConnectorWeight\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCrossConnectorReturn\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_fromReserveBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_fromReserveRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_toReserveBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_toReserveRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCrossReserveReturn\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_supply\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_reserveBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_totalRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateFundCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_supply\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_reserveBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_totalRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateLiquidateReturn\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_supply\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_reserveBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_reserveRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_depositAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculatePurchaseReturn\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_supply\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_reserveBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_reserveRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_sellAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateSaleReturn\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"version\",\n \"outputs\": [\n {\n \"internalType\": \"uint16\",\n \"name\": \"\",\n \"type\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl BancorFormula -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } -} -impl BancorFormula -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn calculate_sale_return( - &self, - supply: ::web3::types::U256, - reserve_balance: ::web3::types::U256, - reserve_ratio: u32, - sell_amount: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "calculateSaleReturn", - (supply, reserve_balance, reserve_ratio, sell_amount), - ) - .await - } - pub async fn calculate_fund_cost( - &self, - supply: ::web3::types::U256, - reserve_balance: ::web3::types::U256, - total_ratio: u32, - amount: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "calculateFundCost", - (supply, reserve_balance, total_ratio, amount), - ) - .await - } - pub async fn calculate_cross_connector_return( - &self, - from_connector_balance: ::web3::types::U256, - from_connector_weight: u32, - to_connector_balance: ::web3::types::U256, - to_connector_weight: u32, - amount: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "calculateCrossConnectorReturn", - ( - from_connector_balance, - from_connector_weight, - to_connector_balance, - to_connector_weight, - amount, - ), - ) - .await - } - pub async fn calculate_cross_reserve_return( - &self, - from_reserve_balance: ::web3::types::U256, - from_reserve_ratio: u32, - to_reserve_balance: ::web3::types::U256, - to_reserve_ratio: u32, - amount: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "calculateCrossReserveReturn", - ( - from_reserve_balance, - from_reserve_ratio, - to_reserve_balance, - to_reserve_ratio, - amount, - ), - ) - .await - } - pub async fn calculate_liquidate_return( - &self, - supply: ::web3::types::U256, - reserve_balance: ::web3::types::U256, - total_ratio: u32, - amount: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "calculateLiquidateReturn", - (supply, reserve_balance, total_ratio, amount), - ) - .await - } - pub async fn calculate_purchase_return( - &self, - supply: ::web3::types::U256, - reserve_balance: ::web3::types::U256, - reserve_ratio: u32, - deposit_amount: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "calculatePurchaseReturn", - (supply, reserve_balance, reserve_ratio, deposit_amount), - ) - .await - } - pub async fn version(&self) -> ::std::result::Result { - self.provider.call("version", ()).await - } -} -pub struct Pausable { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for Pausable { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl Pausable { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"oldPauseGuardian\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"pauseGuardian\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewPauseGuardian\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"isPaused\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PartialPauseChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"isPaused\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PauseChanged\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"lastPausePartialTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lastPauseTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pauseGuardian\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl Pausable -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } -} -impl Pausable -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn last_pause_partial_time( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("lastPausePartialTime", ()).await - } - pub async fn last_pause_time( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("lastPauseTime", ()).await - } - pub async fn pause_guardian( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("pauseGuardian", ()).await - } -} -pub struct Governed { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for Governed { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl Governed { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewPendingOwnership\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"acceptOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"governor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pendingGovernor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newGovernor\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl Governed -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn accept_ownership( - &self, - ) -> ::std::result::Result { - self.provider.send("acceptOwnership", (), None, None).await - } - pub async fn transfer_ownership( - &self, - new_governor: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("transferOwnership", new_governor, None, None) - .await - } -} -impl Governed -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn pending_governor( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("pendingGovernor", ()).await - } - pub async fn governor(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("governor", ()).await - } -} -pub struct RebatePoolMock { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for RebatePoolMock { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl RebatePoolMock { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Redeemed\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_indexerFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_indexerAllocatedStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"add\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"alphaDenominator\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"alphaNumerator\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_totalRewards\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_fees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_totalFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_stake\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_totalStake\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"cobbDouglas\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_indexerFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_indexerAllocatedStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pop\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"rebatePool\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"fees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocatedStake\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"claimedRewards\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"unclaimedAllocationsCount\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setRebateRatio\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl RebatePoolMock -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn pop( - &self, - indexer_fees: ::web3::types::U256, - indexer_allocated_stake: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("pop", (indexer_fees, indexer_allocated_stake), None, None) - .await - } - pub async fn add( - &self, - indexer_fees: ::web3::types::U256, - indexer_allocated_stake: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("add", (indexer_fees, indexer_allocated_stake), None, None) - .await - } - pub async fn set_rebate_ratio( - &self, - alpha_numerator: u32, - alpha_denominator: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setRebateRatio", - (alpha_numerator, alpha_denominator), - None, - None, - ) - .await - } -} -impl RebatePoolMock -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn rebate_pool( - &self, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - u32, - u32, - u32, - ), - ::web3::Error, - > { - self.provider.call("rebatePool", ()).await - } - pub async fn alpha_denominator(&self) -> ::std::result::Result { - self.provider.call("alphaDenominator", ()).await - } - pub async fn cobb_douglas( - &self, - total_rewards: ::web3::types::U256, - fees: ::web3::types::U256, - total_fees: ::web3::types::U256, - stake: ::web3::types::U256, - total_stake: ::web3::types::U256, - alpha_numerator: u32, - alpha_denominator: u32, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "cobbDouglas", - ( - total_rewards, - fees, - total_fees, - stake, - total_stake, - alpha_numerator, - alpha_denominator, - ), - ) - .await - } - pub async fn alpha_numerator(&self) -> ::std::result::Result { - self.provider.call("alphaNumerator", ()).await - } -} -pub struct GovernedMock { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for GovernedMock { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl GovernedMock { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewPendingOwnership\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"acceptOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"governor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pendingGovernor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newGovernor\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl GovernedMock -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn accept_ownership( - &self, - ) -> ::std::result::Result { - self.provider.send("acceptOwnership", (), None, None).await - } - pub async fn transfer_ownership( - &self, - new_governor: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("transferOwnership", new_governor, None, None) - .await - } -} -impl GovernedMock -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn governor(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("governor", ()).await - } - pub async fn pending_governor( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("pendingGovernor", ()).await - } -} -pub struct RewardsManager { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for RewardsManager { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl RewardsManager { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsAssigned\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDenied\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"sinceBlock\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDenylistUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"accRewardsPerSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"accRewardsPerSignalLastBlockUpdated\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"acceptProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptProxyAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"denylist\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getAccRewardsForSubgraph\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getAccRewardsPerAllocatedToken\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getAccRewardsPerSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNewRewardsPerSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRewards\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_issuanceRate\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isDenied\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"issuanceRate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"onSubgraphAllocationUpdate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"onSubgraphSignalUpdate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_deny\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setDenied\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"_deny\",\n \"type\": \"bool[]\"\n }\n ],\n \"name\": \"setDeniedMany\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_issuanceRate\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIssuanceRate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_subgraphAvailabilityOracle\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setSubgraphAvailabilityOracle\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"subgraphAvailabilityOracle\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"subgraphs\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsForSubgraph\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsForSubgraphSnapshot\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerSignalSnapshot\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerAllocatedToken\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"takeRewards\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"updateAccRewardsPerSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl RewardsManager -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn accept_proxy( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("acceptProxy", proxy, None, None).await - } - pub async fn on_subgraph_allocation_update( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send( - "onSubgraphAllocationUpdate", - subgraph_deployment_id, - None, - None, - ) - .await - } - pub async fn initialize( - &self, - controller: ::web3::types::Address, - issuance_rate: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("initialize", (controller, issuance_rate), None, None) - .await - } - pub async fn on_subgraph_signal_update( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("onSubgraphSignalUpdate", subgraph_deployment_id, None, None) - .await - } - pub async fn set_denied( - &self, - subgraph_deployment_id: [u8; 32usize], - deny: bool, - ) -> ::std::result::Result { - self.provider - .send("setDenied", (subgraph_deployment_id, deny), None, None) - .await - } - pub async fn accept_proxy_and_call( - &self, - proxy: ::web3::types::Address, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("acceptProxyAndCall", (proxy, data), None, None) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } - pub async fn set_denied_many( - &self, - subgraph_deployment_id: ::std::vec::Vec<[u8; 32usize]>, - deny: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("setDeniedMany", (subgraph_deployment_id, deny), None, None) - .await - } - pub async fn set_subgraph_availability_oracle( - &self, - subgraph_availability_oracle: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send( - "setSubgraphAvailabilityOracle", - subgraph_availability_oracle, - None, - None, - ) - .await - } - pub async fn set_issuance_rate( - &self, - issuance_rate: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("setIssuanceRate", issuance_rate, None, None) - .await - } - pub async fn take_rewards( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("takeRewards", allocation_id, None, None) - .await - } - pub async fn update_acc_rewards_per_signal( - &self, - ) -> ::std::result::Result { - self.provider - .send("updateAccRewardsPerSignal", (), None, None) - .await - } -} -impl RewardsManager -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn get_acc_rewards_for_subgraph( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getAccRewardsForSubgraph", subgraph_deployment_id) - .await - } - pub async fn acc_rewards_per_signal( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("accRewardsPerSignal", ()).await - } - pub async fn denylist( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("denylist", input_0).await - } - pub async fn get_acc_rewards_per_signal( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getAccRewardsPerSignal", ()).await - } - pub async fn get_rewards( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getRewards", allocation_id).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn subgraph_availability_oracle( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("subgraphAvailabilityOracle", ()).await - } - pub async fn subgraphs( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("subgraphs", input_0).await - } - pub async fn acc_rewards_per_signal_last_block_updated( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("accRewardsPerSignalLastBlockUpdated", ()) - .await - } - pub async fn get_new_rewards_per_signal( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getNewRewardsPerSignal", ()).await - } - pub async fn is_denied( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider.call("isDenied", subgraph_deployment_id).await - } - pub async fn issuance_rate(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("issuanceRate", ()).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn get_acc_rewards_per_allocated_token( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<(::web3::types::U256, ::web3::types::U256), ::web3::Error> { - self.provider - .call("getAccRewardsPerAllocatedToken", subgraph_deployment_id) - .await - } -} -pub struct StakingV1Storage { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for StakingV1Storage { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl StakingV1Storage { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allocations\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"createdAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"closedAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"collectedFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocation\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerAllocatedToken\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"alphaDenominator\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"alphaNumerator\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"assetHolders\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"channelDisputeEpochs\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"curationPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationParametersCooldown\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegationPools\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"cooldownBlocks\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"indexingRewardCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"queryFeeCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"updatedAtBlock\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationRatio\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationTaxPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationUnbondingPeriod\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxAllocationEpochs\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumIndexerStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"operatorAuth\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"protocolPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"rebates\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"fees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocatedStake\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"claimedRewards\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"unclaimedAllocationsCount\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"slashers\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensAllocated\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLocked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLockedUntil\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"subgraphAllocations\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"thawingPeriod\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl StakingV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } -} -impl StakingV1Storage -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn curation_percentage(&self) -> ::std::result::Result { - self.provider.call("curationPercentage", ()).await - } - pub async fn max_allocation_epochs(&self) -> ::std::result::Result { - self.provider.call("maxAllocationEpochs", ()).await - } - pub async fn delegation_unbonding_period(&self) -> ::std::result::Result { - self.provider.call("delegationUnbondingPeriod", ()).await - } - pub async fn alpha_numerator(&self) -> ::std::result::Result { - self.provider.call("alphaNumerator", ()).await - } - pub async fn delegation_parameters_cooldown( - &self, - ) -> ::std::result::Result { - self.provider.call("delegationParametersCooldown", ()).await - } - pub async fn delegation_ratio(&self) -> ::std::result::Result { - self.provider.call("delegationRatio", ()).await - } - pub async fn rebates( - &self, - input_0: ::web3::types::U256, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - u32, - u32, - u32, - ), - ::web3::Error, - > { - self.provider.call("rebates", input_0).await - } - pub async fn stakes( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("stakes", input_0).await - } - pub async fn protocol_percentage(&self) -> ::std::result::Result { - self.provider.call("protocolPercentage", ()).await - } - pub async fn alpha_denominator(&self) -> ::std::result::Result { - self.provider.call("alphaDenominator", ()).await - } - pub async fn delegation_tax_percentage(&self) -> ::std::result::Result { - self.provider.call("delegationTaxPercentage", ()).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn subgraph_allocations( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("subgraphAllocations", input_0).await - } - pub async fn operator_auth( - &self, - input_0: ::web3::types::Address, - input_1: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("operatorAuth", (input_0, input_1)).await - } - pub async fn minimum_indexer_stake( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("minimumIndexerStake", ()).await - } - pub async fn allocations( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::Address, - [u8; 32usize], - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("allocations", input_0).await - } - pub async fn delegation_pools( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - u32, - u32, - u32, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("delegationPools", input_0).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn channel_dispute_epochs(&self) -> ::std::result::Result { - self.provider.call("channelDisputeEpochs", ()).await - } - pub async fn slashers( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("slashers", input_0).await - } - pub async fn asset_holders( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("assetHolders", input_0).await - } - pub async fn thawing_period(&self) -> ::std::result::Result { - self.provider.call("thawingPeriod", ()).await - } -} -pub struct IManaged { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IManaged { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IManaged { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IManaged -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } -} -impl IManaged where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider -{ -} -pub struct ERC20 { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for ERC20 { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl ERC20 { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"name_\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"symbol_\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl ERC20 -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn increase_allowance( - &self, - spender: ::web3::types::Address, - added_value: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("increaseAllowance", (spender, added_value), None, None) - .await - } - pub async fn decrease_allowance( - &self, - spender: ::web3::types::Address, - subtracted_value: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("decreaseAllowance", (spender, subtracted_value), None, None) - .await - } - pub async fn transfer( - &self, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transfer", (recipient, amount), None, None) - .await - } - pub async fn approve( - &self, - spender: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("approve", (spender, amount), None, None) - .await - } - pub async fn transfer_from( - &self, - sender: ::web3::types::Address, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transferFrom", (sender, recipient, amount), None, None) - .await - } -} -impl ERC20 -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn name(&self) -> ::std::result::Result<::std::string::String, ::web3::Error> { - self.provider.call("name", ()).await - } - pub async fn allowance( - &self, - owner: ::web3::types::Address, - spender: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("allowance", (owner, spender)).await - } - pub async fn total_supply(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("totalSupply", ()).await - } - pub async fn symbol(&self) -> ::std::result::Result<::std::string::String, ::web3::Error> { - self.provider.call("symbol", ()).await - } - pub async fn balance_of( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("balanceOf", account).await - } - pub async fn decimals(&self) -> ::std::result::Result { - self.provider.call("decimals", ()).await - } -} -pub struct IERC20 { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IERC20 { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IERC20 { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IERC20 -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn approve( - &self, - spender: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("approve", (spender, amount), None, None) - .await - } - pub async fn transfer( - &self, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transfer", (recipient, amount), None, None) - .await - } - pub async fn transfer_from( - &self, - sender: ::web3::types::Address, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transferFrom", (sender, recipient, amount), None, None) - .await - } -} -impl IERC20 -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn allowance( - &self, - owner: ::web3::types::Address, - spender: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("allowance", (owner, spender)).await - } - pub async fn balance_of( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("balanceOf", account).await - } - pub async fn total_supply(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("totalSupply", ()).await - } -} -pub struct GraphCurationToken { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for GraphCurationToken { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl GraphCurationToken { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_owner\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NewPendingOwnership\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"acceptOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"governor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pendingGovernor\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newGovernor\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl GraphCurationToken -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn transfer( - &self, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transfer", (recipient, amount), None, None) - .await - } - pub async fn transfer_ownership( - &self, - new_governor: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("transferOwnership", new_governor, None, None) - .await - } - pub async fn increase_allowance( - &self, - spender: ::web3::types::Address, - added_value: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("increaseAllowance", (spender, added_value), None, None) - .await - } - pub async fn accept_ownership( - &self, - ) -> ::std::result::Result { - self.provider.send("acceptOwnership", (), None, None).await - } - pub async fn transfer_from( - &self, - sender: ::web3::types::Address, - recipient: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("transferFrom", (sender, recipient, amount), None, None) - .await - } - pub async fn approve( - &self, - spender: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("approve", (spender, amount), None, None) - .await - } - pub async fn burn_from( - &self, - account: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("burnFrom", (account, amount), None, None) - .await - } - pub async fn decrease_allowance( - &self, - spender: ::web3::types::Address, - subtracted_value: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("decreaseAllowance", (spender, subtracted_value), None, None) - .await - } - pub async fn mint( - &self, - to: ::web3::types::Address, - amount: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("mint", (to, amount), None, None).await - } -} -impl GraphCurationToken -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn balance_of( - &self, - account: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("balanceOf", account).await - } - pub async fn governor(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("governor", ()).await - } - pub async fn decimals(&self) -> ::std::result::Result { - self.provider.call("decimals", ()).await - } - pub async fn allowance( - &self, - owner: ::web3::types::Address, - spender: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("allowance", (owner, spender)).await - } - pub async fn name(&self) -> ::std::result::Result<::std::string::String, ::web3::Error> { - self.provider.call("name", ()).await - } - pub async fn pending_governor( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("pendingGovernor", ()).await - } - pub async fn total_supply(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("totalSupply", ()).await - } - pub async fn symbol(&self) -> ::std::result::Result<::std::string::String, ::web3::Error> { - self.provider.call("symbol", ()).await - } -} -pub struct GNS { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for GNS { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl GNS { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"graphAccount\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"nameCurator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"nSignalBurnt\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"withdrawnGRT\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"GRTWithdrawn\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"graphAccount\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"nameCurator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"nSignalBurnt\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"vSignalBurnt\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokensReceived\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NSignalBurned\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"graphAccount\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"nameCurator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"nSignalCreated\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"vSignalCreated\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokensDeposited\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NSignalMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"graphAccount\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"withdrawableGRT\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NameSignalDisabled\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"graphAccount\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint32\",\n \"name\": \"reserveRatio\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"NameSignalEnabled\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"graphAccount\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newVSignalCreated\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokensSignalled\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"NameSignalUpgrade\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"graphAccount\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"nameSystem\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"nameIdentifier\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"SetDefaultName\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"graphAccount\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"subgraphNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SubgraphDeprecated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"graphAccount\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphMetadata\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"SubgraphMetadataUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"graphAccount\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"versionMetadata\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"SubgraphPublished\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"acceptProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptProxyAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"approveAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"bondingCurve\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_nSignal\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensOutMin\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnNSignal\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"deprecateSubgraph\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"erc1056Registry\",\n \"outputs\": [\n {\n \"internalType\": \"contract IEthereumDIDRegistry\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_curator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getCuratorNSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"graphAccountSubgraphNumbers\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_bondingCurve\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_didRegistry\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPublished\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensIn\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_nSignalOutMin\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNSignal\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_nSignalIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"nSignalToTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_nSignalIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"nSignalToVSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"nameSignals\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"vSignal\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nSignal\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"reserveRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"disabled\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"withdrawableGRT\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ownerTaxPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_versionMetadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphMetadata\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"publishNewSubgraph\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_versionMetadata\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"publishNewVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"_nameSystem\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_nameIdentifier\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_name\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setDefaultName\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_ownerTaxPercentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setOwnerTaxPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"subgraphs\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokensIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokensToNSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphMetadata\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"updateSubgraphMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_vSignalIn\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"vSignalToNSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_graphAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_subgraphNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl GNS -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn approve_all( - &self, - ) -> ::std::result::Result { - self.provider.send("approveAll", (), None, None).await - } - pub async fn set_default_name( - &self, - graph_account: ::web3::types::Address, - name_system: u8, - name_identifier: [u8; 32usize], - name: ::std::string::String, - ) -> ::std::result::Result { - self.provider - .send( - "setDefaultName", - (graph_account, name_system, name_identifier, name), - None, - None, - ) - .await - } - pub async fn update_subgraph_metadata( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - subgraph_metadata: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send( - "updateSubgraphMetadata", - (graph_account, subgraph_number, subgraph_metadata), - None, - None, - ) - .await - } - pub async fn withdraw( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("withdraw", (graph_account, subgraph_number), None, None) - .await - } - pub async fn burn_n_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - n_signal: ::web3::types::U256, - tokens_out_min: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "burnNSignal", - (graph_account, subgraph_number, n_signal, tokens_out_min), - None, - None, - ) - .await - } - pub async fn mint_n_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - tokens_in: ::web3::types::U256, - n_signal_out_min: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "mintNSignal", - (graph_account, subgraph_number, tokens_in, n_signal_out_min), - None, - None, - ) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } - pub async fn initialize( - &self, - controller: ::web3::types::Address, - bonding_curve: ::web3::types::Address, - did_registry: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send( - "initialize", - (controller, bonding_curve, did_registry), - None, - None, - ) - .await - } - pub async fn set_owner_tax_percentage( - &self, - owner_tax_percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setOwnerTaxPercentage", owner_tax_percentage, None, None) - .await - } - pub async fn deprecate_subgraph( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send( - "deprecateSubgraph", - (graph_account, subgraph_number), - None, - None, - ) - .await - } - pub async fn accept_proxy_and_call( - &self, - proxy: ::web3::types::Address, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("acceptProxyAndCall", (proxy, data), None, None) - .await - } - pub async fn publish_new_subgraph( - &self, - graph_account: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - version_metadata: [u8; 32usize], - subgraph_metadata: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send( - "publishNewSubgraph", - ( - graph_account, - subgraph_deployment_id, - version_metadata, - subgraph_metadata, - ), - None, - None, - ) - .await - } - pub async fn accept_proxy( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("acceptProxy", proxy, None, None).await - } - pub async fn publish_new_version( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - subgraph_deployment_id: [u8; 32usize], - version_metadata: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send( - "publishNewVersion", - ( - graph_account, - subgraph_number, - subgraph_deployment_id, - version_metadata, - ), - None, - None, - ) - .await - } -} -impl GNS -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn graph_account_subgraph_numbers( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("graphAccountSubgraphNumbers", input_0) - .await - } - pub async fn bonding_curve( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("bondingCurve", ()).await - } - pub async fn tokens_to_n_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - tokens_in: ::web3::types::U256, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider - .call( - "tokensToNSignal", - (graph_account, subgraph_number, tokens_in), - ) - .await - } - pub async fn v_signal_to_n_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - v_signal_in: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "vSignalToNSignal", - (graph_account, subgraph_number, v_signal_in), - ) - .await - } - pub async fn name_signals( - &self, - input_0: ::web3::types::Address, - input_1: ::web3::types::U256, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - [u8; 32usize], - u32, - bool, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("nameSignals", (input_0, input_1)).await - } - pub async fn is_published( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .call("isPublished", (graph_account, subgraph_number)) - .await - } - pub async fn n_signal_to_tokens( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - n_signal_in: ::web3::types::U256, - ) -> ::std::result::Result<(::web3::types::U256, ::web3::types::U256), ::web3::Error> { - self.provider - .call( - "nSignalToTokens", - (graph_account, subgraph_number, n_signal_in), - ) - .await - } - pub async fn n_signal_to_v_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - n_signal_in: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "nSignalToVSignal", - (graph_account, subgraph_number, n_signal_in), - ) - .await - } - pub async fn subgraphs( - &self, - input_0: ::web3::types::Address, - input_1: ::web3::types::U256, - ) -> ::std::result::Result<[u8; 32usize], ::web3::Error> { - self.provider.call("subgraphs", (input_0, input_1)).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn get_curator_n_signal( - &self, - graph_account: ::web3::types::Address, - subgraph_number: ::web3::types::U256, - curator: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "getCuratorNSignal", - (graph_account, subgraph_number, curator), - ) - .await - } - pub async fn erc_1056_registry( - &self, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("erc1056Registry", ()).await - } - pub async fn owner_tax_percentage(&self) -> ::std::result::Result { - self.provider.call("ownerTaxPercentage", ()).await - } -} -pub struct EpochManager { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for EpochManager { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl EpochManager { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthUpdate\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"caller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"EpochRun\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"acceptProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptProxyAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_block\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"blockHash\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"blockNum\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentEpochBlock\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentEpochBlockSinceStart\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_epoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"epochsSince\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epochsSinceUpdate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_epochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isCurrentEpochRun\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lastLengthUpdateBlock\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lastLengthUpdateEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lastRunEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"runEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_epochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl EpochManager -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn accept_proxy( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("acceptProxy", proxy, None, None).await - } - pub async fn accept_proxy_and_call( - &self, - proxy: ::web3::types::Address, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("acceptProxyAndCall", (proxy, data), None, None) - .await - } - pub async fn initialize( - &self, - controller: ::web3::types::Address, - epoch_length: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("initialize", (controller, epoch_length), None, None) - .await - } - pub async fn run_epoch( - &self, - ) -> ::std::result::Result { - self.provider.send("runEpoch", (), None, None).await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } - pub async fn set_epoch_length( - &self, - epoch_length: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("setEpochLength", epoch_length, None, None) - .await - } -} -impl EpochManager -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn last_length_update_epoch( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("lastLengthUpdateEpoch", ()).await - } - pub async fn current_epoch(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("currentEpoch", ()).await - } - pub async fn last_run_epoch( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("lastRunEpoch", ()).await - } - pub async fn epochs_since( - &self, - epoch: ::web3::types::U256, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("epochsSince", epoch).await - } - pub async fn block_num(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("blockNum", ()).await - } - pub async fn current_epoch_block( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("currentEpochBlock", ()).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn epoch_length(&self) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("epochLength", ()).await - } - pub async fn epochs_since_update( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("epochsSinceUpdate", ()).await - } - pub async fn current_epoch_block_since_start( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("currentEpochBlockSinceStart", ()).await - } - pub async fn is_current_epoch_run(&self) -> ::std::result::Result { - self.provider.call("isCurrentEpochRun", ()).await - } - pub async fn block_hash( - &self, - block: ::web3::types::U256, - ) -> ::std::result::Result<[u8; 32usize], ::web3::Error> { - self.provider.call("blockHash", block).await - } - pub async fn last_length_update_block( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("lastLengthUpdateBlock", ()).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } -} -pub struct IRewardsManager { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for IRewardsManager { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl IRewardsManager { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getAccRewardsForSubgraph\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getAccRewardsPerAllocatedToken\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getAccRewardsPerSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNewRewardsPerSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRewards\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isDenied\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"onSubgraphAllocationUpdate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"onSubgraphSignalUpdate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_deny\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setDenied\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"_deny\",\n \"type\": \"bool[]\"\n }\n ],\n \"name\": \"setDeniedMany\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_issuanceRate\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIssuanceRate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_subgraphAvailabilityOracle\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setSubgraphAvailabilityOracle\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"takeRewards\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"updateAccRewardsPerSignal\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl IRewardsManager -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn set_issuance_rate( - &self, - issuance_rate: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("setIssuanceRate", issuance_rate, None, None) - .await - } - pub async fn set_denied( - &self, - subgraph_deployment_id: [u8; 32usize], - deny: bool, - ) -> ::std::result::Result { - self.provider - .send("setDenied", (subgraph_deployment_id, deny), None, None) - .await - } - pub async fn set_denied_many( - &self, - subgraph_deployment_id: ::std::vec::Vec<[u8; 32usize]>, - deny: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("setDeniedMany", (subgraph_deployment_id, deny), None, None) - .await - } - pub async fn on_subgraph_allocation_update( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send( - "onSubgraphAllocationUpdate", - subgraph_deployment_id, - None, - None, - ) - .await - } - pub async fn set_subgraph_availability_oracle( - &self, - subgraph_availability_oracle: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send( - "setSubgraphAvailabilityOracle", - subgraph_availability_oracle, - None, - None, - ) - .await - } - pub async fn take_rewards( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("takeRewards", allocation_id, None, None) - .await - } - pub async fn update_acc_rewards_per_signal( - &self, - ) -> ::std::result::Result { - self.provider - .send("updateAccRewardsPerSignal", (), None, None) - .await - } - pub async fn on_subgraph_signal_update( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("onSubgraphSignalUpdate", subgraph_deployment_id, None, None) - .await - } -} -impl IRewardsManager -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn is_denied( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result { - self.provider.call("isDenied", subgraph_deployment_id).await - } - pub async fn get_acc_rewards_for_subgraph( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getAccRewardsForSubgraph", subgraph_deployment_id) - .await - } - pub async fn get_acc_rewards_per_signal( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getAccRewardsPerSignal", ()).await - } - pub async fn get_rewards( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getRewards", allocation_id).await - } - pub async fn get_new_rewards_per_signal( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getNewRewardsPerSignal", ()).await - } - pub async fn get_acc_rewards_per_allocated_token( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<(::web3::types::U256, ::web3::types::U256), ::web3::Error> { - self.provider - .call("getAccRewardsPerAllocatedToken", subgraph_deployment_id) - .await - } -} -pub struct LibCobbDouglas { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for LibCobbDouglas { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl LibCobbDouglas { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"totalRewards\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"fees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"totalFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"stake\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"totalStake\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"cobbDouglas\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"rewards\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl LibCobbDouglas -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } -} -impl LibCobbDouglas -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn cobb_douglas( - &self, - total_rewards: ::web3::types::U256, - fees: ::web3::types::U256, - total_fees: ::web3::types::U256, - stake: ::web3::types::U256, - total_stake: ::web3::types::U256, - alpha_numerator: u32, - alpha_denominator: u32, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call( - "cobbDouglas", - ( - total_rewards, - fees, - total_fees, - stake, - total_stake, - alpha_numerator, - alpha_denominator, - ), - ) - .await - } -} -pub struct Staking { - provider: ::std::sync::Arc, - pub address: ::web3::types::Address, -} -impl ::std::clone::Clone for Staking { - fn clone(&self) -> Self { - Self { - provider: ::std::clone::Clone::clone(&self.provider), - address: self.address, - } - } -} -impl Staking { - pub fn new(address: ::web3::types::Address, context: &Context) -> Self - where - Context: ::solidity_bindgen::Context, - { - let abi = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocation\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"poi\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"isDelegator\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"AllocationClosed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"curationFees\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"rebateFees\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AllocationCollected\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"metadata\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"AllocationCreated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"caller\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"assetHolder\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"AssetHolderUpdate\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint32\",\n \"name\": \"indexingRewardCut\",\n \"type\": \"uint32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint32\",\n \"name\": \"queryFeeCut\",\n \"type\": \"uint32\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint32\",\n \"name\": \"cooldownBlocks\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"DelegationParametersUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"string\",\n \"name\": \"param\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ParameterUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"forEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"unclaimedAllocationsCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"delegationFees\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RebateClaimed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetController\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"SetOperator\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"destination\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SetRewardsDestination\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"caller\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"slasher\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"SlasherUpdate\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeDelegated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"until\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeDelegatedLocked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeDelegatedWithdrawn\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeDeposited\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"until\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeLocked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"beneficiary\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakeSlashed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeWithdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"acceptProxy\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract IGraphProxy\",\n \"name\": \"_proxy\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"acceptProxyAndCall\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"addressCache\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"allocate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"allocateFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allocations\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"createdAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"closedAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"collectedFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocation\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerAllocatedToken\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"alphaDenominator\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"alphaNumerator\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"assetHolders\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"channelDisputeEpochs\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_restake\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"claim\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_allocationID\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_restake\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"claimMany\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_poi\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"closeAllocation\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"poi\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct IStakingData.CloseAllocationRequest[]\",\n \"name\": \"_requests\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"closeAllocationMany\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_closingAllocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_poi\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_metadata\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_proof\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"closeAndAllocate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"collect\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"controller\",\n \"outputs\": [\n {\n \"internalType\": \"contract IController\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"curationPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationParametersCooldown\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegationPools\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"cooldownBlocks\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"indexingRewardCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"queryFeeCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"updatedAtBlock\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationRatio\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationTaxPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"delegationUnbondingPeriod\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getAllocation\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"subgraphDeploymentID\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"createdAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"closedAtEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"collectedFees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocation\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"accRewardsPerAllocatedToken\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IStakingData.Allocation\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getAllocationState\",\n \"outputs\": [\n {\n \"internalType\": \"enum IStaking.AllocationState\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_delegator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getDelegation\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLocked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLockedUntil\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IStakingData.Delegation\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getIndexerCapacity\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getIndexerStakedTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"_subgraphDeploymentID\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getSubgraphAllocatedTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"shares\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLocked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLockedUntil\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IStakingData.Delegation\",\n \"name\": \"_delegation\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"getWithdraweableDelegatedTokens\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasStake\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumIndexerStake\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_thawingPeriod\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_protocolPercentage\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_curationPercentage\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_channelDisputeEpochs\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_maxAllocationEpochs\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationUnbondingPeriod\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationRatio\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_rebateAlphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_rebateAlphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_allocationID\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isAllocation\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_delegator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isDelegator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isOperator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxAllocationEpochs\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumIndexerStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"operatorAuth\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"protocolPercentage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"rebates\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"fees\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"effectiveAllocatedStake\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"claimedRewards\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"unclaimedAllocationsCount\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardsDestination\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_assetHolder\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAssetHolder\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_channelDisputeEpochs\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setChannelDisputeEpochs\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_controller\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setController\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setCurationPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_indexingRewardCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_queryFeeCut\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_cooldownBlocks\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationParameters\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_blocks\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationParametersCooldown\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationRatio\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationRatio\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationTaxPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_delegationUnbondingPeriod\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setDelegationUnbondingPeriod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_maxAllocationEpochs\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setMaxAllocationEpochs\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_minimumIndexerStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumIndexerStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setOperator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_percentage\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setProtocolPercentage\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaNumerator\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"_alphaDenominator\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setRebateRatio\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_destination\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setRewardsDestination\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_slasher\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowed\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setSlasher\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"_thawingPeriod\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"setThawingPeriod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_beneficiary\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"slash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"slashers\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeTo\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensAllocated\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLocked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokensLockedUntil\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"subgraphAllocations\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"thawingPeriod\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_shares\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"undelegate\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"_tokens\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"unstake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_indexer\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_delegateToIndexer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawDelegated\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n]\n" ; - let provider = ::solidity_bindgen::Context::provider(context, address, abi.as_bytes()); - let provider = ::std::sync::Arc::new(provider); - Self { address, provider } - } -} -impl Staking -where - SolidityBindgenProvider: ::solidity_bindgen::SendProvider, -{ - pub async fn send( - &self, - func: &'static str, - params: impl web3::contract::tokens::Tokenize + Send, - options: Option<::web3::contract::Options>, - confirmations: Option, - ) -> Result { - self.provider - .send(func, params, options, confirmations) - .await - } - pub async fn accept_proxy( - &self, - proxy: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.send("acceptProxy", proxy, None, None).await - } - pub async fn set_minimum_indexer_stake( - &self, - minimum_indexer_stake: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("setMinimumIndexerStake", minimum_indexer_stake, None, None) - .await - } - pub async fn allocate( - &self, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "allocate", - ( - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn initialize( - &self, - controller: ::web3::types::Address, - minimum_indexer_stake: ::web3::types::U256, - thawing_period: u32, - protocol_percentage: u32, - curation_percentage: u32, - channel_dispute_epochs: u32, - max_allocation_epochs: u32, - delegation_unbonding_period: u32, - delegation_ratio: u32, - rebate_alpha_numerator: u32, - rebate_alpha_denominator: u32, - ) -> ::std::result::Result { - self.provider - .send( - "initialize", - ( - controller, - minimum_indexer_stake, - thawing_period, - protocol_percentage, - curation_percentage, - channel_dispute_epochs, - max_allocation_epochs, - delegation_unbonding_period, - delegation_ratio, - rebate_alpha_numerator, - rebate_alpha_denominator, - ), - None, - None, - ) - .await - } - pub async fn delegate( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("delegate", (indexer, tokens), None, None) - .await - } - pub async fn set_channel_dispute_epochs( - &self, - channel_dispute_epochs: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setChannelDisputeEpochs", - channel_dispute_epochs, - None, - None, - ) - .await - } - pub async fn allocate_from( - &self, - indexer: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "allocateFrom", - ( - indexer, - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn set_delegation_ratio( - &self, - delegation_ratio: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationRatio", delegation_ratio, None, None) - .await - } - pub async fn set_thawing_period( - &self, - thawing_period: u32, - ) -> ::std::result::Result { - self.provider - .send("setThawingPeriod", thawing_period, None, None) - .await - } - pub async fn claim( - &self, - allocation_id: ::web3::types::Address, - restake: bool, - ) -> ::std::result::Result { - self.provider - .send("claim", (allocation_id, restake), None, None) - .await - } - pub async fn claim_many( - &self, - allocation_id: ::std::vec::Vec<::web3::types::Address>, - restake: bool, - ) -> ::std::result::Result { - self.provider - .send("claimMany", (allocation_id, restake), None, None) - .await - } - pub async fn accept_proxy_and_call( - &self, - proxy: ::web3::types::Address, - data: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send("acceptProxyAndCall", (proxy, data), None, None) - .await - } - pub async fn set_rebate_ratio( - &self, - alpha_numerator: u32, - alpha_denominator: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setRebateRatio", - (alpha_numerator, alpha_denominator), - None, - None, - ) - .await - } - pub async fn undelegate( - &self, - indexer: ::web3::types::Address, - shares: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("undelegate", (indexer, shares), None, None) - .await - } - pub async fn set_max_allocation_epochs( - &self, - max_allocation_epochs: u32, - ) -> ::std::result::Result { - self.provider - .send("setMaxAllocationEpochs", max_allocation_epochs, None, None) - .await - } - pub async fn close_allocation_many( - &self, - requests: ::solidity_bindgen::internal::Unimplemented, - ) -> ::std::result::Result { - self.provider - .send("closeAllocationMany", requests, None, None) - .await - } - pub async fn set_protocol_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setProtocolPercentage", percentage, None, None) - .await - } - pub async fn collect( - &self, - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("collect", (tokens, allocation_id), None, None) - .await - } - pub async fn set_rewards_destination( - &self, - destination: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setRewardsDestination", destination, None, None) - .await - } - pub async fn withdraw_delegated( - &self, - indexer: ::web3::types::Address, - delegate_to_indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send( - "withdrawDelegated", - (indexer, delegate_to_indexer), - None, - None, - ) - .await - } - pub async fn close_allocation( - &self, - allocation_id: ::web3::types::Address, - poi: [u8; 32usize], - ) -> ::std::result::Result { - self.provider - .send("closeAllocation", (allocation_id, poi), None, None) - .await - } - pub async fn stake( - &self, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("stake", tokens, None, None).await - } - pub async fn set_delegation_parameters_cooldown( - &self, - blocks: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationParametersCooldown", blocks, None, None) - .await - } - pub async fn close_and_allocate( - &self, - closing_allocation_id: ::web3::types::Address, - poi: [u8; 32usize], - indexer: ::web3::types::Address, - subgraph_deployment_id: [u8; 32usize], - tokens: ::web3::types::U256, - allocation_id: ::web3::types::Address, - metadata: [u8; 32usize], - proof: ::std::vec::Vec, - ) -> ::std::result::Result { - self.provider - .send( - "closeAndAllocate", - ( - closing_allocation_id, - poi, - indexer, - subgraph_deployment_id, - tokens, - allocation_id, - metadata, - proof, - ), - None, - None, - ) - .await - } - pub async fn set_controller( - &self, - controller: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("setController", controller, None, None) - .await - } - pub async fn set_operator( - &self, - operator: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setOperator", (operator, allowed), None, None) - .await - } - pub async fn set_asset_holder( - &self, - asset_holder: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setAssetHolder", (asset_holder, allowed), None, None) - .await - } - pub async fn unstake( - &self, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider.send("unstake", tokens, None, None).await - } - pub async fn set_delegation_tax_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setDelegationTaxPercentage", percentage, None, None) - .await - } - pub async fn set_curation_percentage( - &self, - percentage: u32, - ) -> ::std::result::Result { - self.provider - .send("setCurationPercentage", percentage, None, None) - .await - } - pub async fn set_delegation_parameters( - &self, - indexing_reward_cut: u32, - query_fee_cut: u32, - cooldown_blocks: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setDelegationParameters", - (indexing_reward_cut, query_fee_cut, cooldown_blocks), - None, - None, - ) - .await - } - pub async fn set_slasher( - &self, - slasher: ::web3::types::Address, - allowed: bool, - ) -> ::std::result::Result { - self.provider - .send("setSlasher", (slasher, allowed), None, None) - .await - } - pub async fn withdraw( - &self, - ) -> ::std::result::Result { - self.provider.send("withdraw", (), None, None).await - } - pub async fn stake_to( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - ) -> ::std::result::Result { - self.provider - .send("stakeTo", (indexer, tokens), None, None) - .await - } - pub async fn slash( - &self, - indexer: ::web3::types::Address, - tokens: ::web3::types::U256, - reward: ::web3::types::U256, - beneficiary: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .send("slash", (indexer, tokens, reward, beneficiary), None, None) - .await - } - pub async fn set_delegation_unbonding_period( - &self, - delegation_unbonding_period: u32, - ) -> ::std::result::Result { - self.provider - .send( - "setDelegationUnbondingPeriod", - delegation_unbonding_period, - None, - None, - ) - .await - } -} -impl Staking -where - SolidityBindgenProvider: ::solidity_bindgen::CallProvider, -{ - pub async fn allocations( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::Address, - [u8; 32usize], - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("allocations", input_0).await - } - pub async fn delegation_ratio(&self) -> ::std::result::Result { - self.provider.call("delegationRatio", ()).await - } - pub async fn rewards_destination( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("rewardsDestination", input_0).await - } - pub async fn rebates( - &self, - input_0: ::web3::types::U256, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - u32, - u32, - u32, - ), - ::web3::Error, - > { - self.provider.call("rebates", input_0).await - } - pub async fn stakes( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("stakes", input_0).await - } - pub async fn slashers( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("slashers", input_0).await - } - pub async fn get_allocation_state( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .call("getAllocationState", allocation_id) - .await - } - pub async fn curation_percentage(&self) -> ::std::result::Result { - self.provider.call("curationPercentage", ()).await - } - pub async fn get_subgraph_allocated_tokens( - &self, - subgraph_deployment_id: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getSubgraphAllocatedTokens", subgraph_deployment_id) - .await - } - pub async fn get_indexer_staked_tokens( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getIndexerStakedTokens", indexer).await - } - pub async fn protocol_percentage(&self) -> ::std::result::Result { - self.provider.call("protocolPercentage", ()).await - } - pub async fn controller(&self) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("controller", ()).await - } - pub async fn get_indexer_capacity( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("getIndexerCapacity", indexer).await - } - pub async fn get_allocation( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::Address, - [u8; 32usize], - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("getAllocation", allocation_id).await - } - pub async fn asset_holders( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("assetHolders", input_0).await - } - pub async fn max_allocation_epochs(&self) -> ::std::result::Result { - self.provider.call("maxAllocationEpochs", ()).await - } - pub async fn delegation_unbonding_period(&self) -> ::std::result::Result { - self.provider.call("delegationUnbondingPeriod", ()).await - } - pub async fn address_cache( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::Address, ::web3::Error> { - self.provider.call("addressCache", input_0).await - } - pub async fn delegation_parameters_cooldown( - &self, - ) -> ::std::result::Result { - self.provider.call("delegationParametersCooldown", ()).await - } - pub async fn subgraph_allocations( - &self, - input_0: [u8; 32usize], - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("subgraphAllocations", input_0).await - } - pub async fn channel_dispute_epochs(&self) -> ::std::result::Result { - self.provider.call("channelDisputeEpochs", ()).await - } - pub async fn is_allocation( - &self, - allocation_id: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isAllocation", allocation_id).await - } - pub async fn operator_auth( - &self, - input_0: ::web3::types::Address, - input_1: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("operatorAuth", (input_0, input_1)).await - } - pub async fn thawing_period(&self) -> ::std::result::Result { - self.provider.call("thawingPeriod", ()).await - } - pub async fn is_delegator( - &self, - indexer: ::web3::types::Address, - delegator: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider - .call("isDelegator", (indexer, delegator)) - .await - } - pub async fn is_operator( - &self, - operator: ::web3::types::Address, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("isOperator", (operator, indexer)).await - } - pub async fn minimum_indexer_stake( - &self, - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider.call("minimumIndexerStake", ()).await - } - pub async fn delegation_tax_percentage(&self) -> ::std::result::Result { - self.provider.call("delegationTaxPercentage", ()).await - } - pub async fn get_delegation( - &self, - indexer: ::web3::types::Address, - delegator: ::web3::types::Address, - ) -> ::std::result::Result< - ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider - .call("getDelegation", (indexer, delegator)) - .await - } - pub async fn alpha_denominator(&self) -> ::std::result::Result { - self.provider.call("alphaDenominator", ()).await - } - pub async fn has_stake( - &self, - indexer: ::web3::types::Address, - ) -> ::std::result::Result { - self.provider.call("hasStake", indexer).await - } - pub async fn get_withdraweable_delegated_tokens( - &self, - delegation: ( - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ) -> ::std::result::Result<::web3::types::U256, ::web3::Error> { - self.provider - .call("getWithdraweableDelegatedTokens", delegation) - .await - } - pub async fn delegation_pools( - &self, - input_0: ::web3::types::Address, - ) -> ::std::result::Result< - ( - u32, - u32, - u32, - ::web3::types::U256, - ::web3::types::U256, - ::web3::types::U256, - ), - ::web3::Error, - > { - self.provider.call("delegationPools", input_0).await - } - pub async fn alpha_numerator(&self) -> ::std::result::Result { - self.provider.call("alphaNumerator", ()).await - } -} diff --git a/common/src/contracts/config.rs b/common/src/contracts/config.rs deleted file mode 100644 index cbabf12..0000000 --- a/common/src/contracts/config.rs +++ /dev/null @@ -1,230 +0,0 @@ -use super::ContractConfig; -use crate::chain_id::{ARBITRUM_GOERLI, ARBITRUM_ONE, ARBITRUM_SEPOLIA, GOERLI, MAIN_NET, SEPOLIA}; -use crate::prelude::*; -use anyhow::anyhow; -use eip_712_derive::U256; -use serde::{Deserialize, Deserializer}; -use serde_json; -use std::{collections::BTreeMap, fs::File, path::Path, str::FromStr}; -use web3::types::H160; - -/// This impl contains the addresses for contracts belonging to the Network -/// as deployed on various networks. -impl ContractConfig { - pub fn from_file(path: &Path, chain_id: u64, url: &str) -> Result { - let address_book: AddressBook = serde_json::from_reader(File::open(path)?)?; - let addresses = address_book - .0 - .get(&chain_id.to_string()) - .ok_or_else(|| anyhow!("{} not found in address book", chain_id))?; - let mut chain_id_bytes = [0u8; 32]; - chain_id_bytes[24..].clone_from_slice(&chain_id.to_be_bytes()); - Ok(Self { - url: url.into(), - chain_id: U256(chain_id_bytes), - graph_token: addresses - .graph_token - .as_ref() - .ok_or_else(|| anyhow!("GraphToken contract missing from address book"))? - .address, - epoch_manager: addresses.epoch_manager.address, - dispute_manager: addresses.dispute_manager.address, - staking: addresses.staking.address, - curation: addresses.curation.address, - rewards_manager: addresses.rewards_manager.address, - service_registry: addresses.service_registry.address, - gns: addresses.gns.address, - }) - } - - pub fn mainnet(url: &str) -> Self { - Self { - url: url.into(), - graph_token: "c944E90C64B2c07662A292be6244BDf05Cda44a7".parse().unwrap(), - epoch_manager: "64F990Bf16552A693dCB043BB7bf3866c5E05DdB".parse().unwrap(), - dispute_manager: "97307b963662cCA2f7eD50e38dCC555dfFc4FB0b".parse().unwrap(), - staking: "F55041E37E12cD407ad00CE2910B8269B01263b9".parse().unwrap(), - curation: "8FE00a685Bcb3B2cc296ff6FfEaB10acA4CE1538".parse().unwrap(), - rewards_manager: "9Ac758AB77733b4150A901ebd659cbF8cB93ED66".parse().unwrap(), - service_registry: "aD0C9DaCf1e515615b0581c8D7E295E296Ec26E6".parse().unwrap(), - gns: "aDcA0dd4729c8BA3aCf3E99F3A9f471EF37b6825".parse().unwrap(), - chain_id: MAIN_NET, - } - } - - pub fn ganache(chain_id: U256) -> Self { - Self { - url: "http://127.0.0.1:8545".into(), - graph_token: "CfEB869F69431e42cdB54A4F4f105C19C080A601".parse().unwrap(), - epoch_manager: "254dffcd3277C0b1660F6d42EFbB754edaBAbC2B".parse().unwrap(), - dispute_manager: "0290FB167208Af455bB137780163b7B7a9a10C16".parse().unwrap(), - staking: "e982E462b094850F12AF94d21D470e21bE9D0E9C".parse().unwrap(), - curation: "C89Ce4735882C9F0f0FE26686c53074E09B0D550".parse().unwrap(), - rewards_manager: "59d3631c86BbE35EF041872d502F218A39FBa150".parse().unwrap(), - service_registry: "9b1f7F645351AF3631a656421eD2e40f2802E6c0".parse().unwrap(), - gns: "67B5656d60a809915323Bf2C40A8bEF15A152e3e".parse().unwrap(), - chain_id, - } - } - - pub fn goerli(url: &str) -> Self { - Self { - url: url.into(), - graph_token: "5c946740441C12510a167B447B7dE565C20b9E3C".parse().unwrap(), - epoch_manager: "03541c5cd35953CD447261122F93A5E7b812D697".parse().unwrap(), - dispute_manager: "8c344366D9269174F10bB588F16945eb47f78dc9".parse().unwrap(), - staking: "35e3Cb6B317690d662160d5d02A5b364578F62c9".parse().unwrap(), - curation: "E59B4820dDE28D2c235Bd9A73aA4e8716Cb93E9B".parse().unwrap(), - rewards_manager: "1246D7c4c903fDd6147d581010BD194102aD4ee2".parse().unwrap(), - service_registry: "7CF8aD279E9F26b7DAD2Be452A74068536C8231F".parse().unwrap(), - gns: "065611D3515325aE6fe14f09AEe5Aa2C0a1f0CA7".parse().unwrap(), - chain_id: GOERLI, - } - } - - pub fn arbitrum_goerli(url: &str) -> Self { - Self { - url: url.into(), - graph_token: "18C924BD5E8b83b47EFaDD632b7178E2Fd36073D".parse().unwrap(), - epoch_manager: "8ECedc7631f4616D7f4074f9fC9D0368674794BE".parse().unwrap(), - dispute_manager: "16DEF7E0108A5467A106dbD7537f8591f470342E".parse().unwrap(), - staking: "cd549d0C43d915aEB21d3a331dEaB9B7aF186D26".parse().unwrap(), - curation: "7080AAcC4ADF4b1E72615D6eb24CDdE40a04f6Ca".parse().unwrap(), - rewards_manager: "5F06ABd1CfAcF7AE99530D7Fed60E085f0B15e8D".parse().unwrap(), - service_registry: "07ECDD4278D83Cd2425cA86256634f666b659e53".parse().unwrap(), - gns: "6bf9104e054537301cC23A1023Ca30A6Df79eB21".parse().unwrap(), - chain_id: ARBITRUM_GOERLI, - } - } - - pub fn arbitrum_one(url: &str) -> Self { - Self { - url: url.into(), - graph_token: "9623063377AD1B27544C965cCd7342f7EA7e88C7".parse().unwrap(), - epoch_manager: "5A843145c43d328B9bB7a4401d94918f131bB281".parse().unwrap(), - dispute_manager: "0Ab2B043138352413Bb02e67E626a70320E3BD46".parse().unwrap(), - staking: "00669A4CF01450B64E8A2A20E9b1FCB71E61eF03".parse().unwrap(), - curation: "22d78fb4bc72e191C765807f8891B5e1785C8014".parse().unwrap(), - rewards_manager: "971B9d3d0Ae3ECa029CAB5eA1fB0F72c85e6a525".parse().unwrap(), - service_registry: "072884c745c0A23144753335776c99BE22588f8A".parse().unwrap(), - gns: "ec9A7fb6CbC2E41926127929c2dcE6e9c5D33Bec".parse().unwrap(), - chain_id: ARBITRUM_ONE, - } - } - - pub fn sepolia(url: &str) -> Self { - Self { - url: url.into(), - graph_token: "0xCA59cCeb39bE1808d7aA607153f4A5062daF3a83" - .parse() - .unwrap(), - epoch_manager: "0x3C39036a76104D7c6D3eF13a21477C0fE23A3Aa2" - .parse() - .unwrap(), - dispute_manager: "0x1Da0DF3435cde4199650D35690E3B0885dfc38B1" - .parse() - .unwrap(), - staking: "0x14e9B07Dc56A0B03ac8A58453B5cCCB289d6ec90" - .parse() - .unwrap(), - curation: "0x77A6e5F2f13218B33A97Aec56d591dB18D60FFb1" - .parse() - .unwrap(), - rewards_manager: "0x175f483AfAB4Fc52A6E07F9e9d46C90eB95941b5" - .parse() - .unwrap(), - service_registry: "0x0Ee47634c94E6606f67301b3A868319073CB0FC2" - .parse() - .unwrap(), - gns: "0x5461D48556B94e7fdD8ED5A8f865Ba4F1A3b5454" - .parse() - .unwrap(), - chain_id: SEPOLIA, - } - } - - pub fn arbitrum_sepolia(url: &str) -> Self { - Self { - url: url.into(), - graph_token: "0xf8c05dCF59E8B28BFD5eed176C562bEbcfc7Ac04" - .parse() - .unwrap(), - epoch_manager: "0x88b3C7f37253bAA1A9b95feAd69bD5320585826D" - .parse() - .unwrap(), - dispute_manager: "0x7C9B82717f9433932507dF6EdA93A9678b258698" - .parse() - .unwrap(), - staking: "0x865365C425f3A593Ffe698D9c4E6707D14d51e08" - .parse() - .unwrap(), - curation: "0xDe761f075200E75485F4358978FB4d1dC8644FD5" - .parse() - .unwrap(), - rewards_manager: "0x1F49caE7669086c8ba53CC35d1E9f80176d67E79" - .parse() - .unwrap(), - service_registry: "0x888541878CbDDEd880Cd58c728f1Af5C47343F86" - .parse() - .unwrap(), - gns: "0x3133948342F35b8699d8F94aeE064AbB76eDe965" - .parse() - .unwrap(), - chain_id: ARBITRUM_SEPOLIA, - } - } -} - -// The idea behind having this .parse() compatible API is to be able to easily -// migrate to more advanced parsing and specify each field. -impl FromStr for ContractConfig { - type Err = anyhow::Error; - fn from_str(s: &str) -> Result { - let parts: Vec<_> = s.splitn(2, ':').collect(); - - Ok(match parts.as_slice() { - ["mainnet", url] => ContractConfig::mainnet(url), - ["ganache/mainnet"] => ContractConfig::ganache(MAIN_NET), - ["goerli", url] => ContractConfig::goerli(url), - ["sepolia", url] => ContractConfig::sepolia(url), - ["arbitrum-goerli", url] => ContractConfig::arbitrum_goerli(url), - ["arbitrum-one", url] => ContractConfig::arbitrum_one(url), - ["arbitrum-sepolia", url] => ContractConfig::arbitrum_sepolia(url), - _ => { - return Err(anyhow!("Unrecognized format. Expecting: network:url (or just network for \"ganache/mainnet\"). Got: {}", s)); - } - }) - } -} - -#[derive(Deserialize)] -struct AddressBook(BTreeMap); - -#[derive(Deserialize)] -#[serde(rename_all = "PascalCase")] -struct AddressBookEntry { - graph_token: Option, - epoch_manager: AddressBookContract, - dispute_manager: AddressBookContract, - staking: AddressBookContract, - curation: AddressBookContract, - rewards_manager: AddressBookContract, - service_registry: AddressBookContract, - #[serde(rename = "GNS")] - gns: AddressBookContract, -} - -#[derive(Deserialize)] -struct AddressBookContract { - #[serde(deserialize_with = "deserialize_h160")] - address: H160, -} - -fn deserialize_h160<'de, D>(deserializer: D) -> Result -where - D: Deserializer<'de>, -{ - String::deserialize(deserializer)? - .parse::() - .map_err(serde::de::Error::custom) -} diff --git a/common/src/contracts/dry_run.rs b/common/src/contracts/dry_run.rs deleted file mode 100644 index 0688037..0000000 --- a/common/src/contracts/dry_run.rs +++ /dev/null @@ -1,154 +0,0 @@ -use async_trait::async_trait; -use slog::{info, Logger}; -use solidity_bindgen::{CallProvider, Context, SendProvider, Web3Context, Web3Provider}; -use web3::{ - contract::{ - tokens::{Detokenize, Tokenize}, - Options, - }, - types::Address, - Error, -}; - -pub enum AnyProvider { - Web3(Web3Provider), - DryRun(DryRunProvider), -} - -#[async_trait] -impl CallProvider for AnyProvider { - async fn call( - &self, - name: &'static str, - params: Params, - ) -> Result { - match self { - AnyProvider::Web3(web3_provider) => web3_provider.call(name, params).await, - AnyProvider::DryRun(dry_run) => dry_run.call(name, params).await, - } - } -} - -#[async_trait] -impl SendProvider for AnyProvider { - type Out = (); - async fn send( - &self, - func: &'static str, - params: Params, - options: Option, - confirmations: Option, - ) -> Result { - match self { - AnyProvider::Web3(web3_provider) => web3_provider - .send(func, params, options, confirmations) - .await - .map(|_| ()), - AnyProvider::DryRun(dry_run) => { - dry_run.send(func, params, options, confirmations).await - } - } - } -} - -#[derive(Clone)] -pub enum AnyContext { - Web3(Web3Context), - DryRun(DryRunContext), -} - -impl Context for AnyContext { - type Provider = AnyProvider; - fn provider(&self, contract: Address, abi: &[u8]) -> Self::Provider { - match self { - AnyContext::Web3(web3) => AnyProvider::Web3(web3.provider(contract, abi)), - AnyContext::DryRun(dry_run) => AnyProvider::DryRun(dry_run.provider(contract, abi)), - } - } -} - -pub struct DryRunProvider { - base_provider: BaseProvider, - logger: Logger, -} - -#[derive(Clone)] -pub struct DryRunContext { - base_context: BaseContext, - logger: Logger, -} - -impl DryRunContext -where - BaseContext: Context, -{ - pub fn new(base_context: BaseContext, logger: Logger) -> Self { - Self { - base_context, - logger, - } - } -} - -impl Context for DryRunContext -where - BaseContext: Context, - BaseContext::Provider: CallProvider, -{ - type Provider = DryRunProvider; - fn provider(&self, contract: Address, abi: &[u8]) -> Self::Provider { - DryRunProvider::new( - self.base_context.provider(contract, abi), - self.logger.clone(), - ) - } -} - -impl DryRunProvider -where - BaseProvider: CallProvider, -{ - pub fn new(base_provider: BaseProvider, logger: Logger) -> Self { - Self { - base_provider, - logger, - } - } -} - -#[async_trait] -impl CallProvider for DryRunProvider -where - BaseProvider: CallProvider, -{ - async fn call( - &self, - name: &'static str, - params: Params, - ) -> Result { - self.base_provider.call(name, params).await - } -} - -#[async_trait] -impl SendProvider for DryRunProvider { - type Out = (); - async fn send( - &self, - func: &'static str, - params: Params, - _options: Option, - _confirmations: Option, - ) -> Result { - let mut tokens = String::new(); - for token in params.into_tokens() { - let token = format!("{}", token); - tokens.push_str(&token); - } - info!(self.logger, "Send"; - "func" => func, - "params" => tokens, - ); - Ok(()) - } -} diff --git a/common/src/contracts/mod.rs b/common/src/contracts/mod.rs deleted file mode 100644 index 46c8a0d..0000000 --- a/common/src/contracts/mod.rs +++ /dev/null @@ -1,66 +0,0 @@ -mod abis; -mod config; -use crate::prelude::*; -use eip_712_derive::U256; -use web3::types::Address; -pub mod dry_run; - -pub use abis::*; - -macro_rules! contracts { - ($($field:ident: $T:ident),+) => { - /// An interface for our contracts. - pub struct Contracts { - context: Context, - chain_id: U256, - $($field: $T,)+ - } - - impl Clone for Contracts { - fn clone(&self) -> Self { - Self { - context: self.context.clone(), - chain_id: self.chain_id.clone(), - $($field: self.$field.clone(),)+ - } - } - } - - pub struct ContractConfig { - pub url: String, - pub chain_id: U256, - $($field: Address,)+ - } - - impl Contracts { - pub fn new(opts: ContractConfig, context: Context) -> Self where Context: solidity_bindgen::Context { - Self { - $($field: <$T>::new(opts.$field, &context),)+ - context, - chain_id: opts.chain_id, - } - } - - $( - pub fn $field(&self) -> &$T { - &self.$field - } - )+ - - pub fn chain_id(&self) -> &U256 { - &self.chain_id - } - } - } -} - -contracts! { - gns: GNS, - dispute_manager: DisputeManager, - epoch_manager: EpochManager, - rewards_manager: RewardsManager, - curation: Curation, - graph_token: GraphToken, - service_registry: ServiceRegistry, - staking: Staking -} diff --git a/common/src/lib.rs b/common/src/lib.rs index dd05dd6..ce9030c 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -1,12 +1,9 @@ pub mod async_cache; -pub mod chain_id; -pub mod contracts; pub mod logging; pub mod metrics; pub mod prelude; pub use prometheus; -pub use web3; use prelude::*; use std::future::Future; diff --git a/common/src/prelude.rs b/common/src/prelude.rs index 797a3a8..612e7af 100644 --- a/common/src/prelude.rs +++ b/common/src/prelude.rs @@ -18,7 +18,6 @@ macro_rules! concat_bytes { pub use crate::concat_bytes; -pub use crate::contracts::Contracts; pub use crate::metrics::{Metrics, WithErrMetric as _}; pub use anyhow::{anyhow, ensure, Context as _, Error, Result}; pub use futures::{ @@ -28,10 +27,8 @@ pub use never::Never; pub use prometheus::Counter; pub use slog::{error, info, trace, warn, Logger}; pub use std::convert::{TryFrom, TryInto}; -pub use web3::types::Address; pub type Bytes32 = [u8; 32]; pub use lazy_static::lazy_static; -pub use solidity_bindgen::{self, CallProvider, SendProvider, Web3Context, Web3Provider}; pub use crate::impl_slog_value; pub use async_trait::async_trait;