diff --git a/NFT/Cargo.lock b/NFT/Cargo.lock index c883cee11..8fb89a090 100644 --- a/NFT/Cargo.lock +++ b/NFT/Cargo.lock @@ -2,6 +2,4093 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "NFT-contract" version = "0.0.0" +dependencies = [ + "fuels", + "sha2", + "tokio", +] + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" + +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + +[[package]] +name = "async-graphql" +version = "4.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9ed522678d412d77effe47b3c82314ac36952a35e6e852093dd48287c421f80" +dependencies = [ + "async-graphql-derive", + "async-graphql-parser", + "async-graphql-value", + "async-stream", + "async-trait", + "base64 0.13.1", + "bytes", + "fnv", + "futures-util", + "http", + "indexmap 1.9.3", + "mime", + "multer", + "num-traits", + "once_cell", + "pin-project-lite", + "regex", + "serde", + "serde_json", + "serde_urlencoded", + "static_assertions", + "tempfile", + "thiserror", + "tracing", + "tracing-futures", +] + +[[package]] +name = "async-graphql-derive" +version = "4.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c121a894495d7d3fc3d4e15e0a9843e422e4d1d9e3c514d8062a1c94b35b005d" +dependencies = [ + "Inflector", + "async-graphql-parser", + "darling 0.14.4", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "async-graphql-parser" +version = "4.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b6c386f398145c6180206c1869c2279f5a3d45db5be4e0266148c6ac5c6ad68" +dependencies = [ + "async-graphql-value", + "pest", + "serde", + "serde_json", +] + +[[package]] +name = "async-graphql-value" +version = "4.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a941b499fead4a3fb5392cabf42446566d18c86313f69f2deab69560394d65f" +dependencies = [ + "bytes", + "indexmap 1.9.3", + "serde", + "serde_json", +] + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "async-trait" +version = "0.1.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "atomic-polyfill" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" +dependencies = [ + "critical-section", +] + +[[package]] +name = "autocfg" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" + +[[package]] +name = "axum" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acee9fd5073ab6b045a275b3e709c163dd36c90685219cb21804a147b58dba43" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-http", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "serde", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +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 = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "cc" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.52.4", +] + +[[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 = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.1", +] + +[[package]] +name = "clap_derive" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58", + "coins-core", + "digest", + "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]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +dependencies = [ + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cookie" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cookie_store" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387461abbc748185c3a6e1673d826918b450b87ff22639429c694619a83b6cf6" +dependencies = [ + "cookie", + "idna 0.3.0", + "log", + "publicsuffix", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "counter" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d458e66999348f56fd3ffcfbb7f7951542075ca8359687c703de6500c1ddccd" +dependencies = [ + "num-traits", +] + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "critical-section" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crunchy" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "ct-logs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" +dependencies = [ + "sct 0.6.1", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "cynic" +version = "2.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1afa0591b1021e427e548a1f0f147fe6168f6c7c7f7006bace77f28856051b8" +dependencies = [ + "cynic-proc-macros", + "reqwest", + "serde", + "serde_json", + "static_assertions", + "thiserror", +] + +[[package]] +name = "cynic-codegen" +version = "2.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a1bb05cc554f46079d0fa72abe995a2d32d0737d410a41da75b31e3f7ef768" +dependencies = [ + "counter", + "darling 0.13.4", + "graphql-parser", + "once_cell", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "cynic-proc-macros" +version = "2.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa595c4ed7a5374e0e58c5c34f9d93bd6b7d45062790963bd4b4c3c0bf520c4d" +dependencies = [ + "cynic-codegen", + "syn 1.0.109", +] + +[[package]] +name = "darling" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +dependencies = [ + "darling_core 0.13.4", + "darling_macro 0.13.4", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling_core" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +dependencies = [ + "darling_core 0.13.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +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 1.0.109", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dtoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "sha2", + "subtle", +] + +[[package]] +name = "either" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[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 = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-iterator" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fd242f399be1da0a5354aa462d57b4ab2b4ee0683cc552f7c007d2d12d36e94" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[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 = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand", + "scrypt", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror", + "uuid 0.8.2", +] + +[[package]] +name = "ethnum" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" + +[[package]] +name = "eventsource-client" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9146112ee3ce031aa5aebe3e049e10b1d353b9c7630cc6be488c2c62cc5d9c42" +dependencies = [ + "futures", + "hyper", + "hyper-rustls 0.22.1", + "hyper-timeout", + "log", + "pin-project", + "tokio", +] + +[[package]] +name = "fastrand" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" + +[[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 = "fiat-crypto" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fuel-abi-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8118789261e77d67569859a06a886d53dbf7bd00ea23a18a2dfae26a1f5be25" +dependencies = [ + "itertools 0.10.5", + "lazy_static", + "proc-macro2", + "quote", + "regex", + "serde", + "serde_json", + "syn 2.0.58", + "thiserror", +] + +[[package]] +name = "fuel-asm" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ea884860261efdc7300b63db7972cb0e08e8f5379495ad7cdd2bdb7c0cc4623" +dependencies = [ + "bitflags 2.5.0", + "fuel-types", + "serde", + "strum", +] + +[[package]] +name = "fuel-core" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5212499e280344967732bf7dc31227f02460e8c2947e7965d5703ad33d80c9ea" +dependencies = [ + "anyhow", + "async-graphql", + "async-trait", + "axum", + "clap", + "derive_more", + "enum-iterator", + "fuel-core-chain-config", + "fuel-core-consensus-module", + "fuel-core-database", + "fuel-core-executor", + "fuel-core-importer", + "fuel-core-metrics", + "fuel-core-poa", + "fuel-core-producer", + "fuel-core-services", + "fuel-core-storage", + "fuel-core-txpool", + "fuel-core-types", + "futures", + "hex", + "hyper", + "itertools 0.10.5", + "postcard", + "rand", + "serde", + "serde_json", + "strum", + "strum_macros", + "thiserror", + "tokio", + "tokio-stream", + "tower-http", + "tracing", + "uuid 1.8.0", +] + +[[package]] +name = "fuel-core-chain-config" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62ab93dc93c87c0c380e94a6a8d1b65e791151d2f6a567c4970fc8cf76faaa05" +dependencies = [ + "anyhow", + "bech32", + "fuel-core-storage", + "fuel-core-types", + "hex", + "itertools 0.10.5", + "postcard", + "serde", + "serde_json", + "serde_with 1.14.0", + "tracing", +] + +[[package]] +name = "fuel-core-client" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a10b6a6e2dcc651f52961ef3c1bf44ab28434fdb437789bf17f4389d19041f4" +dependencies = [ + "anyhow", + "cynic", + "derive_more", + "eventsource-client", + "fuel-core-types", + "futures", + "hex", + "hyper-rustls 0.24.2", + "itertools 0.10.5", + "reqwest", + "schemafy_lib", + "serde", + "serde_json", + "tai64", + "thiserror", + "tracing", +] + +[[package]] +name = "fuel-core-consensus-module" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61adeb3c3afc83a38616850dd84a32ffd5047bcc60d32b1d2848922c936ab5ec" +dependencies = [ + "anyhow", + "fuel-core-chain-config", + "fuel-core-poa", + "fuel-core-types", + "tokio", +] + +[[package]] +name = "fuel-core-database" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8aa43ee5fbd0a5710c8cde4e405cff4d729e5c48b4ba15714c07dbe45c7ef31" +dependencies = [ + "anyhow", + "derive_more", + "fuel-core-storage", + "fuel-core-types", +] + +[[package]] +name = "fuel-core-executor" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7ffd6011ac5628aed96de774bb30d8918d4d0cde5d82dd3619874655a3b130c" +dependencies = [ + "anyhow", + "fuel-core-chain-config", + "fuel-core-storage", + "fuel-core-types", + "hex", + "parking_lot", + "tracing", +] + +[[package]] +name = "fuel-core-importer" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f9bc11dd9a5a112dffc84554af45aeff35021eb90fbbaa3da8280e659c0e32d" +dependencies = [ + "anyhow", + "derive_more", + "fuel-core-metrics", + "fuel-core-storage", + "fuel-core-types", + "tokio", + "tracing", +] + +[[package]] +name = "fuel-core-metrics" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a08d775335cdfee3717faa083714c75da294508a1244fe7b229748c9926d91c3" +dependencies = [ + "axum", + "once_cell", + "pin-project-lite", + "prometheus-client 0.18.1", + "prometheus-client 0.20.0", + "regex", + "tracing", +] + +[[package]] +name = "fuel-core-poa" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e99ef1eaab07450c327abb4809246f851cc0dc5d52650662a239bc66c26ded41" +dependencies = [ + "anyhow", + "async-trait", + "fuel-core-chain-config", + "fuel-core-services", + "fuel-core-storage", + "fuel-core-types", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "fuel-core-producer" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c38073316314824e1865c269c6663f678003d48ae0a135397087fc1ebdd303e" +dependencies = [ + "anyhow", + "async-trait", + "derive_more", + "fuel-core-storage", + "fuel-core-types", + "tokio", + "tokio-rayon", + "tracing", +] + +[[package]] +name = "fuel-core-services" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a42f05bc2ab4a91afd2db6556521002119e29de49744bd29c8f43b5f561d89" +dependencies = [ + "anyhow", + "async-trait", + "fuel-core-metrics", + "futures", + "parking_lot", + "tokio", + "tracing", +] + +[[package]] +name = "fuel-core-storage" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95d4d9ede89f97c779433e389739410a946e8b94f379a0048a49670bef73e602" +dependencies = [ + "anyhow", + "derive_more", + "fuel-core-types", + "fuel-vm", + "primitive-types", +] + +[[package]] +name = "fuel-core-txpool" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d353895abdbb02f1e2b4b3ccbeadf3258d352d9150787fb7ca04933ea05834f" +dependencies = [ + "anyhow", + "async-trait", + "fuel-core-chain-config", + "fuel-core-metrics", + "fuel-core-services", + "fuel-core-storage", + "fuel-core-types", + "futures", + "parking_lot", + "tokio", + "tokio-rayon", + "tokio-stream", + "tracing", +] + +[[package]] +name = "fuel-core-types" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75785b3a26f7c2c05e73e5cef2f59912751c4821b40225e089199c7fb8712d7" +dependencies = [ + "anyhow", + "bs58", + "derive_more", + "fuel-vm", + "secrecy", + "serde", + "tai64", + "thiserror", + "zeroize", +] + +[[package]] +name = "fuel-crypto" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e0efe99de550a5b5c12a6a4d2eadd26bc5571cfba82d0133baa2805d485ad8c" +dependencies = [ + "coins-bip32", + "coins-bip39", + "ecdsa", + "ed25519-dalek", + "fuel-types", + "k256", + "lazy_static", + "p256", + "rand", + "secp256k1", + "serde", + "sha2", + "zeroize", +] + +[[package]] +name = "fuel-derive" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff58cf4d01a4fb9440c63a8764154dfd3b07c74e4b3639cce8eea77d67e63a7a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", + "synstructure", +] + +[[package]] +name = "fuel-merkle" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89143dd80b29dda305fbb033bc7f868834445ef6b361bf920f0077938fb6c0bc" +dependencies = [ + "derive_more", + "digest", + "fuel-storage", + "hashbrown 0.13.2", + "hex", + "serde", + "sha2", +] + +[[package]] +name = "fuel-storage" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901aee4b46684e483d2c04d40e5ac1b8ccda737ac5a363507b44b9eb23b0fdaa" + +[[package]] +name = "fuel-tx" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1f65e363e5e9a5412cea204f2d2357043327a0c3da5482c3b38b9da045f20e" +dependencies = [ + "bitflags 2.5.0", + "derivative", + "derive_more", + "fuel-asm", + "fuel-crypto", + "fuel-merkle", + "fuel-types", + "hashbrown 0.14.3", + "itertools 0.10.5", + "rand", + "serde", + "serde_json", + "strum", + "strum_macros", +] + +[[package]] +name = "fuel-types" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "148b59be5c54bafff692310663cbce3f097a2a7ff5533224dcfdf387578a72b0" +dependencies = [ + "fuel-derive", + "hex", + "rand", + "serde", +] + +[[package]] +name = "fuel-vm" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aed5ba0cde904f16cd748dc9b33e62f4b3dc5fd0a72ec867c973e687cd7347ba" +dependencies = [ + "async-trait", + "backtrace", + "bitflags 2.5.0", + "derivative", + "derive_more", + "ethnum", + "fuel-asm", + "fuel-crypto", + "fuel-merkle", + "fuel-storage", + "fuel-tx", + "fuel-types", + "hashbrown 0.14.3", + "itertools 0.10.5", + "libm", + "paste", + "percent-encoding", + "primitive-types", + "serde", + "sha3", + "static_assertions", + "strum", + "tai64", +] + +[[package]] +name = "fuels" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "550689758e7cae90e76b11f40dc4a3d817a6f4b62541df134a9a26391011eb53" +dependencies = [ + "fuel-core", + "fuel-core-client", + "fuel-tx", + "fuels-accounts", + "fuels-core", + "fuels-macros", + "fuels-programs", + "fuels-test-helpers", +] + +[[package]] +name = "fuels-accounts" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf897206616d15e284dba7641f95d2b3a119639705b4909828af5008699f6352" +dependencies = [ + "async-trait", + "chrono", + "elliptic-curve", + "eth-keystore", + "fuel-core-client", + "fuel-crypto", + "fuel-tx", + "fuel-types", + "fuels-core", + "hex", + "rand", + "semver", + "tai64", + "thiserror", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "fuels-code-gen" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa5acfe0ef24e12137786072a182dc5f0de9d51e79a6023183466f4eaecf7512" +dependencies = [ + "Inflector", + "fuel-abi-types", + "itertools 0.12.1", + "proc-macro2", + "quote", + "regex", + "serde_json", + "syn 2.0.58", +] + +[[package]] +name = "fuels-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c716030842d8c4eef2191a9c93ed0cb3cdae7927a4b2f07d87db0020293db893" +dependencies = [ + "async-trait", + "bech32", + "chrono", + "fuel-abi-types", + "fuel-asm", + "fuel-core-chain-config", + "fuel-core-client", + "fuel-crypto", + "fuel-tx", + "fuel-types", + "fuel-vm", + "fuels-macros", + "hex", + "itertools 0.12.1", + "serde", + "serde_json", + "sha2", + "thiserror", + "uint", + "zeroize", +] + +[[package]] +name = "fuels-macros" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0dcdf41ccc7090bec4848d680d16cdc0c6cd37b749e518084caa8e6b730053" +dependencies = [ + "fuels-code-gen", + "itertools 0.12.1", + "proc-macro2", + "quote", + "rand", + "syn 2.0.58", +] + +[[package]] +name = "fuels-programs" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2401c796ced3e64ef58156d3c1aeeb61937d5078b87abccbafe1fc60f25faeca" +dependencies = [ + "async-trait", + "bytes", + "fuel-abi-types", + "fuel-asm", + "fuel-tx", + "fuel-types", + "fuels-accounts", + "fuels-core", + "itertools 0.12.1", + "rand", + "serde_json", + "tokio", +] + +[[package]] +name = "fuels-test-helpers" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98c79e02208b3ebb75d37d27161ff7c96847feb88ccd640a027105d1669c0c37" +dependencies = [ + "fuel-core", + "fuel-core-chain-config", + "fuel-core-client", + "fuel-core-poa", + "fuel-core-services", + "fuel-tx", + "fuel-types", + "fuels-accounts", + "fuels-core", + "futures", + "hex", + "portpicker", + "rand", + "serde", + "serde_json", + "serde_with 3.7.0", + "tempfile", + "tokio", + "which", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "graphql-parser" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ebc8013b4426d5b81a4364c419a95ed0b404af2b82e2457de52d9348f0e474" +dependencies = [ + "combine", + "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.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash", + "allocator-api2", + "serde", +] + +[[package]] +name = "heapless" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version", + "serde", + "spin 0.9.8", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +dependencies = [ + "ct-logs", + "futures-util", + "hyper", + "log", + "rustls 0.19.1", + "rustls-native-certs 0.5.0", + "tokio", + "tokio-rustls 0.22.0", + "webpki", +] + +[[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", + "log", + "rustls 0.21.10", + "rustls-native-certs 0.6.3", + "tokio", + "tokio-rustls 0.24.1", + "webpki-roots", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +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]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[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.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[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.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "matchit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[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.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "multer" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "log", + "memchr", + "mime", + "spin 0.9.8", + "version_check", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "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.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +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 = "platforms" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" + +[[package]] +name = "portpicker" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" +dependencies = [ + "rand", +] + +[[package]] +name = "postcard" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8" +dependencies = [ + "cobs", + "embedded-io", + "heapless", + "serde", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prometheus-client" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" +dependencies = [ + "dtoa", + "itoa", + "parking_lot", + "prometheus-client-derive-text-encode", +] + +[[package]] +name = "prometheus-client" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e227aeb6c2cfec819e999c4773b35f8c7fa37298a203ff46420095458eee567e" +dependencies = [ + "dtoa", + "itoa", + "parking_lot", + "prometheus-client-derive-encode", +] + +[[package]] +name = "prometheus-client-derive-encode" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "prometheus-client-derive-text-encode" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "psl-types" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" + +[[package]] +name = "publicsuffix" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a8c1bda5ae1af7f99a2962e49df150414a43d62404644d98dd5c3a93d07457" +dependencies = [ + "idna 0.3.0", + "psl-types", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "cookie", + "cookie_store", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls 0.24.2", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.21.10", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-rustls 0.24.1", + "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.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.1", + "log", + "ring 0.16.20", + "sct 0.6.1", + "webpki", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki", + "sct 0.7.1", +] + +[[package]] +name = "rustls-native-certs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +dependencies = [ + "openssl-probe", + "rustls 0.19.1", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[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.8", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" + +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "schemafy_core" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41781ae092f4fd52c9287efb74456aea0d3b90032d2ecad272bd14dbbcb0511b" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "schemafy_lib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e953db32579999ca98c451d80801b6f6a7ecba6127196c5387ec0774c528befa" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "schemafy_core", + "serde", + "serde_derive", + "serde_json", + "syn 1.0.109", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] + +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "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.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4124a35fe33ae14259c490fd70fa199a32b9ce9502f2ee6bc4f81ec06fa65894" +dependencies = [ + "rand", + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +dependencies = [ + "cc", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" + +[[package]] +name = "serde" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "serde_json" +version = "1.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +dependencies = [ + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee80b0e361bbf88fd2f6e242ccd19cfda072cb0faa6ae694ecee08199938569a" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "serde_with_macros" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" +dependencies = [ + "darling 0.13.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest", + "keccak", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +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.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[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 = "tai64" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed7401421025f4132e6c1f7af5e7f8287383969f36e6628016cd509b8d3da9dc" +dependencies = [ + "serde", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "thiserror" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "tokio-rayon" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cf33a76e0b1dd03b778f83244137bd59887abf25c0e87bc3e7071105f457693" +dependencies = [ + "rayon", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +dependencies = [ + "rustls 0.19.1", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.10", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +dependencies = [ + "bitflags 1.3.2", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "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.58", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "futures", + "futures-task", + "pin-project", + "tracing", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +dependencies = [ + "void", +] + +[[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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna 0.5.0", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[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.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +dependencies = [ + "getrandom", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.58", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "which" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bf3ea8596f3a0dd5980b46430f2058dfe2c36a27ccfbb1845d6fbfcd9ba6e14" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.4", +] + +[[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.4", +] + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", +] + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] diff --git a/NFT/Forc.lock b/NFT/Forc.lock index c22f12a95..821bf1e54 100644 --- a/NFT/Forc.lock +++ b/NFT/Forc.lock @@ -2,41 +2,29 @@ name = "NFT-contract" source = "member" dependencies = [ - "asset", - "src20", - "src3", - "src7", - "std", -] - -[[package]] -name = "asset" -source = "git+https://github.com/FuelLabs/sway-libs?tag=v0.18.0#8d196e9379463d4596ac582a20a84ed52ff58c69" -dependencies = [ - "src7", + "standards", "std", + "sway_libs", ] [[package]] name = "core" -source = "path+from-root-C3992B43B72ADB8C" - -[[package]] -name = "src20" -source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.3.3#4198b4b07449ad16104cc8a0501f3013670fdcfd" -dependencies = ["std"] +source = "path+from-root-9889F771D40C5D34" [[package]] -name = "src3" -source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.3.3#4198b4b07449ad16104cc8a0501f3013670fdcfd" -dependencies = ["std"] - -[[package]] -name = "src7" -source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.3.3#4198b4b07449ad16104cc8a0501f3013670fdcfd" +name = "standards" +source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.4.1#0a6f3ba0bce036a0ce61f15ed4480c71af32d3aa" dependencies = ["std"] [[package]] name = "std" -source = "git+https://github.com/fuellabs/sway?tag=v0.49.1#2ac7030570f22510b0ac2a7b5ddf7baa20bdc0e1" +source = "git+https://github.com/fuellabs/sway?tag=v0.53.0#b30f0e83d3f3d336007e3dfce45a48a87e731345" dependencies = ["core"] + +[[package]] +name = "sway_libs" +source = "git+https://github.com/FuelLabs/sway-libs?tag=v0.20.1#34a2d5a0f118a72c972153ca44140c0f5f78a680" +dependencies = [ + "standards", + "std", +] diff --git a/NFT/NFT-contract/Cargo.toml b/NFT/NFT-contract/Cargo.toml index b05aa2858..bf9b70e21 100644 --- a/NFT/NFT-contract/Cargo.toml +++ b/NFT/NFT-contract/Cargo.toml @@ -6,6 +6,9 @@ edition = "2021" license = "Apache-2.0" [dependencies] +fuels = { version = "0.54.0", features = ["fuel-core-lib"] } +sha2 = { version = "0.10.7" } +tokio = { version = "1.12", features = ["rt", "macros"] } [[test]] harness = true diff --git a/NFT/NFT-contract/Forc.toml b/NFT/NFT-contract/Forc.toml index d6a27c8a3..584777a01 100644 --- a/NFT/NFT-contract/Forc.toml +++ b/NFT/NFT-contract/Forc.toml @@ -5,7 +5,5 @@ license = "Apache-2.0" name = "NFT-contract" [dependencies] -asset = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.18.0" } -src20 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.3.3" } -src3 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.3.3" } -src7 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.3.3" } +standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.4.1" } +sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.20.1" } diff --git a/NFT/NFT-contract/src/interface.sw b/NFT/NFT-contract/src/interface.sw new file mode 100644 index 000000000..af87710a7 --- /dev/null +++ b/NFT/NFT-contract/src/interface.sw @@ -0,0 +1,6 @@ +library; + +abi Constructor { + #[storage(read, write)] + fn constructor(owner: Identity); +} diff --git a/NFT/NFT-contract/src/main.sw b/NFT/NFT-contract/src/main.sw index 5006ddf8a..6c90c3669 100644 --- a/NFT/NFT-contract/src/main.sw +++ b/NFT/NFT-contract/src/main.sw @@ -1,25 +1,39 @@ contract; mod errors; +mod interface; use errors::{MintError, SetError}; -use src20::SRC20; -use src3::SRC3; -use src7::{Metadata, SRC7}; -use asset::{ - base::{ - _name, - _set_name, - _set_symbol, - _symbol, - _total_assets, - _total_supply, - SetAssetAttributes, +use interface::Constructor; +use standards::{src20::SRC20, src3::SRC3, src5::{SRC5, State}, src7::{Metadata, SRC7},}; +use sway_libs::{ + asset::{ + base::{ + _name, + _set_name, + _set_symbol, + _symbol, + _total_assets, + _total_supply, + SetAssetAttributes, + }, + metadata::*, + supply::{ + _burn, + _mint, + }, }, - metadata::*, - mint::{ - _burn, - _mint, + ownership::{ + _owner, + initialize_ownership, + only_owner, + }, + pausable::{ + _is_paused, + _pause, + _unpause, + Pausable, + require_not_paused, }, }; use std::{call_frames::contract_id, hash::Hash, storage::storage_string::*, string::String}; @@ -50,6 +64,11 @@ storage { metadata: StorageMetadata = StorageMetadata {}, } +configurable { + /// The maximum number of NFTs that may be minted. + MAX_SUPPLY: u64 = 3, +} + impl SRC20 for Contract { /// Returns the total number of individual NFTs for this contract. /// @@ -197,7 +216,7 @@ impl SRC20 for Contract { /// } /// ``` #[storage(read)] - fn decimals(asset: AssetId) -> Option { + fn decimals(_asset: AssetId) -> Option { Some(0u8) } } @@ -218,9 +237,10 @@ impl SRC3 for Contract { /// /// # Reverts /// + /// * When the contract is paused. /// * When amount is greater than one. /// * When the asset has already been minted. - /// * When more than 100,000 NFTs have been minted. + /// * When more than the MAX_SUPPLY NFTs have been minted. /// /// # Number of Storage Accesses /// @@ -239,6 +259,9 @@ impl SRC3 for Contract { /// ``` #[storage(read, write)] fn mint(recipient: Identity, sub_id: SubId, amount: u64) { + require_not_paused(); + + // Checks to ensure this is a valid mint. let asset = AssetId::new(contract_id(), sub_id); require(amount == 1, MintError::CannotMintMoreThanOneNFTWithSubId); require( @@ -253,9 +276,11 @@ impl SRC3 for Contract { storage .total_assets .try_read() - .unwrap_or(0) + amount <= 100_000, + .unwrap_or(0) + amount <= MAX_SUPPLY, MintError::MaxNFTsMinted, ); + + // Mint the NFT let _ = _mint( storage .total_assets, @@ -266,6 +291,7 @@ impl SRC3 for Contract { amount, ); } + /// Burns assets sent with the given `sub_id`. /// /// # Additional Information @@ -278,6 +304,10 @@ impl SRC3 for Contract { /// * `sub_id`: [SubId] - The sub-identifier of the asset to burn. /// * `amount`: [u64] - The quantity of coins to burn. /// + /// # Reverts + /// + /// * When the contract is paused. + /// /// # Number of Storage Accesses /// /// * Reads: `1` @@ -297,8 +327,10 @@ impl SRC3 for Contract { /// } (ZERO_B256, 1); /// } /// ``` + #[payable] #[storage(read, write)] fn burn(sub_id: SubId, amount: u64) { + require_not_paused(); _burn(storage.total_supply, sub_id, amount); } } @@ -338,6 +370,38 @@ impl SRC7 for Contract { } } +impl SRC5 for Contract { + /// Returns the owner. + /// + /// # Return Values + /// + /// * [State] - Represents the state of ownership for this contract. + /// + /// # Number of Storage Accesses + /// + /// * Reads: `1` + /// + /// # Examples + /// + /// ```sway + /// use standards::src5::SRC5; + /// + /// fn foo(contract_id: ContractId) { + /// let ownership_abi = abi(contract_id, SRC_5); + /// + /// match ownership_abi.owner() { + /// State::Uninitalized => log("The ownership is uninitalized"), + /// State::Initialized(owner) => log("The ownership is initalized"), + /// State::Revoked => log("The ownership is revoked"), + /// } + /// } + /// ``` + #[storage(read)] + fn owner() -> State { + _owner() + } +} + impl SetAssetAttributes for Contract { /// Sets the name of an asset. /// @@ -348,6 +412,7 @@ impl SetAssetAttributes for Contract { /// /// # Reverts /// + /// * When the caller is not the owner of the contract. /// * When the name has already been set for an asset. /// /// # Number of Storage Accesses @@ -372,6 +437,7 @@ impl SetAssetAttributes for Contract { /// ``` #[storage(write)] fn set_name(asset: AssetId, name: String) { + only_owner(); require( storage .name @@ -382,6 +448,7 @@ impl SetAssetAttributes for Contract { ); _set_name(storage.name, asset, name); } + /// Sets the symbol of an asset. /// /// # Arguments @@ -391,6 +458,7 @@ impl SetAssetAttributes for Contract { /// /// # Reverts /// + /// * When the caller is not the owner of the contract. /// * When the symbol has already been set for an asset. /// /// # Number of Storage Accesses @@ -415,6 +483,7 @@ impl SetAssetAttributes for Contract { /// ``` #[storage(write)] fn set_symbol(asset: AssetId, symbol: String) { + only_owner(); require( storage .symbol @@ -425,6 +494,7 @@ impl SetAssetAttributes for Contract { ); _set_symbol(storage.symbol, asset, symbol); } + /// This function should never be called. /// /// # Additional Information @@ -437,7 +507,7 @@ impl SetAssetAttributes for Contract { /// /// * When the function is called. #[storage(write)] - fn set_decimals(asset: AssetId, decimals: u8) { + fn set_decimals(_asset: AssetId, _decimals: u8) { require(false, SetError::ValueAlreadySet); } } @@ -486,161 +556,120 @@ impl SetAssetMetadata for Contract { } } -// Tests +impl Pausable for Contract { + /// Pauses the contract. + /// + /// # Reverts + /// + /// * When the caller is not the contract owner. + /// + /// # Number of Storage Accesses + /// + /// * Writes: `1` + /// + /// # Examples + /// + /// ```sway + /// use sway_libs::pausable::Pausable; + /// + /// fn foo(contract_id: ContractId) { + /// let pausable_abi = abi(Pausable, contract_id); + /// pausable_abi.pause(); + /// assert(pausable_abi.is_paused()); + /// } + /// ``` + #[storage(write)] + fn pause() { + only_owner(); + _pause(); + } -#[test] -fn test_mint() { - use std::context::balance_of; - use std::constants::ZERO_B256; - let src3_abi = abi(SRC3, CONTRACT_ID); - let recipient = Identity::ContractId(ContractId::from(CONTRACT_ID)); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - assert(balance_of(ContractId::from(CONTRACT_ID), asset_id) == 0); - src3_abi.mint(recipient, sub_id, 1); - assert(balance_of(ContractId::from(CONTRACT_ID), asset_id) == 1); -} -#[test(should_revert)] -fn test_revert_mint_amount_greater_than_one() { - use std::constants::ZERO_B256; - let src3_abi = abi(SRC3, CONTRACT_ID); - let recipient = Identity::ContractId(ContractId::from(CONTRACT_ID)); - let sub_id = ZERO_B256; - let amount = 2; - src3_abi.mint(recipient, sub_id, amount); -} -#[test(should_revert)] -fn test_revert_mint_twice() { - use std::constants::ZERO_B256; - let src3_abi = abi(SRC3, CONTRACT_ID); - let recipient = Identity::ContractId(ContractId::from(CONTRACT_ID)); - let sub_id = ZERO_B256; - let amount = 1; - src3_abi.mint(recipient, sub_id, amount); - src3_abi.mint(recipient, sub_id, amount); -} -#[test] -fn test_burn() { - use std::context::balance_of; - use std::constants::ZERO_B256; - let src3_abi = abi(SRC3, CONTRACT_ID); - let recipient = Identity::ContractId(ContractId::from(CONTRACT_ID)); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - src3_abi.mint(recipient, sub_id, 1); - assert(balance_of(ContractId::from(CONTRACT_ID), asset_id) == 1); - src3_abi.burn(sub_id, 1); - assert(balance_of(ContractId::from(CONTRACT_ID), asset_id) == 0); -} -#[test] -fn test_total_assets() { - let src3_abi = abi(SRC3, CONTRACT_ID); - let src20_abi = abi(SRC20, CONTRACT_ID); - let recipient = Identity::ContractId(ContractId::from(CONTRACT_ID)); - let sub_id1 = 0x0000000000000000000000000000000000000000000000000000000000000001; - let sub_id2 = 0x0000000000000000000000000000000000000000000000000000000000000002; - assert(src20_abi.total_assets() == 0); - src3_abi.mint(recipient, sub_id1, 1); - assert(src20_abi.total_assets() == 1); - src3_abi.mint(recipient, sub_id2, 1); - assert(src20_abi.total_assets() == 2); -} -#[test] -fn test_total_supply() { - use std::constants::ZERO_B256; - let src3_abi = abi(SRC3, CONTRACT_ID); - let src20_abi = abi(SRC20, CONTRACT_ID); - let recipient = Identity::ContractId(ContractId::from(CONTRACT_ID)); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - assert(src20_abi.total_supply(asset_id).is_none()); - src3_abi.mint(recipient, sub_id, 1); - assert(src20_abi.total_supply(asset_id).unwrap() == 1); -} -#[test] -fn test_name() { - use std::constants::ZERO_B256; - let src20_abi = abi(SRC20, CONTRACT_ID); - let attributes_abi = abi(SetAssetAttributes, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let name = String::from_ascii_str("Fuel Asset"); - assert(src20_abi.name(asset_id).is_none()); - attributes_abi.set_name(asset_id, name); - assert(src20_abi.name(asset_id).unwrap().as_bytes() == name.as_bytes()); -} -#[test(should_revert)] -fn test_revert_set_name_twice() { - use std::constants::ZERO_B256; - let attributes_abi = abi(SetAssetAttributes, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let name = String::from_ascii_str("Fuel Asset"); - attributes_abi.set_name(asset_id, name); - attributes_abi.set_name(asset_id, name); -} -#[test] -fn test_symbol() { - use std::constants::ZERO_B256; - let src20_abi = abi(SRC20, CONTRACT_ID); - let attributes_abi = abi(SetAssetAttributes, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let symbol = String::from_ascii_str("FUEL"); - assert(src20_abi.symbol(asset_id).is_none()); - attributes_abi.set_symbol(asset_id, symbol); - assert(src20_abi.symbol(asset_id).unwrap().as_bytes() == symbol.as_bytes()); -} -#[test(should_revert)] -fn test_revert_set_symbol_twice() { - use std::constants::ZERO_B256; - let attributes_abi = abi(SetAssetAttributes, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let symbol = String::from_ascii_str("FUEL"); - attributes_abi.set_symbol(asset_id, symbol); - attributes_abi.set_symbol(asset_id, symbol); -} -#[test] -fn test_decimals() { - use std::constants::ZERO_B256; - let src20_abi = abi(SRC20, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let decimals = 0u8; - assert(src20_abi.decimals(asset_id).unwrap() == decimals); -} -#[test(should_revert)] -fn test_revert_set_decimals() { - use std::constants::ZERO_B256; - let attributes_abi = abi(SetAssetAttributes, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let decimals = 0u8; - attributes_abi.set_decimals(asset_id, decimals); -} -#[test] -fn test_set_metadata() { - use std::constants::ZERO_B256; - let data_b256 = 0x0000000000000000000000000000000000000000000000000000000000000001; - let metadata = Metadata::B256(data_b256); - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), ZERO_B256); - let src7_abi = abi(SRC7, CONTRACT_ID); - let set_metadata_abi = abi(SetAssetMetadata, CONTRACT_ID); - let key = String::from_ascii_str("my_key"); - set_metadata_abi.set_metadata(asset_id, key, metadata); - let returned_metadata = src7_abi.metadata(asset_id, key); - assert(returned_metadata.is_some()); - assert(returned_metadata.unwrap() == metadata); + /// Returns whether the contract is paused. + /// + /// # Returns + /// + /// * [bool] - The pause state for the contract. + /// + /// # Number of Storage Accesses + /// + /// * Reads: `1` + /// + /// # Examples + /// + /// ```sway + /// use sway_libs::pausable::Pausable; + /// + /// fn foo(contract_id: ContractId) { + /// let pausable_abi = abi(Pausable, contract_id); + /// assert(!pausable_abi.is_paused()); + /// } + /// ``` + #[storage(read)] + fn is_paused() -> bool { + _is_paused() + } + + /// Unpauses the contract. + /// + /// # Reverts + /// + /// * When the caller is not the contract owner. + /// + /// # Number of Storage Accesses + /// + /// * Writes: `1` + /// + /// # Examples + /// + /// ```sway + /// use sway_libs::pausable::Pausable; + /// + /// fn foo(contract_id: ContractId) { + /// let pausable_abi = abi(Pausable, contract_id); + /// pausable_abi.unpause(); + /// assert(!pausable_abi.is_paused()); + /// } + /// ``` + #[storage(write)] + fn unpause() { + only_owner(); + _unpause(); + } } -#[test(should_revert)] -fn test_revert_set_metadata_twice() { - use std::constants::ZERO_B256; - let data_b256 = 0x0000000000000000000000000000000000000000000000000000000000000001; - let metadata = Metadata::B256(data_b256); - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), ZERO_B256); - let set_metadata_abi = abi(SetAssetMetadata, CONTRACT_ID); - let key = String::from_ascii_str("my_key"); - set_metadata_abi.set_metadata(asset_id, key, metadata); - set_metadata_abi.set_metadata(asset_id, key, metadata); + +impl Constructor for Contract { + /// Sets the defaults for the contract. + /// + /// # Arguments + /// + /// * `owner`: [Identity] - The `Identity` that will be the first owner. + /// + /// # Reverts + /// + /// * When ownership has been set before. + /// + /// # Number of Storage Acesses + /// + /// * Reads: `1` + /// * Write: `1` + /// + /// # Examples + /// + /// ```sway + /// use standards::src5::SRC5; + /// use nft::Constructor; + /// + /// fn foo(contract: ContractId, owner: Identity) { + /// let src_5_abi = abi(SRC5, contract.bits()); + /// assert(src_5_abi.owner() == State::Uninitialized); + /// + /// let constructor_abi = abi(Constructor, contract.bits()); + /// constructor_abi.constructor(owner); + /// assert(src_5_abi.owner() == State::Initialized(owner)); + /// } + /// ``` + #[storage(read, write)] + fn constructor(owner: Identity) { + initialize_ownership(owner); + } } diff --git a/NFT/NFT-contract/tests/functions/burn.rs b/NFT/NFT-contract/tests/functions/burn.rs new file mode 100644 index 000000000..cbca96cdd --- /dev/null +++ b/NFT/NFT-contract/tests/functions/burn.rs @@ -0,0 +1,218 @@ +use crate::utils::{ + interface::{burn, constructor, mint, pause, total_assets, total_supply}, + setup::{defaults, get_wallet_balance, setup}, +}; +use fuels::prelude::{CallParameters, TxPolicies, BASE_ASSET_ID}; + +mod success { + + use super::*; + + #[tokio::test] + async fn burn_assets() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity, sub_id_1, 1).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 1); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + assert_eq!(total_assets(&instance_1).await, 1); + + burn(&instance_2, asset_id_1, sub_id_1, 1).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 0); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(0)); + assert_eq!(total_assets(&instance_1).await, 1); + } + + #[tokio::test] + async fn burns_multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + sub_id_1, + sub_id_2, + sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + mint(&instance_1, other_identity.clone(), sub_id_1, 1).await; + mint(&instance_1, other_identity.clone(), sub_id_2, 1).await; + mint(&instance_1, other_identity, sub_id_3, 1).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 1); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 1); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_3).await, 1); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(1)); + assert_eq!(total_supply(&instance_1, asset_id_3).await, Some(1)); + assert_eq!(total_assets(&instance_1).await, 3); + + burn(&instance_2, asset_id_1, sub_id_1, 1).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 0); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 1); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_3).await, 1); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(0)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(1)); + assert_eq!(total_supply(&instance_1, asset_id_3).await, Some(1)); + assert_eq!(total_assets(&instance_1).await, 3); + + burn(&instance_2, asset_id_2, sub_id_2, 1).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 0); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 0); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_3).await, 1); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(0)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(0)); + assert_eq!(total_supply(&instance_1, asset_id_3).await, Some(1)); + assert_eq!(total_assets(&instance_1).await, 3); + + burn(&instance_2, asset_id_3, sub_id_3, 1).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 0); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 0); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_3).await, 0); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(0)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(0)); + assert_eq!(total_supply(&instance_1, asset_id_3).await, Some(0)); + assert_eq!(total_assets(&instance_1).await, 3); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "NotEnoughCoins")] + async fn when_not_enough_coins() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity, sub_id_1, 1).await; + + let call_params = CallParameters::new(0, asset_id_1, 1_000_000); + instance_2 + .methods() + .burn(sub_id_1, 1) + .with_tx_policies(TxPolicies::default().with_script_gas_limit(2_000_000)) + .call_params(call_params) + .unwrap() + .call() + .await + .unwrap(); + } + + #[tokio::test] + #[should_panic(expected = "NotEnoughCoins")] + async fn when_invalid_asset() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity, sub_id_1, 1).await; + + let call_params = CallParameters::new(1, BASE_ASSET_ID, 1_000_000); + instance_2 + .methods() + .burn(sub_id_1, 1) + .with_tx_policies(TxPolicies::default().with_script_gas_limit(2_000_000)) + .call_params(call_params) + .unwrap() + .call() + .await + .unwrap(); + } + + #[tokio::test] + #[should_panic(expected = "NotEnoughCoins")] + async fn when_invalid_sub_id() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + sub_id_2, + _sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity, sub_id_1, 1).await; + + let call_params = CallParameters::new(1, asset_id_1, 1_000_000); + instance_2 + .methods() + .burn(sub_id_2, 1) + .with_tx_policies(TxPolicies::default().with_script_gas_limit(2_000_000)) + .call_params(call_params) + .unwrap() + .call() + .await + .unwrap(); + } + + #[tokio::test] + #[should_panic(expected = "Paused")] + async fn when_contract_is_paused() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity, sub_id_1, 1).await; + pause(&instance_1).await; + + burn(&instance_2, asset_id_1, sub_id_1, 1).await; + } +} diff --git a/NFT/NFT-contract/tests/functions/constructor.rs b/NFT/NFT-contract/tests/functions/constructor.rs new file mode 100644 index 000000000..e5b1c49b5 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/constructor.rs @@ -0,0 +1,52 @@ +use crate::utils::{ + interface::{constructor, owner}, + setup::{defaults, setup, State}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn initializes() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(owner(&instance_1).await, State::Initialized(owner_identity)); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "CannotReinitialized")] + async fn when_owner_already_set() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + constructor(&instance_1, owner_identity.clone()).await; + } +} diff --git a/NFT/NFT-contract/tests/functions/decimals.rs b/NFT/NFT-contract/tests/functions/decimals.rs new file mode 100644 index 000000000..f9658b34a --- /dev/null +++ b/NFT/NFT-contract/tests/functions/decimals.rs @@ -0,0 +1,49 @@ +use crate::utils::{ + interface::{constructor, decimals}, + setup::{defaults, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(decimals(&instance_1, asset_id_1).await, Some(0u8)); + } + + #[tokio::test] + async fn multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(decimals(&instance_1, asset_id_1).await, Some(0u8)); + assert_eq!(decimals(&instance_1, asset_id_2).await, Some(0u8)); + assert_eq!(decimals(&instance_1, asset_id_3).await, Some(0u8)); + } +} diff --git a/NFT/NFT-contract/tests/functions/is_paused.rs b/NFT/NFT-contract/tests/functions/is_paused.rs new file mode 100644 index 000000000..3528867a8 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/is_paused.rs @@ -0,0 +1,88 @@ +use crate::utils::{ + interface::{constructor, is_paused, pause, unpause}, + setup::{defaults, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn is_unpaused_by_default() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert!(!is_paused(&instance_1).await); + } + + #[tokio::test] + async fn is_unpaused_when_not_initialzied() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + _owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + assert!(!is_paused(&instance_1).await); + } + + #[tokio::test] + async fn switches_state_when_paused() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert!(!is_paused(&instance_1).await); + + pause(&instance_1).await; + + assert!(is_paused(&instance_1).await); + + unpause(&instance_1).await; + + assert!(!is_paused(&instance_1).await); + + pause(&instance_1).await; + + assert!(is_paused(&instance_1).await); + + unpause(&instance_1).await; + + assert!(!is_paused(&instance_1).await); + + pause(&instance_1).await; + + assert!(is_paused(&instance_1).await); + + unpause(&instance_1).await; + + assert!(!is_paused(&instance_1).await); + } +} diff --git a/NFT/NFT-contract/tests/functions/metadata.rs b/NFT/NFT-contract/tests/functions/metadata.rs new file mode 100644 index 000000000..8a81815bd --- /dev/null +++ b/NFT/NFT-contract/tests/functions/metadata.rs @@ -0,0 +1,139 @@ +use crate::utils::{ + interface::{constructor, metadata, set_metadata}, + setup::{defaults, setup, Metadata}, +}; +use fuels::types::Bytes; + +mod success { + + use super::*; + + #[ignore] + #[tokio::test] + async fn gets_one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + let metadata1 = Metadata::String(String::from("Fuel NFT Metadata")); + let key = String::from("key1"); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(metadata(&instance_1, asset_id_1, key.clone()).await, None); + + set_metadata(&instance_1, asset_id_1, key.clone(), metadata1.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_1, key).await, + Some(metadata1) + ); + } + + #[ignore] + #[tokio::test] + async fn gets_multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + let metadata1 = Metadata::String(String::from("Fuel NFT Metadata 1")); + let metadata2 = Metadata::String(String::from("Fuel NFT Metadata 2")); + let metadata3 = Metadata::String(String::from("Fuel NFT Metadata 3")); + let key = String::from("key1"); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(metadata(&instance_1, asset_id_1, key.clone()).await, None); + set_metadata(&instance_1, asset_id_1, key.clone(), metadata1.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_1, key.clone()).await, + Some(metadata1) + ); + + assert_eq!(metadata(&instance_1, asset_id_2, key.clone()).await, None); + set_metadata(&instance_1, asset_id_2, key.clone(), metadata2.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_2, key.clone()).await, + Some(metadata2) + ); + + assert_eq!(metadata(&instance_1, asset_id_3, key.clone()).await, None); + set_metadata(&instance_1, asset_id_3, key.clone(), metadata3.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_3, key).await, + Some(metadata3) + ); + } + + #[ignore] + #[tokio::test] + async fn gets_multiple_types() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + let metadata1 = Metadata::String(String::from("Fuel NFT Metadata 1")); + let metadata2 = Metadata::Int(1); + let metadata3 = + Metadata::Bytes(Bytes::from_hex_str("bytes").expect("failed to conver to bytes")); + let key1 = String::from("key1"); + let key2 = String::from("key2"); + let key3 = String::from("key3"); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(metadata(&instance_1, asset_id_1, key1.clone()).await, None); + set_metadata(&instance_1, asset_id_1, key1.clone(), metadata1.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_1, key1.clone()).await, + Some(metadata1.clone()) + ); + + assert_eq!(metadata(&instance_1, asset_id_1, key2.clone()).await, None); + set_metadata(&instance_1, asset_id_1, key2.clone(), metadata2.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_1, key2.clone()).await, + Some(metadata2.clone()) + ); + assert_eq!( + metadata(&instance_1, asset_id_1, key1.clone()).await, + Some(metadata1.clone()) + ); + + assert_eq!(metadata(&instance_1, asset_id_1, key3.clone()).await, None); + set_metadata(&instance_1, asset_id_1, key3.clone(), metadata3.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_1, key3).await, + Some(metadata3) + ); + assert_eq!( + metadata(&instance_1, asset_id_1, key2.clone()).await, + Some(metadata2) + ); + assert_eq!( + metadata(&instance_1, asset_id_1, key1.clone()).await, + Some(metadata1) + ); + } +} diff --git a/NFT/NFT-contract/tests/functions/mint.rs b/NFT/NFT-contract/tests/functions/mint.rs new file mode 100644 index 000000000..c53b7c270 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/mint.rs @@ -0,0 +1,193 @@ +use crate::utils::{ + interface::{burn, constructor, mint, pause, total_assets, total_supply}, + setup::{defaults, get_wallet_balance, setup}, +}; +use fuels::types::Bits256; + +mod success { + + use super::*; + + #[tokio::test] + async fn mints_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 0); + assert_eq!(total_supply(&instance_1, asset_id_1).await, None); + assert_eq!(total_assets(&instance_1).await, 0); + + mint(&instance_1, other_identity, sub_id_1, 1).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 1); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + assert_eq!(total_assets(&instance_1).await, 1); + } + + #[tokio::test] + async fn mints_multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + sub_id_1, + sub_id_2, + sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + mint(&instance_1, other_identity.clone(), sub_id_1, 1).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 1); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 0); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, None); + assert_eq!(total_assets(&instance_1).await, 1); + + mint(&instance_1, other_identity.clone(), sub_id_2, 1).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 1); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 1); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(1)); + assert_eq!(total_assets(&instance_1).await, 2); + + mint(&instance_1, other_identity, sub_id_3, 1).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 1); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 1); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_3).await, 1); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(1)); + assert_eq!(total_supply(&instance_1, asset_id_3).await, Some(1)); + assert_eq!(total_assets(&instance_1).await, 3); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "Paused")] + async fn when_paused() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet); + + constructor(&instance_1, owner_identity.clone()).await; + + pause(&instance_1).await; + + mint(&instance_2, other_identity, sub_id_1, 1).await; + } + + #[tokio::test] + #[should_panic(expected = "CannotMintMoreThanOneNFTWithSubId")] + async fn when_minting_more_than_one() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + _sub_id_2, + _sub_id_3, + _owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet); + + mint(&instance_1, other_identity, sub_id_1, 2).await; + } + + #[tokio::test] + #[should_panic(expected = "NFTAlreadyMinted")] + async fn when_nft_already_minted() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity.clone(), sub_id_1, 1).await; + mint(&instance_1, other_identity, sub_id_1, 1).await; + } + + #[tokio::test] + #[should_panic(expected = "MaxNFTsMinted")] + async fn when_max_supplt_reached() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + sub_id_2, + sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity.clone(), sub_id_1, 1).await; + mint(&instance_1, other_identity.clone(), sub_id_2, 1).await; + mint(&instance_1, other_identity.clone(), sub_id_3, 1).await; + mint(&instance_1, other_identity, Bits256([4u8; 32]), 1).await; + } + + #[tokio::test] + #[should_panic(expected = "MaxNFTsMinted")] + async fn when_minting_max_supply_after_burn() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + sub_id_2, + sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet); + + constructor(&instance_1, owner_identity.clone()).await; + mint(&instance_1, other_identity.clone(), sub_id_1, 1).await; + mint(&instance_1, other_identity.clone(), sub_id_2, 1).await; + mint(&instance_1, other_identity.clone(), sub_id_3, 1).await; + + burn(&instance_2, asset_id_1, sub_id_1, 1).await; + + mint(&instance_1, other_identity, Bits256([4u8; 32]), 1).await; + } +} diff --git a/NFT/NFT-contract/tests/functions/mod.rs b/NFT/NFT-contract/tests/functions/mod.rs new file mode 100644 index 000000000..492fabf73 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/mod.rs @@ -0,0 +1,17 @@ +mod burn; +mod constructor; +mod decimals; +mod is_paused; +mod metadata; +mod mint; +mod name; +mod owner; +mod pause; +mod set_decimals; +mod set_metadata; +mod set_name; +mod set_symbol; +mod symbol; +mod total_assets; +mod total_supply; +mod unpause; diff --git a/NFT/NFT-contract/tests/functions/name.rs b/NFT/NFT-contract/tests/functions/name.rs new file mode 100644 index 000000000..720e05943 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/name.rs @@ -0,0 +1,124 @@ +use crate::utils::{ + interface::{constructor, name, set_name}, + setup::{defaults, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + + set_name(&instance_1, asset_id_1, String::from("Fuel NFT 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel NFT 1")) + ); + } + + #[tokio::test] + async fn multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + set_name(&instance_1, asset_id_1, String::from("Fuel NFT 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel NFT 1")) + ); + + assert_eq!(name(&instance_1, asset_id_2).await, None); + set_name(&instance_1, asset_id_2, String::from("Fuel NFT 2")).await; + assert_eq!( + name(&instance_1, asset_id_2).await, + Some(String::from("Fuel NFT 2")) + ); + + assert_eq!(name(&instance_1, asset_id_3).await, None); + set_name(&instance_1, asset_id_3, String::from("Fuel NFT 3")).await; + assert_eq!( + name(&instance_1, asset_id_3).await, + Some(String::from("Fuel NFT 3")) + ); + } + + #[tokio::test] + async fn does_not_overwrite_other_names() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + set_name(&instance_1, asset_id_1, String::from("Fuel NFT 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel NFT 1")) + ); + + assert_eq!(name(&instance_1, asset_id_2).await, None); + set_name(&instance_1, asset_id_2, String::from("Fuel NFT 2")).await; + + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel NFT 1")) + ); + assert_eq!( + name(&instance_1, asset_id_2).await, + Some(String::from("Fuel NFT 2")) + ); + + assert_eq!(name(&instance_1, asset_id_3).await, None); + set_name(&instance_1, asset_id_3, String::from("Fuel NFT 3")).await; + + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel NFT 1")) + ); + assert_eq!( + name(&instance_1, asset_id_2).await, + Some(String::from("Fuel NFT 2")) + ); + assert_eq!( + name(&instance_1, asset_id_3).await, + Some(String::from("Fuel NFT 3")) + ); + } +} diff --git a/NFT/NFT-contract/tests/functions/owner.rs b/NFT/NFT-contract/tests/functions/owner.rs new file mode 100644 index 000000000..645ef9a27 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/owner.rs @@ -0,0 +1,45 @@ +use crate::utils::{ + interface::{constructor, owner}, + setup::{defaults, setup, State}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn gets_owner() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(owner(&instance_1).await, State::Initialized(owner_identity)); + } + + #[tokio::test] + async fn gets_no_owner() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + _owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + assert_eq!(owner(&instance_1).await, State::Uninitialized); + } +} diff --git a/NFT/NFT-contract/tests/functions/pause.rs b/NFT/NFT-contract/tests/functions/pause.rs new file mode 100644 index 000000000..33519b23f --- /dev/null +++ b/NFT/NFT-contract/tests/functions/pause.rs @@ -0,0 +1,99 @@ +use crate::utils::{ + interface::{constructor, is_paused, pause}, + setup::{defaults, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn pauses() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert!(!is_paused(&instance_1).await); + + pause(&instance_1).await; + + assert!(is_paused(&instance_1).await); + } + + #[tokio::test] + async fn stays_paused_when_called_twice() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert!(!is_paused(&instance_1).await); + + pause(&instance_1).await; + pause(&instance_1).await; + + assert!(is_paused(&instance_1).await); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_not_owner() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + pause(&instance_2).await; + } + + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_not_initialized() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + _owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + pause(&instance_1).await; + } +} diff --git a/NFT/NFT-contract/tests/functions/set_decimals.rs b/NFT/NFT-contract/tests/functions/set_decimals.rs new file mode 100644 index 000000000..6711ec208 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/set_decimals.rs @@ -0,0 +1,29 @@ +use crate::utils::{ + interface::{constructor, set_decimals}, + setup::{defaults, setup}, +}; + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "ValueAlreadySet")] + async fn when_attempting_to_set_decimals() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + set_decimals(&instance_2, asset_id_1, 9u8).await; + } +} diff --git a/NFT/NFT-contract/tests/functions/set_metadata.rs b/NFT/NFT-contract/tests/functions/set_metadata.rs new file mode 100644 index 000000000..9d621312e --- /dev/null +++ b/NFT/NFT-contract/tests/functions/set_metadata.rs @@ -0,0 +1,248 @@ +use crate::utils::{ + interface::{constructor, metadata, set_metadata}, + setup::{defaults, setup, Metadata}, +}; +use fuels::types::Bytes; + +mod success { + + use super::*; + + #[ignore] + #[tokio::test] + async fn sets_one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + let metadata1 = Metadata::String(String::from("Fuel NFT Metadata")); + let key = String::from("key1"); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(metadata(&instance_1, asset_id_1, key.clone()).await, None); + + set_metadata(&instance_1, asset_id_1, key.clone(), metadata1.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_1, key).await, + Some(metadata1) + ); + } + + #[ignore] + #[tokio::test] + async fn sets_multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + let metadata1 = Metadata::String(String::from("Fuel NFT Metadata 1")); + let metadata2 = Metadata::String(String::from("Fuel NFT Metadata 2")); + let metadata3 = Metadata::String(String::from("Fuel NFT Metadata 3")); + let key = String::from("key1"); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(metadata(&instance_1, asset_id_1, key.clone()).await, None); + set_metadata(&instance_1, asset_id_1, key.clone(), metadata1.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_1, key.clone()).await, + Some(metadata1) + ); + + assert_eq!(metadata(&instance_1, asset_id_2, key.clone()).await, None); + set_metadata(&instance_1, asset_id_2, key.clone(), metadata2.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_2, key.clone()).await, + Some(metadata2) + ); + + assert_eq!(metadata(&instance_1, asset_id_3, key.clone()).await, None); + set_metadata(&instance_1, asset_id_3, key.clone(), metadata3.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_3, key).await, + Some(metadata3) + ); + } + + #[ignore] + #[tokio::test] + async fn does_not_overwrite_other_names() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + let metadata1 = Metadata::String(String::from("Fuel NFT Metadata 1")); + let metadata2 = Metadata::String(String::from("Fuel NFT Metadata 2")); + let metadata3 = Metadata::String(String::from("Fuel NFT Metadata 3")); + let key = String::from("key1"); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(metadata(&instance_1, asset_id_1, key.clone()).await, None); + set_metadata(&instance_1, asset_id_1, key.clone(), metadata1.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_1, key.clone()).await, + Some(metadata1.clone()) + ); + + assert_eq!(metadata(&instance_1, asset_id_2, key.clone()).await, None); + set_metadata(&instance_1, asset_id_2, key.clone(), metadata2.clone()).await; + + assert_eq!( + metadata(&instance_1, asset_id_1, key.clone()).await, + Some(metadata1.clone()) + ); + assert_eq!( + metadata(&instance_1, asset_id_2, key.clone()).await, + Some(metadata2.clone()) + ); + + assert_eq!(metadata(&instance_1, asset_id_3, key.clone()).await, None); + set_metadata(&instance_1, asset_id_3, key.clone(), metadata3.clone()).await; + + assert_eq!( + metadata(&instance_1, asset_id_1, key.clone()).await, + Some(metadata1) + ); + assert_eq!( + metadata(&instance_1, asset_id_2, key.clone()).await, + Some(metadata2) + ); + assert_eq!( + metadata(&instance_1, asset_id_3, key).await, + Some(metadata3) + ); + } + + #[ignore] + #[tokio::test] + async fn sets_multiple_types() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + let metadata1 = Metadata::String(String::from("Fuel NFT Metadata 1")); + let metadata2 = Metadata::Int(1); + let metadata3 = + Metadata::Bytes(Bytes::from_hex_str("bytes").expect("failed to conver to bytes")); + let key1 = String::from("key1"); + let key2 = String::from("key2"); + let key3 = String::from("key3"); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(metadata(&instance_1, asset_id_1, key1.clone()).await, None); + set_metadata(&instance_1, asset_id_1, key1.clone(), metadata1.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_1, key1.clone()).await, + Some(metadata1.clone()) + ); + + assert_eq!(metadata(&instance_1, asset_id_1, key2.clone()).await, None); + set_metadata(&instance_1, asset_id_1, key2.clone(), metadata2.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_1, key2.clone()).await, + Some(metadata2.clone()) + ); + assert_eq!( + metadata(&instance_1, asset_id_1, key1.clone()).await, + Some(metadata1.clone()) + ); + + assert_eq!(metadata(&instance_1, asset_id_1, key3.clone()).await, None); + set_metadata(&instance_1, asset_id_1, key3.clone(), metadata3.clone()).await; + assert_eq!( + metadata(&instance_1, asset_id_1, key3).await, + Some(metadata3) + ); + assert_eq!( + metadata(&instance_1, asset_id_1, key2.clone()).await, + Some(metadata2) + ); + assert_eq!( + metadata(&instance_1, asset_id_1, key1.clone()).await, + Some(metadata1) + ); + } +} + +mod revert { + + use super::*; + + #[ignore] + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_not_owner() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + let metadata1 = Metadata::String(String::from("Fuel NFT Metadata 1")); + let key = String::from("key1"); + + constructor(&instance_1, owner_identity.clone()).await; + + set_metadata(&instance_2, asset_id_1, key, metadata1).await; + } + + #[ignore] + #[tokio::test] + #[should_panic(expected = "ValueAlreadySet")] + async fn when_a_name_has_already_been_set() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + let metadata1 = Metadata::String(String::from("Fuel NFT Metadata 1")); + let key = String::from("key1"); + + constructor(&instance_1, owner_identity.clone()).await; + + set_metadata(&instance_1, asset_id_1, key.clone(), metadata1.clone()).await; + set_metadata(&instance_1, asset_id_1, key, metadata1).await; + } +} diff --git a/NFT/NFT-contract/tests/functions/set_name.rs b/NFT/NFT-contract/tests/functions/set_name.rs new file mode 100644 index 000000000..d14ba5c3d --- /dev/null +++ b/NFT/NFT-contract/tests/functions/set_name.rs @@ -0,0 +1,170 @@ +use crate::utils::{ + interface::{constructor, name, set_name}, + setup::{defaults, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn sets_one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + + set_name(&instance_1, asset_id_1, String::from("Fuel NFT 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel NFT 1")) + ); + } + + #[tokio::test] + async fn sets_multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + set_name(&instance_1, asset_id_1, String::from("Fuel NFT 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel NFT 1")) + ); + + assert_eq!(name(&instance_1, asset_id_2).await, None); + set_name(&instance_1, asset_id_2, String::from("Fuel NFT 2")).await; + assert_eq!( + name(&instance_1, asset_id_2).await, + Some(String::from("Fuel NFT 2")) + ); + + assert_eq!(name(&instance_1, asset_id_3).await, None); + set_name(&instance_1, asset_id_3, String::from("Fuel NFT 3")).await; + assert_eq!( + name(&instance_1, asset_id_3).await, + Some(String::from("Fuel NFT 3")) + ); + } + + #[tokio::test] + async fn does_not_overwrite_other_names() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + set_name(&instance_1, asset_id_1, String::from("Fuel NFT 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel NFT 1")) + ); + + assert_eq!(name(&instance_1, asset_id_2).await, None); + set_name(&instance_1, asset_id_2, String::from("Fuel NFT 2")).await; + + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel NFT 1")) + ); + assert_eq!( + name(&instance_1, asset_id_2).await, + Some(String::from("Fuel NFT 2")) + ); + + assert_eq!(name(&instance_1, asset_id_3).await, None); + set_name(&instance_1, asset_id_3, String::from("Fuel NFT 3")).await; + + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel NFT 1")) + ); + assert_eq!( + name(&instance_1, asset_id_2).await, + Some(String::from("Fuel NFT 2")) + ); + assert_eq!( + name(&instance_1, asset_id_3).await, + Some(String::from("Fuel NFT 3")) + ); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_not_owner() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + set_name(&instance_2, asset_id_1, String::from("Fuel NFT 1")).await; + } + + #[tokio::test] + #[should_panic(expected = "ValueAlreadySet")] + async fn when_a_name_has_already_been_set() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + set_name(&instance_1, asset_id_1, String::from("Fuel NFT 1")).await; + set_name(&instance_1, asset_id_1, String::from("Fuel NFT 1")).await; + } +} diff --git a/NFT/NFT-contract/tests/functions/set_symbol.rs b/NFT/NFT-contract/tests/functions/set_symbol.rs new file mode 100644 index 000000000..983ae0772 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/set_symbol.rs @@ -0,0 +1,170 @@ +use crate::utils::{ + interface::{constructor, set_symbol, symbol}, + setup::{defaults, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn sets_one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + } + + #[tokio::test] + async fn sets_multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + + assert_eq!(symbol(&instance_1, asset_id_2).await, None); + set_symbol(&instance_1, asset_id_2, String::from("FA2")).await; + assert_eq!( + symbol(&instance_1, asset_id_2).await, + Some(String::from("FA2")) + ); + + assert_eq!(symbol(&instance_1, asset_id_3).await, None); + set_symbol(&instance_1, asset_id_3, String::from("FA3")).await; + assert_eq!( + symbol(&instance_1, asset_id_3).await, + Some(String::from("FA3")) + ); + } + + #[tokio::test] + async fn does_not_overwrite_other_symbols() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + + assert_eq!(symbol(&instance_1, asset_id_2).await, None); + set_symbol(&instance_1, asset_id_2, String::from("FA2")).await; + + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + assert_eq!( + symbol(&instance_1, asset_id_2).await, + Some(String::from("FA2")) + ); + + assert_eq!(symbol(&instance_1, asset_id_3).await, None); + set_symbol(&instance_1, asset_id_3, String::from("FA3")).await; + + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + assert_eq!( + symbol(&instance_1, asset_id_2).await, + Some(String::from("FA2")) + ); + assert_eq!( + symbol(&instance_1, asset_id_3).await, + Some(String::from("FA3")) + ); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_not_owner() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + set_symbol(&instance_2, asset_id_1, String::from("FA1")).await; + } + + #[tokio::test] + #[should_panic(expected = "ValueAlreadySet")] + async fn when_a_name_has_already_been_set() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + } +} diff --git a/NFT/NFT-contract/tests/functions/symbol.rs b/NFT/NFT-contract/tests/functions/symbol.rs new file mode 100644 index 000000000..7f9ad4369 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/symbol.rs @@ -0,0 +1,124 @@ +use crate::utils::{ + interface::{constructor, set_symbol, symbol}, + setup::{defaults, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + } + + #[tokio::test] + async fn multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + + assert_eq!(symbol(&instance_1, asset_id_2).await, None); + set_symbol(&instance_1, asset_id_2, String::from("FA2")).await; + assert_eq!( + symbol(&instance_1, asset_id_2).await, + Some(String::from("FA2")) + ); + + assert_eq!(symbol(&instance_1, asset_id_3).await, None); + set_symbol(&instance_1, asset_id_3, String::from("FA3")).await; + assert_eq!( + symbol(&instance_1, asset_id_3).await, + Some(String::from("FA3")) + ); + } + + #[tokio::test] + async fn does_not_overwrite_other_symbols() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + + assert_eq!(symbol(&instance_1, asset_id_2).await, None); + set_symbol(&instance_1, asset_id_2, String::from("FA2")).await; + + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + assert_eq!( + symbol(&instance_1, asset_id_2).await, + Some(String::from("FA2")) + ); + + assert_eq!(symbol(&instance_1, asset_id_3).await, None); + set_symbol(&instance_1, asset_id_3, String::from("FA3")).await; + + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + assert_eq!( + symbol(&instance_1, asset_id_2).await, + Some(String::from("FA2")) + ); + assert_eq!( + symbol(&instance_1, asset_id_3).await, + Some(String::from("FA3")) + ); + } +} diff --git a/NFT/NFT-contract/tests/functions/total_assets.rs b/NFT/NFT-contract/tests/functions/total_assets.rs new file mode 100644 index 000000000..a2deac640 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/total_assets.rs @@ -0,0 +1,59 @@ +use crate::utils::{ + interface::{constructor, mint, total_assets}, + setup::{defaults, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_assets(&instance_1).await, 0); + + mint(&instance_1, other_identity, sub_id_1, 1).await; + assert_eq!(total_assets(&instance_1).await, 1); + } + + #[tokio::test] + async fn multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + sub_id_2, + sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_assets(&instance_1).await, 0); + + mint(&instance_1, other_identity.clone(), sub_id_1, 1).await; + assert_eq!(total_assets(&instance_1).await, 1); + + mint(&instance_1, other_identity.clone(), sub_id_2, 1).await; + assert_eq!(total_assets(&instance_1).await, 2); + + mint(&instance_1, other_identity.clone(), sub_id_3, 1).await; + assert_eq!(total_assets(&instance_1).await, 3); + } +} diff --git a/NFT/NFT-contract/tests/functions/total_supply.rs b/NFT/NFT-contract/tests/functions/total_supply.rs new file mode 100644 index 000000000..3d3f9b619 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/total_supply.rs @@ -0,0 +1,109 @@ +use crate::utils::{ + interface::{burn, constructor, mint, total_supply}, + setup::{defaults, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_supply(&instance_1, asset_id_1).await, None); + mint(&instance_1, other_identity, sub_id_1, 1).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + } + + #[tokio::test] + async fn multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + asset_id_3, + sub_id_1, + sub_id_2, + sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_supply(&instance_1, asset_id_1).await, None); + mint(&instance_1, other_identity.clone(), sub_id_1, 1).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + + assert_eq!(total_supply(&instance_1, asset_id_2).await, None); + mint(&instance_1, other_identity.clone(), sub_id_2, 1).await; + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(1)); + + assert_eq!(total_supply(&instance_1, asset_id_3).await, None); + mint(&instance_1, other_identity.clone(), sub_id_3, 1).await; + assert_eq!(total_supply(&instance_1, asset_id_3).await, Some(1)); + } + + #[tokio::test] + async fn only_increments_on_one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + sub_id_2, + sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_supply(&instance_1, asset_id_1).await, None); + mint(&instance_1, other_identity.clone(), sub_id_1, 1).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + + mint(&instance_1, other_identity.clone(), sub_id_2, 1).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + + mint(&instance_1, other_identity.clone(), sub_id_3, 1).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + } + + #[tokio::test] + async fn decrements_on_burn() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _asset_id_3, + sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity.clone(), sub_id_1, 1).await; + + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(1)); + burn(&instance_2, asset_id_1, sub_id_1, 1).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(0)); + } +} diff --git a/NFT/NFT-contract/tests/functions/unpause.rs b/NFT/NFT-contract/tests/functions/unpause.rs new file mode 100644 index 000000000..d7cd695e8 --- /dev/null +++ b/NFT/NFT-contract/tests/functions/unpause.rs @@ -0,0 +1,126 @@ +use crate::utils::{ + interface::{constructor, is_paused, pause, unpause}, + setup::{defaults, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn unpauses() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + pause(&instance_1).await; + + assert!(is_paused(&instance_1).await); + + unpause(&instance_1).await; + + assert!(!is_paused(&instance_1).await); + } + + #[tokio::test] + async fn stays_paused_when_called_twice() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + pause(&instance_1).await; + + assert!(is_paused(&instance_1).await); + + unpause(&instance_1).await; + unpause(&instance_1).await; + + assert!(!is_paused(&instance_1).await); + } + + #[tokio::test] + async fn unpaused_when_not_paused() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert!(!is_paused(&instance_1).await); + + unpause(&instance_1).await; + + assert!(!is_paused(&instance_1).await); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_not_owner() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + unpause(&instance_2).await; + } + + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_not_initialized() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _asset_id_3, + _sub_id_1, + _sub_id_2, + _sub_id_3, + _owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + unpause(&instance_1).await; + } +} diff --git a/NFT/NFT-contract/tests/harness.rs b/NFT/NFT-contract/tests/harness.rs index 8b1378917..39c936316 100644 --- a/NFT/NFT-contract/tests/harness.rs +++ b/NFT/NFT-contract/tests/harness.rs @@ -1 +1,2 @@ - +mod functions; +mod utils; diff --git a/NFT/NFT-contract/tests/utils/interface.rs b/NFT/NFT-contract/tests/utils/interface.rs new file mode 100644 index 000000000..e796b2515 --- /dev/null +++ b/NFT/NFT-contract/tests/utils/interface.rs @@ -0,0 +1,168 @@ +use crate::utils::setup::{Metadata, State, NFT}; +use fuels::{ + prelude::{AssetId, CallParameters, TxPolicies, WalletUnlocked}, + programs::{call_response::FuelCallResponse, call_utils::TxDependencyExtension}, + types::{Bits256, Identity}, +}; + +pub(crate) async fn total_assets(contract: &NFT) -> u64 { + contract + .methods() + .total_assets() + .call() + .await + .unwrap() + .value +} + +pub(crate) async fn total_supply(contract: &NFT, asset: AssetId) -> Option { + contract + .methods() + .total_supply(asset) + .call() + .await + .unwrap() + .value +} + +pub(crate) async fn name(contract: &NFT, asset: AssetId) -> Option { + contract.methods().name(asset).call().await.unwrap().value +} + +pub(crate) async fn symbol(contract: &NFT, asset: AssetId) -> Option { + contract.methods().symbol(asset).call().await.unwrap().value +} + +pub(crate) async fn decimals(contract: &NFT, asset: AssetId) -> Option { + contract + .methods() + .decimals(asset) + .call() + .await + .unwrap() + .value +} + +pub(crate) async fn mint( + contract: &NFT, + recipient: Identity, + sub_id: Bits256, + amount: u64, +) -> FuelCallResponse<()> { + contract + .methods() + .mint(recipient, sub_id, amount) + .append_variable_outputs(1) + .call() + .await + .unwrap() +} + +pub(crate) async fn burn( + contract: &NFT, + asset_id: AssetId, + sub_id: Bits256, + amount: u64, +) -> FuelCallResponse<()> { + let call_params = CallParameters::new(amount, asset_id, 1_000_000); + + contract + .methods() + .burn(sub_id, amount) + .with_tx_policies(TxPolicies::default().with_script_gas_limit(2_000_000)) + .call_params(call_params) + .unwrap() + .call() + .await + .unwrap() +} + +pub(crate) async fn owner(contract: &NFT) -> State { + contract.methods().owner().call().await.unwrap().value +} + +pub(crate) async fn set_name( + contract: &NFT, + asset: AssetId, + name: String, +) -> FuelCallResponse<()> { + contract + .methods() + .set_name(asset, name) + .call() + .await + .unwrap() +} + +pub(crate) async fn set_symbol( + contract: &NFT, + asset: AssetId, + name: String, +) -> FuelCallResponse<()> { + contract + .methods() + .set_symbol(asset, name) + .call() + .await + .unwrap() +} + +pub(crate) async fn set_decimals( + contract: &NFT, + asset: AssetId, + decimals: u8, +) -> FuelCallResponse<()> { + contract + .methods() + .set_decimals(asset, decimals) + .call() + .await + .unwrap() +} + +pub(crate) async fn constructor( + contract: &NFT, + owner: Identity, +) -> FuelCallResponse<()> { + contract.methods().constructor(owner).call().await.unwrap() +} + +pub(crate) async fn metadata( + contract: &NFT, + asset: AssetId, + key: String, +) -> Option { + contract + .methods() + .metadata(asset, key) + .call() + .await + .unwrap() + .value +} + +pub(crate) async fn set_metadata( + contract: &NFT, + asset: AssetId, + key: String, + metadata: Metadata, +) -> FuelCallResponse<()> { + contract + .methods() + .set_metadata(asset, key, metadata) + .call() + .await + .unwrap() +} + +pub(crate) async fn pause(contract: &NFT) -> FuelCallResponse<()> { + contract.methods().pause().call().await.unwrap() +} + +pub(crate) async fn unpause(contract: &NFT) -> FuelCallResponse<()> { + contract.methods().unpause().call().await.unwrap() +} + +pub(crate) async fn is_paused(contract: &NFT) -> bool { + contract.methods().is_paused().call().await.unwrap().value +} diff --git a/NFT/NFT-contract/tests/utils/mod.rs b/NFT/NFT-contract/tests/utils/mod.rs new file mode 100644 index 000000000..b1878bb6a --- /dev/null +++ b/NFT/NFT-contract/tests/utils/mod.rs @@ -0,0 +1,2 @@ +pub mod interface; +pub mod setup; diff --git a/NFT/NFT-contract/tests/utils/setup.rs b/NFT/NFT-contract/tests/utils/setup.rs new file mode 100644 index 000000000..7e3ee3606 --- /dev/null +++ b/NFT/NFT-contract/tests/utils/setup.rs @@ -0,0 +1,102 @@ +use fuels::{ + accounts::ViewOnlyAccount, + prelude::{ + abigen, launch_custom_provider_and_get_wallets, AssetConfig, Contract, ContractId, + LoadConfiguration, TxPolicies, WalletUnlocked, WalletsConfig, BASE_ASSET_ID, + }, + tx::Bytes32, + types::{Address, AssetId, Bits256, Identity}, +}; +use sha2::{Digest, Sha256}; + +abigen!(Contract( + name = "NFT", + abi = "./NFT-contract/out/debug/NFT-contract-abi.json" +),); + +const NFT_CONTRACT_BINARY_PATH: &str = "./out/debug/NFT-contract.bin"; + +pub(crate) fn defaults( + contract_id: ContractId, + wallet_1: WalletUnlocked, + wallet_2: WalletUnlocked, +) -> ( + AssetId, + AssetId, + AssetId, + Bits256, + Bits256, + Bits256, + Identity, + Identity, +) { + let sub_id_1 = Bytes32::from([1u8; 32]); + let sub_id_2 = Bytes32::from([2u8; 32]); + let sub_id_3 = Bytes32::from([3u8; 32]); + let asset1 = get_asset_id(sub_id_1, contract_id); + let asset2 = get_asset_id(sub_id_2, contract_id); + let asset3 = get_asset_id(sub_id_3, contract_id); + + let identity_1 = Identity::Address(Address::from(wallet_1.address())); + let identity_2 = Identity::Address(Address::from(wallet_2.address())); + + ( + asset1, + asset2, + asset3, + Bits256(*sub_id_1), + Bits256(*sub_id_2), + Bits256(*sub_id_3), + identity_1, + identity_2, + ) +} + +pub(crate) async fn setup() -> ( + WalletUnlocked, + WalletUnlocked, + ContractId, + NFT, + NFT, +) { + let number_of_coins = 1; + let coin_amount = 100_000_000; + let number_of_wallets = 2; + + let base_asset = AssetConfig { + id: BASE_ASSET_ID, + num_coins: number_of_coins, + coin_amount, + }; + let assets = vec![base_asset]; + + let wallet_config = WalletsConfig::new_multiple_assets(number_of_wallets, assets); + let mut wallets = launch_custom_provider_and_get_wallets(wallet_config, None, None) + .await + .unwrap(); + + let wallet1 = wallets.pop().unwrap(); + let wallet2 = wallets.pop().unwrap(); + + let id = Contract::load_from(NFT_CONTRACT_BINARY_PATH, LoadConfiguration::default()) + .unwrap() + .deploy(&wallet1, TxPolicies::default()) + .await + .unwrap(); + + let instance_1 = NFT::new(id.clone(), wallet1.clone()); + let instance_2 = NFT::new(id.clone(), wallet2.clone()); + + (wallet1, wallet2, id.into(), instance_1, instance_2) +} + +pub(crate) fn get_asset_id(sub_id: Bytes32, contract: ContractId) -> AssetId { + let mut hasher = Sha256::new(); + hasher.update(*contract); + hasher.update(*sub_id); + AssetId::new(*Bytes32::from(<[u8; 32]>::from(hasher.finalize()))) +} + +pub(crate) async fn get_wallet_balance(wallet: &WalletUnlocked, asset: &AssetId) -> u64 { + wallet.get_asset_balance(asset).await.unwrap() +} diff --git a/NFT/fuel-toolchain.toml b/NFT/fuel-toolchain.toml index e75c0bb58..5282a3d5b 100644 --- a/NFT/fuel-toolchain.toml +++ b/NFT/fuel-toolchain.toml @@ -1,6 +1,6 @@ [toolchain] -channel = "nightly-2024-01-24" +channel = "nightly-2024-04-12" [components] -forc = "0.49.1" -fuel-core = "0.22.0" +forc = "0.53.0" +fuel-core = "0.23.0" diff --git a/native-asset/Cargo.lock b/native-asset/Cargo.lock index 414d9b882..1f32f92a4 100644 --- a/native-asset/Cargo.lock +++ b/native-asset/Cargo.lock @@ -2,6 +2,4093 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" + +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + +[[package]] +name = "async-graphql" +version = "4.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9ed522678d412d77effe47b3c82314ac36952a35e6e852093dd48287c421f80" +dependencies = [ + "async-graphql-derive", + "async-graphql-parser", + "async-graphql-value", + "async-stream", + "async-trait", + "base64 0.13.1", + "bytes", + "fnv", + "futures-util", + "http", + "indexmap 1.9.3", + "mime", + "multer", + "num-traits", + "once_cell", + "pin-project-lite", + "regex", + "serde", + "serde_json", + "serde_urlencoded", + "static_assertions", + "tempfile", + "thiserror", + "tracing", + "tracing-futures", +] + +[[package]] +name = "async-graphql-derive" +version = "4.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c121a894495d7d3fc3d4e15e0a9843e422e4d1d9e3c514d8062a1c94b35b005d" +dependencies = [ + "Inflector", + "async-graphql-parser", + "darling 0.14.4", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "async-graphql-parser" +version = "4.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b6c386f398145c6180206c1869c2279f5a3d45db5be4e0266148c6ac5c6ad68" +dependencies = [ + "async-graphql-value", + "pest", + "serde", + "serde_json", +] + +[[package]] +name = "async-graphql-value" +version = "4.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a941b499fead4a3fb5392cabf42446566d18c86313f69f2deab69560394d65f" +dependencies = [ + "bytes", + "indexmap 1.9.3", + "serde", + "serde_json", +] + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "async-trait" +version = "0.1.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "atomic-polyfill" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" +dependencies = [ + "critical-section", +] + +[[package]] +name = "autocfg" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" + +[[package]] +name = "axum" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acee9fd5073ab6b045a275b3e709c163dd36c90685219cb21804a147b58dba43" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-http", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "serde", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +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 = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "cc" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd97381a8cc6493395a5afc4c691c1084b3768db713b73aa215217aa245d153" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.52.4", +] + +[[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 = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.1", +] + +[[package]] +name = "clap_derive" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58", + "coins-core", + "digest", + "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]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +dependencies = [ + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cookie" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cookie_store" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387461abbc748185c3a6e1673d826918b450b87ff22639429c694619a83b6cf6" +dependencies = [ + "cookie", + "idna 0.3.0", + "log", + "publicsuffix", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "counter" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d458e66999348f56fd3ffcfbb7f7951542075ca8359687c703de6500c1ddccd" +dependencies = [ + "num-traits", +] + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "critical-section" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crunchy" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "ct-logs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" +dependencies = [ + "sct 0.6.1", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "cynic" +version = "2.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1afa0591b1021e427e548a1f0f147fe6168f6c7c7f7006bace77f28856051b8" +dependencies = [ + "cynic-proc-macros", + "reqwest", + "serde", + "serde_json", + "static_assertions", + "thiserror", +] + +[[package]] +name = "cynic-codegen" +version = "2.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a1bb05cc554f46079d0fa72abe995a2d32d0737d410a41da75b31e3f7ef768" +dependencies = [ + "counter", + "darling 0.13.4", + "graphql-parser", + "once_cell", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "cynic-proc-macros" +version = "2.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa595c4ed7a5374e0e58c5c34f9d93bd6b7d45062790963bd4b4c3c0bf520c4d" +dependencies = [ + "cynic-codegen", + "syn 1.0.109", +] + +[[package]] +name = "darling" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +dependencies = [ + "darling_core 0.13.4", + "darling_macro 0.13.4", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling_core" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +dependencies = [ + "darling_core 0.13.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +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 1.0.109", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dtoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "sha2", + "subtle", +] + +[[package]] +name = "either" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[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 = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-iterator" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fd242f399be1da0a5354aa462d57b4ab2b4ee0683cc552f7c007d2d12d36e94" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[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 = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand", + "scrypt", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror", + "uuid 0.8.2", +] + +[[package]] +name = "ethnum" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" + +[[package]] +name = "eventsource-client" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9146112ee3ce031aa5aebe3e049e10b1d353b9c7630cc6be488c2c62cc5d9c42" +dependencies = [ + "futures", + "hyper", + "hyper-rustls 0.22.1", + "hyper-timeout", + "log", + "pin-project", + "tokio", +] + +[[package]] +name = "fastrand" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" + +[[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 = "fiat-crypto" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fuel-abi-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8118789261e77d67569859a06a886d53dbf7bd00ea23a18a2dfae26a1f5be25" +dependencies = [ + "itertools 0.10.5", + "lazy_static", + "proc-macro2", + "quote", + "regex", + "serde", + "serde_json", + "syn 2.0.58", + "thiserror", +] + +[[package]] +name = "fuel-asm" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ea884860261efdc7300b63db7972cb0e08e8f5379495ad7cdd2bdb7c0cc4623" +dependencies = [ + "bitflags 2.5.0", + "fuel-types", + "serde", + "strum", +] + +[[package]] +name = "fuel-core" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5212499e280344967732bf7dc31227f02460e8c2947e7965d5703ad33d80c9ea" +dependencies = [ + "anyhow", + "async-graphql", + "async-trait", + "axum", + "clap", + "derive_more", + "enum-iterator", + "fuel-core-chain-config", + "fuel-core-consensus-module", + "fuel-core-database", + "fuel-core-executor", + "fuel-core-importer", + "fuel-core-metrics", + "fuel-core-poa", + "fuel-core-producer", + "fuel-core-services", + "fuel-core-storage", + "fuel-core-txpool", + "fuel-core-types", + "futures", + "hex", + "hyper", + "itertools 0.10.5", + "postcard", + "rand", + "serde", + "serde_json", + "strum", + "strum_macros", + "thiserror", + "tokio", + "tokio-stream", + "tower-http", + "tracing", + "uuid 1.8.0", +] + +[[package]] +name = "fuel-core-chain-config" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62ab93dc93c87c0c380e94a6a8d1b65e791151d2f6a567c4970fc8cf76faaa05" +dependencies = [ + "anyhow", + "bech32", + "fuel-core-storage", + "fuel-core-types", + "hex", + "itertools 0.10.5", + "postcard", + "serde", + "serde_json", + "serde_with 1.14.0", + "tracing", +] + +[[package]] +name = "fuel-core-client" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a10b6a6e2dcc651f52961ef3c1bf44ab28434fdb437789bf17f4389d19041f4" +dependencies = [ + "anyhow", + "cynic", + "derive_more", + "eventsource-client", + "fuel-core-types", + "futures", + "hex", + "hyper-rustls 0.24.2", + "itertools 0.10.5", + "reqwest", + "schemafy_lib", + "serde", + "serde_json", + "tai64", + "thiserror", + "tracing", +] + +[[package]] +name = "fuel-core-consensus-module" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61adeb3c3afc83a38616850dd84a32ffd5047bcc60d32b1d2848922c936ab5ec" +dependencies = [ + "anyhow", + "fuel-core-chain-config", + "fuel-core-poa", + "fuel-core-types", + "tokio", +] + +[[package]] +name = "fuel-core-database" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8aa43ee5fbd0a5710c8cde4e405cff4d729e5c48b4ba15714c07dbe45c7ef31" +dependencies = [ + "anyhow", + "derive_more", + "fuel-core-storage", + "fuel-core-types", +] + +[[package]] +name = "fuel-core-executor" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7ffd6011ac5628aed96de774bb30d8918d4d0cde5d82dd3619874655a3b130c" +dependencies = [ + "anyhow", + "fuel-core-chain-config", + "fuel-core-storage", + "fuel-core-types", + "hex", + "parking_lot", + "tracing", +] + +[[package]] +name = "fuel-core-importer" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f9bc11dd9a5a112dffc84554af45aeff35021eb90fbbaa3da8280e659c0e32d" +dependencies = [ + "anyhow", + "derive_more", + "fuel-core-metrics", + "fuel-core-storage", + "fuel-core-types", + "tokio", + "tracing", +] + +[[package]] +name = "fuel-core-metrics" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a08d775335cdfee3717faa083714c75da294508a1244fe7b229748c9926d91c3" +dependencies = [ + "axum", + "once_cell", + "pin-project-lite", + "prometheus-client 0.18.1", + "prometheus-client 0.20.0", + "regex", + "tracing", +] + +[[package]] +name = "fuel-core-poa" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e99ef1eaab07450c327abb4809246f851cc0dc5d52650662a239bc66c26ded41" +dependencies = [ + "anyhow", + "async-trait", + "fuel-core-chain-config", + "fuel-core-services", + "fuel-core-storage", + "fuel-core-types", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "fuel-core-producer" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c38073316314824e1865c269c6663f678003d48ae0a135397087fc1ebdd303e" +dependencies = [ + "anyhow", + "async-trait", + "derive_more", + "fuel-core-storage", + "fuel-core-types", + "tokio", + "tokio-rayon", + "tracing", +] + +[[package]] +name = "fuel-core-services" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a42f05bc2ab4a91afd2db6556521002119e29de49744bd29c8f43b5f561d89" +dependencies = [ + "anyhow", + "async-trait", + "fuel-core-metrics", + "futures", + "parking_lot", + "tokio", + "tracing", +] + +[[package]] +name = "fuel-core-storage" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95d4d9ede89f97c779433e389739410a946e8b94f379a0048a49670bef73e602" +dependencies = [ + "anyhow", + "derive_more", + "fuel-core-types", + "fuel-vm", + "primitive-types", +] + +[[package]] +name = "fuel-core-txpool" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d353895abdbb02f1e2b4b3ccbeadf3258d352d9150787fb7ca04933ea05834f" +dependencies = [ + "anyhow", + "async-trait", + "fuel-core-chain-config", + "fuel-core-metrics", + "fuel-core-services", + "fuel-core-storage", + "fuel-core-types", + "futures", + "parking_lot", + "tokio", + "tokio-rayon", + "tokio-stream", + "tracing", +] + +[[package]] +name = "fuel-core-types" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75785b3a26f7c2c05e73e5cef2f59912751c4821b40225e089199c7fb8712d7" +dependencies = [ + "anyhow", + "bs58", + "derive_more", + "fuel-vm", + "secrecy", + "serde", + "tai64", + "thiserror", + "zeroize", +] + +[[package]] +name = "fuel-crypto" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e0efe99de550a5b5c12a6a4d2eadd26bc5571cfba82d0133baa2805d485ad8c" +dependencies = [ + "coins-bip32", + "coins-bip39", + "ecdsa", + "ed25519-dalek", + "fuel-types", + "k256", + "lazy_static", + "p256", + "rand", + "secp256k1", + "serde", + "sha2", + "zeroize", +] + +[[package]] +name = "fuel-derive" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff58cf4d01a4fb9440c63a8764154dfd3b07c74e4b3639cce8eea77d67e63a7a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", + "synstructure", +] + +[[package]] +name = "fuel-merkle" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89143dd80b29dda305fbb033bc7f868834445ef6b361bf920f0077938fb6c0bc" +dependencies = [ + "derive_more", + "digest", + "fuel-storage", + "hashbrown 0.13.2", + "hex", + "serde", + "sha2", +] + +[[package]] +name = "fuel-storage" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901aee4b46684e483d2c04d40e5ac1b8ccda737ac5a363507b44b9eb23b0fdaa" + +[[package]] +name = "fuel-tx" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1f65e363e5e9a5412cea204f2d2357043327a0c3da5482c3b38b9da045f20e" +dependencies = [ + "bitflags 2.5.0", + "derivative", + "derive_more", + "fuel-asm", + "fuel-crypto", + "fuel-merkle", + "fuel-types", + "hashbrown 0.14.3", + "itertools 0.10.5", + "rand", + "serde", + "serde_json", + "strum", + "strum_macros", +] + +[[package]] +name = "fuel-types" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "148b59be5c54bafff692310663cbce3f097a2a7ff5533224dcfdf387578a72b0" +dependencies = [ + "fuel-derive", + "hex", + "rand", + "serde", +] + +[[package]] +name = "fuel-vm" +version = "0.43.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aed5ba0cde904f16cd748dc9b33e62f4b3dc5fd0a72ec867c973e687cd7347ba" +dependencies = [ + "async-trait", + "backtrace", + "bitflags 2.5.0", + "derivative", + "derive_more", + "ethnum", + "fuel-asm", + "fuel-crypto", + "fuel-merkle", + "fuel-storage", + "fuel-tx", + "fuel-types", + "hashbrown 0.14.3", + "itertools 0.10.5", + "libm", + "paste", + "percent-encoding", + "primitive-types", + "serde", + "sha3", + "static_assertions", + "strum", + "tai64", +] + +[[package]] +name = "fuels" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "550689758e7cae90e76b11f40dc4a3d817a6f4b62541df134a9a26391011eb53" +dependencies = [ + "fuel-core", + "fuel-core-client", + "fuel-tx", + "fuels-accounts", + "fuels-core", + "fuels-macros", + "fuels-programs", + "fuels-test-helpers", +] + +[[package]] +name = "fuels-accounts" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf897206616d15e284dba7641f95d2b3a119639705b4909828af5008699f6352" +dependencies = [ + "async-trait", + "chrono", + "elliptic-curve", + "eth-keystore", + "fuel-core-client", + "fuel-crypto", + "fuel-tx", + "fuel-types", + "fuels-core", + "hex", + "rand", + "semver", + "tai64", + "thiserror", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "fuels-code-gen" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa5acfe0ef24e12137786072a182dc5f0de9d51e79a6023183466f4eaecf7512" +dependencies = [ + "Inflector", + "fuel-abi-types", + "itertools 0.12.1", + "proc-macro2", + "quote", + "regex", + "serde_json", + "syn 2.0.58", +] + +[[package]] +name = "fuels-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c716030842d8c4eef2191a9c93ed0cb3cdae7927a4b2f07d87db0020293db893" +dependencies = [ + "async-trait", + "bech32", + "chrono", + "fuel-abi-types", + "fuel-asm", + "fuel-core-chain-config", + "fuel-core-client", + "fuel-crypto", + "fuel-tx", + "fuel-types", + "fuel-vm", + "fuels-macros", + "hex", + "itertools 0.12.1", + "serde", + "serde_json", + "sha2", + "thiserror", + "uint", + "zeroize", +] + +[[package]] +name = "fuels-macros" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0dcdf41ccc7090bec4848d680d16cdc0c6cd37b749e518084caa8e6b730053" +dependencies = [ + "fuels-code-gen", + "itertools 0.12.1", + "proc-macro2", + "quote", + "rand", + "syn 2.0.58", +] + +[[package]] +name = "fuels-programs" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2401c796ced3e64ef58156d3c1aeeb61937d5078b87abccbafe1fc60f25faeca" +dependencies = [ + "async-trait", + "bytes", + "fuel-abi-types", + "fuel-asm", + "fuel-tx", + "fuel-types", + "fuels-accounts", + "fuels-core", + "itertools 0.12.1", + "rand", + "serde_json", + "tokio", +] + +[[package]] +name = "fuels-test-helpers" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98c79e02208b3ebb75d37d27161ff7c96847feb88ccd640a027105d1669c0c37" +dependencies = [ + "fuel-core", + "fuel-core-chain-config", + "fuel-core-client", + "fuel-core-poa", + "fuel-core-services", + "fuel-tx", + "fuel-types", + "fuels-accounts", + "fuels-core", + "futures", + "hex", + "portpicker", + "rand", + "serde", + "serde_json", + "serde_with 3.7.0", + "tempfile", + "tokio", + "which", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06fddc2749e0528d2813f95e050e87e52c8cbbae56223b9babf73b3e53b0cc6" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "graphql-parser" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ebc8013b4426d5b81a4364c419a95ed0b404af2b82e2457de52d9348f0e474" +dependencies = [ + "combine", + "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.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash", + "allocator-api2", + "serde", +] + +[[package]] +name = "heapless" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version", + "serde", + "spin 0.9.8", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +dependencies = [ + "ct-logs", + "futures-util", + "hyper", + "log", + "rustls 0.19.1", + "rustls-native-certs 0.5.0", + "tokio", + "tokio-rustls 0.22.0", + "webpki", +] + +[[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", + "log", + "rustls 0.21.10", + "rustls-native-certs 0.6.3", + "tokio", + "tokio-rustls 0.24.1", + "webpki-roots", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +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]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[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.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[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.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "matchit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[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.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "multer" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "log", + "memchr", + "mime", + "spin 0.9.8", + "version_check", +] + [[package]] name = "native-asset-contract" version = "0.0.0" +dependencies = [ + "fuels", + "sha2", + "tokio", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "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.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +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 = "platforms" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" + +[[package]] +name = "portpicker" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" +dependencies = [ + "rand", +] + +[[package]] +name = "postcard" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8" +dependencies = [ + "cobs", + "embedded-io", + "heapless", + "serde", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prometheus-client" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" +dependencies = [ + "dtoa", + "itoa", + "parking_lot", + "prometheus-client-derive-text-encode", +] + +[[package]] +name = "prometheus-client" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e227aeb6c2cfec819e999c4773b35f8c7fa37298a203ff46420095458eee567e" +dependencies = [ + "dtoa", + "itoa", + "parking_lot", + "prometheus-client-derive-encode", +] + +[[package]] +name = "prometheus-client-derive-encode" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "prometheus-client-derive-text-encode" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "psl-types" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" + +[[package]] +name = "publicsuffix" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a8c1bda5ae1af7f99a2962e49df150414a43d62404644d98dd5c3a93d07457" +dependencies = [ + "idna 0.3.0", + "psl-types", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "cookie", + "cookie_store", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls 0.24.2", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.21.10", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-rustls 0.24.1", + "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.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.1", + "log", + "ring 0.16.20", + "sct 0.6.1", + "webpki", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki", + "sct 0.7.1", +] + +[[package]] +name = "rustls-native-certs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +dependencies = [ + "openssl-probe", + "rustls 0.19.1", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[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.8", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" + +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "schemafy_core" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41781ae092f4fd52c9287efb74456aea0d3b90032d2ecad272bd14dbbcb0511b" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "schemafy_lib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e953db32579999ca98c451d80801b6f6a7ecba6127196c5387ec0774c528befa" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "schemafy_core", + "serde", + "serde_derive", + "serde_json", + "syn 1.0.109", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] + +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "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.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4124a35fe33ae14259c490fd70fa199a32b9ce9502f2ee6bc4f81ec06fa65894" +dependencies = [ + "rand", + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +dependencies = [ + "cc", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" + +[[package]] +name = "serde" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "serde_json" +version = "1.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +dependencies = [ + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee80b0e361bbf88fd2f6e242ccd19cfda072cb0faa6ae694ecee08199938569a" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "serde_with_macros" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" +dependencies = [ + "darling 0.13.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest", + "keccak", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +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.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[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 = "tai64" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed7401421025f4132e6c1f7af5e7f8287383969f36e6628016cd509b8d3da9dc" +dependencies = [ + "serde", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "thiserror" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "time" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "tokio-rayon" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cf33a76e0b1dd03b778f83244137bd59887abf25c0e87bc3e7071105f457693" +dependencies = [ + "rayon", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +dependencies = [ + "rustls 0.19.1", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.10", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +dependencies = [ + "bitflags 1.3.2", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "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.58", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "futures", + "futures-task", + "pin-project", + "tracing", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +dependencies = [ + "void", +] + +[[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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna 0.5.0", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[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.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +dependencies = [ + "getrandom", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.58", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "which" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bf3ea8596f3a0dd5980b46430f2058dfe2c36a27ccfbb1845d6fbfcd9ba6e14" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.4", +] + +[[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.4", +] + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", +] + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.58", +] diff --git a/native-asset/Forc.lock b/native-asset/Forc.lock index e67a419c1..0b76e9881 100644 --- a/native-asset/Forc.lock +++ b/native-asset/Forc.lock @@ -1,41 +1,30 @@ -[[package]] -name = "asset" -source = "git+https://github.com/FuelLabs/sway-libs?tag=v0.18.0#8d196e9379463d4596ac582a20a84ed52ff58c69" -dependencies = [ - "src7", - "std", -] - [[package]] name = "core" -source = "path+from-root-C3992B43B72ADB8C" +source = "path+from-root-9889F771D40C5D34" [[package]] name = "native-asset-contract" source = "member" dependencies = [ - "asset", - "src20", - "src3", + "standards", "std", + "sway_libs", ] [[package]] -name = "src20" -source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.3.3#4198b4b07449ad16104cc8a0501f3013670fdcfd" -dependencies = ["std"] - -[[package]] -name = "src3" -source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.3.3#4198b4b07449ad16104cc8a0501f3013670fdcfd" -dependencies = ["std"] - -[[package]] -name = "src7" -source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.3.3#4198b4b07449ad16104cc8a0501f3013670fdcfd" +name = "standards" +source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.4.1#0a6f3ba0bce036a0ce61f15ed4480c71af32d3aa" dependencies = ["std"] [[package]] name = "std" -source = "git+https://github.com/fuellabs/sway?tag=v0.49.1#2ac7030570f22510b0ac2a7b5ddf7baa20bdc0e1" +source = "git+https://github.com/fuellabs/sway?tag=v0.53.0#b30f0e83d3f3d336007e3dfce45a48a87e731345" dependencies = ["core"] + +[[package]] +name = "sway_libs" +source = "git+https://github.com/FuelLabs/sway-libs?tag=v0.20.1#34a2d5a0f118a72c972153ca44140c0f5f78a680" +dependencies = [ + "standards", + "std", +] diff --git a/native-asset/fuel-toolchain.toml b/native-asset/fuel-toolchain.toml index e75c0bb58..5282a3d5b 100644 --- a/native-asset/fuel-toolchain.toml +++ b/native-asset/fuel-toolchain.toml @@ -1,6 +1,6 @@ [toolchain] -channel = "nightly-2024-01-24" +channel = "nightly-2024-04-12" [components] -forc = "0.49.1" -fuel-core = "0.22.0" +forc = "0.53.0" +fuel-core = "0.23.0" diff --git a/native-asset/native-asset-contract/Cargo.toml b/native-asset/native-asset-contract/Cargo.toml index cbaea9029..d9b426ab0 100644 --- a/native-asset/native-asset-contract/Cargo.toml +++ b/native-asset/native-asset-contract/Cargo.toml @@ -6,6 +6,9 @@ edition = "2021" license = "Apache-2.0" [dependencies] +fuels = { version = "0.54.0", features = ["fuel-core-lib"] } +sha2 = { version = "0.10.7" } +tokio = { version = "1.12", features = ["rt", "macros"] } [[test]] harness = true diff --git a/native-asset/native-asset-contract/Forc.toml b/native-asset/native-asset-contract/Forc.toml index 4d3ef941b..afa5e5963 100644 --- a/native-asset/native-asset-contract/Forc.toml +++ b/native-asset/native-asset-contract/Forc.toml @@ -5,6 +5,5 @@ license = "Apache-2.0" name = "native-asset-contract" [dependencies] -asset = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.18.0" } -src20 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.3.3" } -src3 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.3.3" } +standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.4.1" } +sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.20.1" } diff --git a/native-asset/native-asset-contract/src/errors.sw b/native-asset/native-asset-contract/src/errors.sw index 1ad6f6f62..d03988591 100644 --- a/native-asset/native-asset-contract/src/errors.sw +++ b/native-asset/native-asset-contract/src/errors.sw @@ -1,5 +1,9 @@ library; +pub enum AmountError { + AmountMismatch: (), +} + pub enum MintError { MaxMinted: (), } diff --git a/native-asset/native-asset-contract/src/interface.sw b/native-asset/native-asset-contract/src/interface.sw new file mode 100644 index 000000000..af87710a7 --- /dev/null +++ b/native-asset/native-asset-contract/src/interface.sw @@ -0,0 +1,6 @@ +library; + +abi Constructor { + #[storage(read, write)] + fn constructor(owner: Identity); +} diff --git a/native-asset/native-asset-contract/src/main.sw b/native-asset/native-asset-contract/src/main.sw index d847b2081..813eb8ebb 100644 --- a/native-asset/native-asset-contract/src/main.sw +++ b/native-asset/native-asset-contract/src/main.sw @@ -1,33 +1,47 @@ contract; mod errors; +mod interface; -use errors::{MintError, SetError}; -use src20::SRC20; -use src3::SRC3; -use asset::{ - base::{ - _decimals, - _name, - _set_decimals, - _set_name, - _set_symbol, - _symbol, - _total_assets, - _total_supply, - SetAssetAttributes, +use errors::{AmountError, MintError, SetError}; +use standards::{src20::SRC20, src3::SRC3, src5::{SRC5, State},}; +use sway_libs::{ + asset::{ + base::{ + _decimals, + _name, + _set_decimals, + _set_name, + _set_symbol, + _symbol, + _total_assets, + _total_supply, + SetAssetAttributes, + }, + supply::{ + _burn, + _mint, + }, }, - mint::{ - _burn, - _mint, + ownership::{ + _owner, + initialize_ownership, + only_owner, }, }; -use std::{call_frames::contract_id, hash::Hash, storage::storage_string::*, string::String}; +use interface::Constructor; +use std::{ + call_frames::contract_id, + context::msg_amount, + hash::Hash, + storage::storage_string::*, + string::String, +}; storage { /// The total number of unique assets minted by this contract. total_assets: u64 = 0, - /// The total number of coins minted for a particular asset. + /// The current total number of coins minted for a particular asset. total_supply: StorageMap = StorageMap {}, /// The name associated with a particular asset. name: StorageMap = StorageMap {}, @@ -35,6 +49,13 @@ storage { symbol: StorageMap = StorageMap {}, /// The decimals associated with a particular asset. decimals: StorageMap = StorageMap {}, + /// The total number of coins ever minted for an asset. + cumulative_supply: StorageMap = StorageMap {}, +} + +configurable { + /// The maximum supply allowed for any single asset. + MAX_SUPPLY: u64 = 100_000_000, } impl SRC20 for Contract { @@ -51,7 +72,7 @@ impl SRC20 for Contract { /// # Examples /// /// ```sway - /// use src20::SRC20; + /// use standards::src20::SRC20; /// /// fn foo(contract: ContractId) { /// let contract_abi = abi(SRC20, contract); @@ -81,7 +102,7 @@ impl SRC20 for Contract { /// # Examples /// /// ```sway - /// use src20::SRC20; + /// use standards::src20::SRC20; /// /// fn foo(contract: ContractId, asset: AssetId) { /// let contract_abi = abi(SRC20, contract); @@ -111,7 +132,7 @@ impl SRC20 for Contract { /// # Examples /// /// ```sway - /// use src20::SRC20; + /// use standards::src20::SRC20; /// use std::string::String; /// /// fn foo(contract: ContractId, asset: AssetId) { @@ -141,7 +162,7 @@ impl SRC20 for Contract { /// # Examples /// /// ```sway - /// use src20::SRC20; + /// use standards::src20::SRC20; /// use std::string::String; /// /// fn foo(contract: ContractId, asset: AssetId) { @@ -175,7 +196,7 @@ impl SRC20 for Contract { /// # Examples /// /// ```sway - /// use src20::SRC20; + /// use standards::src20::SRC20; /// /// fn foo(contract: ContractId, asset: AssedId) { /// let contract_abi = abi(SRC20, contract); @@ -192,6 +213,11 @@ impl SRC20 for Contract { impl SRC3 for Contract { /// Mints new assets using the `sub_id` sub-identifier. /// + /// # Additional Information + /// + /// + /// NOTE: This function will only ever let MAX_SUPPLY coins be minted, even if other coins are burned reducing the total supply. + /// /// # Arguments /// /// * `recipient`: [Identity] - The user to which the newly minted assets are transferred to. @@ -200,6 +226,7 @@ impl SRC3 for Contract { /// /// # Reverts /// + /// * When the caller is not the contract owner. /// * When more than 100,000,000 coins have been minted. /// /// # Number of Storage Accesses @@ -210,24 +237,27 @@ impl SRC3 for Contract { /// # Examples /// /// ```sway - /// use src3::SRC3; + /// use standards::src3::SRC3; + /// use std::constants::DEFAULT_SUB_ID; /// - /// fn foo(contract: ContractId) { + /// fn foo(contract: ContractId, identity: Identity) { /// let contract_abi = abi(SR3, contract); - /// contract_abi.mint(Identity::ContractId(this_contract()), ZERO_B256, 100); + /// contract_abi.mint(identity, DEFAULT_SUB_ID, 100); /// } /// ``` #[storage(read, write)] fn mint(recipient: Identity, sub_id: SubId, amount: u64) { + only_owner(); + let asset = AssetId::new(contract_id(), sub_id); + let cumulative_supply = storage.cumulative_supply.get(asset).try_read().unwrap_or(0); require( - storage - .total_supply - .get(asset) - .try_read() - .unwrap_or(0) + amount < 100_000_000, + cumulative_supply + amount <= MAX_SUPPLY, MintError::MaxMinted, ); + storage + .cumulative_supply + .insert(asset, cumulative_supply + amount); let _ = _mint( storage .total_assets, @@ -242,14 +272,18 @@ impl SRC3 for Contract { /// /// # Additional Information /// - /// NOTE: The sha-256 hash of `(ContractId, SubId)` must match the `AssetId` where `ContractId` is the id of - /// the implementing contract and `SubId` is the given `sub_id` argument. + /// NOTE: The sha-256 hash of `(ContractId, SubId)` must match the `AssetId` where `ContractId` is the id of the implementing contract and `SubId` is the given `sub_id` argument. + /// NOTE: This function reduces the total supply. /// /// # Arguments /// /// * `sub_id`: [SubId] - The sub-identifier of the asset to burn. /// * `amount`: [u64] - The quantity of coins to burn. /// + /// # Reverts + /// + /// * When the `amount` provided and transaction amount do not match. + /// /// # Number of Storage Accesses /// /// * Reads: `1` @@ -258,23 +292,58 @@ impl SRC3 for Contract { /// # Examples /// /// ```sway - /// use src3::SRC3; + /// use standards::src3::SRC3; + /// use std::constants::DEFAULT_SUB_ID; /// - /// fn foo(contract: ContractId, asset_id: AssetId) { + /// fn foo(contract: ContractId) { /// let contract_abi = abi(SR3, contract); + /// let asset_id = AssetId::new(contract, DEFAULT_SUB_ID); /// contract_abi { /// gas: 10000, /// coins: 100, /// asset_id: AssetId, - /// }.burn(ZERO_B256, 100); + /// }.burn(DEFAULT_SUB_ID, 100); /// } /// ``` + #[payable] #[storage(read, write)] fn burn(sub_id: SubId, amount: u64) { + require(msg_amount() == amount, AmountError::AmountMismatch); _burn(storage.total_supply, sub_id, amount); } } +impl SRC5 for Contract { + /// Returns the owner. + /// + /// # Return Values + /// + /// * [State] - Represents the state of ownership for this contract. + /// + /// # Number of Storage Accesses + /// + /// * Reads: `1` + /// + /// # Examples + /// + /// ```sway + /// use standards::src5::SRC5; + /// + /// fn foo(contract_id: ContractId) { + /// let ownership_abi = abi(contract_id, SRC_5); + /// + /// match ownership_abi.owner() { + /// State::Uninitalized => log("The ownership is uninitalized"), + /// _ => log("This example will never reach this statement"), + /// } + /// } + /// ``` + #[storage(read)] + fn owner() -> State { + _owner() + } +} + impl SetAssetAttributes for Contract { /// Sets the name of an asset. /// @@ -285,6 +354,7 @@ impl SetAssetAttributes for Contract { /// /// # Reverts /// + /// * When the caller is not the contract owner. /// * When the name has already been set for an asset. /// /// # Number of Storage Accesses @@ -295,8 +365,8 @@ impl SetAssetAttributes for Contract { /// # Examples /// /// ```sway - /// use asset::SetAssetAttributes; - /// use src20::SRC20; + /// use sway_libs::asset::SetAssetAttributes; + /// use standards::src20::SRC20; /// use std::string::String; /// /// fn foo(asset: AssetId) { @@ -309,6 +379,8 @@ impl SetAssetAttributes for Contract { /// ``` #[storage(write)] fn set_name(asset: AssetId, name: String) { + only_owner(); + require( storage .name @@ -319,6 +391,7 @@ impl SetAssetAttributes for Contract { ); _set_name(storage.name, asset, name); } + /// Sets the symbol of an asset. /// /// # Arguments @@ -328,6 +401,7 @@ impl SetAssetAttributes for Contract { /// /// # Reverts /// + /// * When the caller is not the contract owner. /// * When the symbol has already been set for an asset. /// /// # Number of Storage Accesses @@ -339,7 +413,7 @@ impl SetAssetAttributes for Contract { /// /// ```sway /// use asset::SetAssetAttributes; - /// use src20::SRC20; + /// use standards::src20::SRC20; /// use std::string::String; /// /// fn foo(asset: AssetId) { @@ -352,6 +426,8 @@ impl SetAssetAttributes for Contract { /// ``` #[storage(write)] fn set_symbol(asset: AssetId, symbol: String) { + only_owner(); + require( storage .symbol @@ -362,6 +438,7 @@ impl SetAssetAttributes for Contract { ); _set_symbol(storage.symbol, asset, symbol); } + /// Sets the decimals of an asset. /// /// # Arguments @@ -371,6 +448,7 @@ impl SetAssetAttributes for Contract { /// /// # Reverts /// + /// * When the caller is not the contract owner. /// * When the decimals has already been set for an asset. /// /// # Number of Storage Accesses @@ -381,8 +459,8 @@ impl SetAssetAttributes for Contract { /// # Examples /// /// ```sway - /// use asset::SetAssetAttributes; - /// use src20::SRC20; + /// use sway_libs::asset::SetAssetAttributes; + /// use standards::src20::SRC20; /// /// fn foo(asset: AssetId) { /// let decimals = 8u8; @@ -394,6 +472,8 @@ impl SetAssetAttributes for Contract { /// ``` #[storage(write)] fn set_decimals(asset: AssetId, decimals: u8) { + only_owner(); + require( storage .decimals @@ -406,131 +486,39 @@ impl SetAssetAttributes for Contract { } } -#[test] -fn test_mint() { - use std::context::balance_of; - use std::constants::ZERO_B256; - let src3_abi = abi(SRC3, CONTRACT_ID); - let src20_abi = abi(SRC20, CONTRACT_ID); - let recipient = Identity::ContractId(ContractId::from(CONTRACT_ID)); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - assert(balance_of(ContractId::from(CONTRACT_ID), asset_id) == 0); - src3_abi.mint(recipient, sub_id, 100); - assert(balance_of(ContractId::from(CONTRACT_ID), asset_id) == 100); -} -#[test(should_revert)] -fn test_revert_mint_amount_greater_than_max() { - use std::constants::ZERO_B256; - let src3_abi = abi(SRC3, CONTRACT_ID); - let recipient = Identity::ContractId(ContractId::from(CONTRACT_ID)); - let sub_id = ZERO_B256; - let amount = 100_000_001; - src3_abi.mint(recipient, sub_id, amount); -} -#[test] -fn test_burn() { - use std::context::balance_of; - use std::constants::ZERO_B256; - let src3_abi = abi(SRC3, CONTRACT_ID); - let src20_abi = abi(SRC20, CONTRACT_ID); - let recipient = Identity::ContractId(ContractId::from(CONTRACT_ID)); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - src3_abi.mint(recipient, sub_id, 100); - assert(balance_of(ContractId::from(CONTRACT_ID), asset_id) == 100); - src3_abi.burn(sub_id, 100); - assert(balance_of(ContractId::from(CONTRACT_ID), asset_id) == 0); -} -#[test] -fn test_total_assets() { - let src3_abi = abi(SRC3, CONTRACT_ID); - let src20_abi = abi(SRC20, CONTRACT_ID); - let recipient = Identity::ContractId(ContractId::from(CONTRACT_ID)); - let sub_id1 = 0x0000000000000000000000000000000000000000000000000000000000000001; - let sub_id2 = 0x0000000000000000000000000000000000000000000000000000000000000002; - assert(src20_abi.total_assets() == 0); - src3_abi.mint(recipient, sub_id1, 100); - assert(src20_abi.total_assets() == 1); - src3_abi.mint(recipient, sub_id2, 100); - assert(src20_abi.total_assets() == 2); -} -#[test] -fn test_total_supply() { - use std::constants::ZERO_B256; - let src3_abi = abi(SRC3, CONTRACT_ID); - let src20_abi = abi(SRC20, CONTRACT_ID); - let recipient = Identity::ContractId(ContractId::from(CONTRACT_ID)); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - assert(src20_abi.total_supply(asset_id).is_none()); - src3_abi.mint(recipient, sub_id, 100); - assert(src20_abi.total_supply(asset_id).unwrap() == 100); -} -#[test] -fn test_name() { - use std::constants::ZERO_B256; - let src20_abi = abi(SRC20, CONTRACT_ID); - let attributes_abi = abi(SetAssetAttributes, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let name = String::from_ascii_str("Fuel Asset"); - assert(src20_abi.name(asset_id).is_none()); - attributes_abi.set_name(asset_id, name); - assert(src20_abi.name(asset_id).unwrap().as_bytes() == name.as_bytes()); -} -#[test(should_revert)] -fn test_revert_set_name_twice() { - use std::constants::ZERO_B256; - let attributes_abi = abi(SetAssetAttributes, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let name = String::from_ascii_str("Fuel Asset"); - attributes_abi.set_name(asset_id, name); - attributes_abi.set_name(asset_id, name); -} -#[test] -fn test_symbol() { - use std::constants::ZERO_B256; - let src20_abi = abi(SRC20, CONTRACT_ID); - let attributes_abi = abi(SetAssetAttributes, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let symbol = String::from_ascii_str("FUEL"); - assert(src20_abi.symbol(asset_id).is_none()); - attributes_abi.set_symbol(asset_id, symbol); - assert(src20_abi.symbol(asset_id).unwrap().as_bytes() == symbol.as_bytes()); -} -#[test(should_revert)] -fn test_revert_set_symbol_twice() { - use std::constants::ZERO_B256; - let attributes_abi = abi(SetAssetAttributes, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let symbol = String::from_ascii_str("FUEL"); - attributes_abi.set_symbol(asset_id, symbol); - attributes_abi.set_symbol(asset_id, symbol); -} -#[test] -fn test_decimals() { - use std::constants::ZERO_B256; - let src20_abi = abi(SRC20, CONTRACT_ID); - let attributes_abi = abi(SetAssetAttributes, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let decimals = 8u8; - assert(src20_abi.decimals(asset_id).is_none()); - attributes_abi.set_decimals(asset_id, decimals); - assert(src20_abi.decimals(asset_id).unwrap() == decimals); -} -#[test(should_revert)] -fn test_revert_set_decimals_twice() { - use std::constants::ZERO_B256; - let src20_abi = abi(SRC20, CONTRACT_ID); - let attributes_abi = abi(SetAssetAttributes, CONTRACT_ID); - let sub_id = ZERO_B256; - let asset_id = AssetId::new(ContractId::from(CONTRACT_ID), sub_id); - let decimals = 8u8; - attributes_abi.set_decimals(asset_id, decimals); - attributes_abi.set_decimals(asset_id, decimals); +impl Constructor for Contract { + /// Sets the defaults for the contract. + /// + /// # Arguments + /// + /// * `owner`: [Identity] - The `Identity` that will be the first owner. + /// + /// # Reverts + /// + /// * When ownership has been set before. + /// + /// # Number of Storage Acesses + /// + /// * Reads: `1` + /// * Write: `1` + /// + /// # Examples + /// + /// ```sway + /// use standards::src5::SRC5; + /// use native_asset::Constructor; + /// + /// fn foo(contract: ContractId, owner: Identity) { + /// let src_5_abi = abi(SRC5, contract.bits()); + /// assert(src_5_abi.owner() == State::Uninitialized); + /// + /// let constructor_abi = abi(Constructor, contract.bits()); + /// constructor_abi.constructor(owner); + /// assert(src_5_abi.owner() == State::Initialized(owner)); + /// } + /// ``` + #[storage(read, write)] + fn constructor(owner: Identity) { + initialize_ownership(owner); + } } diff --git a/native-asset/native-asset-contract/tests/functions/burn.rs b/native-asset/native-asset-contract/tests/functions/burn.rs new file mode 100644 index 000000000..17041defb --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/burn.rs @@ -0,0 +1,178 @@ +use crate::utils::{ + interface::{burn, constructor, mint, total_assets, total_supply}, + setup::{defaults, get_wallet_balance, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn burn_assets() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let (asset_id_1, _asset_id_2, sub_id_1, _sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity, sub_id_1, 100).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 100); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + assert_eq!(total_assets(&instance_1).await, 1); + + burn(&instance_2, asset_id_1, sub_id_1, 50).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 50); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(50)); + assert_eq!(total_assets(&instance_1).await, 1); + } + + #[tokio::test] + async fn burns_multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let (asset_id_1, asset_id_2, sub_id_1, sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + mint(&instance_1, other_identity.clone(), sub_id_1, 100).await; + mint(&instance_1, other_identity, sub_id_2, 200).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 100); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 200); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(200)); + assert_eq!(total_assets(&instance_1).await, 2); + + burn(&instance_2, asset_id_1, sub_id_1, 50).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 50); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 200); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(50)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(200)); + assert_eq!(total_assets(&instance_1).await, 2); + + burn(&instance_2, asset_id_2, sub_id_2, 100).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 50); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 100); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(50)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(100)); + assert_eq!(total_assets(&instance_1).await, 2); + } + + #[tokio::test] + async fn burn_to_zero() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let (asset_id_1, _asset_id_2, sub_id_1, _sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity, sub_id_1, 100).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 100); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + assert_eq!(total_assets(&instance_1).await, 1); + + burn(&instance_2, asset_id_1, sub_id_1, 50).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 50); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(50)); + assert_eq!(total_assets(&instance_1).await, 1); + + burn(&instance_2, asset_id_1, sub_id_1, 25).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 25); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(25)); + assert_eq!(total_assets(&instance_1).await, 1); + + burn(&instance_2, asset_id_1, sub_id_1, 25).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 0); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(0)); + assert_eq!(total_assets(&instance_1).await, 1); + } +} + +mod revert { + + use super::*; + use fuels::prelude::{CallParameters, TxPolicies, BASE_ASSET_ID}; + + #[tokio::test] + #[should_panic(expected = "AmountMismatch")] + async fn when_amounts_do_not_match() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let (asset_id_1, _asset_id_2, sub_id_1, _sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity, sub_id_1, 100).await; + + let call_params = CallParameters::new(50, asset_id_1, 1_000_000); + instance_2 + .methods() + .burn(sub_id_1, 51) + .with_tx_policies(TxPolicies::default().with_script_gas_limit(2_000_000)) + .call_params(call_params) + .unwrap() + .call() + .await + .unwrap(); + } + + #[tokio::test] + #[should_panic(expected = "NotEnoughCoins")] + async fn when_invalid_sub_id() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let (asset_id_1, _asset_id_2, sub_id_1, sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity, sub_id_1, 100).await; + + let call_params = CallParameters::new(50, asset_id_1, 1_000_000); + instance_2 + .methods() + .burn(sub_id_2, 50) + .with_tx_policies(TxPolicies::default().with_script_gas_limit(2_000_000)) + .call_params(call_params) + .unwrap() + .call() + .await + .unwrap(); + } + + #[tokio::test] + #[should_panic(expected = "NotEnoughCoins")] + async fn when_invalid_asset() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + sub_id_1, + _sub_id_2, + _supply, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity, sub_id_1, 100).await; + + let call_params = CallParameters::new(50, BASE_ASSET_ID, 1_000_000); + instance_2 + .methods() + .burn(sub_id_1, 50) + .with_tx_policies(TxPolicies::default().with_script_gas_limit(2_000_000)) + .call_params(call_params) + .unwrap() + .call() + .await + .unwrap(); + } +} diff --git a/native-asset/native-asset-contract/tests/functions/constructor.rs b/native-asset/native-asset-contract/tests/functions/constructor.rs new file mode 100644 index 000000000..e16f427bc --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/constructor.rs @@ -0,0 +1,50 @@ +use crate::utils::{ + interface::{constructor, owner}, + setup::{defaults, setup, State}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn initializes() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(owner(&instance_1).await, State::Initialized(owner_identity)); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "CannotReinitialized")] + async fn when_owner_already_set() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + constructor(&instance_1, owner_identity.clone()).await; + } +} diff --git a/native-asset/native-asset-contract/tests/functions/decimals.rs b/native-asset/native-asset-contract/tests/functions/decimals.rs new file mode 100644 index 000000000..366d9b410 --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/decimals.rs @@ -0,0 +1,70 @@ +use crate::utils::{ + interface::{constructor, decimals, set_decimals}, + setup::{defaults, get_asset_id, setup}, +}; +use fuels::tx::Bytes32; + +mod success { + + use super::*; + + #[tokio::test] + async fn one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(decimals(&instance_1, asset_id_1).await, None); + + set_decimals(&instance_1, asset_id_1, 9u8).await; + assert_eq!(decimals(&instance_1, asset_id_1).await, Some(9u8)); + } + + #[tokio::test] + async fn multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(decimals(&instance_1, asset_id_1).await, None); + set_decimals(&instance_1, asset_id_1, 9u8).await; + assert_eq!(decimals(&instance_1, asset_id_1).await, Some(9u8)); + + assert_eq!(decimals(&instance_1, asset_id_2).await, None); + set_decimals(&instance_1, asset_id_2, 8u8).await; + assert_eq!(decimals(&instance_1, asset_id_2).await, Some(8u8)); + + let asset_id_3 = get_asset_id(Bytes32::from([3u8; 32]), id); + assert_eq!(decimals(&instance_1, asset_id_3).await, None); + set_decimals(&instance_1, asset_id_3, 7u8).await; + assert_eq!(decimals(&instance_1, asset_id_3).await, Some(7u8)); + + let asset_id_4 = get_asset_id(Bytes32::from([4u8; 32]), id); + assert_eq!(decimals(&instance_1, asset_id_4).await, None); + set_decimals(&instance_1, asset_id_4, 6u8).await; + assert_eq!(decimals(&instance_1, asset_id_4).await, Some(6u8)); + + let asset_id_5 = get_asset_id(Bytes32::from([5u8; 32]), id); + assert_eq!(decimals(&instance_1, asset_id_5).await, None); + set_decimals(&instance_1, asset_id_5, 5u8).await; + assert_eq!(decimals(&instance_1, asset_id_5).await, Some(5u8)); + } +} diff --git a/native-asset/native-asset-contract/tests/functions/mint.rs b/native-asset/native-asset-contract/tests/functions/mint.rs new file mode 100644 index 000000000..05b8d13f5 --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/mint.rs @@ -0,0 +1,139 @@ +use crate::utils::{ + interface::{burn, constructor, mint, total_assets, total_supply}, + setup::{defaults, get_wallet_balance, setup}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn mints_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let (asset_id_1, _asset_id_2, sub_id_1, _sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 0); + assert_eq!(total_supply(&instance_1, asset_id_1).await, None); + assert_eq!(total_assets(&instance_1).await, 0); + + mint(&instance_1, other_identity, sub_id_1, 100).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 100); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + assert_eq!(total_assets(&instance_1).await, 1); + } + + #[tokio::test] + async fn mints_multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let (asset_id_1, asset_id_2, sub_id_1, sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + mint(&instance_1, other_identity.clone(), sub_id_1, 100).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 100); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 0); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, None); + assert_eq!(total_assets(&instance_1).await, 1); + + mint(&instance_1, other_identity, sub_id_2, 200).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 100); + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_2).await, 200); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(200)); + assert_eq!(total_assets(&instance_1).await, 2); + } + + #[tokio::test] + async fn can_mint_max_supply() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let (asset_id_1, _asset_id_2, sub_id_1, _sub_id_2, supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, 0); + assert_eq!(total_supply(&instance_1, asset_id_1).await, None); + assert_eq!(total_assets(&instance_1).await, 0); + + mint(&instance_1, other_identity, sub_id_1, supply).await; + + assert_eq!(get_wallet_balance(&other_wallet, &asset_id_1).await, supply); + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(supply)); + assert_eq!(total_assets(&instance_1).await, 1); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_not_owner() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + sub_id_1, + _sub_id_2, + _supply, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_2, other_identity, sub_id_1, 100).await; + } + + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_no_owner() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + sub_id_1, + _sub_id_2, + _supply, + _owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet); + + mint(&instance_1, other_identity, sub_id_1, 100).await; + } + + #[tokio::test] + #[should_panic(expected = "MaxMinted")] + async fn when_max_supply_minted() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let (_asset_id_1, _asset_id_2, sub_id_1, _sub_id_2, supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet); + + constructor(&instance_1, owner_identity.clone()).await; + + mint(&instance_1, other_identity, sub_id_1, supply + 1).await; + } + + #[tokio::test] + #[should_panic(expected = "MaxMinted")] + async fn when_minting_max_supply_after_burn() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let (asset_id_1, _asset_id_2, sub_id_1, _sub_id_2, supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + mint(&instance_1, other_identity.clone(), sub_id_1, supply).await; + + burn(&instance_2, asset_id_1, sub_id_1, 1).await; + + mint(&instance_1, other_identity, sub_id_1, 1).await; + } +} diff --git a/native-asset/native-asset-contract/tests/functions/mod.rs b/native-asset/native-asset-contract/tests/functions/mod.rs new file mode 100644 index 000000000..ce849c084 --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/mod.rs @@ -0,0 +1,12 @@ +mod burn; +mod constructor; +mod decimals; +mod mint; +mod name; +mod owner; +mod set_decimals; +mod set_name; +mod set_symbol; +mod symbol; +mod total_assets; +mod total_supply; diff --git a/native-asset/native-asset-contract/tests/functions/name.rs b/native-asset/native-asset-contract/tests/functions/name.rs new file mode 100644 index 000000000..5aab09072 --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/name.rs @@ -0,0 +1,123 @@ +use crate::utils::{ + interface::{constructor, name, set_name}, + setup::{defaults, get_asset_id, setup}, +}; +use fuels::tx::Bytes32; + +mod success { + + use super::*; + + #[tokio::test] + async fn one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + + set_name(&instance_1, asset_id_1, String::from("Fuel Asset 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel Asset 1")) + ); + } + + #[tokio::test] + async fn multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + set_name(&instance_1, asset_id_1, String::from("Fuel Asset 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel Asset 1")) + ); + + assert_eq!(name(&instance_1, asset_id_2).await, None); + set_name(&instance_1, asset_id_2, String::from("Fuel Asset 2")).await; + assert_eq!( + name(&instance_1, asset_id_2).await, + Some(String::from("Fuel Asset 2")) + ); + + let asset_id_3 = get_asset_id(Bytes32::from([3u8; 32]), id); + assert_eq!(name(&instance_1, asset_id_3).await, None); + set_name(&instance_1, asset_id_3, String::from("Fuel Asset 3")).await; + assert_eq!( + name(&instance_1, asset_id_3).await, + Some(String::from("Fuel Asset 3")) + ); + + let asset_id_4 = get_asset_id(Bytes32::from([4u8; 32]), id); + assert_eq!(name(&instance_1, asset_id_4).await, None); + set_name(&instance_1, asset_id_4, String::from("Fuel Asset 4")).await; + assert_eq!( + name(&instance_1, asset_id_4).await, + Some(String::from("Fuel Asset 4")) + ); + + let asset_id_5 = get_asset_id(Bytes32::from([5u8; 32]), id); + assert_eq!(name(&instance_1, asset_id_5).await, None); + set_name(&instance_1, asset_id_5, String::from("Fuel Asset 5")).await; + assert_eq!( + name(&instance_1, asset_id_5).await, + Some(String::from("Fuel Asset 5")) + ); + } + + #[tokio::test] + async fn does_not_overwrite_other_names() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + set_name(&instance_1, asset_id_1, String::from("Fuel Asset 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel Asset 1")) + ); + + assert_eq!(name(&instance_1, asset_id_2).await, None); + set_name(&instance_1, asset_id_2, String::from("Fuel Asset 2")).await; + + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel Asset 1")) + ); + assert_eq!( + name(&instance_1, asset_id_2).await, + Some(String::from("Fuel Asset 2")) + ); + } +} diff --git a/native-asset/native-asset-contract/tests/functions/owner.rs b/native-asset/native-asset-contract/tests/functions/owner.rs new file mode 100644 index 000000000..030f68e5a --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/owner.rs @@ -0,0 +1,43 @@ +use crate::utils::{ + interface::{constructor, owner}, + setup::{defaults, setup, State}, +}; + +mod success { + + use super::*; + + #[tokio::test] + async fn gets_owner() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(owner(&instance_1).await, State::Initialized(owner_identity)); + } + + #[tokio::test] + async fn gets_no_owner() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + _owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + assert_eq!(owner(&instance_1).await, State::Uninitialized); + } +} diff --git a/native-asset/native-asset-contract/tests/functions/set_decimals.rs b/native-asset/native-asset-contract/tests/functions/set_decimals.rs new file mode 100644 index 000000000..3cba3a249 --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/set_decimals.rs @@ -0,0 +1,140 @@ +use crate::utils::{ + interface::{constructor, decimals, set_decimals}, + setup::{defaults, get_asset_id, setup}, +}; +use fuels::tx::Bytes32; + +mod success { + + use super::*; + + #[tokio::test] + async fn sets_one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(decimals(&instance_1, asset_id_1).await, None); + + set_decimals(&instance_1, asset_id_1, 9u8).await; + assert_eq!(decimals(&instance_1, asset_id_1).await, Some(9u8)); + } + + #[tokio::test] + async fn sets_multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(decimals(&instance_1, asset_id_1).await, None); + set_decimals(&instance_1, asset_id_1, 9u8).await; + assert_eq!(decimals(&instance_1, asset_id_1).await, Some(9u8)); + + assert_eq!(decimals(&instance_1, asset_id_2).await, None); + set_decimals(&instance_1, asset_id_2, 8u8).await; + assert_eq!(decimals(&instance_1, asset_id_2).await, Some(8u8)); + + let asset_id_3 = get_asset_id(Bytes32::from([3u8; 32]), id); + assert_eq!(decimals(&instance_1, asset_id_3).await, None); + set_decimals(&instance_1, asset_id_3, 7u8).await; + assert_eq!(decimals(&instance_1, asset_id_3).await, Some(7u8)); + + let asset_id_4 = get_asset_id(Bytes32::from([4u8; 32]), id); + assert_eq!(decimals(&instance_1, asset_id_4).await, None); + set_decimals(&instance_1, asset_id_4, 6u8).await; + assert_eq!(decimals(&instance_1, asset_id_4).await, Some(6u8)); + + let asset_id_5 = get_asset_id(Bytes32::from([5u8; 32]), id); + assert_eq!(decimals(&instance_1, asset_id_5).await, None); + set_decimals(&instance_1, asset_id_5, 5u8).await; + assert_eq!(decimals(&instance_1, asset_id_5).await, Some(5u8)); + } + + #[tokio::test] + async fn does_not_overwrite_other_decimals() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(decimals(&instance_1, asset_id_1).await, None); + set_decimals(&instance_1, asset_id_1, 9u8).await; + assert_eq!(decimals(&instance_1, asset_id_1).await, Some(9u8)); + + assert_eq!(decimals(&instance_1, asset_id_2).await, None); + set_decimals(&instance_1, asset_id_2, 8u8).await; + + assert_eq!(decimals(&instance_1, asset_id_1).await, Some(9u8)); + assert_eq!(decimals(&instance_1, asset_id_2).await, Some(8u8)); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_not_owner() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + set_decimals(&instance_2, asset_id_1, 9u8).await; + } + + #[tokio::test] + #[should_panic(expected = "ValueAlreadySet")] + async fn when_a_name_has_already_been_set() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + set_decimals(&instance_1, asset_id_1, 9u8).await; + set_decimals(&instance_1, asset_id_1, 9u8).await; + } +} diff --git a/native-asset/native-asset-contract/tests/functions/set_name.rs b/native-asset/native-asset-contract/tests/functions/set_name.rs new file mode 100644 index 000000000..b4ec3b1b2 --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/set_name.rs @@ -0,0 +1,167 @@ +use crate::utils::{ + interface::{constructor, name, set_name}, + setup::{defaults, get_asset_id, setup}, +}; +use fuels::tx::Bytes32; + +mod success { + + use super::*; + + #[tokio::test] + async fn sets_one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + + set_name(&instance_1, asset_id_1, String::from("Fuel Asset 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel Asset 1")) + ); + } + + #[tokio::test] + async fn sets_multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + set_name(&instance_1, asset_id_1, String::from("Fuel Asset 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel Asset 1")) + ); + + assert_eq!(name(&instance_1, asset_id_2).await, None); + set_name(&instance_1, asset_id_2, String::from("Fuel Asset 2")).await; + assert_eq!( + name(&instance_1, asset_id_2).await, + Some(String::from("Fuel Asset 2")) + ); + + let asset_id_3 = get_asset_id(Bytes32::from([3u8; 32]), id); + assert_eq!(name(&instance_1, asset_id_3).await, None); + set_name(&instance_1, asset_id_3, String::from("Fuel Asset 3")).await; + assert_eq!( + name(&instance_1, asset_id_3).await, + Some(String::from("Fuel Asset 3")) + ); + + let asset_id_4 = get_asset_id(Bytes32::from([4u8; 32]), id); + assert_eq!(name(&instance_1, asset_id_4).await, None); + set_name(&instance_1, asset_id_4, String::from("Fuel Asset 4")).await; + assert_eq!( + name(&instance_1, asset_id_4).await, + Some(String::from("Fuel Asset 4")) + ); + + let asset_id_5 = get_asset_id(Bytes32::from([5u8; 32]), id); + assert_eq!(name(&instance_1, asset_id_5).await, None); + set_name(&instance_1, asset_id_5, String::from("Fuel Asset 5")).await; + assert_eq!( + name(&instance_1, asset_id_5).await, + Some(String::from("Fuel Asset 5")) + ); + } + + #[tokio::test] + async fn does_not_overwrite_other_names() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(name(&instance_1, asset_id_1).await, None); + set_name(&instance_1, asset_id_1, String::from("Fuel Asset 1")).await; + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel Asset 1")) + ); + + assert_eq!(name(&instance_1, asset_id_2).await, None); + set_name(&instance_1, asset_id_2, String::from("Fuel Asset 2")).await; + + assert_eq!( + name(&instance_1, asset_id_1).await, + Some(String::from("Fuel Asset 1")) + ); + assert_eq!( + name(&instance_1, asset_id_2).await, + Some(String::from("Fuel Asset 2")) + ); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_not_owner() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + set_name(&instance_2, asset_id_1, String::from("Fuel Asset 1")).await; + } + + #[tokio::test] + #[should_panic(expected = "ValueAlreadySet")] + async fn when_a_name_has_already_been_set() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + set_name(&instance_1, asset_id_1, String::from("Fuel Asset 1")).await; + set_name(&instance_1, asset_id_1, String::from("Fuel Asset 1")).await; + } +} diff --git a/native-asset/native-asset-contract/tests/functions/set_symbol.rs b/native-asset/native-asset-contract/tests/functions/set_symbol.rs new file mode 100644 index 000000000..e58a0f55a --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/set_symbol.rs @@ -0,0 +1,167 @@ +use crate::utils::{ + interface::{constructor, set_symbol, symbol}, + setup::{defaults, get_asset_id, setup}, +}; +use fuels::tx::Bytes32; + +mod success { + + use super::*; + + #[tokio::test] + async fn sets_one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + } + + #[tokio::test] + async fn sets_multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + + assert_eq!(symbol(&instance_1, asset_id_2).await, None); + set_symbol(&instance_1, asset_id_2, String::from("FA2")).await; + assert_eq!( + symbol(&instance_1, asset_id_2).await, + Some(String::from("FA2")) + ); + + let asset_id_3 = get_asset_id(Bytes32::from([3u8; 32]), id); + assert_eq!(symbol(&instance_1, asset_id_3).await, None); + set_symbol(&instance_1, asset_id_3, String::from("FA3")).await; + assert_eq!( + symbol(&instance_1, asset_id_3).await, + Some(String::from("FA3")) + ); + + let asset_id_4 = get_asset_id(Bytes32::from([4u8; 32]), id); + assert_eq!(symbol(&instance_1, asset_id_4).await, None); + set_symbol(&instance_1, asset_id_4, String::from("FA4")).await; + assert_eq!( + symbol(&instance_1, asset_id_4).await, + Some(String::from("FA4")) + ); + + let asset_id_5 = get_asset_id(Bytes32::from([5u8; 32]), id); + assert_eq!(symbol(&instance_1, asset_id_5).await, None); + set_symbol(&instance_1, asset_id_5, String::from("FA5")).await; + assert_eq!( + symbol(&instance_1, asset_id_5).await, + Some(String::from("FA5")) + ); + } + + #[tokio::test] + async fn does_not_overwrite_other_symbols() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + + assert_eq!(symbol(&instance_1, asset_id_2).await, None); + set_symbol(&instance_1, asset_id_2, String::from("FA2")).await; + + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + assert_eq!( + symbol(&instance_1, asset_id_2).await, + Some(String::from("FA2")) + ); + } +} + +mod revert { + + use super::*; + + #[tokio::test] + #[should_panic(expected = "NotOwner")] + async fn when_not_owner() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + set_symbol(&instance_2, asset_id_1, String::from("FA1")).await; + } + + #[tokio::test] + #[should_panic(expected = "ValueAlreadySet")] + async fn when_a_name_has_already_been_set() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + } +} diff --git a/native-asset/native-asset-contract/tests/functions/symbol.rs b/native-asset/native-asset-contract/tests/functions/symbol.rs new file mode 100644 index 000000000..35d5bfcc9 --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/symbol.rs @@ -0,0 +1,123 @@ +use crate::utils::{ + interface::{constructor, set_symbol, symbol}, + setup::{defaults, get_asset_id, setup}, +}; +use fuels::tx::Bytes32; + +mod success { + + use super::*; + + #[tokio::test] + async fn one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + _asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + } + + #[tokio::test] + async fn multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + + assert_eq!(symbol(&instance_1, asset_id_2).await, None); + set_symbol(&instance_1, asset_id_2, String::from("FA2")).await; + assert_eq!( + symbol(&instance_1, asset_id_2).await, + Some(String::from("FA2")) + ); + + let asset_id_3 = get_asset_id(Bytes32::from([3u8; 32]), id); + assert_eq!(symbol(&instance_1, asset_id_3).await, None); + set_symbol(&instance_1, asset_id_3, String::from("FA3")).await; + assert_eq!( + symbol(&instance_1, asset_id_3).await, + Some(String::from("FA3")) + ); + + let asset_id_4 = get_asset_id(Bytes32::from([4u8; 32]), id); + assert_eq!(symbol(&instance_1, asset_id_4).await, None); + set_symbol(&instance_1, asset_id_4, String::from("FA4")).await; + assert_eq!( + symbol(&instance_1, asset_id_4).await, + Some(String::from("FA4")) + ); + + let asset_id_5 = get_asset_id(Bytes32::from([5u8; 32]), id); + assert_eq!(symbol(&instance_1, asset_id_5).await, None); + set_symbol(&instance_1, asset_id_5, String::from("FA5")).await; + assert_eq!( + symbol(&instance_1, asset_id_5).await, + Some(String::from("FA5")) + ); + } + + #[tokio::test] + async fn does_not_overwrite_other_symbols() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + asset_id_1, + asset_id_2, + _sub_id_1, + _sub_id_2, + _supply, + owner_identity, + _other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(symbol(&instance_1, asset_id_1).await, None); + set_symbol(&instance_1, asset_id_1, String::from("FA1")).await; + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + + assert_eq!(symbol(&instance_1, asset_id_2).await, None); + set_symbol(&instance_1, asset_id_2, String::from("FA2")).await; + + assert_eq!( + symbol(&instance_1, asset_id_1).await, + Some(String::from("FA1")) + ); + assert_eq!( + symbol(&instance_1, asset_id_2).await, + Some(String::from("FA2")) + ); + } +} diff --git a/native-asset/native-asset-contract/tests/functions/total_assets.rs b/native-asset/native-asset-contract/tests/functions/total_assets.rs new file mode 100644 index 000000000..8987239a3 --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/total_assets.rs @@ -0,0 +1,84 @@ +use crate::utils::{ + interface::{constructor, mint, total_assets}, + setup::{defaults, setup}, +}; +use fuels::types::Bits256; + +mod success { + + use super::*; + + #[tokio::test] + async fn one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + sub_id_1, + _sub_id_2, + _supply, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_assets(&instance_1).await, 0); + + mint(&instance_1, other_identity, sub_id_1, 100).await; + assert_eq!(total_assets(&instance_1).await, 1); + } + + #[tokio::test] + async fn multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let (_asset_id_1, _asset_id_2, sub_id_1, sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_assets(&instance_1).await, 0); + + mint(&instance_1, other_identity.clone(), sub_id_1, 100).await; + assert_eq!(total_assets(&instance_1).await, 1); + + mint(&instance_1, other_identity.clone(), sub_id_2, 200).await; + assert_eq!(total_assets(&instance_1).await, 2); + + mint(&instance_1, other_identity.clone(), Bits256([3u8; 32]), 300).await; + assert_eq!(total_assets(&instance_1).await, 3); + + mint(&instance_1, other_identity.clone(), Bits256([4u8; 32]), 400).await; + assert_eq!(total_assets(&instance_1).await, 4); + + mint(&instance_1, other_identity, Bits256([5u8; 32]), 200).await; + assert_eq!(total_assets(&instance_1).await, 5); + } + + #[tokio::test] + async fn only_increments_on_new_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let ( + _asset_id_1, + _asset_id_2, + sub_id_1, + _sub_id_2, + _supply, + owner_identity, + other_identity, + ) = defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_assets(&instance_1).await, 0); + + mint(&instance_1, other_identity.clone(), sub_id_1, 100).await; + assert_eq!(total_assets(&instance_1).await, 1); + + mint(&instance_1, other_identity.clone(), sub_id_1, 100).await; + assert_eq!(total_assets(&instance_1).await, 1); + + mint(&instance_1, other_identity.clone(), sub_id_1, 100).await; + assert_eq!(total_assets(&instance_1).await, 1); + } +} diff --git a/native-asset/native-asset-contract/tests/functions/total_supply.rs b/native-asset/native-asset-contract/tests/functions/total_supply.rs new file mode 100644 index 000000000..d2b8448ee --- /dev/null +++ b/native-asset/native-asset-contract/tests/functions/total_supply.rs @@ -0,0 +1,90 @@ +use crate::utils::{ + interface::{burn, constructor, mint, total_supply}, + setup::{defaults, get_asset_id, setup}, +}; +use fuels::{tx::Bytes32, types::Bits256}; + +mod success { + + use super::*; + + #[tokio::test] + async fn one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let (asset_id_1, _asset_id_2, sub_id_1, _sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_supply(&instance_1, asset_id_1).await, None); + mint(&instance_1, other_identity, sub_id_1, 100).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + } + + #[tokio::test] + async fn multiple_assets() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let (asset_id_1, asset_id_2, sub_id_1, sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_supply(&instance_1, asset_id_1).await, None); + mint(&instance_1, other_identity.clone(), sub_id_1, 100).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + + assert_eq!(total_supply(&instance_1, asset_id_2).await, None); + mint(&instance_1, other_identity.clone(), sub_id_2, 200).await; + assert_eq!(total_supply(&instance_1, asset_id_2).await, Some(200)); + + let asset_id_3 = get_asset_id(Bytes32::from([3u8; 32]), id); + assert_eq!(total_supply(&instance_1, asset_id_3).await, None); + mint(&instance_1, other_identity.clone(), Bits256([3u8; 32]), 300).await; + assert_eq!(total_supply(&instance_1, asset_id_3).await, Some(300)); + + let asset_id_4 = get_asset_id(Bytes32::from([4u8; 32]), id); + assert_eq!(total_supply(&instance_1, asset_id_4).await, None); + mint(&instance_1, other_identity.clone(), Bits256([4u8; 32]), 400).await; + assert_eq!(total_supply(&instance_1, asset_id_4).await, Some(400)); + + let asset_id_5 = get_asset_id(Bytes32::from([5u8; 32]), id); + assert_eq!(total_supply(&instance_1, asset_id_5).await, None); + mint(&instance_1, other_identity, Bits256([5u8; 32]), 500).await; + assert_eq!(total_supply(&instance_1, asset_id_5).await, Some(500)); + } + + #[tokio::test] + async fn only_increments_on_one_asset() { + let (owner_wallet, other_wallet, id, instance_1, _instance_2) = setup().await; + let (asset_id_1, _asset_id_2, sub_id_1, sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_supply(&instance_1, asset_id_1).await, None); + mint(&instance_1, other_identity.clone(), sub_id_1, 100).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + + mint(&instance_1, other_identity.clone(), sub_id_2, 200).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + + mint(&instance_1, other_identity.clone(), sub_id_2, 300).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + } + + #[tokio::test] + async fn decrements_on_burn() { + let (owner_wallet, other_wallet, id, instance_1, instance_2) = setup().await; + let (asset_id_1, _asset_id_2, sub_id_1, _sub_id_2, _supply, owner_identity, other_identity) = + defaults(id, owner_wallet, other_wallet.clone()); + + constructor(&instance_1, owner_identity.clone()).await; + + assert_eq!(total_supply(&instance_1, asset_id_1).await, None); + mint(&instance_1, other_identity.clone(), sub_id_1, 100).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(100)); + + burn(&instance_2, asset_id_1, sub_id_1, 50).await; + assert_eq!(total_supply(&instance_1, asset_id_1).await, Some(50)); + } +} diff --git a/native-asset/native-asset-contract/tests/harness.rs b/native-asset/native-asset-contract/tests/harness.rs index 8b1378917..39c936316 100644 --- a/native-asset/native-asset-contract/tests/harness.rs +++ b/native-asset/native-asset-contract/tests/harness.rs @@ -1 +1,2 @@ - +mod functions; +mod utils; diff --git a/native-asset/native-asset-contract/tests/utils/interface.rs b/native-asset/native-asset-contract/tests/utils/interface.rs new file mode 100644 index 000000000..6676674d3 --- /dev/null +++ b/native-asset/native-asset-contract/tests/utils/interface.rs @@ -0,0 +1,134 @@ +use crate::utils::setup::{NativeAsset, State}; +use fuels::{ + prelude::{AssetId, CallParameters, TxPolicies, WalletUnlocked}, + programs::{call_response::FuelCallResponse, call_utils::TxDependencyExtension}, + types::{Bits256, Identity}, +}; + +pub(crate) async fn total_assets(contract: &NativeAsset) -> u64 { + contract + .methods() + .total_assets() + .call() + .await + .unwrap() + .value +} + +pub(crate) async fn total_supply( + contract: &NativeAsset, + asset: AssetId, +) -> Option { + contract + .methods() + .total_supply(asset) + .call() + .await + .unwrap() + .value +} + +pub(crate) async fn name(contract: &NativeAsset, asset: AssetId) -> Option { + contract.methods().name(asset).call().await.unwrap().value +} + +pub(crate) async fn symbol( + contract: &NativeAsset, + asset: AssetId, +) -> Option { + contract.methods().symbol(asset).call().await.unwrap().value +} + +pub(crate) async fn decimals(contract: &NativeAsset, asset: AssetId) -> Option { + contract + .methods() + .decimals(asset) + .call() + .await + .unwrap() + .value +} + +pub(crate) async fn mint( + contract: &NativeAsset, + recipient: Identity, + sub_id: Bits256, + amount: u64, +) -> FuelCallResponse<()> { + contract + .methods() + .mint(recipient, sub_id, amount) + .append_variable_outputs(1) + .call() + .await + .unwrap() +} + +pub(crate) async fn burn( + contract: &NativeAsset, + asset_id: AssetId, + sub_id: Bits256, + amount: u64, +) -> FuelCallResponse<()> { + let call_params = CallParameters::new(amount, asset_id, 1_000_000); + + contract + .methods() + .burn(sub_id, amount) + .with_tx_policies(TxPolicies::default().with_script_gas_limit(2_000_000)) + .call_params(call_params) + .unwrap() + .call() + .await + .unwrap() +} + +pub(crate) async fn owner(contract: &NativeAsset) -> State { + contract.methods().owner().call().await.unwrap().value +} + +pub(crate) async fn set_name( + contract: &NativeAsset, + asset: AssetId, + name: String, +) -> FuelCallResponse<()> { + contract + .methods() + .set_name(asset, name) + .call() + .await + .unwrap() +} + +pub(crate) async fn set_symbol( + contract: &NativeAsset, + asset: AssetId, + name: String, +) -> FuelCallResponse<()> { + contract + .methods() + .set_symbol(asset, name) + .call() + .await + .unwrap() +} + +pub(crate) async fn set_decimals( + contract: &NativeAsset, + asset: AssetId, + decimals: u8, +) -> FuelCallResponse<()> { + contract + .methods() + .set_decimals(asset, decimals) + .call() + .await + .unwrap() +} + +pub(crate) async fn constructor( + contract: &NativeAsset, + owner: Identity, +) -> FuelCallResponse<()> { + contract.methods().constructor(owner).call().await.unwrap() +} diff --git a/native-asset/native-asset-contract/tests/utils/mod.rs b/native-asset/native-asset-contract/tests/utils/mod.rs new file mode 100644 index 000000000..b1878bb6a --- /dev/null +++ b/native-asset/native-asset-contract/tests/utils/mod.rs @@ -0,0 +1,2 @@ +pub mod interface; +pub mod setup; diff --git a/native-asset/native-asset-contract/tests/utils/setup.rs b/native-asset/native-asset-contract/tests/utils/setup.rs new file mode 100644 index 000000000..a4f4b2b7a --- /dev/null +++ b/native-asset/native-asset-contract/tests/utils/setup.rs @@ -0,0 +1,94 @@ +use fuels::{ + accounts::ViewOnlyAccount, + prelude::{ + abigen, launch_custom_provider_and_get_wallets, AssetConfig, Contract, ContractId, + LoadConfiguration, TxPolicies, WalletUnlocked, WalletsConfig, BASE_ASSET_ID, + }, + tx::Bytes32, + types::{Address, AssetId, Bits256, Identity}, +}; +use sha2::{Digest, Sha256}; + +abigen!(Contract( + name = "NativeAsset", + abi = "./native-asset-contract/out/debug/native-asset-contract-abi.json" +),); + +const NATIVE_ASSET_CONTRACT_BINARY_PATH: &str = "./out/debug/native-asset-contract.bin"; + +pub(crate) fn defaults( + contract_id: ContractId, + wallet_1: WalletUnlocked, + wallet_2: WalletUnlocked, +) -> (AssetId, AssetId, Bits256, Bits256, u64, Identity, Identity) { + let sub_id_1 = Bytes32::from([1u8; 32]); + let sub_id_2 = Bytes32::from([2u8; 32]); + let asset1 = get_asset_id(sub_id_1, contract_id); + let asset2 = get_asset_id(sub_id_2, contract_id); + let supply = 100_000_000; + + let identity_1 = Identity::Address(Address::from(wallet_1.address())); + let identity_2 = Identity::Address(Address::from(wallet_2.address())); + + ( + asset1, + asset2, + Bits256(*sub_id_1), + Bits256(*sub_id_2), + supply, + identity_1, + identity_2, + ) +} + +pub(crate) async fn setup() -> ( + WalletUnlocked, + WalletUnlocked, + ContractId, + NativeAsset, + NativeAsset, +) { + let number_of_coins = 1; + let coin_amount = 100_000_000; + let number_of_wallets = 2; + + let base_asset = AssetConfig { + id: BASE_ASSET_ID, + num_coins: number_of_coins, + coin_amount, + }; + let assets = vec![base_asset]; + + let wallet_config = WalletsConfig::new_multiple_assets(number_of_wallets, assets); + let mut wallets = launch_custom_provider_and_get_wallets(wallet_config, None, None) + .await + .unwrap(); + + let wallet1 = wallets.pop().unwrap(); + let wallet2 = wallets.pop().unwrap(); + + let id = Contract::load_from( + NATIVE_ASSET_CONTRACT_BINARY_PATH, + LoadConfiguration::default(), + ) + .unwrap() + .deploy(&wallet1, TxPolicies::default()) + .await + .unwrap(); + + let instance_1 = NativeAsset::new(id.clone(), wallet1.clone()); + let instance_2 = NativeAsset::new(id.clone(), wallet2.clone()); + + (wallet1, wallet2, id.into(), instance_1, instance_2) +} + +pub(crate) fn get_asset_id(sub_id: Bytes32, contract: ContractId) -> AssetId { + let mut hasher = Sha256::new(); + hasher.update(*contract); + hasher.update(*sub_id); + AssetId::new(*Bytes32::from(<[u8; 32]>::from(hasher.finalize()))) +} + +pub(crate) async fn get_wallet_balance(wallet: &WalletUnlocked, asset: &AssetId) -> u64 { + wallet.get_asset_balance(asset).await.unwrap() +}