diff --git a/.cargo/config.toml b/.cargo/config.toml index 91efce0..e70a585 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -15,11 +15,7 @@ overflow-checks = true # enable safety checks for arithmetic operations [alias] wasm = "rustc --target wasm32-unknown-unknown --profile wasm-release" doc-all = "doc -p mintbase-deps --release --features store-wasm --features factory-wasm --lib --no-deps --target-dir mintbase-core-docs" -helper-wasm = "wasm -p helper -- --emit link=wasm/helper.wasm" store-wasm = "wasm -p store -- --emit link=wasm/store.wasm" factory-wasm = "wasm -p factory -- --emit link=wasm/factory.wasm" market-wasm = "wasm -p simple-market-contract -- --emit link=wasm/market.wasm" -p2p_indexer = "rustc -p mintbase-near-indexer --release --bin p2p_indexer --features p2p_indexer -- --emit link=bin/p2p_indexer" -mintlake = "rustc -p mintbase-near-indexer --release --bin mintlake --features mintlake -- --emit link=bin/mintlake" -#indexer = "rustc -p mintbase-near-indexer --release --bin mintbase-near-indexer -- --emit link=bin/indexer" lint = "clippy -- -D warnings" diff --git a/.gitignore b/.gitignore index a093b12..fef834b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,16 +6,16 @@ _scripts .postgres.sh wasm -error.log -out.log bin *.log +tmp.sh + +**/TODO.md Dockerfile tills-notes.md testing/node_modules -testing/TODO testing/downloads .DS_Store diff --git a/.gitmodules b/.gitmodules index cb9a18b..7cf895d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,4 @@ -[submodule "mintbase-near-indexer"] - path = mintbase-near-indexer - url = https://github.com/Mintbase/mintbase-near-indexer - branch = dev [submodule "simple-market-contract"] path = simple-market-contract url = https://github.com/Mintbase/simple-market-contract branch = dev -[submodule "mintbase-core-docs"] - path = mintbase-core-docs - url = https://github.com/Mintbase/mintbase-core-docs - branch = dev diff --git a/Cargo.lock b/Cargo.lock index 53077c4..3bfaf87 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9,889 +9,589 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" [[package]] -name = "actix" -version = "0.11.0-beta.2" +name = "ahash" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb78f9871feb3519e06b947c2becbf2cc7f67ce786e510e6bd3f9a27da3dbf1" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "actix-rt", - "actix_derive", - "bitflags", - "bytes", - "crossbeam-channel", - "futures-core", - "futures-sink", - "futures-task", - "log", + "getrandom 0.2.8", "once_cell", - "parking_lot 0.11.2", - "pin-project-lite", - "smallvec", - "tokio", - "tokio-util 0.6.9", + "version_check", ] [[package]] -name = "actix-codec" -version = "0.4.0" +name = "android_system_properties" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d5dbeb2d9e51344cb83ca7cc170f1217f9fe25bfc50160e6e200b5c31c1019a" -dependencies = [ - "bitflags", - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", - "tokio-util 0.6.9", -] - -[[package]] -name = "actix-cors" -version = "0.6.0-beta.2" -source = "git+https://github.com/near/actix-extras.git?branch=actix-web-4-beta.6#eb38fbccd2df7846f83f2d9ace3b4c2a593614f0" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ - "actix-service", - "actix-web", - "derive_more", - "futures-util", - "log", - "once_cell", - "tinyvec", + "libc", ] [[package]] -name = "actix-diesel" -version = "0.3.1-alpha.0" -source = "git+https://github.com/frol/actix-diesel?branch=actix-0.11-beta.2#7066a04ccce15b20940d926758837c99954765cc" -dependencies = [ - "actix", - "actix-rt", - "derive_more", - "diesel", - "futures", - "num_cpus", - "once_cell", - "r2d2", -] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" [[package]] -name = "actix-http" -version = "3.0.0-beta.6" +name = "arrayvec" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59d51c2ba06062e698a5d212d860e9fb2afc931c285ede687aaae896c8150347" -dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-tls", - "actix-utils", - "ahash", - "base64 0.13.0", - "bitflags", - "brotli2", - "bytes", - "bytestring", - "derive_more", - "encoding_rs", - "flate2", - "futures-core", - "futures-util", - "h2", - "http", - "httparse", - "itoa 0.4.8", - "language-tags", - "local-channel", - "log", - "mime", - "once_cell", - "paste", - "percent-encoding", - "pin-project", - "pin-project-lite", - "rand 0.8.4", - "regex", - "serde", - "sha-1", - "smallvec", - "time 0.2.27", - "tokio", -] +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] -name = "actix-macros" -version = "0.2.3" +name = "arrayvec" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" -dependencies = [ - "quote", - "syn", -] +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] -name = "actix-router" -version = "0.2.7" +name = "atty" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad299af73649e1fc893e333ccf86f377751eb95ff875d095131574c6f43452c" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "bytestring", - "http", - "log", - "regex", - "serde", + "hermit-abi", + "libc", + "winapi", ] [[package]] -name = "actix-rt" -version = "2.2.0" +name = "autocfg" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7d7cd957c9ed92288a7c3c96af81fa5291f65247a76a34dac7b6af74e52ba0" -dependencies = [ - "actix-macros", - "futures-core", - "tokio", -] +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "actix-server" -version = "2.0.0-beta.6" +name = "base64" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7367665785765b066ad16e1086d26a087f696bc7c42b6f93004ced6cfcf1eeca" -dependencies = [ - "actix-rt", - "actix-service", - "actix-utils", - "futures-core", - "log", - "mio", - "num_cpus", - "tokio", -] +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" [[package]] -name = "actix-service" -version = "2.0.1" +name = "base64" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3dc6a618b082974a08d7a4781d24d4691cba51500059bfebe6656a61ebfe1e" -dependencies = [ - "futures-core", - "paste", - "pin-project-lite", -] +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] -name = "actix-tls" -version = "3.0.0-beta.5" +name = "bitflags" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65b7bb60840962ef0332f7ea01a57d73a24d2cb663708511ff800250bbfef569" -dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-utils", - "derive_more", - "futures-core", - "http", - "log", - "openssl", - "tokio-openssl", - "tokio-util 0.6.9", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "actix-utils" -version = "3.0.0" +name = "bitvec" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e491cbaac2e7fc788dfff99ff48ef317e23b3cf63dbaf7aaab6418f40f92aa94" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" dependencies = [ - "local-waker", - "pin-project-lite", + "funty", + "radium", + "tap", + "wyz", ] [[package]] -name = "actix-web" -version = "4.0.0-beta.6" +name = "blake2" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff12e933051557d700b0fcad20fe25b9ca38395cc87bbc5aeaddaef17b937a2f" +checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" dependencies = [ - "actix-codec", - "actix-http", - "actix-macros", - "actix-router", - "actix-rt", - "actix-server", - "actix-service", - "actix-tls", - "actix-utils", - "actix-web-codegen", - "ahash", - "bytes", - "cookie", - "derive_more", - "either", - "encoding_rs", - "futures-core", - "futures-util", - "itoa 0.4.8", - "language-tags", - "log", - "mime", - "once_cell", - "pin-project", - "regex", - "serde", - "serde_json", - "serde_urlencoded", - "smallvec", - "socket2", - "time 0.2.27", - "url", + "crypto-mac", + "digest 0.9.0", + "opaque-debug", ] [[package]] -name = "actix-web-codegen" -version = "0.5.0-beta.2" +name = "block-buffer" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f138ac357a674c3b480ddb7bbd894b13c1b6e8927d728bc9ea5e17eee2f8fc9" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "proc-macro2", - "quote", - "syn", + "generic-array", ] [[package]] -name = "actix_derive" -version = "0.6.0-beta.1" +name = "block-buffer" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae749cf2582eb83efd288edd4e9704600fdce1bc4f69aa0c86ca1368a3e4c13f" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ - "proc-macro2", - "quote", - "syn", + "generic-array", ] [[package]] -name = "addr2line" -version = "0.17.0" +name = "borsh" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" dependencies = [ - "gimli", + "borsh-derive", + "hashbrown 0.11.2", ] [[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.7.6" +name = "borsh-derive" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ - "getrandom 0.2.3", - "once_cell", - "version_check", + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn", ] [[package]] -name = "aho-corasick" -version = "0.7.18" +name = "borsh-derive-internal" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ - "memchr", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "ansi_term" -version = "0.12.1" +name = "borsh-schema-derive-internal" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ - "winapi", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "anyhow" -version = "1.0.56" +name = "bs58" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] -name = "arrayref" -version = "0.3.6" +name = "bumpalo" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] -name = "arrayvec" -version = "0.5.2" +name = "byte-slice-cast" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] -name = "arrayvec" -version = "0.7.1" +name = "byteorder" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] -name = "async-recursion" -version = "0.3.2" +name = "bytesize" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70" [[package]] -name = "async-trait" -version = "0.1.52" +name = "c2-chacha" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" dependencies = [ - "proc-macro2", - "quote", - "syn", + "cipher", + "ppv-lite86", ] [[package]] -name = "atty" -version = "0.2.14" +name = "cc" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] -name = "autocfg" -version = "0.1.7" +name = "cfg-if" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] -name = "autocfg" -version = "1.1.0" +name = "cfg-if" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "awc" -version = "3.0.0-beta.5" +name = "chrono" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bea03ceedb5bc5d1696f0d800dfcb81cf3d1991eed1c84ae00306eb74b2d70" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" dependencies = [ - "actix-codec", - "actix-http", - "actix-rt", - "actix-service", - "base64 0.13.0", - "bytes", - "cookie", - "derive_more", - "futures-core", - "itoa 0.4.8", - "log", - "mime", - "percent-encoding", - "pin-project-lite", - "rand 0.8.4", + "iana-time-zone", + "js-sys", + "num-integer", + "num-traits", "serde", - "serde_json", - "serde_urlencoded", + "time", + "wasm-bindgen", + "winapi", ] [[package]] -name = "aws-config" -version = "0.11.0" +name = "cipher" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91154572c69defdbe4ee7e7c86a0d1ad1f8c49655bedb7c6be61a7c1dc43105" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" dependencies = [ - "aws-http", - "aws-sdk-sso", - "aws-sdk-sts", - "aws-smithy-async", - "aws-smithy-client", - "aws-smithy-http", - "aws-smithy-http-tower", - "aws-smithy-json", - "aws-smithy-types", - "aws-types", - "bytes", - "hex", - "http", - "hyper", - "ring", - "tokio", - "tower", - "tracing", - "zeroize", + "generic-array", ] [[package]] -name = "aws-endpoint" -version = "0.11.0" +name = "clap" +version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "515bd0f038107827309daa28612941ff559e71a6e96335e336d4fdf4caffb34b" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ - "aws-smithy-http", - "aws-types", - "http", - "regex", - "tracing", + "atty", + "bitflags", + "clap_lex", + "indexmap", + "strsim", + "termcolor", + "textwrap", ] [[package]] -name = "aws-http" -version = "0.11.0" +name = "clap_lex" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1378c2c2430a063076621ec8c6435cdbd97b3e053111aebb52c9333fc793f32c" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" dependencies = [ - "aws-smithy-http", - "aws-smithy-types", - "aws-types", - "http", - "lazy_static", - "percent-encoding", - "tracing", + "os_str_bytes", ] [[package]] -name = "aws-sdk-s3" -version = "0.11.0" +name = "codespan-reporting" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e2c859c7420c8564b6eb964056abf508c10c0269cbd624ecc8c8de5c33446c" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ - "aws-endpoint", - "aws-http", - "aws-sig-auth", - "aws-sigv4", - "aws-smithy-async", - "aws-smithy-client", - "aws-smithy-eventstream", - "aws-smithy-http", - "aws-smithy-http-tower", - "aws-smithy-types", - "aws-smithy-xml", - "aws-types", - "bytes", - "http", - "md5", - "tokio-stream", - "tower", + "termcolor", + "unicode-width", ] [[package]] -name = "aws-sdk-sso" -version = "0.11.0" +name = "convert_case" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d74bff9a790eceb16a7825b11c4d9526fe6d3649349ba04beb5cb4770b7822b4" -dependencies = [ - "aws-endpoint", - "aws-http", - "aws-sig-auth", - "aws-smithy-async", - "aws-smithy-client", - "aws-smithy-http", - "aws-smithy-http-tower", - "aws-smithy-json", - "aws-smithy-types", - "aws-types", - "bytes", - "http", - "tokio-stream", - "tower", -] +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] -name = "aws-sdk-sts" -version = "0.11.0" +name = "core-foundation-sys" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e879f3619e0b444218ab76d28364d57b81820ad792fd58088ab675237e4d7b5f" -dependencies = [ - "aws-endpoint", - "aws-http", - "aws-sig-auth", - "aws-smithy-async", - "aws-smithy-client", - "aws-smithy-http", - "aws-smithy-http-tower", - "aws-smithy-query", - "aws-smithy-types", - "aws-smithy-xml", - "aws-types", - "bytes", - "http", - "tower", -] +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] -name = "aws-sig-auth" -version = "0.11.0" +name = "cpufeatures" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b44c7698294a89fabbadb538560ad34b6fdd26e926dee3c5e710928c3093fcf0" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ - "aws-sigv4", - "aws-smithy-eventstream", - "aws-smithy-http", - "aws-types", - "http", - "thiserror", - "tracing", + "libc", ] [[package]] -name = "aws-sigv4" -version = "0.11.0" +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fe0aee7539298b8447e1a60d2d6de329fb1619f116c5f488e0b3aa136d49696" -dependencies = [ - "aws-smithy-eventstream", - "aws-smithy-http", - "bytes", - "form_urlencoded", - "hex", - "http", - "once_cell", - "percent-encoding", - "regex", - "ring", - "time 0.3.7", - "tracing", -] +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "aws-smithy-async" -version = "0.41.0" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dcbf7d119f514a627d236412626645c4378b126e30dc61db9de3e069fa1676" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "futures-util", - "pin-project-lite", - "tokio", - "tokio-stream", + "generic-array", + "typenum", ] [[package]] -name = "aws-smithy-client" -version = "0.41.0" +name = "crypto-mac" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511ac6c65f2a89cfcd74fe78aa6d07216095a53cbaeab493b17f6df82cd65b86" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-http-tower", - "aws-smithy-types", - "bytes", - "fastrand", - "http", - "http-body", - "hyper", - "hyper-rustls", - "lazy_static", - "pin-project", - "pin-project-lite", - "tokio", - "tower", - "tracing", + "generic-array", + "subtle", ] [[package]] -name = "aws-smithy-eventstream" -version = "0.41.0" +name = "curve25519-dalek" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703e7d99d80156d5a41a3996a985701650ccb0d5edaf441ca40bda199d34284e" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ - "aws-smithy-types", - "bytes", - "crc32fast", + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", ] [[package]] -name = "aws-smithy-http" -version = "0.41.0" +name = "cxx" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d800c8684fa567cdf1abd9654c7997b2a887e7b06022938756193472ec7ec251" +checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579" dependencies = [ - "aws-smithy-eventstream", - "aws-smithy-types", - "bytes", - "bytes-utils", - "futures-core", - "http", - "http-body", - "hyper", - "once_cell", - "percent-encoding", - "pin-project", - "tokio", - "tokio-util 0.6.9", - "tracing", -] - -[[package]] -name = "aws-smithy-http-tower" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8017959786cce64e690214d303d062c97fcd38a68df7cb444255e534c9bbce49" -dependencies = [ - "aws-smithy-http", - "bytes", - "http", - "http-body", - "pin-project", - "tower", - "tracing", + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", ] [[package]] -name = "aws-smithy-json" -version = "0.41.0" +name = "cxx-build" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3796e2a4a3b7d15db2fd5aec2de9220919332648f0a56a77b5c53caf4a9653fa" +checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70" dependencies = [ - "aws-smithy-types", + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", ] [[package]] -name = "aws-smithy-query" -version = "0.41.0" +name = "cxxbridge-flags" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76694d1a2dacefa347b921c61bf64b5cc493a898971b3c18fa636ce1788ceabe" -dependencies = [ - "aws-smithy-types", - "urlencoding", -] +checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c" [[package]] -name = "aws-smithy-types" -version = "0.41.0" +name = "cxxbridge-macro" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c7f957a2250cc0fa4ccf155e00aeac9a81f600df7cd4ecc910c75030e6534f5" +checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5" dependencies = [ - "itoa 1.0.1", - "num-integer", - "ryu", - "time 0.3.7", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "aws-smithy-xml" -version = "0.41.0" +name = "derive_more" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b01d77433f248d9a2b08f519b403d6aa8435bf144b5d8585862f8dd599eb843" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "thiserror", - "xmlparser", + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn", ] [[package]] -name = "aws-types" -version = "0.11.0" +name = "digest" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "394d5c945b747ab3292b94509b78c91191aacfd1deacbcd58371d6f61f8be78a" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "aws-smithy-async", - "aws-smithy-client", - "aws-smithy-http", - "aws-smithy-types", - "http", - "rustc_version 0.4.0", - "tracing", - "zeroize", + "generic-array", ] [[package]] -name = "backtrace" -version = "0.3.64" +name = "digest" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "addr2line", - "cc", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", + "block-buffer 0.10.3", + "crypto-common", ] [[package]] -name = "base-x" -version = "0.2.8" +name = "dyn-clone" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" +checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" [[package]] -name = "base64" -version = "0.11.0" +name = "easy-ext" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" +checksum = "53aff6fdc1b181225acdcb5b14c47106726fd8e486707315b1b138baed68ee31" [[package]] -name = "base64" -version = "0.13.0" +name = "ed25519" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" +dependencies = [ + "signature", +] [[package]] -name = "bigdecimal" -version = "0.1.2" +name = "ed25519-dalek" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1374191e2dd25f9ae02e3aa95041ed5d747fc77b3c102b49fe2dd9a8117a6244" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ - "num-bigint 0.2.6", - "num-integer", - "num-traits", + "curve25519-dalek", + "ed25519", + "rand 0.7.3", "serde", + "sha2 0.9.9", + "zeroize", ] [[package]] -name = "bincode" -version = "1.3.3" +name = "either" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" + +[[package]] +name = "factory" +version = "0.1.0" dependencies = [ - "serde", + "mintbase-deps", ] [[package]] -name = "bindgen" -version = "0.59.2" +name = "fixed-hash" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", ] [[package]] -name = "bitflags" -version = "1.3.2" +name = "funty" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" [[package]] -name = "bitvec" -version = "0.20.4" +name = "generic-array" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ - "funty", - "radium", - "tap", - "wyz", + "typenum", + "version_check", ] [[package]] -name = "blake2" -version = "0.9.2" +name = "getrandom" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "crypto-mac", - "digest 0.9.0", - "opaque-debug", + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] -name = "blake3" -version = "0.3.8" +name = "getrandom" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "cc", - "cfg-if 0.1.10", - "constant_time_eq", - "crypto-mac", - "digest 0.9.0", + "cfg-if 1.0.0", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] -name = "block-buffer" -version = "0.9.0" +name = "hashbrown" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "block-padding", - "generic-array 0.14.4", + "ahash", ] [[package]] -name = "block-buffer" -version = "0.10.2" +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + +[[package]] +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ - "generic-array 0.14.4", + "libc", ] [[package]] -name = "block-padding" -version = "0.2.1" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "borsh" -version = "0.9.2" +name = "iana-time-zone" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c9d0958efb8301e1626692ea879cbff622ef45cf731807ec8d488b34be98cb8" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" dependencies = [ - "borsh-derive", - "hashbrown", + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "winapi", ] [[package]] -name = "borsh-derive" -version = "0.9.2" +name = "iana-time-zone-haiku" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325164710ad57bae6d32455ce3bd384f95768464a927ce145626dc3390a7f9fe" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" dependencies = [ - "borsh-derive-internal", - "borsh-schema-derive-internal", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn", + "cxx", + "cxx-build", ] [[package]] -name = "borsh-derive-internal" -version = "0.9.2" +name = "impl-codec" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f74159f43b231f4af8c4ce4967fef76e4e59725acf51706ddb9268c94348d15c" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" dependencies = [ - "proc-macro2", - "quote", - "syn", + "parity-scale-codec", ] [[package]] -name = "borsh-schema-derive-internal" -version = "0.9.2" +name = "impl-trait-for-tuples" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99b2a77771907a820a860d200d193a0787c79a7890c8e253c462fa0f51ad58b6" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", @@ -899,5804 +599,1004 @@ dependencies = [ ] [[package]] -name = "brotli-sys" -version = "0.3.2" +name = "indexmap" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "cc", - "libc", + "autocfg", + "hashbrown 0.12.3", ] [[package]] -name = "brotli2" -version = "0.3.2" +name = "itertools" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ - "brotli-sys", - "libc", + "either", ] [[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - -[[package]] -name = "bumpalo" -version = "3.8.0" +name = "itoa" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] -name = "byte-slice-cast" -version = "1.2.0" +name = "js-sys" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d30c751592b77c499e7bce34d99d67c2c11bdc0574e9a488ddade14150a4698" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] [[package]] -name = "bytecheck" -version = "0.6.7" +name = "keccak" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "314889ea31cda264cb7c3d6e6e5c9415a987ecb0e72c17c00d36fbb881d34abe" +checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" dependencies = [ - "bytecheck_derive", - "ptr_meta", + "cpufeatures", ] [[package]] -name = "bytecheck_derive" -version = "0.6.7" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a2b3b92c135dae665a6f760205b89187638e83bed17ef3e44e83c712cf30600" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "proc-macro2", - "quote", - "syn", + "spin", ] [[package]] -name = "byteorder" -version = "1.4.3" +name = "libc" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] -name = "bytes" -version = "1.1.0" +name = "link-cplusplus" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +dependencies = [ + "cc", +] [[package]] -name = "bytes-utils" -version = "0.1.2" +name = "log" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1934a3ef9cac8efde4966a92781e77713e1ba329f1d42e446c7d7eba340d8ef1" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "bytes", - "either", + "cfg-if 1.0.0", ] [[package]] -name = "bytesize" -version = "1.1.0" +name = "memory_units" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" [[package]] -name = "bytestring" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90706ba19e97b90786e19dc0d5e2abd80008d99d4c0c5d1ad0b5e72cec7c494d" +name = "mintbase-deps" +version = "0.1.0" dependencies = [ - "bytes", + "clap", + "ed25519-dalek", + "near-sdk", + "near_events", + "serde", + "serde_json", ] [[package]] -name = "c2-chacha" -version = "0.3.2" +name = "near-abi" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f1a1e56adbcfb7a96c51ec42e37a22ee5cda66c0eae80f9b94ff68a71d4759" +checksum = "885db39b08518fa700b73fa2214e8adbbfba316ba82dd510f50519173eadaf73" dependencies = [ - "cipher", - "ppv-lite86", + "borsh", + "schemars", + "semver", + "serde", ] [[package]] -name = "cc" -version = "1.0.71" +name = "near-account-id" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" +checksum = "71d258582a1878e6db67400b0504a5099db85718d22c2e07f747fe1706ae7150" dependencies = [ - "jobserver", + "borsh", + "serde", ] [[package]] -name = "cexpr" -version = "0.6.0" +name = "near-crypto" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +checksum = "1e75673d69fd7365508f3d32483669fe45b03bfb34e4d9363e90adae9dfb416c" dependencies = [ - "nom", + "arrayref", + "blake2", + "borsh", + "bs58", + "c2-chacha", + "curve25519-dalek", + "derive_more", + "ed25519-dalek", + "near-account-id", + "once_cell", + "parity-secp256k1", + "primitive-types", + "rand 0.7.3", + "rand_core 0.5.1", + "serde", + "serde_json", + "subtle", + "thiserror", ] [[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[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.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "serde", - "time 0.1.43", - "winapi", -] - -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array 0.14.4", -] - -[[package]] -name = "clang-sys" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10612c0ec0e0a1ff0e97980647cb058a6e7aedb913d01d009c406b8b7d0b26ee" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "3.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123" -dependencies = [ - "atty", - "bitflags", - "clap_derive", - "indexmap", - "lazy_static", - "os_str_bytes", - "strsim", - "termcolor", - "textwrap", -] - -[[package]] -name = "clap_derive" -version = "3.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16" -dependencies = [ - "heck 0.4.0", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "conqueue" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac4306c796b95d3964b94fa65018a57daee08b45a54b86a4f64910426427b66" - -[[package]] -name = "console" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "regex", - "terminal_size", - "unicode-width", - "winapi", -] - -[[package]] -name = "const_fn" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92cfa0fd5690b3cf8c1ef2cabbd9b7ef22fa53cf5e1f92b05103f6d5d1cf6e7" - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[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.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f1c7727e460397e56abc4bddc1d49e07a1ad78fc98eb2e1c8f032a58a2f80d" -dependencies = [ - "percent-encoding", - "time 0.2.27", - "version_check", -] - -[[package]] -name = "core-foundation" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - -[[package]] -name = "cpp_demangle" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea47428dc9d2237f3c6bc134472edfd63ebba0af932e783506dcfd66f10d18a" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "cpufeatures" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" -dependencies = [ - "libc", -] - -[[package]] -name = "cranelift-bforest" -version = "0.80.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9516ba6b2ba47b4cbf63b713f75b432fafa0a0e0464ec8381ec76e6efe931ab3" -dependencies = [ - "cranelift-entity", -] - -[[package]] -name = "cranelift-codegen" -version = "0.80.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489e5d0081f7edff6be12d71282a8bf387b5df64d5592454b75d662397f2d642" -dependencies = [ - "cranelift-bforest", - "cranelift-codegen-meta", - "cranelift-codegen-shared", - "cranelift-entity", - "gimli", - "log", - "regalloc", - "smallvec", - "target-lexicon 0.12.2", -] - -[[package]] -name = "cranelift-codegen-meta" -version = "0.80.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36ee1140371bb0f69100e734b30400157a4adf7b86148dee8b0a438763ead48" -dependencies = [ - "cranelift-codegen-shared", -] - -[[package]] -name = "cranelift-codegen-shared" -version = "0.80.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "981da52d8f746af1feb96290c83977ff8d41071a7499e991d8abae0d4869f564" - -[[package]] -name = "cranelift-entity" -version = "0.80.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2906740053dd3bcf95ce53df0fd9b5649c68ae4bd9adada92b406f059eae461" -dependencies = [ - "serde", -] - -[[package]] -name = "cranelift-frontend" -version = "0.80.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cb156de1097f567d46bf57a0cd720a72c3e15e1a2bd8b1041ba2fc894471b7" -dependencies = [ - "cranelift-codegen", - "log", - "smallvec", - "target-lexicon 0.12.2", -] - -[[package]] -name = "cranelift-native" -version = "0.80.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "166028ca0343a6ee7bddac0e70084e142b23f99c701bd6f6ea9123afac1a7a46" -dependencies = [ - "cranelift-codegen", - "libc", - "target-lexicon 0.12.2", -] - -[[package]] -name = "cranelift-wasm" -version = "0.80.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5012a1cde0c8b3898770b711490d803018ae9bec2d60674ba0e5b2058a874f80" -dependencies = [ - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "itertools", - "log", - "smallvec", - "wasmparser 0.81.0", - "wasmtime-types", -] - -[[package]] -name = "crc32fast" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", - "lazy_static", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" -dependencies = [ - "cfg-if 1.0.0", - "lazy_static", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-common" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" -dependencies = [ - "generic-array 0.14.4", - "typenum", -] - -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array 0.14.4", - "subtle", -] - -[[package]] -name = "ct-logs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" -dependencies = [ - "sct", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - -[[package]] -name = "darling" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "757c0ded2af11d8e739c4daea1ac623dd1624b06c844cf3f5a39f1bdbd99bb12" -dependencies = [ - "darling_core 0.13.0", - "darling_macro 0.13.0", -] - -[[package]] -name = "darling" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02" -dependencies = [ - "darling_core 0.14.1", - "darling_macro 0.14.1", -] - -[[package]] -name = "darling_core" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c34d8efb62d0c2d7f60ece80f75e5c63c1588ba68032740494b0b9a996466e3" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_core" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade7bff147130fe5e6d39f089c6bd49ec0250f35d70b2eebf72afdfc919f15cc" -dependencies = [ - "darling_core 0.13.0", - "quote", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5" -dependencies = [ - "darling_core 0.14.1", - "quote", - "syn", -] - -[[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" -dependencies = [ - "darling 0.14.1", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "derive_builder_macro" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" -dependencies = [ - "derive_builder_core", - "syn", -] - -[[package]] -name = "derive_more" -version = "0.99.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc7b9cef1e351660e5443924e4f43ab25fbbed3e9a5f052df3677deb4d6b320" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "diesel" -version = "1.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b28135ecf6b7d446b43e27e225622a038cc4e2930a1022f51cdb97ada19b8e4d" -dependencies = [ - "bigdecimal", - "bitflags", - "byteorder", - "chrono", - "diesel_derives", - "num-bigint 0.2.6", - "num-integer", - "num-traits", - "pq-sys", - "r2d2", - "serde_json", - "uuid", -] - -[[package]] -name = "diesel_derives" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "diesel_migrations" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf3cde8413353dc7f5d72fa8ce0b99a560a359d2c5ef1e5817ca731cd9008f4c" -dependencies = [ - "migrations_internals", - "migrations_macros", -] - -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.4", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array 0.14.4", -] - -[[package]] -name = "digest" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" -dependencies = [ - "block-buffer 0.10.2", - "crypto-common", - "subtle", -] - -[[package]] -name = "dirs" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - -[[package]] -name = "dotenv" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" - -[[package]] -name = "dtoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" - -[[package]] -name = "dynasm" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdc2d9a5e44da60059bd38db2d05cbb478619541b8c79890547861ec1e3194f0" -dependencies = [ - "bitflags", - "byteorder", - "lazy_static", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "dynasmrt" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42276e3f205fe63887cca255aa9a65a63fb72764c30b9a6252a7c7e46994f689" -dependencies = [ - "byteorder", - "dynasm", - "memmap2 0.2.3", -] - -[[package]] -name = "easy-ext" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53aff6fdc1b181225acdcb5b14c47106726fd8e486707315b1b138baed68ee31" - -[[package]] -name = "ed25519" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand 0.7.3", - "serde", - "sha2 0.9.8", - "zeroize", -] - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "elastic-array" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d63720ea2bc2e1b79f7aa044d9dc0b825f9ccb6930b32120f8fb9e873aa84bc" -dependencies = [ - "heapsize", -] - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "encoding_rs" -version = "0.8.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "enumset" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e76129da36102af021b8e5000dab2c1c30dbef85c1e482beeff8da5dde0e0b0" -dependencies = [ - "enumset_derive", -] - -[[package]] -name = "enumset_derive" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6451128aa6655d880755345d085494cf7561a6bee7c8dc821e5d77e6d267ecd4" -dependencies = [ - "darling 0.13.0", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "factory" -version = "0.1.0" -dependencies = [ - "mintbase-deps", -] - -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - -[[package]] -name = "fastrand" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" -dependencies = [ - "instant", -] - -[[package]] -name = "fixed-hash" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" -dependencies = [ - "byteorder", - "rand 0.8.4", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "flate2" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" -dependencies = [ - "cfg-if 1.0.0", - "crc32fast", - "libc", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" -dependencies = [ - "matches", - "percent-encoding", -] - -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - -[[package]] -name = "futures" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" - -[[package]] -name = "futures-executor" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" - -[[package]] -name = "futures-macro" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" -dependencies = [ - "autocfg 1.1.0", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" - -[[package]] -name = "futures-task" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" - -[[package]] -name = "futures-util" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" -dependencies = [ - "autocfg 1.1.0", - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "proc-macro-hack", - "proc-macro-nested", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - -[[package]] -name = "generic-array" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.10.2+wasi-snapshot-preview1", -] - -[[package]] -name = "gimli" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" -dependencies = [ - "fallible-iterator", - "indexmap", - "stable_deref_trait", -] - -[[package]] -name = "glob" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" - -[[package]] -name = "h2" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62eeb471aa3e3c9197aa4bfeabfe02982f6dc96f750486c0bb0009ac58b26d2b" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util 0.6.9", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hdrhistogram" -version = "7.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31672b7011be2c4f7456c4ddbcb40e7e9a4a9fad8efe49a6ebaf5f307d0109c0" -dependencies = [ - "base64 0.13.0", - "byteorder", - "crossbeam-channel", - "flate2", - "nom", - "num-traits", -] - -[[package]] -name = "heapsize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" -dependencies = [ - "winapi", -] - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - -[[package]] -name = "helper" -version = "0.1.0" -dependencies = [ - "mintbase-deps", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.3", -] - -[[package]] -name = "http" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" -dependencies = [ - "bytes", - "fnv", - "itoa 1.0.1", -] - -[[package]] -name = "http-body" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6330e8a36bd8c859f3fa6d9382911fbb7147ec39807f63b923933a247240b9ba" - -[[package]] -name = "httpdate" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" - -[[package]] -name = "hyper" -version = "0.14.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa 1.0.1", - "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", - "rustls-native-certs", - "tokio", - "tokio-rustls", - "webpki", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[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.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "impl-codec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "indexmap" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" -dependencies = [ - "autocfg 1.1.0", - "hashbrown", - "serde", -] - -[[package]] -name = "indicatif" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" -dependencies = [ - "console", - "lazy_static", - "number_prefix", - "regex", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "io-lifetimes" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ef6787e7f0faedc040f95716bdd0e62bcfcf4ba93da053b62dea2691c13864" -dependencies = [ - "winapi", -] - -[[package]] -name = "ipnet" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e70ee094dc02fd9c13fdad4940090f22dbd6ac7c9e7094a46cf0232a50bc7c" - -[[package]] -name = "itertools" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "itoa" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" - -[[package]] -name = "jobserver" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "keccak" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - -[[package]] -name = "lazy-static-include" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6002fe04202bdaf9e8d82929a7c9ebfcf47d027d87f671818e8cf9ccb4029908" -dependencies = [ - "lazy_static", - "manifest-dir-macros", - "syn", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - -[[package]] -name = "libc" -version = "0.2.112" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" - -[[package]] -name = "libloading" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cf036d15402bea3c5d4de17b3fce76b3e4a56ebc1f577be0e7a72f7c607cf0" -dependencies = [ - "cfg-if 1.0.0", - "winapi", -] - -[[package]] -name = "librocksdb-sys" -version = "6.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d" -dependencies = [ - "bindgen", - "cc", - "glob", - "libc", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" - -[[package]] -name = "linux-raw-sys" -version = "0.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a261afc61b7a5e323933b402ca6a1765183687c614789b1e4db7762ed4230bca" - -[[package]] -name = "local-channel" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6246c68cf195087205a0512559c97e15eaf95198bf0e206d662092cdcb03fe9f" -dependencies = [ - "futures-core", - "futures-sink", - "futures-util", - "local-waker", -] - -[[package]] -name = "local-waker" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f9a2d3e27ce99ce2c3aad0b09b1a7b916293ea9b2bf624c13fe646fadd8da4" - -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "lock_api" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" -dependencies = [ - "autocfg 1.1.0", - "scopeguard", - "serde", -] - -[[package]] -name = "log" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "loupe" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" -dependencies = [ - "indexmap", - "loupe-derive", - "rustversion", -] - -[[package]] -name = "loupe-derive" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "lru" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "274353858935c992b13c0ca408752e2121da852d07dec7ce5f108c77dfa14d1f" -dependencies = [ - "hashbrown", -] - -[[package]] -name = "lzma-sys" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb4b7c3eddad11d3af9e86c487607d2d2442d185d848575365c4856ba96d619" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "mach" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" -dependencies = [ - "libc", -] - -[[package]] -name = "manifest-dir-macros" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca7bbc41d799583acd24ed05a9c3db3c9275c93491b4e7cde0e609bb9598f2f0" -dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "matchers" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" -dependencies = [ - "regex-automata", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata", -] - -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "md-5" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658646b21e0b72f7866c7038ab086d3d5e1cd6271f060fd37defb241949d0582" -dependencies = [ - "digest 0.10.3", -] - -[[package]] -name = "md5" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" - -[[package]] -name = "memchr" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" - -[[package]] -name = "memmap" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "memmap2" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723e3ebdcdc5c023db1df315364573789f8857c11b631a2fdfad7c00f5c046b4" -dependencies = [ - "libc", -] - -[[package]] -name = "memmap2" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" -dependencies = [ - "autocfg 1.1.0", -] - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - -[[package]] -name = "migrations_internals" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b4fc84e4af020b837029e017966f86a1c2d5e83e64b589963d5047525995860" -dependencies = [ - "diesel", -] - -[[package]] -name = "migrations_macros" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9753f12909fd8d923f75ae5c3258cae1ed3c8ec052e1b38c93c21a6d157f789c" -dependencies = [ - "migrations_internals", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg 1.1.0", -] - -[[package]] -name = "mintbase-deps" -version = "0.1.0" -dependencies = [ - "clap", - "near-sdk", - "near_events 0.1.0 (git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b)", - "serde", - "serde_json", -] - -[[package]] -name = "mintbase-near-indexer" -version = "0.6.5" -dependencies = [ - "actix", - "actix-diesel", - "actix-http", - "actix-tls", - "actix-web", - "actix_derive", - "anyhow", - "bigdecimal", - "chrono", - "clap", - "diesel", - "diesel_migrations", - "dotenv", - "futures", - "hyper", - "mintbase-deps", - "near-account-id 0.0.0", - "near-client-primitives 0.0.0", - "near-crypto 0.0.0", - "near-indexer", - "near-jsonrpc-client 0.1.0", - "near-jsonrpc-primitives 0.0.0", - "near-lake-framework", - "near-primitives 0.0.0", - "near_events 0.1.0 (git+https://github.com/mintbase/near-events?rev=6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7)", - "openssl-probe", - "rayon", - "reqwest", - "tokio", - "tokio-postgres", - "tokio-stream", - "tower", - "tracing", - "tracing-subscriber 0.3.11", - "uuid", -] - -[[package]] -name = "mio" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" -dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", -] - -[[package]] -name = "more-asserts" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" - -[[package]] -name = "native-tls" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "near-account-id" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "borsh", - "serde", -] - -[[package]] -name = "near-account-id" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fbe33ba04b086e082aabe4167f03d8e7f5af2db4fffb5e6061226e46e7f5ff" -dependencies = [ - "borsh", - "serde", -] - -[[package]] -name = "near-account-id" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd61f43cedc1bb7a7c097ef3adbab0092a51185dca0e48d5851b37818e13978" -dependencies = [ - "borsh", - "serde", -] - -[[package]] -name = "near-account-id" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b81ee2cf429b8bc04046d94f725a4f192fe7b13f42d76649d0177fd9ea719d8" -dependencies = [ - "borsh", - "serde", -] - -[[package]] -name = "near-cache" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "lru", -] - -[[package]] -name = "near-chain" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "borsh", - "chrono", - "failure", - "failure_derive", - "itertools", - "lru", - "near-chain-configs 0.0.0", - "near-chain-primitives 0.0.0", - "near-crypto 0.0.0", - "near-metrics 0.0.0", - "near-pool", - "near-primitives 0.0.0", - "near-store", - "num-rational", - "once_cell", - "rand 0.7.3", - "rayon", - "strum", - "thiserror", - "tracing", -] - -[[package]] -name = "near-chain-configs" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "anyhow", - "chrono", - "derive_more", - "near-crypto 0.0.0", - "near-primitives 0.0.0", - "num-rational", - "serde", - "serde_json", - "sha2 0.9.8", - "smart-default", - "tracing", -] - -[[package]] -name = "near-chain-configs" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c229496a676c08440e3566e09d05f472dd9b3bd5885cc24b5634ffac145842" -dependencies = [ - "chrono", - "derive_more", - "near-crypto 0.5.0", - "near-primitives 0.5.0", - "num-rational", - "serde", - "serde_json", - "sha2 0.9.8", - "smart-default", - "tracing", -] - -[[package]] -name = "near-chain-primitives" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "chrono", - "failure", - "failure_derive", - "log", - "near-crypto 0.0.0", - "near-primitives 0.0.0", - "thiserror", -] - -[[package]] -name = "near-chain-primitives" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9ff481b515b4399b74d18f63c34f9860a843d904ebf77cd7b86f9a8323737d4" -dependencies = [ - "chrono", - "failure", - "failure_derive", - "log", - "near-crypto 0.5.0", - "near-primitives 0.5.0", - "thiserror", -] - -[[package]] -name = "near-chunks" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "borsh", - "chrono", - "futures", - "log", - "lru", - "near-chain", - "near-chunks-primitives 0.0.0", - "near-crypto 0.0.0", - "near-network", - "near-network-primitives 0.0.0", - "near-pool", - "near-primitives 0.0.0", - "near-store", - "rand 0.7.3", - "reed-solomon-erasure", -] - -[[package]] -name = "near-chunks-primitives" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "near-chain-primitives 0.0.0", -] - -[[package]] -name = "near-chunks-primitives" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdf2e3c24a5092b58aa114120c4d533811d595461196a2e6ec05dfdedcc179d" -dependencies = [ - "near-chain-primitives 0.5.0", -] - -[[package]] -name = "near-client" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "actix-rt", - "ansi_term", - "borsh", - "chrono", - "futures", - "log", - "lru", - "near-chain", - "near-chain-configs 0.0.0", - "near-chunks", - "near-client-primitives 0.0.0", - "near-crypto 0.0.0", - "near-metrics 0.0.0", - "near-network", - "near-network-primitives 0.0.0", - "near-performance-metrics", - "near-performance-metrics-macros", - "near-pool", - "near-primitives 0.0.0", - "near-store", - "near-telemetry", - "num-rational", - "once_cell", - "rand 0.7.3", - "reed-solomon-erasure", - "serde_json", - "strum", - "sysinfo", - "thiserror", -] - -[[package]] -name = "near-client-primitives" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "chrono", - "near-chain-configs 0.0.0", - "near-chain-primitives 0.0.0", - "near-chunks-primitives 0.0.0", - "near-crypto 0.0.0", - "near-network-primitives 0.0.0", - "near-primitives 0.0.0", - "strum", - "thiserror", -] - -[[package]] -name = "near-client-primitives" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e37fedeee10f1da6d3ab854705346b7f0ad6d142c2049a4a14e76d349ad6f6a" -dependencies = [ - "actix", - "chrono", - "near-chain-configs 0.5.0", - "near-chain-primitives 0.5.0", - "near-chunks-primitives 0.5.0", - "near-crypto 0.5.0", - "near-network-primitives 0.5.0", - "near-primitives 0.5.0", - "serde", - "strum", - "thiserror", -] - -[[package]] -name = "near-crypto" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "arrayref", - "blake2", - "borsh", - "bs58", - "c2-chacha", - "curve25519-dalek", - "derive_more", - "ed25519-dalek", - "libc", - "near-account-id 0.0.0", - "once_cell", - "parity-secp256k1", - "primitive-types", - "rand 0.7.3", - "rand_core 0.5.1", - "serde", - "serde_json", - "subtle", - "thiserror", -] - -[[package]] -name = "near-crypto" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e44231c19aa95e0ff3b1a46209a8edb44f5e02fca8a60a19386ba38b2ee1942" -dependencies = [ - "arrayref", - "blake2", - "borsh", - "bs58", - "c2-chacha", - "curve25519-dalek", - "derive_more", - "ed25519-dalek", - "lazy_static", - "libc", - "near-account-id 0.5.0", - "parity-secp256k1", - "primitive-types", - "rand 0.7.3", - "rand_core 0.5.1", - "serde", - "serde_json", - "subtle", - "thiserror", -] - -[[package]] -name = "near-crypto" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f68d8d55bd2a457eba5956d8c1255e288c47f394ca6fffe6184d19664bf0bc4c" -dependencies = [ - "arrayref", - "blake2", - "borsh", - "bs58", - "c2-chacha", - "curve25519-dalek", - "derive_more", - "ed25519-dalek", - "lazy_static", - "libc", - "near-account-id 0.10.0", - "parity-secp256k1", - "primitive-types", - "rand 0.7.3", - "rand_core 0.5.1", - "serde", - "serde_json", - "subtle", - "thiserror", -] - -[[package]] -name = "near-crypto" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d301d3ca4f59ab69c4b8ff625e7b2ef624345f69ab651d15c5fd59382096d2b1" -dependencies = [ - "arrayref", - "blake2", - "borsh", - "bs58", - "c2-chacha", - "curve25519-dalek", - "derive_more", - "ed25519-dalek", - "libc", - "near-account-id 0.12.0", - "once_cell", - "parity-secp256k1", - "primitive-types", - "rand 0.7.3", - "rand_core 0.5.1", - "serde", - "serde_json", - "subtle", - "thiserror", -] - -[[package]] -name = "near-epoch-manager" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "borsh", - "log", - "lru", - "near-chain", - "near-chain-configs 0.0.0", - "near-crypto 0.0.0", - "near-primitives 0.0.0", - "near-store", - "num-rational", - "primitive-types", - "rand 0.6.5", - "rand 0.7.3", - "serde_json", - "smart-default", -] - -[[package]] -name = "near-event-data-log-macro" -version = "0.1.0" -source = "git+https://github.com/mintbase/near-events?rev=6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7#6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7" -dependencies = [ - "itertools", - "proc-macro-support 0.1.0 (git+https://github.com/mintbase/near-events?rev=6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7)", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "near-event-data-log-macro" -version = "0.1.0" -source = "git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b#bd78dcaeaa11f6f6286bbbed97d835370783c30b" -dependencies = [ - "itertools", - "proc-macro-support 0.1.0 (git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b)", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "near-event-data-macro" -version = "0.1.0" -source = "git+https://github.com/mintbase/near-events?rev=6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7#6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7" -dependencies = [ - "itertools", - "proc-macro-support 0.1.0 (git+https://github.com/mintbase/near-events?rev=6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7)", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "near-event-data-macro" -version = "0.1.0" -source = "git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b#bd78dcaeaa11f6f6286bbbed97d835370783c30b" -dependencies = [ - "itertools", - "proc-macro-support 0.1.0 (git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b)", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "near-indexer" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "anyhow", - "async-recursion", - "futures", - "near-chain-configs 0.0.0", - "near-client", - "near-crypto 0.0.0", - "near-primitives 0.0.0", - "nearcore", - "node-runtime", - "rocksdb", - "serde", - "serde_json", - "tokio", - "tracing", -] - -[[package]] -name = "near-indexer-primitives" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c3e351572f1d5259afda836fb915262e0dc9a550b0e0412b5bc69d30b0b7f8" -dependencies = [ - "near-primitives 0.12.0", - "serde", - "serde_json", -] - -[[package]] -name = "near-jsonrpc" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "actix-cors", - "actix-web", - "easy-ext", - "futures", - "near-chain-configs 0.0.0", - "near-client", - "near-jsonrpc-client 0.0.0", - "near-jsonrpc-primitives 0.0.0", - "near-metrics 0.0.0", - "near-network", - "near-network-primitives 0.0.0", - "near-primitives 0.0.0", - "near-rpc-error-macro 0.0.0", - "once_cell", - "prometheus", - "serde", - "serde_json", - "tokio", - "tracing", -] - -[[package]] -name = "near-jsonrpc-client" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix-http", - "awc", - "futures", - "near-jsonrpc-primitives 0.0.0", - "near-primitives 0.0.0", - "serde", - "serde_json", - "uuid", -] - -[[package]] -name = "near-jsonrpc-client" -version = "0.1.0" -source = "git+https://github.com/near/near-jsonrpc-client-rs?rev=dd7761b51e1775350be1782370aa22c0b0fe98d7#dd7761b51e1775350be1782370aa22c0b0fe98d7" -dependencies = [ - "borsh", - "lazy_static", - "near-chain-configs 0.5.0", - "near-client-primitives 0.5.0", - "near-jsonrpc-primitives 0.5.0", - "near-primitives 0.5.0", - "reqwest", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "near-jsonrpc-primitives" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "near-chain-configs 0.0.0", - "near-client-primitives 0.0.0", - "near-crypto 0.0.0", - "near-metrics 0.0.0", - "near-network-primitives 0.0.0", - "near-primitives 0.0.0", - "near-primitives-core 0.0.0", - "near-rpc-error-macro 0.0.0", - "once_cell", - "serde", - "serde_json", - "thiserror", - "tracing", - "uuid", -] - -[[package]] -name = "near-jsonrpc-primitives" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e47ebf93ecb3d5b2a5e4a7e7986d2772dd6d98712ec6844efd8948c25673f06f" -dependencies = [ - "actix", - "lazy_static", - "near-chain-configs 0.5.0", - "near-client-primitives 0.5.0", - "near-crypto 0.5.0", - "near-metrics 0.5.0", - "near-primitives 0.5.0", - "near-primitives-core 0.5.0", - "near-rpc-error-macro 0.5.0", - "serde", - "serde_json", - "thiserror", - "tracing", - "uuid", -] - -[[package]] -name = "near-lake-framework" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fdb33a58d29c1b993f3b72b28adb4e138e38a708f0e2da2dd27ebb2c7a1d1ae" -dependencies = [ - "anyhow", - "aws-config", - "aws-endpoint", - "aws-sdk-s3", - "aws-smithy-http", - "aws-types", - "derive_builder", - "futures", - "itertools", - "near-indexer-primitives", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tracing", - "tracing-subscriber 0.2.25", -] - -[[package]] -name = "near-metrics" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "lazy_static", - "log", - "prometheus", -] - -[[package]] -name = "near-metrics" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e833372067545d0bb84015f283ad05f13f5a2cdd4ec2d9bbbce76915bf9d0502" -dependencies = [ - "lazy_static", - "log", - "prometheus", -] - -[[package]] -name = "near-network" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "borsh", - "bytes", - "bytesize", - "conqueue", - "futures", - "itertools", - "lru", - "near-crypto 0.0.0", - "near-metrics 0.0.0", - "near-network-primitives 0.0.0", - "near-performance-metrics", - "near-performance-metrics-macros", - "near-primitives 0.0.0", - "near-rate-limiter", - "near-store", - "once_cell", - "rand 0.7.3", - "strum", - "tokio", - "tokio-stream", - "tokio-util 0.6.9", - "tracing", -] - -[[package]] -name = "near-network-primitives" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "actix_derive", - "anyhow", - "borsh", - "chrono", - "near-crypto 0.0.0", - "near-primitives 0.0.0", - "strum", - "tokio", - "tracing", -] - -[[package]] -name = "near-network-primitives" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1629497107e6b2e003e8b90ae1ddda9f661c9030baf5c2a3d58bc589a525d752" -dependencies = [ - "actix", - "borsh", - "chrono", - "near-crypto 0.5.0", - "near-primitives 0.5.0", - "serde", - "strum", - "tokio", - "tracing", -] - -[[package]] -name = "near-performance-metrics" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "bitflags", - "bytes", - "bytesize", - "futures", - "libc", - "log", - "once_cell", - "strum", - "tokio", - "tokio-util 0.6.9", -] - -[[package]] -name = "near-performance-metrics-macros" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "near-pool" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "borsh", - "near-crypto 0.0.0", - "near-metrics 0.0.0", - "near-primitives 0.0.0", - "once_cell", - "rand 0.7.3", -] - -[[package]] -name = "near-primitives" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "borsh", - "byteorder", - "bytesize", - "chrono", - "derive_more", - "easy-ext", - "hex", - "near-crypto 0.0.0", - "near-primitives-core 0.0.0", - "near-rpc-error-macro 0.0.0", - "near-vm-errors 0.0.0", - "num-rational", - "primitive-types", - "rand 0.7.3", - "reed-solomon-erasure", - "serde", - "serde_json", - "smart-default", -] - -[[package]] -name = "near-primitives" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f106c7bbf2a12228daf4af2a976122b030745683ede24b5dc4514e8faaa36c" -dependencies = [ - "base64 0.13.0", - "borsh", - "bs58", - "byteorder", - "bytesize", - "chrono", - "derive_more", - "easy-ext", - "hex", - "near-crypto 0.5.0", - "near-primitives-core 0.5.0", - "near-rpc-error-macro 0.5.0", - "near-vm-errors 3.1.0", - "num-rational", - "primitive-types", - "rand 0.7.3", - "reed-solomon-erasure", - "regex", - "serde", - "serde_json", - "sha2 0.9.8", - "smart-default", - "validator", -] - -[[package]] -name = "near-primitives" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04d93aaf84ad4f5ccf780d8a0029c6fb636a2e6c1ddb3c772dee4686529e30a8" -dependencies = [ - "base64 0.13.0", - "borsh", - "bs58", - "byteorder", - "bytesize", - "chrono", - "derive_more", - "easy-ext", - "hex", - "near-crypto 0.10.0", - "near-primitives-core 0.10.0", - "near-rpc-error-macro 0.10.0", - "near-vm-errors 0.10.0", - "num-rational", - "primitive-types", - "rand 0.7.3", - "reed-solomon-erasure", - "regex", - "serde", - "serde_json", - "sha2 0.9.8", - "smart-default", - "validator", -] - -[[package]] -name = "near-primitives" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6a0b49d322ebda81ec4fdd99dca804526539673d0b12133286e0d7934f4802" -dependencies = [ - "borsh", - "byteorder", - "bytesize", - "chrono", - "derive_more", - "easy-ext", - "hex", - "near-crypto 0.12.0", - "near-primitives-core 0.12.0", - "near-rpc-error-macro 0.12.0", - "near-vm-errors 0.12.0", - "num-rational", - "primitive-types", - "rand 0.7.3", - "reed-solomon-erasure", - "serde", - "serde_json", - "smart-default", -] - -[[package]] -name = "near-primitives-core" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "base64 0.11.0", - "borsh", - "bs58", - "derive_more", - "near-account-id 0.0.0", - "num-rational", - "serde", - "sha2 0.9.8", -] - -[[package]] -name = "near-primitives-core" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "108d06655885c1174823e41941fd44a82e13e850b12fa068a95194c96e247c68" -dependencies = [ - "base64 0.11.0", - "borsh", - "bs58", - "derive_more", - "hex", - "lazy_static", - "near-account-id 0.5.0", - "num-rational", - "serde", - "serde_json", - "sha2 0.9.8", -] - -[[package]] -name = "near-primitives-core" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d88b2b0f418c1174214fb51106c90251f61ecfe4c7063f149c2e199ec2850fd" -dependencies = [ - "base64 0.11.0", - "borsh", - "bs58", - "derive_more", - "hex", - "lazy_static", - "near-account-id 0.10.0", - "num-rational", - "serde", - "serde_json", - "sha2 0.9.8", -] - -[[package]] -name = "near-primitives-core" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaae2d2271ecdb0e3d90c11724cdb46d7d5bb50838fdb3941bfc381634cf08a3" -dependencies = [ - "base64 0.11.0", - "borsh", - "bs58", - "derive_more", - "near-account-id 0.12.0", - "num-rational", - "serde", - "sha2 0.9.8", -] - -[[package]] -name = "near-rate-limiter" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "bytes", - "futures-core", - "pin-project-lite", - "tokio", - "tokio-util 0.6.9", - "tracing", -] - -[[package]] -name = "near-rosetta-rpc" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "actix-cors", - "actix-http", - "actix-web", - "awc", - "derive_more", - "futures", - "hex", - "lazy_static", - "near-account-id 0.0.0", - "near-chain-configs 0.0.0", - "near-client", - "near-client-primitives 0.0.0", - "near-crypto 0.0.0", - "near-network", - "near-primitives 0.0.0", - "paperclip", - "serde", - "serde_json", - "strum", - "tokio", - "validator", -] - -[[package]] -name = "near-rpc-error-core" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "quote", - "serde", - "syn", -] - -[[package]] -name = "near-rpc-error-core" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db59973d0e8d8bd4be5ae508600add29f96737722d30e05cfc49e5044ded955" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "syn", -] - -[[package]] -name = "near-rpc-error-core" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a98c9bd7edee4dcfc293e3511e9fab826bcd6fbfbfe06124a1164b94ee60351" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "syn", -] - -[[package]] -name = "near-rpc-error-core" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5b9fd54b177a2efc1203cd605dc3369289d9c2a74ddbfdfb372feb13be38060" -dependencies = [ - "quote", - "serde", - "syn", -] - -[[package]] -name = "near-rpc-error-macro" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "near-rpc-error-core 0.0.0", - "serde", - "syn", -] - -[[package]] -name = "near-rpc-error-macro" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bde9eb491ab7ccccd48ee6d438dc07aa74318faa0ff007717c3d5b538d3951" -dependencies = [ - "near-rpc-error-core 0.5.0", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn", -] - -[[package]] -name = "near-rpc-error-macro" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abade92d0fc76a6c25aeb82f3e7fd97678ab5d0fd92b80149a65d1088e86505" -dependencies = [ - "near-rpc-error-core 0.10.0", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn", -] - -[[package]] -name = "near-rpc-error-macro" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a38f5469f86f3c8ce0f39828f10a9c6aca2581d71a5c176a1c9be7e7eb4511a3" -dependencies = [ - "near-rpc-error-core 0.12.0", - "serde", - "syn", -] - -[[package]] -name = "near-sdk" -version = "4.0.0-pre.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e30889e853c3508ed83b0f507e3c947e3591810d44221b3899c7b407c484a2b2" -dependencies = [ - "base64 0.13.0", - "borsh", - "bs58", - "near-primitives-core 0.10.0", - "near-sdk-macros", - "near-sys", - "near-vm-logic 0.10.0", - "serde", - "serde_json", - "wee_alloc", -] - -[[package]] -name = "near-sdk-macros" -version = "4.0.0-pre.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e104d6e4f4a85526c7b027c998f16cc5c27c30b691a3aed4cad57dd6414b90e" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "near-stable-hasher" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" - -[[package]] -name = "near-store" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "borsh", - "byteorder", - "bytesize", - "derive_more", - "elastic-array", - "fs2", - "lru", - "near-crypto 0.0.0", - "near-primitives 0.0.0", - "num_cpus", - "rand 0.7.3", - "rocksdb", - "serde_json", - "strum", - "thiserror", - "tracing", -] - -[[package]] -name = "near-sys" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6a7aa3f46fac44416d8a93d14f30a562c4d730a1c6bf14bffafab5f475c244a" - -[[package]] -name = "near-telemetry" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "actix-web", - "awc", - "futures", - "near-performance-metrics", - "near-performance-metrics-macros", - "openssl", - "serde", - "serde_json", - "tracing", -] - -[[package]] -name = "near-vm-errors" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "borsh", - "near-account-id 0.0.0", - "near-rpc-error-macro 0.0.0", - "serde", -] - -[[package]] -name = "near-vm-errors" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e781248bed1f8e4792aee0c0362cf8bc831fc9f51573bc43807b5e07e0e7db81" -dependencies = [ - "borsh", - "hex", - "near-account-id 0.10.0", - "near-rpc-error-macro 0.10.0", - "serde", -] - -[[package]] -name = "near-vm-errors" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5092bbad4e16e48423d9be92e18b84af8e128c263df66d867a3f99c560b3cb28" -dependencies = [ - "borsh", - "near-account-id 0.12.0", - "near-rpc-error-macro 0.12.0", - "serde", -] - -[[package]] -name = "near-vm-errors" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffec816703a13b6ca5b3dbd0005e6eb5360087058203c93e859a019dbfd88300" -dependencies = [ - "borsh", - "hex", - "near-account-id 0.5.0", - "near-rpc-error-macro 0.5.0", - "serde", -] - -[[package]] -name = "near-vm-logic" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "base64 0.13.0", - "borsh", - "bs58", - "byteorder", - "near-account-id 0.0.0", - "near-crypto 0.0.0", - "near-primitives 0.0.0", - "near-primitives-core 0.0.0", - "near-vm-errors 0.0.0", - "ripemd160", - "serde", - "sha2 0.9.8", - "sha3", -] - -[[package]] -name = "near-vm-logic" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c06b3cb3ccf0423a9ba6908ccf07abe19c3c34319af200c733f34b7ac5af0ab" -dependencies = [ - "base64 0.13.0", - "borsh", - "bs58", - "byteorder", - "near-account-id 0.10.0", - "near-crypto 0.10.0", - "near-primitives 0.10.0", - "near-primitives-core 0.10.0", - "near-vm-errors 0.10.0", - "ripemd160", - "serde", - "sha2 0.9.8", - "sha3", -] - -[[package]] -name = "near-vm-runner" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "anyhow", - "borsh", - "loupe", - "memoffset", - "near-cache", - "near-primitives 0.0.0", - "near-stable-hasher", - "near-vm-errors 0.0.0", - "near-vm-logic 0.0.0", - "once_cell", - "parity-wasm 0.41.0", - "pwasm-utils 0.12.0", - "pwasm-utils 0.18.2", - "serde", - "threadpool", - "tracing", - "wasmer-compiler-near", - "wasmer-compiler-singlepass-near", - "wasmer-engine-near", - "wasmer-engine-universal-near", - "wasmer-runtime-core-near", - "wasmer-runtime-near", - "wasmer-types-near", - "wasmer-vm-near", - "wasmparser 0.78.2", - "wasmtime", -] - -[[package]] -name = "near_events" -version = "0.1.0" -source = "git+https://github.com/mintbase/near-events?rev=6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7#6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7" -dependencies = [ - "near-event-data-log-macro 0.1.0 (git+https://github.com/mintbase/near-events?rev=6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7)", - "near-event-data-macro 0.1.0 (git+https://github.com/mintbase/near-events?rev=6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7)", - "near-sdk", - "serde_json", -] - -[[package]] -name = "near_events" -version = "0.1.0" -source = "git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b#bd78dcaeaa11f6f6286bbbed97d835370783c30b" -dependencies = [ - "near-event-data-log-macro 0.1.0 (git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b)", - "near-event-data-macro 0.1.0 (git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b)", - "near-sdk", - "serde_json", -] - -[[package]] -name = "nearcore" -version = "1.25.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "actix", - "actix-rt", - "actix-web", - "actix_derive", - "anyhow", - "awc", - "borsh", - "byteorder", - "chrono", - "dirs", - "easy-ext", - "futures", - "hyper", - "hyper-tls", - "indicatif", - "lazy-static-include", - "near-chain", - "near-chain-configs 0.0.0", - "near-chunks", - "near-client", - "near-crypto 0.0.0", - "near-epoch-manager", - "near-jsonrpc", - "near-network", - "near-network-primitives 0.0.0", - "near-performance-metrics", - "near-pool", - "near-primitives 0.0.0", - "near-rosetta-rpc", - "near-store", - "near-telemetry", - "near-vm-runner", - "node-runtime", - "num-rational", - "rand 0.7.3", - "rayon", - "serde", - "serde_json", - "smart-default", - "tempfile", - "thiserror", - "tokio", - "tracing", - "xz2", -] - -[[package]] -name = "nix" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229" -dependencies = [ - "bitflags", - "cc", - "cfg-if 0.1.10", - "libc", - "void", -] - -[[package]] -name = "node-runtime" -version = "0.0.0" -source = "git+https://github.com/near/nearcore?rev=9b3d6ba551f561a028f0216051e031bc2ba0c6b7#9b3d6ba551f561a028f0216051e031bc2ba0c6b7" -dependencies = [ - "borsh", - "byteorder", - "hex", - "log", - "near-chain-configs 0.0.0", - "near-crypto 0.0.0", - "near-metrics 0.0.0", - "near-primitives 0.0.0", - "near-store", - "near-vm-errors 0.0.0", - "near-vm-logic 0.0.0", - "near-vm-runner", - "num-bigint 0.3.3", - "num-rational", - "num-traits", - "once_cell", - "rand 0.7.3", - "rayon", - "serde", - "serde_json", - "thiserror", - "tracing", -] - -[[package]] -name = "nom" -version = "7.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" -dependencies = [ - "memchr", - "minimal-lexical", - "version_check", -] - -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -dependencies = [ - "autocfg 1.1.0", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" -dependencies = [ - "autocfg 1.1.0", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg 1.1.0", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" -dependencies = [ - "autocfg 1.1.0", - "num-bigint 0.3.3", - "num-integer", - "num-traits", - "serde", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg 1.1.0", -] - -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_threads" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aba1801fb138d8e85e11d0fc70baf4fe1cdfffda7c6cd34a854905df588e5ed0" -dependencies = [ - "libc", -] - -[[package]] -name = "number_prefix" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" - -[[package]] -name = "object" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" -dependencies = [ - "crc32fast", - "indexmap", - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssl" -version = "0.10.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" -dependencies = [ - "bitflags", - "cfg-if 1.0.0", - "foreign-types", - "libc", - "once_cell", - "openssl-sys", -] - -[[package]] -name = "openssl-probe" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" - -[[package]] -name = "openssl-src" -version = "111.16.0+1.1.1l" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab2173f69416cf3ec12debb5823d244127d23a9b127d5a5189aa97c5fa2859f" -dependencies = [ - "cc", -] - -[[package]] -name = "openssl-sys" -version = "0.9.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" -dependencies = [ - "autocfg 1.1.0", - "cc", - "libc", - "openssl-src", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "os_str_bytes" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" -dependencies = [ - "memchr", -] - -[[package]] -name = "page_size" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebde548fbbf1ea81a99b128872779c437752fb99f217c45245e1a61dcd9edcd" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "paperclip" -version = "0.5.0" -source = "git+https://github.com/near/paperclip?branch=actix-web-4-beta.6#b9589c6e520eeee4a07ed94f7e32c476990d6536" -dependencies = [ - "anyhow", - "itertools", - "once_cell", - "paperclip-actix", - "paperclip-core", - "paperclip-macros", - "parking_lot 0.11.2", - "semver 0.9.0", - "serde", - "serde_derive", - "serde_json", - "serde_yaml", - "thiserror", - "url", -] - -[[package]] -name = "paperclip-actix" -version = "0.3.0" -source = "git+https://github.com/near/paperclip?branch=actix-web-4-beta.6#b9589c6e520eeee4a07ed94f7e32c476990d6536" -dependencies = [ - "actix-service", - "actix-web", - "futures", - "once_cell", - "paperclip-core", - "paperclip-macros", - "parking_lot 0.11.2", - "serde_json", -] - -[[package]] -name = "paperclip-core" -version = "0.3.0" -source = "git+https://github.com/near/paperclip?branch=actix-web-4-beta.6#b9589c6e520eeee4a07ed94f7e32c476990d6536" -dependencies = [ - "actix-web", - "mime", - "once_cell", - "paperclip-macros", - "parking_lot 0.11.2", - "pin-project", - "regex", - "serde", - "serde_json", - "serde_yaml", - "thiserror", -] - -[[package]] -name = "paperclip-macros" -version = "0.4.0" -source = "git+https://github.com/near/paperclip?branch=actix-web-4-beta.6#b9589c6e520eeee4a07ed94f7e32c476990d6536" -dependencies = [ - "heck 0.3.3", - "http", - "lazy_static", - "mime", - "proc-macro-error", - "proc-macro2", - "quote", - "strum", - "strum_macros", - "syn", -] - -[[package]] -name = "parity-scale-codec" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec 0.7.1", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" -dependencies = [ - "proc-macro-crate 1.1.0", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "parity-secp256k1" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fca4f82fccae37e8bbdaeb949a4a218a1bbc485d11598f193d2a908042e5fc1" -dependencies = [ - "arrayvec 0.5.2", - "cc", - "cfg-if 0.1.10", - "rand 0.7.3", -] - -[[package]] -name = "parity-wasm" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" - -[[package]] -name = "parity-wasm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" - -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api 0.4.7", - "parking_lot_core 0.8.5", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall 0.2.10", - "smallvec", - "winapi", -] - -[[package]] -name = "paste" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "phf" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb" - -[[package]] -name = "postgres-protocol" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ec03bce71f18b4a27c4c64c6ba2ddf74686d69b91d8714fb32ead3adaed713" -dependencies = [ - "base64 0.13.0", - "byteorder", - "bytes", - "fallible-iterator", - "hmac", - "md-5", - "memchr", - "rand 0.8.4", - "sha2 0.10.2", - "stringprep", -] - -[[package]] -name = "postgres-types" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04619f94ba0cc80999f4fc7073607cb825bc739a883cb6d20900fc5e009d6b0d" -dependencies = [ - "bytes", - "chrono", - "fallible-iterator", - "postgres-protocol", - "serde", - "serde_json", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ca011bd0129ff4ae15cd04c4eef202cadf6c51c21e47aba319b4e0501db741" - -[[package]] -name = "pq-sys" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda" -dependencies = [ - "vcpkg", -] - -[[package]] -name = "primitive-types" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" -dependencies = [ - "fixed-hash", - "impl-codec", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] - -[[package]] -name = "proc-macro-crate" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" -dependencies = [ - "thiserror", - "toml", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - -[[package]] -name = "proc-macro-support" -version = "0.1.0" -source = "git+https://github.com/mintbase/near-events?rev=6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7#6d5fe6eef75d2ac5d67ce01d7219c91219a0c7b7" -dependencies = [ - "itertools", - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro-support" -version = "0.1.0" -source = "git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b#bd78dcaeaa11f6f6286bbbed97d835370783c30b" -dependencies = [ - "itertools", - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "prometheus" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8425533e7122f0c3cc7a37e6244b16ad3a2cc32ae7ac6276e2a75da0d9c200d" -dependencies = [ - "cfg-if 1.0.0", - "fnv", - "lazy_static", - "parking_lot 0.11.2", - "protobuf", - "regex", - "thiserror", -] - -[[package]] -name = "protobuf" -version = "2.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23129d50f2c9355ced935fce8a08bd706ee2e7ce2b3b33bf61dace0e379ac63a" - -[[package]] -name = "psm" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd136ff4382c4753fc061cb9e4712ab2af263376b95bbd5bd8cd50c020b78e69" -dependencies = [ - "cc", -] - -[[package]] -name = "ptr_meta" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pwasm-utils" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" -dependencies = [ - "byteorder", - "log", - "parity-wasm 0.41.0", -] - -[[package]] -name = "pwasm-utils" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "880b3384fb00b8f6ecccd5d358b93bd2201900ae3daad213791d1864f6441f5c" -dependencies = [ - "byteorder", - "log", - "parity-wasm 0.42.2", -] - -[[package]] -name = "quote" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r2d2" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" -dependencies = [ - "log", - "parking_lot 0.11.2", - "scheduled-thread-pool", -] - -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_pcg", - "rand_xorshift", - "winapi", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - -[[package]] -name = "rand" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", - "rand_hc 0.3.1", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.3.1", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[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 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom 0.2.3", -] - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core 0.6.3", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rayon" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" -dependencies = [ - "autocfg 1.1.0", - "crossbeam-deque", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "lazy_static", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "redox_syscall" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" -dependencies = [ - "getrandom 0.2.3", - "redox_syscall 0.2.10", -] - -[[package]] -name = "reed-solomon-erasure" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" -dependencies = [ - "smallvec", -] - -[[package]] -name = "regalloc" -version = "0.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d808cff91dfca7b239d40b972ba628add94892b1d9e19a842aedc5cfae8ab1a" -dependencies = [ - "log", - "rustc-hash", - "smallvec", -] - -[[package]] -name = "regex" -version = "1.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" - -[[package]] -name = "region" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0" -dependencies = [ - "bitflags", - "libc", - "mach", - "winapi", -] - -[[package]] -name = "region" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" -dependencies = [ - "bitflags", - "libc", - "mach", - "winapi", -] - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - -[[package]] -name = "rend" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1033f6fe7ce48c8333e5412891b933e85d6a3a09728c4883240edf64e7a6f11a" -dependencies = [ - "bytecheck", -] - -[[package]] -name = "reqwest" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f242f1488a539a79bac6dbe7c8609ae43b7914b7736210f239a37cccb32525" -dependencies = [ - "base64 0.13.0", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-native-tls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[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", - "untrusted", - "web-sys", - "winapi", -] - -[[package]] -name = "ripemd160" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "rkyv" -version = "0.7.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66bf572c17c77322f4d858c214def56b13a3c32b8d833cd6d28a92de8325ac5f" -dependencies = [ - "bytecheck", - "hashbrown", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3eca50f172b8e59e2080810fb41b65f047960c197149564d4bd0680af1888e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "rocksdb" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c749134fda8bfc90d0de643d59bfc841dcb3ac8a1062e12b6754bd60235c48b3" -dependencies = [ - "libc", - "librocksdb-sys", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.9", -] - -[[package]] -name = "rustix" -version = "0.31.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2dcfc2778a90e38f56a708bfc90572422e11d6c7ee233d053d1f782cf9df6d2" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "winapi", -] - -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.0", - "log", - "ring", - "sct", - "webpki", -] - -[[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", - "schannel", - "security-framework", -] - -[[package]] -name = "rustversion" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088" - -[[package]] -name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "schannel" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" -dependencies = [ - "lazy_static", - "winapi", -] - -[[package]] -name = "scheduled-thread-pool" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" -dependencies = [ - "parking_lot 0.11.2", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" - -[[package]] -name = "security-framework" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd" - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "serde" -version = "1.0.136" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-bench" -version = "0.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d733da87e79faaac25616e33d26299a41143fd4cd42746cbb0e91d8feea243fd" -dependencies = [ - "byteorder", - "serde", -] - -[[package]] -name = "serde_bytes" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.136" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +name = "near-event-data-log-macro" +version = "0.1.0" +source = "git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b#bd78dcaeaa11f6f6286bbbed97d835370783c30b" dependencies = [ + "itertools", + "proc-macro-support", "proc-macro2", "quote", "syn", ] [[package]] -name = "serde_json" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" -dependencies = [ - "indexmap", - "itoa 1.0.1", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" -dependencies = [ - "form_urlencoded", - "itoa 0.4.8", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c608a35705a5d3cdc9fbe403147647ff34b921f8e833e49306df898f9b20af" -dependencies = [ - "dtoa", - "indexmap", - "serde", - "yaml-rust", -] - -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" - -[[package]] -name = "sha2" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.3", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug", -] - -[[package]] -name = "sharded-slab" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" - -[[package]] -name = "signal-hook-registry" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" - -[[package]] -name = "simple-market-contract" +name = "near-event-data-macro" version = "0.1.0" +source = "git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b#bd78dcaeaa11f6f6286bbbed97d835370783c30b" dependencies = [ - "mintbase-deps", -] - -[[package]] -name = "siphasher" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" - -[[package]] -name = "slab" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" - -[[package]] -name = "smallvec" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" - -[[package]] -name = "smart-default" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6" -dependencies = [ + "itertools", + "proc-macro-support", "proc-macro2", "quote", "syn", ] [[package]] -name = "socket2" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "stdweb" -version = "0.4.20" +name = "near-primitives" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" +checksum = "8ad1a9a1640539c81f065425c31bffcfbf6b31ef1aeaade59ce905f5df6ac860" dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", + "borsh", + "byteorder", + "bytesize", + "chrono", + "derive_more", + "easy-ext", + "hex", + "near-crypto", + "near-primitives-core", + "near-rpc-error-macro", + "near-vm-errors", + "num-rational", + "once_cell", + "primitive-types", + "rand 0.7.3", + "reed-solomon-erasure", + "serde", + "serde_json", + "smart-default", + "strum", + "thiserror", ] [[package]] -name = "stdweb-derive" -version = "0.5.3" +name = "near-primitives-core" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" +checksum = "91d508f0fc340f6461e4e256417685720d3c4c00bb5a939b105160e49137caba" dependencies = [ - "proc-macro2", - "quote", + "base64 0.11.0", + "borsh", + "bs58", + "derive_more", + "near-account-id", + "num-rational", "serde", - "serde_derive", - "syn", + "sha2 0.10.6", + "strum", ] [[package]] -name = "stdweb-internal-macros" -version = "0.2.9" +name = "near-rpc-error-core" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" +checksum = "93ee0b41c75ef859c193a8ff1dadfa0c8207bc0ac447cc22259721ad769a1408" dependencies = [ - "base-x", - "proc-macro2", "quote", "serde", - "serde_derive", - "serde_json", - "sha1", "syn", ] [[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - -[[package]] -name = "store" -version = "0.1.0" -dependencies = [ - "mintbase-deps", -] - -[[package]] -name = "stringprep" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "strum" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7318c509b5ba57f18533982607f24070a55d353e90d4cae30c467cdb2ad5ac5c" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.20.1" +name = "near-rpc-error-macro" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" +checksum = "8e837bd4bacd807073ec5ceb85708da7f721b46a4c2a978de86027fb0034ce31" dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", + "near-rpc-error-core", + "serde", "syn", ] [[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "syn" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "synstructure" -version = "0.12.6" +name = "near-sdk" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - -[[package]] -name = "sysinfo" -version = "0.14.3" -source = "git+https://github.com/near/sysinfo?rev=3cb97ee79a02754407d2f0f63628f247d7c65e7b#3cb97ee79a02754407d2f0f63628f247d7c65e7b" +checksum = "15eb3de2defe3626260cc209a6cdb985c6b27b0bd4619fad97dcfae002c3c5bd" dependencies = [ - "cfg-if 0.1.10", - "doc-comment", - "libc", - "ntapi", + "base64 0.13.1", + "borsh", + "bs58", + "near-abi", + "near-crypto", + "near-primitives", + "near-primitives-core", + "near-sdk-macros", + "near-sys", + "near-vm-logic", "once_cell", - "rayon", - "winapi", + "schemars", + "serde", + "serde_json", + "wee_alloc", ] [[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "target-lexicon" -version = "0.10.0" +name = "near-sdk-macros" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" +checksum = "4907affc9f5ed559456509188ff0024f1f2099c0830e6bdb66eb61d5b75912c0" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "target-lexicon" -version = "0.12.2" +name = "near-sys" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "e307313276eaeced2ca95740b5639e1f3125b7c97f0a1151809d105f1aa8c6d3" [[package]] -name = "tempfile" -version = "3.3.0" +name = "near-vm-errors" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "d0da466a30f0446639cbd788c30865086fac3e8dcb07a79e51d2b0775ed4261e" dependencies = [ - "cfg-if 1.0.0", - "fastrand", - "libc", - "redox_syscall 0.2.10", - "remove_dir_all", - "winapi", + "borsh", + "near-account-id", + "near-rpc-error-macro", + "serde", ] [[package]] -name = "termcolor" -version = "1.1.2" +name = "near-vm-logic" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "81b534828419bacbf1f7b11ef7b00420f248c548c485d3f0cfda8bb6931152f2" dependencies = [ - "winapi-util", + "base64 0.13.1", + "borsh", + "bs58", + "byteorder", + "near-account-id", + "near-crypto", + "near-primitives", + "near-primitives-core", + "near-vm-errors", + "ripemd", + "serde", + "sha2 0.10.6", + "sha3", + "zeropool-bn", ] [[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +name = "near_events" +version = "0.1.0" +source = "git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b#bd78dcaeaa11f6f6286bbbed97d835370783c30b" dependencies = [ - "libc", - "winapi", + "near-event-data-log-macro", + "near-event-data-macro", + "near-sdk", + "serde_json", ] [[package]] -name = "textwrap" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" - -[[package]] -name = "thiserror" -version = "1.0.30" +name = "num-bigint" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" dependencies = [ - "thiserror-impl", + "autocfg", + "num-integer", + "num-traits", ] [[package]] -name = "thiserror-impl" -version = "1.0.30" +name = "num-integer" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "proc-macro2", - "quote", - "syn", + "autocfg", + "num-traits", ] [[package]] -name = "thread_local" -version = "1.1.4" +name = "num-rational" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" dependencies = [ - "once_cell", + "autocfg", + "num-bigint", + "num-integer", + "num-traits", + "serde", ] [[package]] -name = "threadpool" -version = "1.8.1" +name = "num-traits" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "num_cpus", + "autocfg", ] [[package]] -name = "time" -version = "0.1.43" +name = "once_cell" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi", -] +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] -name = "time" -version = "0.2.27" +name = "opaque-debug" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros", - "version_check", - "winapi", -] +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] -name = "time" -version = "0.3.7" +name = "os_str_bytes" +version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" -dependencies = [ - "libc", - "num_threads", -] +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] -name = "time-macros" -version = "0.1.1" +name = "parity-scale-codec" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ - "proc-macro-hack", - "time-macros-impl", + "arrayvec 0.7.2", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", ] [[package]] -name = "time-macros-impl" -version = "0.1.2" +name = "parity-scale-codec-derive" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ - "proc-macro-hack", + "proc-macro-crate 1.2.1", "proc-macro2", "quote", - "standback", "syn", ] [[package]] -name = "tinyvec" -version = "1.5.0" +name = "parity-secp256k1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83b2a3d4d9091d0abd7eba4dc2710b1718583bd4d8992e2190720ea38f391f7" +checksum = "4fca4f82fccae37e8bbdaeb949a4a218a1bbc485d11598f193d2a908042e5fc1" dependencies = [ - "tinyvec_macros", + "arrayvec 0.5.2", + "cc", + "cfg-if 0.1.10", + "rand 0.7.3", ] [[package]] -name = "tinyvec_macros" -version = "0.1.0" +name = "ppv-lite86" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] -name = "tokio" -version = "1.16.1" +name = "primitive-types" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ - "bytes", - "libc", - "memchr", - "mio", - "num_cpus", - "once_cell", - "parking_lot 0.11.2", - "pin-project-lite", - "signal-hook-registry", - "tokio-macros", - "winapi", + "fixed-hash", + "impl-codec", + "uint", ] [[package]] -name = "tokio-macros" -version = "1.7.0" +name = "proc-macro-crate" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "proc-macro2", - "quote", - "syn", + "toml", ] [[package]] -name = "tokio-native-tls" -version = "0.3.0" +name = "proc-macro-crate" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" dependencies = [ - "native-tls", - "tokio", + "once_cell", + "thiserror", + "toml", ] [[package]] -name = "tokio-openssl" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f24cddc8445a4dc8359cdd9e91c19d544fc95f672e32afe8945852b9381a09fe" +name = "proc-macro-support" +version = "0.1.0" +source = "git+https://github.com/mintbase/near-events?rev=bd78dcaeaa11f6f6286bbbed97d835370783c30b#bd78dcaeaa11f6f6286bbbed97d835370783c30b" dependencies = [ - "futures", - "openssl", - "openssl-sys", - "tokio", + "itertools", + "proc-macro2", + "syn", ] [[package]] -name = "tokio-postgres" -version = "0.7.5" +name = "proc-macro2" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6c8b33df661b548dcd8f9bf87debb8c56c05657ed291122e1188698c2ece95" +checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" dependencies = [ - "async-trait", - "byteorder", - "bytes", - "fallible-iterator", - "futures", - "log", - "parking_lot 0.11.2", - "percent-encoding", - "phf", - "pin-project-lite", - "postgres-protocol", - "postgres-types", - "socket2", - "tokio", - "tokio-util 0.6.9", + "unicode-ident", ] [[package]] -name = "tokio-rustls" -version = "0.22.0" +name = "quote" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ - "rustls", - "tokio", - "webpki", + "proc-macro2", ] [[package]] -name = "tokio-stream" -version = "0.1.8" +name = "radium" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" [[package]] -name = "tokio-util" -version = "0.6.9" +name = "rand" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", ] [[package]] -name = "tokio-util" -version = "0.7.1" +name = "rand" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", ] [[package]] -name = "toml" -version = "0.5.8" +name = "rand_chacha" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ - "serde", + "ppv-lite86", + "rand_core 0.5.1", ] [[package]] -name = "tower" -version = "0.4.12" +name = "rand_chacha" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a89fd63ad6adf737582df5db40d286574513c69a11dac5214dc3b5603d6713e" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ - "futures-core", - "futures-util", - "hdrhistogram", - "indexmap", - "pin-project", - "pin-project-lite", - "rand 0.8.4", - "slab", - "tokio", - "tokio-util 0.7.1", - "tower-layer", - "tower-service", - "tracing", + "ppv-lite86", + "rand_core 0.6.4", ] [[package]] -name = "tower-layer" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" - -[[package]] -name = "tower-service" -version = "0.3.1" +name = "rand_core" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] [[package]] -name = "tracing" -version = "0.1.34" +name = "rand_core" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "cfg-if 1.0.0", - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", + "getrandom 0.2.8", ] [[package]] -name = "tracing-attributes" -version = "0.1.20" +name = "rand_hc" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "proc-macro2", - "quote", - "syn", + "rand_core 0.5.1", ] [[package]] -name = "tracing-core" -version = "0.1.23" +name = "reed-solomon-erasure" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c" +checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" dependencies = [ - "lazy_static", - "valuable", + "smallvec", ] [[package]] -name = "tracing-log" +name = "ripemd" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "lazy_static", - "log", - "tracing-core", + "digest 0.10.6", ] [[package]] -name = "tracing-serde" -version = "0.1.3" +name = "rustc-hex" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" -dependencies = [ - "serde", - "tracing-core", -] +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] -name = "tracing-subscriber" -version = "0.2.25" +name = "rustc_version" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "ansi_term", - "chrono", - "lazy_static", - "matchers 0.0.1", - "regex", - "serde", - "serde_json", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", - "tracing-serde", + "semver", ] [[package]] -name = "tracing-subscriber" -version = "0.3.11" +name = "rustversion" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596" -dependencies = [ - "ansi_term", - "lazy_static", - "matchers 0.1.0", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] +checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" [[package]] -name = "try-lock" -version = "0.2.3" +name = "ryu" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] -name = "typenum" -version = "1.14.0" +name = "schemars" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] [[package]] -name = "uint" -version = "0.9.1" +name = "schemars_derive" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", + "proc-macro2", + "quote", + "serde_derive_internals", + "syn", ] [[package]] -name = "unicode-bidi" -version = "0.3.7" +name = "scratch" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" [[package]] -name = "unicode-normalization" -version = "0.1.19" +name = "semver" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" -dependencies = [ - "tinyvec", -] +checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" [[package]] -name = "unicode-segmentation" -version = "1.8.0" +name = "serde" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +dependencies = [ + "serde_derive", +] [[package]] -name = "unicode-width" -version = "0.1.9" +name = "serde_derive" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "serde_derive_internals" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "untrusted" -version = "0.7.1" +name = "serde_json" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", +] [[package]] -name = "url" -version = "2.2.2" +name = "sha2" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", ] [[package]] -name = "urlencoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b90931029ab9b034b300b797048cf23723400aa757e8a2bfb9d748102f9821" - -[[package]] -name = "uuid" -version = "0.8.2" +name = "sha2" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "getrandom 0.2.3", - "serde", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.6", ] [[package]] -name = "validator" -version = "0.12.0" +name = "sha3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d6937c33ec6039d8071bcf72933146b5bbe378d645d8fa59bdadabfc2a249" +checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" dependencies = [ - "idna", - "lazy_static", - "regex", - "serde", - "serde_derive", - "serde_json", - "url", - "validator_types", + "digest 0.10.6", + "keccak", ] [[package]] -name = "validator_types" -version = "0.12.0" +name = "signature" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9680608df133af2c1ddd5eaf1ddce91d60d61b6bc51494ef326458365a470a" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] -name = "valuable" +name = "simple-market-contract" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +dependencies = [ + "mintbase-deps", +] [[package]] -name = "vcpkg" -version = "0.2.15" +name = "smallvec" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] -name = "version_check" -version = "0.9.3" +name = "smart-default" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "void" -version = "1.0.2" +name = "spin" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "want" -version = "0.3.0" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +name = "store" +version = "0.1.0" +dependencies = [ + "mintbase-deps", +] [[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +name = "strsim" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] -name = "wasm-bindgen" -version = "0.2.78" +name = "strum" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "cfg-if 1.0.0", - "wasm-bindgen-macro", + "strum_macros", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.78" +name = "strum_macros" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "bumpalo", - "lazy_static", - "log", + "heck", "proc-macro2", "quote", + "rustversion", "syn", - "wasm-bindgen-shared", ] [[package]] -name = "wasm-bindgen-futures" -version = "0.4.28" +name = "subtle" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", -] +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] -name = "wasm-bindgen-macro" -version = "0.2.78" +name = "syn" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ + "proc-macro2", "quote", - "wasm-bindgen-macro-support", + "unicode-ident", ] [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.78" +name = "synstructure" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", + "unicode-xid", ] [[package]] -name = "wasm-bindgen-shared" -version = "0.2.78" +name = "tap" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] -name = "wasmer-compiler-near" -version = "2.2.0" +name = "termcolor" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c11074b5b8f4170b5ebf0744e811728befb01a70757395c43b528b6441e9c924" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ - "enumset", - "loupe", - "rkyv", - "serde", - "serde_bytes", - "smallvec", - "target-lexicon 0.12.2", - "thiserror", - "wasmer-types-near", - "wasmer-vm-near", - "wasmparser 0.78.2", + "winapi-util", ] [[package]] -name = "wasmer-compiler-singlepass-near" -version = "2.2.0" +name = "textwrap" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95dc7a193f0b607ce19c3a71418ea0d325696087a53755b4610b5b5b02b335b" -dependencies = [ - "byteorder", - "dynasm", - "dynasmrt", - "lazy_static", - "loupe", - "memoffset", - "more-asserts", - "rayon", - "smallvec", - "wasmer-compiler-near", - "wasmer-types-near", - "wasmer-vm-near", -] +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] -name = "wasmer-engine-near" -version = "2.2.0" +name = "thiserror" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55090b4c4cffc8460478fa0b0355d81044750655986a8be93e769f9df3caa6bf" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" dependencies = [ - "backtrace", - "enumset", - "lazy_static", - "loupe", - "memmap2 0.5.0", - "more-asserts", - "rustc-demangle", - "serde", - "serde_bytes", - "target-lexicon 0.12.2", - "thiserror", - "wasmer-compiler-near", - "wasmer-types-near", - "wasmer-vm-near", + "thiserror-impl", ] [[package]] -name = "wasmer-engine-universal-near" -version = "2.2.0" +name = "thiserror-impl" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d2a5c1153cf6d9441e3d05101559071a3fb7f44e343f398d5ec89f2f5748f4" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ - "cfg-if 1.0.0", - "enumset", - "leb128", - "loupe", - "region 3.0.0", - "rkyv", - "wasmer-compiler-near", - "wasmer-engine-near", - "wasmer-types-near", - "wasmer-vm-near", - "winapi", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "wasmer-runtime-core-near" -version = "0.18.2" +name = "time" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cf26de331c8ef4257bef33649b4665535b105c927ab2e00715f17891362efe8" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ - "bincode", - "blake3", - "borsh", - "cc", - "digest 0.8.1", - "errno", - "hex", - "indexmap", - "lazy_static", "libc", - "nix", - "page_size", - "parking_lot 0.10.2", - "rustc_version 0.2.3", - "serde", - "serde-bench", - "serde_bytes", - "serde_derive", - "smallvec", - "target-lexicon 0.10.0", - "wasmparser 0.51.4", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi", ] [[package]] -name = "wasmer-runtime-near" -version = "0.18.0" +name = "toml" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158e6fff11e5e1ef805af50637374d5bd43d92017beafa18992cdf7f3f7ae3e4" +checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" dependencies = [ - "lazy_static", - "memmap", "serde", - "serde_derive", - "wasmer-runtime-core-near", - "wasmer-singlepass-backend-near", ] [[package]] -name = "wasmer-singlepass-backend-near" -version = "0.18.1" +name = "typenum" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6edd0ba6c0bcf9b279186d4dbe81649dda3e5ef38f586865943de4dcd653f8" -dependencies = [ - "bincode", - "borsh", - "byteorder", - "dynasm", - "dynasmrt", - "lazy_static", - "libc", - "nix", - "serde", - "serde_derive", - "smallvec", - "wasmer-runtime-core-near", -] +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] -name = "wasmer-types-near" -version = "2.2.0" +name = "uint" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4fae5b0041c76c1b114b3286503a54d42c38eb88146724919b5610c66ecd548" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ - "indexmap", - "loupe", - "rkyv", - "serde", - "thiserror", + "byteorder", + "crunchy", + "hex", + "static_assertions", ] [[package]] -name = "wasmer-vm-near" -version = "2.2.0" +name = "unicode-ident" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db06e0c8e20945000c075237f1b5afb682bf80e2bec875ed9b9a633ef41960c7" -dependencies = [ - "backtrace", - "cc", - "cfg-if 1.0.0", - "indexmap", - "libc", - "loupe", - "memoffset", - "more-asserts", - "region 3.0.0", - "rkyv", - "serde", - "thiserror", - "wasmer-types-near", - "winapi", -] +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] -name = "wasmparser" -version = "0.51.4" +name = "unicode-width" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb1956b19469d1c5e63e459d29e7b5aa0f558d9f16fcef09736f8a265e6c10a" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] -name = "wasmparser" -version = "0.78.2" +name = "unicode-xid" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] -name = "wasmparser" -version = "0.81.0" +name = "version_check" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98930446519f63d00a836efdc22f67766ceae8dbcc1571379f2bcabc6b2b9abc" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "wasmtime" -version = "0.33.0" +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414be1bc5ca12e755ffd3ff7acc3a6d1979922f8237fc34068b2156cebcc3270" -dependencies = [ - "anyhow", - "backtrace", - "bincode", - "cfg-if 1.0.0", - "cpp_demangle", - "indexmap", - "lazy_static", - "libc", - "log", - "object", - "paste", - "psm", - "region 2.2.0", - "rustc-demangle", - "serde", - "target-lexicon 0.12.2", - "wasmparser 0.81.0", - "wasmtime-cranelift", - "wasmtime-environ", - "wasmtime-jit", - "wasmtime-runtime", - "winapi", -] +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] -name = "wasmtime-cranelift" -version = "0.33.0" +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4693d33725773615a4c9957e4aa731af57b27dca579702d1d8ed5750760f1a9" -dependencies = [ - "anyhow", - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "cranelift-native", - "cranelift-wasm", - "gimli", - "log", - "more-asserts", - "object", - "target-lexicon 0.12.2", - "thiserror", - "wasmparser 0.81.0", - "wasmtime-environ", -] +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] -name = "wasmtime-environ" -version = "0.33.0" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b17e47116a078b9770e6fb86cff8b9a660826623cebcfff251b047c8d8993ef" -dependencies = [ - "anyhow", - "cranelift-entity", - "gimli", - "indexmap", - "log", - "more-asserts", - "object", - "serde", - "target-lexicon 0.12.2", - "thiserror", - "wasmparser 0.81.0", - "wasmtime-types", -] +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wasmtime-jit" -version = "0.33.0" +name = "wasm-bindgen" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60ea5b380bdf92e32911400375aeefb900ac9d3f8e350bb6ba555a39315f2ee7" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "addr2line", - "anyhow", - "bincode", "cfg-if 1.0.0", - "gimli", - "object", - "region 2.2.0", - "serde", - "target-lexicon 0.12.2", - "thiserror", - "wasmtime-environ", - "wasmtime-runtime", - "winapi", + "wasm-bindgen-macro", ] [[package]] -name = "wasmtime-runtime" -version = "0.33.0" +name = "wasm-bindgen-backend" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abc7cd79937edd6e238b337608ebbcaf9c086a8457f01dfd598324f7fa56d81a" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ - "anyhow", - "backtrace", - "cc", - "cfg-if 1.0.0", - "indexmap", - "lazy_static", - "libc", + "bumpalo", "log", - "mach", - "memoffset", - "more-asserts", - "rand 0.8.4", - "region 2.2.0", - "rustix", - "thiserror", - "wasmtime-environ", - "winapi", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", ] [[package]] -name = "wasmtime-types" -version = "0.33.0" +name = "wasm-bindgen-macro" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e5e51a461a2cf2b69e1fc48f325b17d78a8582816e18479e8ead58844b23f8" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ - "cranelift-entity", - "serde", - "thiserror", - "wasmparser 0.81.0", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "web-sys" -version = "0.3.55" +name = "wasm-bindgen-macro-support" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ - "js-sys", - "wasm-bindgen", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] -name = "webpki" -version = "0.21.4" +name = "wasm-bindgen-shared" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wee_alloc" @@ -6741,62 +1641,43 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "winreg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi", -] - [[package]] name = "wyz" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" -[[package]] -name = "xmlparser" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "114ba2b24d2167ef6d67d7d04c8cc86522b87f490025f39f0303b7db5bf5e3d8" - -[[package]] -name = "xz2" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c179869f34fc7c01830d3ce7ea2086bc3a07e0d35289b667d0a8bf910258926c" -dependencies = [ - "lzma-sys", -] - -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "zeroize" -version = "1.4.2" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf68b08513768deaa790264a7fac27a58cbf2705cfcdc9448362229217d7e970" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.2.0" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdff2024a851a322b08f179173ae2ba620445aef1e838f0c196820eade4ae0c7" +checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] + +[[package]] +name = "zeropool-bn" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e61de68ede9ffdd69c01664f65a178c5188b73f78faa21f0936016a888ff7c" +dependencies = [ + "borsh", + "byteorder", + "crunchy", + "lazy_static", + "rand 0.8.5", + "rustc-hex", +] diff --git a/Cargo.toml b/Cargo.toml index 934fed3..c4a6f41 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,3 @@ [workspace] -members = [ - "mintbase-deps", - "store", - "factory", - "helper", - "simple-market-contract", - "mintbase-near-indexer", -] +members = ["mintbase-deps", "store", "factory", "simple-market-contract"] diff --git a/factory/src/lib.rs b/factory/src/lib.rs index 9963a3d..f56b08d 100644 --- a/factory/src/lib.rs +++ b/factory/src/lib.rs @@ -1,18 +1,13 @@ use std::convert::TryFrom; use std::str::FromStr; -use mintbase_deps::common::{ - NFTContractMetadata, - StoreInitArgs, -}; use mintbase_deps::constants::{ gas, storage_bytes, storage_stake, - NO_DEPOSIT, YOCTO_PER_BYTE, }; -use mintbase_deps::interfaces::factory_self; +use mintbase_deps::interfaces::ext_factory; use mintbase_deps::logging::MbStoreDeployData; use mintbase_deps::near_sdk::borsh::{ self, @@ -33,6 +28,10 @@ use mintbase_deps::near_sdk::{ PublicKey, }; use mintbase_deps::serde_json; +use mintbase_deps::store_data::{ + NFTContractMetadata, + StoreInitArgs, +}; // ------------------------------- constants -------------------------------- // // ----------------------------- smart contract ----------------------------- // @@ -65,7 +64,8 @@ impl Default for MintbaseStoreFactory { #[near_bindgen] impl MintbaseStoreFactory { - pub fn assert_only_owner(&self) { + /// Panics if not called by the factory owner + fn assert_only_owner(&self) { assert_one_yocto(); assert_eq!( env::predecessor_account_id(), @@ -74,18 +74,7 @@ impl MintbaseStoreFactory { ); } - /// Sufficient attached deposit is defined as enough to deploy a `Store`, - /// plus enough left over for the mintbase deployment cost. - pub fn assert_sufficient_attached_deposit(&self) { - let min = storage_bytes::STORE as u128 * self.storage_price_per_byte + self.mintbase_fee; - assert!( - env::attached_deposit() >= min, - "Not enough attached deposit to complete store deployment. Need: {}, got: {}", - min, - env::attached_deposit() - ); - } - + /// Panics if a store with the requested ID already exists pub fn assert_no_store_with_id( &self, store_id: String, @@ -119,11 +108,23 @@ impl MintbaseStoreFactory { (storage_bytes::STORE as u128 * self.storage_price_per_byte + self.mintbase_fee).into() } - /// The sum of `mintbase_fee` and `STORE_STORAGE`. + /// Public key that will be attached to any created store. pub fn get_admin_public_key(&self) -> &PublicKey { &self.admin_public_key } + /// Retrieve the storage price per byte in yocotNEAR currently registered + /// with the factory. + pub fn get_storage_price_per_byte(&self) -> U128 { + self.storage_price_per_byte.into() + } + + /// Retrieve the store cost in yocotNEAR currently registered with the + /// factory. + pub fn get_store_cost(&self) -> U128 { + self.store_cost.into() + } + /// The Near Storage price per byte has changed in the past, and may change in /// the future. This method may never be used. #[payable] @@ -213,6 +214,7 @@ impl MintbaseStoreFactory { } } + /// Initialization #[init(ignore_state)] pub fn new() -> Self { assert!(!env::state_exists()); @@ -246,7 +248,7 @@ impl MintbaseStoreFactory { metadata: NFTContractMetadata, owner_id: AccountId, ) -> Promise { - self.assert_sufficient_attached_deposit(); + assert!(env::attached_deposit() >= self.store_cost); self.assert_no_store_with_id(metadata.name.clone()); assert_ne!(&metadata.name, "market"); // marketplace lives here assert_ne!(&metadata.name, "loan"); // loan lives here @@ -268,16 +270,17 @@ impl MintbaseStoreFactory { .add_full_access_key(self.admin_public_key.clone()) .deploy_contract(include_bytes!("../../wasm/store.wasm").to_vec()) .function_call("new".to_string(), init_args, 0, gas::CREATE_STORE) - .then(factory_self::on_create( - env::predecessor_account_id(), - metadata, - owner_id, - store_account_id, - env::attached_deposit().into(), - env::current_account_id(), - NO_DEPOSIT, - gas::ON_CREATE_CALLBACK, - )) + .then( + ext_factory::ext(env::current_account_id()) + .with_static_gas(gas::ON_CREATE_CALLBACK) + .on_create( + env::predecessor_account_id(), + metadata, + owner_id, + store_account_id, + env::attached_deposit().into(), + ), + ) } } diff --git a/helper/Cargo.toml b/helper/Cargo.toml deleted file mode 100644 index 082a4b2..0000000 --- a/helper/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "helper" -version = "0.1.0" -edition = "2021" - -[lib] -crate-type = ["cdylib"] - -[dependencies] -mintbase-deps = { path = "../mintbase-deps", features = ["helper-wasm"] } diff --git a/helper/src/lib.rs b/helper/src/lib.rs deleted file mode 100644 index f0a1e11..0000000 --- a/helper/src/lib.rs +++ /dev/null @@ -1,55 +0,0 @@ -use mintbase_deps::near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use mintbase_deps::near_sdk::{ - self, - env, - near_bindgen, - AccountId, - PromiseOrValue, -}; - -// ----------------------------- smart contract ----------------------------- // -#[near_bindgen] -#[derive(BorshDeserialize, BorshSerialize)] -pub struct HelperWasm { - pub count: u64, -} - -/// default must be implemented for wasm compilation. -impl Default for HelperWasm { - fn default() -> Self { - Self { count: 0 } - } -} - -#[near_bindgen] -impl HelperWasm { - #[init(ignore_state)] - pub fn new() -> Self { - Self { count: 0 } - } - - pub fn nft_on_transfer( - &mut self, - sender_id: AccountId, - previous_owner_id: AccountId, - token_id: String, - msg: String, - ) -> PromiseOrValue { - env::log_str( - format!( - "in nft_on_transfer; sender_id={}, previous_owner_id={}, token_id={}, msg={}", - &sender_id, &previous_owner_id, &token_id, msg - ) - .as_str(), - ); - match msg.as_str() { - "true" => PromiseOrValue::Value(true), - "false" => PromiseOrValue::Value(false), - _ => env::panic_str("unsupported msg"), - } - } -} diff --git a/mintbase-core-docs b/mintbase-core-docs deleted file mode 160000 index 82450d6..0000000 --- a/mintbase-core-docs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 82450d690a1c3dc8c189cb3695353bd3f025966b diff --git a/mintbase-deps/Cargo.toml b/mintbase-deps/Cargo.toml index 3099b21..255974d 100644 --- a/mintbase-deps/Cargo.toml +++ b/mintbase-deps/Cargo.toml @@ -11,9 +11,10 @@ crate-type = ["rlib", "cdylib"] [dependencies] clap = { version = "3.0.0-beta.2", optional = true } -near-sdk = { version = "4.0.0-pre.7", optional = true } +near-sdk = { version = "4.1.1", optional = true } serde = { version = "1", features = ["derive"] } serde_json = "1.0.81" +ed25519-dalek = "1.0.0" [dependencies.near_events] git = "https://github.com/mintbase/near-events" diff --git a/mintbase-deps/src/asserts.rs b/mintbase-deps/src/asserts.rs deleted file mode 100644 index 0b97598..0000000 --- a/mintbase-deps/src/asserts.rs +++ /dev/null @@ -1,188 +0,0 @@ -#[macro_export] -macro_rules! near_panic { - ($msg:literal) => { - near_sdk::env::panic_str($msg) - }; - - ($msg:literal, $($arg:expr),*) => { - near_sdk::env::panic_str(format!($msg, $($arg),*).as_str()) - }; -} - -#[macro_export] -macro_rules! near_assert { - ($predicate:expr, $msg:literal) => { - if !$predicate { - $crate::near_panic!($msg) - } - }; - - ($predicate:expr, $msg:literal, $($arg:expr),*) => { - if !$predicate { - $crate::near_panic!($msg, $($arg),*) - } - }; -} - -#[macro_export] -macro_rules! near_assert_eq { - ($a:expr, $b:expr ,$msg:literal) => { - if $a != $b { - $crate::near_panic!($msg) - } - }; - - ($a:expr, $b:expr ,$msg:literal, $($arg:expr),*) => { - if $a != $b { - $crate::near_panic!($msg, $($arg),*) - } - }; -} - -#[macro_export] -macro_rules! near_assert_ne { - ($a:expr, $b:expr ,$msg:literal) => { - if $a == $b { - $crate::near_panic!($msg) - } - }; - - ($a:expr, $b:expr ,$msg:literal, $($arg:expr),*) => { - if $a == $b { - $crate::near_panic!($msg, $($arg),*) - } - }; -} - -// TODO: near_assert_range - -// ------------- specific asserts for mintbase smart contracts -------------- // - -// Theoretically a duplicate for `near_sdk::assert_one_yocto`, but this version -// uses `near_sdk_env::panic`, where as `near_sdk::assert_one_yocto` uses rusts -// builtin `panic!` macro. -#[macro_export] -macro_rules! assert_yocto_deposit { - () => { - if env::attached_deposit() != 1 { - $crate::near_panic!("Requires attached deposit of exactly 1 yoctoNEAR") - } - }; -} - -// full-macro panics which generate larger code but give src locations -// We can shave ~1% off contract size by moving these into methods on `Token` - -#[macro_export] -macro_rules! assert_token_owned_by { - ($token:expr, $account:expr) => { - if !$token.is_owned_by($account) { - $crate::near_panic!( - "{} is required to own token {} ({}, {}:{})", - $account, - $token.id, - file!(), - line!(), - column!() - ); - } - }; -} - -#[macro_export] -macro_rules! assert_token_owned_by_predecessor { - ($token:expr) => { - $crate::assert_token_owned_by!($token, &$crate::near_sdk::env::predecessor_account_id()) - }; -} - -#[macro_export] -macro_rules! assert_token_owned_or_approved { - ($token:expr, $account:expr, $approval_id:expr) => { - if !$token.is_owned_by($account) { - let src = format!("{}, {}:{}", file!(), line!(), column!()); - match ($token.approvals.get($account), $approval_id) { - (_, None) => { - $crate::near_panic!("Disallowing approvals without approval ID! ({})", src) - }, - (None, _) => { - $crate::near_panic!( - "{} has no approval for token {} ({})", - $account, - $token.id, - src - ) - }, - (Some(a), Some(b)) if *a != b => { - $crate::near_panic!( - "The current approval ID is {}, but {} has been provided ({})", - a, - b, - src - ) - }, - _ => { /* everything ok */ }, - } - } - }; -} - -#[macro_export] -macro_rules! assert_token_unloaned { - ($token:expr) => { - if $token.is_loaned() { - $crate::near_panic!( - "Token {} must not be loaned ({}, {}:{})", - $token.id, - file!(), - line!(), - column!() - ); - } - }; -} - -#[macro_export] -macro_rules! assert_storage_deposit { - ($required:expr) => { - if env::attached_deposit() < $required { - $crate::near_panic!( - "Requires storage deposit of at least {} yoctoNEAR ({}, {}:{})", - $required, - file!(), - line!(), - column!() - ); - } - }; -} - -#[macro_export] -macro_rules! assert_payment_deposit { - ($required:expr) => { - if env::attached_deposit() < $required { - $crate::near_panic!( - "Requires payment of at least {} yoctoNEAR ({}, {}:{})", - $required, - file!(), - line!(), - column!() - ); - } - }; -} - -#[macro_export] -macro_rules! assert_payment_deposit_eq { - ($required:expr) => { - if env::attached_deposit() != $required { - $crate::near_panic!( - "Requires payment of exactly {} yoctoNEAR ({}, {}:{})", - $required, - file!(), - line!(), - column!() - ); - } - }; -} diff --git a/mintbase-deps/src/common.rs b/mintbase-deps/src/common.rs deleted file mode 100644 index 4156abd..0000000 --- a/mintbase-deps/src/common.rs +++ /dev/null @@ -1,56 +0,0 @@ -// pub mod loan; -// pub mod owner; -pub mod payouts; -pub mod safe_fraction; -pub mod sale_args; -// pub mod storage; -pub mod store_init_args; -pub mod store_metadata; -pub mod time; -// pub mod token; -pub mod token_key; -pub mod token_listing; -pub mod token_metadata; -pub mod token_offer; - -// pub use loan::Loan; -// pub use owner::Owner; -pub use payouts::{ - OwnershipFractions, - Payout, - Royalty, - RoyaltyArgs, - SplitBetween, - SplitBetweenUnparsed, - SplitOwners, -}; -pub use safe_fraction::{ - MultipliedSafeFraction, - SafeFraction, -}; -pub use sale_args::SaleArgs; -// pub use storage::{ -// StorageCosts, -// StorageCostsMarket, -// }; -pub use store_init_args::StoreInitArgs; -pub use store_metadata::{ - NFTContractMetadata, - NonFungibleContractMetadata, -}; -pub use time::{ - NearTime, - TimeUnit, -}; -// pub use token::{ -// Token, -// TokenCompliant, -// }; -pub use token_key::TokenKey; -pub use token_listing::TokenListing; -pub use token_metadata::{ - TokenMetadata, - TokenMetadataCompliant, -}; -pub use token_offer::TokenOffer; -// pub use store_metadata::{}; diff --git a/mintbase-deps/src/common/payouts/mod.rs b/mintbase-deps/src/common/payouts/mod.rs deleted file mode 100644 index f5e8d5f..0000000 --- a/mintbase-deps/src/common/payouts/mod.rs +++ /dev/null @@ -1,17 +0,0 @@ -pub mod payout; -pub mod royalty; -pub mod splits; - -pub use payout::{ - OwnershipFractions, - Payout, -}; -pub use royalty::{ - Royalty, - RoyaltyArgs, -}; -pub use splits::{ - SplitBetween, - SplitBetweenUnparsed, - SplitOwners, -}; diff --git a/mintbase-deps/src/common/payouts/payout.rs b/mintbase-deps/src/common/payouts/payout.rs deleted file mode 100644 index 8e77e76..0000000 --- a/mintbase-deps/src/common/payouts/payout.rs +++ /dev/null @@ -1,113 +0,0 @@ -use std::collections::HashMap; - -use near_sdk::json_types::U128; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; -use near_sdk::{ - AccountId, - Balance, -}; - -use crate::common::{ - MultipliedSafeFraction, - Royalty, - SafeFraction, - SplitOwners, -}; -use crate::constants::MAX_LEN_PAYOUT; - -/// Whom to pay. Generated from `OwnershipFractions`. -#[derive(Serialize, Deserialize)] -pub struct Payout { - pub payout: HashMap, -} - -/// Take the Royalty and SplitOwner information for a token, and return a Vector -/// of proportional payouts. -#[derive(Serialize, Deserialize)] -pub struct OwnershipFractions { - pub fractions: HashMap, -} - -impl OwnershipFractions { - /// Generate a mapping of who receives what from a token's Royalty, - /// SplitOwners, and normal owner data. - pub fn new( - owner_id: &str, - royalty: &Option, - split_owners: &Option, - ) -> Self { - let roy_len = royalty.as_ref().map(|r| r.split_between.len()).unwrap_or(0); - let split_len = split_owners - .as_ref() - .map(|r| r.split_between.len()) - .unwrap_or(1); - crate::near_assert!( - (roy_len + split_len) as u32 <= MAX_LEN_PAYOUT, - "Number of payout addresses may not exceed {}", - MAX_LEN_PAYOUT - ); - - let mut payout: HashMap = Default::default(); - let percentage_not_taken_by_royalty = match royalty { - Some(royalty) => { - let (split_between, percentage) = - (royalty.split_between.clone(), royalty.percentage); - split_between.iter().for_each(|(receiver, &rel_perc)| { - let abs_perc: MultipliedSafeFraction = percentage * rel_perc; - payout.insert(receiver.to_string().parse().unwrap(), abs_perc); - }); - SafeFraction::new(10_000 - percentage.numerator) - }, - None => SafeFraction::new(10_000u32), - }; - - match split_owners { - Some(ref split_owners) => { - split_owners - .split_between - .iter() - .for_each(|(receiver, &rel_perc)| { - let abs_perc: MultipliedSafeFraction = - percentage_not_taken_by_royalty * rel_perc; - // If an account is already in the payout map, update their take. - if let Some(&roy_perc) = payout.get(receiver) { - payout.insert(receiver.clone(), abs_perc + roy_perc); - } else { - payout.insert(receiver.clone(), abs_perc); - } - }); - }, - None => { - if let Some(&roy_perc) = payout.get(&AccountId::new_unchecked(owner_id.to_string())) - { - payout.insert( - owner_id.to_string().parse().unwrap(), - MultipliedSafeFraction::from(percentage_not_taken_by_royalty) + roy_perc, - ); - } else { - payout.insert( - owner_id.to_string().parse().unwrap(), - MultipliedSafeFraction::from(percentage_not_taken_by_royalty), - ); - } - }, - }; - Self { fractions: payout } - } - - pub fn into_payout( - self, - balance: Balance, - ) -> Payout { - Payout { - payout: self - .fractions - .into_iter() - .map(|(k, v)| (k, v.multiply_balance(balance).into())) - .collect(), - } - } -} diff --git a/mintbase-deps/src/common/payouts/royalty.rs b/mintbase-deps/src/common/payouts/royalty.rs deleted file mode 100644 index 0862aa1..0000000 --- a/mintbase-deps/src/common/payouts/royalty.rs +++ /dev/null @@ -1,85 +0,0 @@ -use std::collections::HashMap; -use std::convert::TryFrom; - -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; -use near_sdk::AccountId; - -use crate::common::{ - SafeFraction, - SplitBetween, - SplitBetweenUnparsed, -}; -use crate::constants::ROYALTY_UPPER_LIMIT; - -/// A representation of permanent partial ownership of a Token's revenues. -/// Percentages must add to 10,000. On purchase of the `Token`, a percentage of -/// the value of the transaction will be paid out to each account in the -/// `Royalty` mapping. `Royalty` field once set can NEVER change for this -/// `Token`, even if removed and re-added. -#[derive(PartialEq, Eq)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct Royalty { - /// Mapping of addresses to relative percentages of the overall royalty percentage - pub split_between: HashMap, - /// The overall royalty percentage taken - pub percentage: SafeFraction, -} - -/// Stable -impl Royalty { - /// Validates all arguments. Addresses must be valid and percentages must be - /// within accepted values. Hashmap percentages must add to 10000. - pub fn new(royalty_args: RoyaltyArgs) -> Self { - let percentage = royalty_args.percentage; - let split_between = royalty_args.split_between; - - crate::near_assert!( - percentage <= ROYALTY_UPPER_LIMIT, - "Royalties must not exceed 50% of a sale", - ); - crate::near_assert!(percentage > 0, "Royalty percentage cannot be zero"); - crate::near_assert!( - !split_between.is_empty(), - "Royalty mapping may not be empty" - ); - - let mut sum: u32 = 0; - let split_between: SplitBetween = split_between - .into_iter() - .map(|(addr, numerator)| { - // TODO: different method than splits? - crate::near_assert!( - AccountId::try_from(addr.to_string()).is_ok(), - "{} is not a valid account ID on NEAR", - addr - ); - crate::near_assert!(numerator > 0, "Royalty for {} cannot be zero", addr); - let sf = SafeFraction::new(numerator); - sum += sf.numerator; - (addr, sf) - }) - .collect(); - crate::near_assert_eq!(sum, 10_000, "Fractions need to add up to 10_000"); - - Self { - percentage: SafeFraction::new(percentage), - split_between, - } - } -} - -/// Unparsed pre-image of a Royalty struct. Used in `Store::mint_tokens`. -#[derive(Clone, Deserialize, Serialize)] -pub struct RoyaltyArgs { - pub split_between: SplitBetweenUnparsed, - pub percentage: u32, -} diff --git a/mintbase-deps/src/common/payouts/splits.rs b/mintbase-deps/src/common/payouts/splits.rs deleted file mode 100644 index 709a36d..0000000 --- a/mintbase-deps/src/common/payouts/splits.rs +++ /dev/null @@ -1,59 +0,0 @@ -use std::collections::HashMap; - -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::{ - env, - AccountId, -}; -use serde::{ - Deserialize, - Serialize, -}; - -use crate::common::SafeFraction; - -pub type SplitBetweenUnparsed = HashMap; -pub type SplitBetween = HashMap; - -/// A representation of the splitting of ownership of the Token. Percentages -/// must add to 1. On purchase of the `Token`, the value of the transaction -/// (minus royalty percentage) will be paid out to each account in `SplitOwners` -/// mapping. The `SplitOwner` field on the `Token` will be set to `None` after -/// each transfer of the token. -#[derive(Clone, Debug, Deserialize, Serialize)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -pub struct SplitOwners { - pub split_between: HashMap, -} - -impl SplitOwners { - pub fn new(split_between: HashMap) -> Self { - crate::near_assert!( - split_between.len() >= 2, - "Requires at least two accounts to split revenue" - ); - // validate args - let mut sum: u32 = 0; - let split_between: HashMap = split_between - .into_iter() - .map(|(addr, numerator)| { - crate::near_assert!( - // TODO: different method than royalty? - env::is_valid_account_id(addr.as_bytes()), - "{} is not a valid account ID on NEAR", - addr - ); - let sf = SafeFraction::new(numerator); - sum += sf.numerator; - (addr, sf) - }) - .collect(); - crate::near_assert!(sum == 10_000, "Splits numerators must sum up to 10_000"); - - Self { split_between } - } -} diff --git a/mintbase-deps/src/common/safe_fraction.rs b/mintbase-deps/src/common/safe_fraction.rs deleted file mode 100644 index 6ecab11..0000000 --- a/mintbase-deps/src/common/safe_fraction.rs +++ /dev/null @@ -1,124 +0,0 @@ -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; -use near_sdk::Balance; - -/// A provisional safe fraction type, borrowed and modified from: -/// https://github.com/near/core-contracts/blob/master/staking-pool/src/lib.rs#L127 -/// The numerator is a value between 0 and 10,000. The denominator is -/// assumed to be 10,000. -#[derive(Debug, Clone, PartialEq, Eq, Copy)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -#[derive(Deserialize, Serialize)] -pub struct SafeFraction { - pub numerator: u32, -} - -/// A SafeFraction that has been multiplied with another SafeFraction. Denominator is 10^8. -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -#[derive(Clone, Debug, Deserialize, Serialize, Copy)] -pub struct MultipliedSafeFraction { - pub numerator: u32, -} - -impl SafeFraction { - /// Take a u32 numerator to a 10^4 denominator. - /// - /// Upper limit is 10^4 so as to prevent multiplication with overflow. - pub fn new(numerator: u32) -> Self { - crate::near_assert!( - (0..=10000).contains(&numerator), - "{} must be between 0 and 10_000", - numerator - ); - SafeFraction { numerator } - } - - /// Fractionalize a balance. - pub fn multiply_balance( - &self, - value: Balance, - ) -> Balance { - value / 10_000u128 * self.numerator as u128 - } -} - -impl std::ops::Sub for SafeFraction { - type Output = SafeFraction; - - fn sub( - self, - rhs: Self, - ) -> Self::Output { - crate::near_assert!( - self.numerator >= rhs.numerator, - "Subtraction result cannot be negative" - ); - Self { - numerator: self.numerator - rhs.numerator, - } - } -} - -impl std::ops::SubAssign for SafeFraction { - fn sub_assign( - &mut self, - rhs: Self, - ) { - crate::near_assert!( - self.numerator >= rhs.numerator, - "Subtraction result cannot be negative" - ); - self.numerator -= rhs.numerator; - } -} - -impl std::ops::Mul for SafeFraction { - type Output = MultipliedSafeFraction; - - fn mul( - self, - rhs: Self, - ) -> Self::Output { - MultipliedSafeFraction { - numerator: self.numerator * rhs.numerator, - } - } -} - -impl From for MultipliedSafeFraction { - fn from(f: SafeFraction) -> Self { - MultipliedSafeFraction { - numerator: f.numerator * 10_000, - } - } -} - -impl std::ops::Add for MultipliedSafeFraction { - type Output = Self; - - fn add( - self, - rhs: Self, - ) -> Self::Output { - MultipliedSafeFraction { - numerator: self.numerator + rhs.numerator, - } - } -} - -impl MultipliedSafeFraction { - /// Fractionalize a balance. - pub fn multiply_balance( - &self, - value: Balance, - ) -> Balance { - value / 100_000_000u128 * self.numerator as u128 - } -} diff --git a/mintbase-deps/src/common/sale_args.rs b/mintbase-deps/src/common/sale_args.rs deleted file mode 100644 index 720e3a2..0000000 --- a/mintbase-deps/src/common/sale_args.rs +++ /dev/null @@ -1,12 +0,0 @@ -use near_sdk::json_types::U128; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; - -/// ref: https://github.com/near-apps/nft-market/blob/main/contracts/market-simple/src/lib.rs#L54 -#[derive(Serialize, Deserialize)] -pub struct SaleArgs { - pub price: U128, - pub autotransfer: bool, -} diff --git a/mintbase-deps/src/common/store_init_args.rs b/mintbase-deps/src/common/store_init_args.rs deleted file mode 100644 index c0cb2c6..0000000 --- a/mintbase-deps/src/common/store_init_args.rs +++ /dev/null @@ -1,19 +0,0 @@ -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; -use near_sdk::AccountId; - -use crate::common::NFTContractMetadata; - -#[derive(Clone, Debug, Deserialize, Serialize)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -pub struct StoreInitArgs { - pub metadata: NFTContractMetadata, - pub owner_id: AccountId, -} diff --git a/mintbase-deps/src/common/store_metadata.rs b/mintbase-deps/src/common/store_metadata.rs deleted file mode 100644 index 1b4fb7b..0000000 --- a/mintbase-deps/src/common/store_metadata.rs +++ /dev/null @@ -1,52 +0,0 @@ -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::json_types::Base64VecU8; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; - -#[derive(Clone, Debug, Deserialize, Serialize)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -pub struct NFTContractMetadata { - /// a version like "nft-1.0.0" - pub spec: String, - /// Subaccount of this `Store`. `Factory` is the super-account. - pub name: String, - /// Symbol of the Store. Up to 6 chars. - pub symbol: String, - /// a small image associated with this `Store`. - pub icon: Option, - /// Centralized gateway known to have reliable access to decentralized storage - /// assets referenced by `reference` or `media` URLs - pub base_uri: Option, - /// URL to a JSON file with more info - pub reference: Option, - /// Base64-encoded sha256 hash of the JSON file pointed at by the reference - /// field. Required if `reference` is included. - pub reference_hash: Option, -} - -impl Default for NFTContractMetadata { - fn default() -> Self { - Self { - spec: "".to_string(), - name: "".to_string(), - symbol: "".to_string(), - icon: None, - base_uri: None, - reference: None, - reference_hash: None, - } - } -} - -/// ref: -/// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Metadata.md -pub trait NonFungibleContractMetadata { - /// Get the metadata for this `Store`. - fn nft_metadata(&self) -> &NFTContractMetadata; -} diff --git a/mintbase-deps/src/common/time.rs b/mintbase-deps/src/common/time.rs deleted file mode 100644 index 68d01eb..0000000 --- a/mintbase-deps/src/common/time.rs +++ /dev/null @@ -1,52 +0,0 @@ -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::env; -use serde::{ - Deserialize, - Serialize, -}; - -/// This enum used to support other time denominations, which were dropped -/// for simplicity. -#[derive(Debug, Serialize, Deserialize, Clone)] -#[cfg_attr(feature = "wasm", derive(BorshSerialize, BorshDeserialize,))] -pub enum TimeUnit { - Hours(u64), -} - -#[derive(Debug, Serialize, Deserialize, Clone)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -pub struct NearTime(pub u64); - -impl NearTime { - pub fn is_before_timeout(&self) -> bool { - now().0 < self.0 - } - - pub fn new(span: TimeUnit) -> Self { - match span { - TimeUnit::Hours(n) => Self::now_plus_n_hours(n), - } - } - - fn now_plus_n_hours(n: u64) -> Self { - crate::near_assert!(n > 0, "Cannot set times into the past"); - crate::near_assert!( - n < 70_000, - "Cannot set times more than 70_000 hours into the future (~8 years)" - ); - let now = env::block_timestamp(); - let hour_ns = 10u64.pow(9) * 3600; - Self(now + n * hour_ns) - } -} - -/// An alias for env::block_timestamp. Note that block_timestamp returns -/// the number of **nanoseconds since Jan 1 1970 UTC**. Note that each day -/// is 8.64*10^14 nanoseconds. -pub fn now() -> NearTime { - NearTime(env::block_timestamp()) -} diff --git a/mintbase-deps/src/common/token_key.rs b/mintbase-deps/src/common/token_key.rs deleted file mode 100644 index ce9c915..0000000 --- a/mintbase-deps/src/common/token_key.rs +++ /dev/null @@ -1,56 +0,0 @@ -use std::fmt; - -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; -use near_sdk::AccountId; - -use crate::utils::split_colon; - -#[derive(Clone, Debug, Deserialize, Serialize)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -pub struct TokenKey { - pub token_id: u64, - pub account_id: String, -} - -impl TokenKey { - pub fn new( - n: u64, - account_id: AccountId, - ) -> Self { - Self { - token_id: n, - account_id: account_id.into(), - } - } - - pub fn split(self) -> (u64, String) { - (self.token_id, self.account_id) - } -} - -impl fmt::Display for TokenKey { - fn fmt( - &self, - f: &mut fmt::Formatter, - ) -> fmt::Result { - write!(f, "{}:{}", self.token_id, self.account_id) - } -} - -impl From<&str> for TokenKey { - fn from(s: &str) -> Self { - let (id, account_id) = split_colon(s); - Self { - token_id: id.parse::().unwrap(), - account_id: account_id.to_string(), - } - } -} diff --git a/mintbase-deps/src/common/token_listing.rs b/mintbase-deps/src/common/token_listing.rs deleted file mode 100644 index 06be783..0000000 --- a/mintbase-deps/src/common/token_listing.rs +++ /dev/null @@ -1,92 +0,0 @@ -use std::convert::TryInto; - -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::json_types::U128; -use near_sdk::AccountId; -use serde::{ - Deserialize, - Serialize, -}; - -use crate::common::{ - TokenKey, - TokenOffer, -}; - -/// A Token for sale on the Marketplace. -#[derive(Deserialize, Serialize, Debug)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -pub struct TokenListing { - /// Id of this `Token`. - pub id: u64, - /// Owner of this `Token`. - pub owner_id: AccountId, - /// `Store` that originated this `Token`. - pub store_id: AccountId, - /// If `autotransfer` is enabled, the Token will automatically be - /// transferred to an Offerer if their `Offer::price` is greater than the - /// `asking_price`. Note that enabling `autotransfer` does not - /// retroactively trigger on the presently held `current_offer` - pub autotransfer: bool, - /// The price set by the owner of this Token. - pub asking_price: U128, - /// The `approval_id` of the Token allows the Marketplace to transfer the - /// Token, if purchased. The `approval_id` is also used to generate - /// unique identifiers for Token-listings. - pub approval_id: u64, - /// The current `Offer` for this listing. This `Offer` may have timed - /// out; if the `Marketplace::min_offer_hours` has transpired, the - /// `Offer` may be withdrawn by the account in `Offer::from`. - pub current_offer: Option, - /// The number of `Offer`s that have been made on this listing. Used to - /// generate Offer `id`s. - pub num_offers: u64, - /// When the transfer process is initiated, the token is locked, and no - /// further changes may be made on the token. - pub locked: bool, -} - -impl TokenListing { - /// Check that the given `account_id` is valid before instantiating a - /// `Token`. Note that all input validation for `Token` functions should - /// be performed at the `Marketplace` level. - pub fn new( - owner_id: AccountId, - store_id: AccountId, - id: u64, - approval_id: u64, - autotransfer: bool, - asking_price: U128, - ) -> Self { - Self { - id, - owner_id, - store_id, - approval_id, - autotransfer, - asking_price, - current_offer: None, - num_offers: 0, - locked: false, - } - } - - /// Unique identifier of the Token. - pub fn get_token_key(&self) -> TokenKey { - TokenKey::new(self.id, self.store_id.to_string().try_into().unwrap()) - } - - /// Unique identifier of the Token, which is also unique across - /// relistings of the Token. - pub fn get_list_id(&self) -> String { - format!("{}:{}:{}", self.id, self.approval_id, self.store_id) - } - - pub fn assert_not_locked(&self) { - assert!(!self.locked); - } -} diff --git a/mintbase-deps/src/common/token_metadata.rs b/mintbase-deps/src/common/token_metadata.rs deleted file mode 100644 index 503058b..0000000 --- a/mintbase-deps/src/common/token_metadata.rs +++ /dev/null @@ -1,116 +0,0 @@ -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::json_types::Base64VecU8; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; - -// NON-COMPLIANT https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Metadata.md -/// ref: -/// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Metadata.md -#[derive(Clone, Debug, Deserialize, Serialize)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -pub struct TokenMetadata { - /// the Title for this token. ex. "Arch Nemesis: Mail Carrier" or "Parcel 5055" - pub title: Option, - /// free-form description of this token. - pub description: Option, - /// URL to associated media, preferably to decentralized, content-addressed storage - pub media: Option, - /// Base64-encoded sha256 hash of content referenced by the `media` field. - /// Required if `media` is included. - pub media_hash: Option, - /// number of copies of this set of metadata in existence when token was minted. - pub copies: Option, - /// ISO 8601 datetime when token expires. - pub expires_at: Option, - /// ISO 8601 datetime when token starts being valid. - pub starts_at: Option, - /// When token was last updated, Unix epoch in milliseconds - pub extra: Option, - /// URL to an off-chain JSON file with more info. The Mintbase Indexer refers - /// to this field as `thing_id` or sometimes, `meta_id`. - pub reference: Option, - /// Base64-encoded sha256 hash of JSON from reference field. Required if - /// `reference` is included. - pub reference_hash: Option, -} - -impl TokenMetadata { - /// Get the metadata and its size in bytes. - pub fn from_with_size( - args: TokenMetadata, - copies: u64, - ) -> (Self, u64) { - // if args.media.is_some() { - // crate::near_assert!( - // args.media_hash.is_some(), - // "Cannot specificy metadata.media without metadata.media_hash" - // ); - // } - - // if args.reference.is_some() { - // crate::near_assert!( - // args.reference_hash.is_some(), - // "Cannot specificy metadata.reference without metadata.reference_hash" - // ); - // } - - let metadata = Self { - title: args.title, - description: args.description, - media: args.media, - media_hash: args.media_hash, - copies: (copies as u16).into(), - expires_at: args.expires_at, - starts_at: args.starts_at, - extra: args.extra, - reference: args.reference, - reference_hash: args.reference_hash, - }; - - let size = serde_json::to_vec(&metadata).unwrap().len(); - - // let size = metadata.try_to_vec().unwrap().len(); - - (metadata, size as u64) - } -} - -// NON-COMPLIANT https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Metadata.md -/// ref: -/// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Metadata.md -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct TokenMetadataCompliant { - /// the Title for this token. ex. "Arch Nemesis: Mail Carrier" or "Parcel 5055" - pub title: Option, - /// free-form description of this token. - pub description: Option, - /// URL to associated media, preferably to decentralized, content-addressed storage - pub media: Option, - /// Base64-encoded sha256 hash of content referenced by the `media` field. - /// Required if `media` is included. - pub media_hash: Option, - /// number of copies of this set of metadata in existence when token was minted. - pub copies: Option, - /// When token was issued or minted, Unix epoch in milliseconds - pub issued_at: Option, - /// ISO 8601 datetime when token expires. - pub expires_at: Option, - /// ISO 8601 datetime when token starts being valid. - pub starts_at: Option, - /// When token was last updated, Unix epoch in milliseconds - pub updated_at: Option, - /// Brief description of what this thing is. Used by the mintbase indexer as "memo". - pub extra: Option, - /// URL to an off-chain JSON file with more info. The Mintbase Indexer refers - /// to this field as `thing_id` or sometimes, `meta_id`. - pub reference: Option, - /// Base64-encoded sha256 hash of JSON from reference field. Required if - /// `reference` is included. - pub reference_hash: Option, -} diff --git a/mintbase-deps/src/common/token_offer.rs b/mintbase-deps/src/common/token_offer.rs deleted file mode 100644 index 7ab38e6..0000000 --- a/mintbase-deps/src/common/token_offer.rs +++ /dev/null @@ -1,59 +0,0 @@ -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::{ - env, - AccountId, -}; -use serde::{ - Deserialize, - Serialize, -}; - -use crate::common::time::{ - now, - NearTime, - TimeUnit, -}; - -/// Type representing an offer for a `Token` the marketplace -#[derive(Serialize, Deserialize, Clone, Debug)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -pub struct TokenOffer { - /// The id of this `Offer` is the num of the previous `Offer` + 1. Generated - /// from the field `Token::num_offers`. - pub id: u64, - /// The price the Offerer has posted. - pub price: u128, - /// The account who originated the `Offer`. - pub from: AccountId, - /// When the `Offer` was made. - pub timestamp: NearTime, - /// When the `Offer` will expire. - pub timeout: NearTime, -} - -impl TokenOffer { - /// Timeout is in days. - pub fn new( - price: u128, - timeout: TimeUnit, - id: u64, - ) -> Self { - let timeout = NearTime::new(timeout); - Self { - id, - price, - from: env::predecessor_account_id(), - timestamp: now(), - timeout, - } - } - - /// An offer is active if it has yet to timeout. - pub fn is_active(&self) -> bool { - self.timeout.is_before_timeout() - } -} diff --git a/mintbase-deps/src/constants.rs b/mintbase-deps/src/constants.rs index 156b5e8..1f7d61a 100644 --- a/mintbase-deps/src/constants.rs +++ b/mintbase-deps/src/constants.rs @@ -6,12 +6,6 @@ use near_sdk::borsh::{ }; use near_sdk::Balance; -// #[cfg(feature = "all")] -// use near_sdk::serde::{ -// Deserialize, -// Serialize, -// }; - /// Current price for one byte of on-chain storage, denominated in yoctoNEAR. pub const YOCTO_PER_BYTE: Balance = 10_000_000_000_000_000_000; @@ -35,7 +29,6 @@ pub mod gas { pub const PAYOUT_RESOLVE: Gas = tgas(30); /// Gas requirements for transferring an NFT and obtaining the payout. - // TODO: Check back with Amber for requirements pub const NFT_TRANSFER_PAYOUT: Gas = tgas(15); /// Gas requirements for creating a store. @@ -104,13 +97,6 @@ pub mod storage_stake { pub const CUSHION: Balance = 10u128.pow(23); } -// /// The amount of Storage in bytes consumed by a maximal sized Token with NO -// /// metadata and NO Royalty field. Rounded to 360 for extra cushion. -// pub const LIST_STORAGE: near_sdk::StorageUsage = 360; - -// storage -// pub const STORE_STORAGE: u64 = 550_000; // 499kB - /// Royalty upper limit is 50%. pub const ROYALTY_UPPER_LIMIT: u32 = 5000; @@ -120,26 +106,10 @@ pub const MAX_LEN_PAYOUT: u32 = 50; /// Minimum storage stake required to allow updates pub const MINIMUM_FREE_STORAGE_STAKE: near_sdk::Balance = 50 * YOCTO_PER_BYTE; -//? - -// /// The amount of Storage in bytes consumed by a maximal sized Token with NO -// /// metadata and NO Royalty field. Rounded to 360 for extra cushion. -// pub const TOKEN_STORAGE: near_sdk::StorageUsage = 360; - -// /// The storage in bytes (with a little padding) for: -// /// - a single royalty -// /// - a single approval -// /// - adding a new entry to the `tokens_per_account` map -// /// - adding a new entry to the `composeables` map -// pub const COMMON_STORAGE: near_sdk::StorageUsage = 80; - -// // ref: https://github.com/near-apps/nft-market/blob/main/contracts/nft-simple/src/nft_core.rs -// pub const GAS_RESOLVE_TRANSFER: u64 = 10_000_000_000_000; -// pub const GAS_NFT_TRANSFER_CALL: u64 = 25_000_000_000_000 + GAS_RESOLVE_TRANSFER; - -// #[derive(Clone, Debug)] -// #[cfg_attr(feature = "all", derive(Deserialize, Serialize))] -#[cfg_attr(feature = "store-wasm", derive(BorshDeserialize, BorshSerialize))] +#[cfg_attr( + feature = "store-wasm", + derive(BorshDeserialize, BorshSerialize, near_sdk::serde::Serialize, Clone) +)] pub struct StorageCosts { /// The Near-denominated price-per-byte of storage. As of April 2021, the /// price per bytes is set by default to 10^19, but this may change in the @@ -179,10 +149,7 @@ impl StorageCostsMarket { pub fn new(storage_price_per_byte: u128) -> Self { Self { storage_price_per_byte, - // list: storage_price_per_byte * LIST_STORAGE as u128, list: storage_stake::TOKEN, } } } - -// TODO: StorageCosts for Factory? diff --git a/mintbase-deps/src/interfaces.rs b/mintbase-deps/src/interfaces.rs index 05b4de2..94e69cf 100644 --- a/mintbase-deps/src/interfaces.rs +++ b/mintbase-deps/src/interfaces.rs @@ -1,242 +1,120 @@ -// this is required because of the `ext_contract` macro -#[cfg(feature = "market-wasm")] -pub use market_interfaces::*; - -/// Interfaces that we need the market to be aware of -#[cfg(feature = "market-wasm")] -#[allow(clippy::too_many_arguments)] -mod market_interfaces { - use near_sdk::json_types::{ - U128, - U64, - }; - use near_sdk::{ - self, - ext_contract, - }; - - use crate::common::TokenListing; - - #[ext_contract(ext_self)] - pub trait ExtSelf { - fn resolve_nft_payout( - &mut self, - token_key: String, - token: TokenListing, - others_keep: U128, - market_keeps: U128, - ) -> Promise; - } - - #[ext_contract(nft_contract)] - /// Impl of NEP-171. Note that the impl makes the assumption that `TokenId` has - /// type `String`, where this contract internally uses `u64`, which is more - /// efficient. ref: - /// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Core.md - pub trait NFTContract { - /// Transfer the token and get the payout data. - fn nft_transfer_payout( - &mut self, - receiver_id: AccountId, - token_id: U64, - approval_id: u64, - balance: U128, - max_len_payout: u32, - ) -> Promise; - } -} - -#[cfg(feature = "store-wasm")] -pub use store_interfaces::*; - -/// Interfaces that we need the store to be aware of -#[cfg(feature = "store-wasm")] -#[allow(clippy::too_many_arguments)] -mod store_interfaces { - use near_sdk::json_types::U64; - use near_sdk::{ - self, - ext_contract, - }; - - /// Non-Fungible Token Approval NEP 178. Ref: - /// https://github.com/near/NEPs/blobß/master/specs/Standards/NonFungibleToken/ApprovalManagement.md - #[ext_contract(ext_on_approve)] - pub trait NonFungibleOnApprove { - /// Approved Account Contract Interface If a contract that gets approved to - /// transfer NFTs wants to, it can implement nft_on_approve to update its own - /// state when granted approval for a token: Respond to notification that - /// contract has been granted approval for a token. - /// - /// Notes - /// * Contract knows the token contract ID from `predecessor_account_id` - /// - /// Arguments: - /// * `token_id`: the token to which this contract has been granted approval - /// * `owner_id`: the owner of the token - /// * `approval_id`: the approval ID stored by NFT contract for this approval. - /// Expected to be a number within the 2^53 limit representable by JSON. - /// * `msg`: specifies information needed by the approved contract in order to - /// handle the approval. Can indicate both a fn to call and the - /// parameters to pass to that fn. - fn nft_on_approve( - &mut self, - token_id: U64, - owner_id: AccountId, - approval_id: u64, - msg: String, - ); - fn nft_on_batch_approve( - &mut self, - tokens: Vec, - approvals: Vec, - owner_id: AccountId, - msg: String, - ); - } - - /// Impl of NEP-171 resolve transfer. ref: - /// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Core.md - #[ext_contract(ext_on_transfer)] - pub trait NonFungibleOnTransfer { - /// Take some action after receiving a non-fungible token. - /// - /// Requirements: * Contract MUST restrict calls to this function to a set of - /// allow-listed NFT contracts. - /// - /// Arguments: - /// * `sender_id`: the sender of `nft_transfer_call`. - /// * `previous_owner_id`: the account that owned the NFT prior to it being - /// transfered to this contract, which can differ from `sender_id` if using - /// Approval Management extension. - /// * `token_id`: the `token_id` argument given to `nft_transfer_call` - /// * `msg`: information necessary for this contract to know how to process the - /// request. This may include method names and/or arguments. - /// - /// Returns true if token should be returned to `sender_id`. - fn nft_on_transfer( - &mut self, - sender_id: AccountId, - previous_owner_id: AccountId, - token_id: U64, - msg: String, - ) -> Promise; - } +use near_sdk::json_types::{ + U128, + U64, +}; +use near_sdk::{ + self, + ext_contract, + AccountId, + Promise, +}; + +#[ext_contract(ext_old_market)] +pub trait ExtOldMarket { + fn resolve_nft_payout( + &mut self, + token_key: String, + token: crate::market_data::TokenListing, + others_keep: U128, + market_keeps: U128, + ) -> Promise; } -#[cfg(feature = "factory-wasm")] -pub use factory_interfaces::*; - -/// Interfaces that we need the factory to be aware of -#[cfg(feature = "factory-wasm")] -#[allow(clippy::too_many_arguments)] -mod factory_interfaces { - use near_sdk::json_types::U128; - use near_sdk::{ - self, - ext_contract, - }; - - use crate::common::NFTContractMetadata; - - #[ext_contract(factory_self)] - pub trait OnCreateCallback { - fn on_create( - &mut self, - store_creator_id: AccountId, - metadata: NFTContractMetadata, - owner_id: AccountId, - store_account_id: AccountId, - attached_deposit: U128, - ); - } +// #[ext_contract(ext_new_market)] +// pub trait ExtNewMarket { +// // FIXME: correct signature! +// fn resolve_nft_payout( +// &mut self, +// token_key: String, +// token: TokenListing, +// others_keep: U128, +// market_keeps: U128, +// ) -> Promise; +// } + +#[ext_contract(ext_nft)] +pub trait ExtNft { + /// Transfer the token and get the payout data. + fn nft_transfer_payout( + &mut self, + receiver_id: AccountId, + token_id: U64, + approval_id: u64, + balance: U128, + max_len_payout: u32, + ) -> Promise; + // TODO: resolve_transfer? } -// TODO: Is this used anywhere? -> nope -// --------------------------- nft core interface --------------------------- // - -/// Impl of NEP-171. Note that the impl makes the assumption that `TokenId` has -/// type `String`, where this contract internally uses `u64`, which is more -/// efficient. ref: -/// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Core.md -pub trait NonFungibleContractCore { - /// Simple transfer. Transfer a given `token_id` from current owner to - /// `receiver_id`. +#[ext_contract(ext_nft_on_approve)] +pub trait ExtNftOnApprove { + /// Approved Account Contract Interface If a contract that gets approved to + /// transfer NFTs wants to, it can implement nft_on_approve to update its own + /// state when granted approval for a token: Respond to notification that + /// contract has been granted approval for a token. /// - /// Requirements - /// * Caller of the method must attach a deposit of 1 yoctoⓃ for security purposes - /// * Contract MUST panic if called by someone other than token owner or, - /// if using Approval Management, one of the approved accounts - /// * `approval_id` is for use with Approval Management extension, see - /// that document for full explanation. - /// * If using Approval Management, contract MUST nullify approved accounts on - /// successful transfer. + /// Notes + /// * Contract knows the token contract ID from `predecessor_account_id` /// /// Arguments: - /// * `receiver_id`: the valid NEAR account receiving the token - /// * `token_id`: the token to transfer - /// * `approval_id`: expected approval ID. A number smaller than - /// 2^53, and therefore representable as JSON. See Approval Management - /// standard for full explanation. - /// * `memo` (optional): for use cases that may benefit from indexing or - /// providing information for a transfer - //#[payable] - fn nft_transfer( + /// * `token_id`: the token to which this contract has been granted approval + /// * `owner_id`: the owner of the token + /// * `approval_id`: the approval ID stored by NFT contract for this approval. + /// Expected to be a number within the 2^53 limit representable by JSON. + /// * `msg`: specifies information needed by the approved contract in order to + /// handle the approval. Can indicate both a fn to call and the + /// parameters to pass to that fn. + fn nft_on_approve( &mut self, - receiver_id: near_sdk::AccountId, - token_id: near_sdk::json_types::U64, - approval_id: Option, - memo: Option, + token_id: U64, + owner_id: AccountId, + approval_id: u64, + msg: String, ); + /// Batched version of `nft_on_approve`, not standardized! + fn nft_on_batch_approve( + &mut self, + tokens: Vec, + approvals: Vec, + owner_id: AccountId, + msg: String, + ); +} - /// Returns `true` if the token was transferred from the sender's account. +#[ext_contract(ext_nft_on_transfer)] +pub trait ExtNftOnTransfer { + /// Take some action after receiving a non-fungible token. /// - /// Transfer token and call a method on a receiver contract. A successful - /// workflow will end in a success execution outcome to the callback on the NFT - /// contract at the method `nft_resolve_transfer`. - /// - /// You can think of this as being similar to attaching native NEAR tokens to a - /// function call. It allows you to attach any Non-Fungible Token in a call to a - /// receiver contract. - /// - /// Requirements: - /// * Caller of the method must attach a deposit of 1 yoctoⓃ for security - /// purposes - /// * Contract MUST panic if called by someone other than token owner or, - /// if using Approval Management, one of the approved accounts - /// * The receiving contract must implement `ft_on_transfer` according to the - /// standard. If it does not, FT contract's `ft_resolve_transfer` MUST deal - /// with the resulting failed cross-contract call and roll back the transfer. - /// * Contract MUST implement the behavior described in `ft_resolve_transfer` - /// * `approval_id` is for use with Approval Management extension, see - /// that document for full explanation. - /// * If using Approval Management, contract MUST nullify approved accounts on - /// successful transfer. + /// Requirements: * Contract MUST restrict calls to this function to a set of + /// allow-listed NFT contracts. /// /// Arguments: - /// * `receiver_id`: the valid NEAR account receiving the token. - /// * `token_id`: the token to send. - /// * `approval_id`: expected approval ID. A number smaller than - /// 2^53, and therefore representable as JSON. See Approval Management - /// standard for full explanation. - /// * `memo` (optional): for use cases that may benefit from indexing or - /// providing information for a transfer. - /// * `msg`: specifies information needed by the receiving contract in - /// order to properly handle the transfer. Can indicate both a function to - /// call and the parameters to pass to that function. - //#[payable] - fn nft_transfer_call( + /// * `sender_id`: the sender of `nft_transfer_call`. + /// * `previous_owner_id`: the account that owned the NFT prior to it being + /// transfered to this contract, which can differ from `sender_id` if using + /// Approval Management extension. + /// * `token_id`: the `token_id` argument given to `nft_transfer_call` + /// * `msg`: information necessary for this contract to know how to process the + /// request. This may include method names and/or arguments. + /// + /// Returns true if token should be returned to `sender_id`. + fn nft_on_transfer( &mut self, - receiver_id: near_sdk::AccountId, - token_id: near_sdk::json_types::U64, - approval_id: Option, - memo: Option, + sender_id: AccountId, + previous_owner_id: AccountId, + token_id: U64, msg: String, - ) -> near_sdk::Promise; + ) -> Promise; +} - /// Returns the token with the given `token_id` or `None` if no such token. - fn nft_token( - &self, - token_id: near_sdk::json_types::U64, - ) -> Option; +#[ext_contract(ext_factory)] +pub trait ExtFactory { + fn on_create( + &mut self, + store_creator_id: AccountId, + metadata: crate::store_data::NFTContractMetadata, + owner_id: AccountId, + store_account_id: AccountId, + attached_deposit: U128, + ); } diff --git a/mintbase-deps/src/lib.rs b/mintbase-deps/src/lib.rs index 996966f..42255f5 100644 --- a/mintbase-deps/src/lib.rs +++ b/mintbase-deps/src/lib.rs @@ -1,41 +1,21 @@ -pub mod asserts; -pub mod common; +/// Storage costs, gas costs, maximum processable entities pub mod constants; +/// Function interfaces for cross-contract calls pub mod interfaces; +/// Holds events pub mod logging; -pub mod token; +/// Commonly used methods pub mod utils; +/// Types that the market uses to interface with the blockchain or with callers +pub mod market_data; +/// Types that the store uses to interface with the blockchain or with callers +// #[cfg(any(feature = "market-wasm", feature = "factory-wasm"))] +pub mod store_data; + // ----------------- re-exports for consistent dependencies ----------------- // pub use near_sdk::{ self, serde, serde_json, }; - -// // TODO: move module resolution to indexer -// #[cfg(feature = "all")] -// pub use crate::logging::{ -// NearJsonEvent, -// // Nep171Event, -// // Nep171EventLog, -// NftApproveLog, -// NftBurnLog, -// NftComposeLog, -// NftListLog, -// NftLoanSetLog, -// NftMakeOfferLog, -// NftMintLog, -// NftMintLogMemo, -// NftOptionStringLog, -// NftRevokeLog, -// NftSaleData, -// NftSetSplitOwnerLog, -// NftStoreCreateLog, -// NftStringLog, -// NftTransferLog, -// NftUpdateListLog, -// NftUpdateOfferData, -// UpdateAllowlistData, -// UpdateBanlistData, -// }; diff --git a/mintbase-deps/src/logging.rs b/mintbase-deps/src/logging.rs index a6e05fa..0fecf75 100644 --- a/mintbase-deps/src/logging.rs +++ b/mintbase-deps/src/logging.rs @@ -1,41 +1,22 @@ -use near_sdk::serde::{ - Deserialize, - Serialize, -}; +// TODO: specify in near events so import is not required here +#[cfg(feature = "factory-wasm")] +use near_sdk::serde::Serialize; -mod market; -mod mb_store_settings; -mod nft_approvals; -mod nft_core; -mod nft_payouts; -pub use market::*; -pub use mb_store_settings::*; -pub use nft_approvals::*; -pub use nft_core::*; -pub use nft_payouts::*; +#[cfg(feature = "market-wasm")] +pub mod market_events; +#[cfg(feature = "store-wasm")] +pub mod store_events; -// TODO: probably unused -> deprecate? -mod nft_composition; -mod nft_loan; -mod nft_move; -pub use nft_composition::*; -pub use nft_loan::*; -pub use nft_move::*; +#[cfg(feature = "market-wasm")] +pub use market_events::*; +#[cfg(feature = "store-wasm")] +pub use store_events::*; -// ------------------ general event according to standard ------------------- // - -// TODO: deprecate this abomination -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct NearJsonEvent { - pub standard: String, - pub version: String, - pub event: String, - pub data: String, -} - -impl NearJsonEvent { - pub fn near_json_event(&self) -> String { - let json = serde_json::to_string(&self).unwrap(); - format!("EVENT_JSON: {}", &json) - } +// ----------------------------- Factory event ------------------------------ // +#[cfg(feature = "factory-wasm")] +#[near_events::near_event_data(standard = "mb_store", version = "0.1.0", event = "deploy")] +pub struct MbStoreDeployData { + pub contract_metadata: crate::store_data::NFTContractMetadata, + pub owner_id: String, + pub store_id: String, } diff --git a/mintbase-deps/src/logging/market.rs b/mintbase-deps/src/logging/market.rs deleted file mode 100644 index f11b6b9..0000000 --- a/mintbase-deps/src/logging/market.rs +++ /dev/null @@ -1,282 +0,0 @@ -use std::collections::HashMap; - -use near_events::{ - near_event_data, - near_event_data_log, -}; -use near_sdk::json_types::{ - U128, - U64, -}; -#[cfg(feature = "de")] -use near_sdk::serde::Deserialize; -#[cfg(feature = "ser")] -use near_sdk::serde::Serialize; -use near_sdk::{ - env, - AccountId, -}; - -use crate::common::TokenOffer; - -// ----------------------------- create listing ----------------------------- // -#[cfg_attr(feature = "ser", derive(Serialize))] -#[cfg_attr(feature = "de", derive(Deserialize))] -#[cfg_attr(any(feature = "ser", feature = "de"), serde(crate = "near_sdk::serde"))] -pub struct NftListLog { - pub list_id: String, - pub price: String, - pub token_key: String, - pub owner_id: String, - pub autotransfer: bool, - pub approval_id: String, - pub token_id: String, - pub store_id: String, -} - -#[near_event_data(standard = "mb_market", version = "0.1.0", event = "nft_list")] -pub struct NftListData(Vec); - -#[cfg(feature = "ser")] -pub fn log_listing_created( - list_id: &str, - price: &U128, - token_key: &str, - owner_id: &AccountId, - autotransfer: bool, -) { - let mut iter = token_key.split(':'); - let mut iter2 = list_id.split(':'); - let token_id = iter.next(); - let store_id = iter.next(); - iter2.next(); - let approval_id = iter2.next().unwrap(); - let data = NftListData(vec![NftListLog { - list_id: list_id.to_string(), - price: price.0.to_string(), - token_key: token_key.to_string(), - owner_id: owner_id.to_string(), - autotransfer, - approval_id: approval_id.to_string(), - token_id: token_id.unwrap().to_string(), - store_id: store_id.unwrap().to_string(), - }]); - env::log_str(&data.serialize_event()); -} - -#[cfg(feature = "ser")] -pub fn log_batch_listing_created( - approval_ids: &[U64], - price: &U128, - token_ids: &[U64], - owner_id: &AccountId, - store_id: &AccountId, - autotransfer: bool, -) { - let data = NftListData( - approval_ids - .iter() - .enumerate() - .map(|(u, x)| { - let list_id = format!("{}:{}:{}", token_ids[u].0, x.0, store_id); - let token_key = format!("{}:{}", token_ids[u].0, store_id); - NftListLog { - list_id, - price: price.0.to_string(), - token_key, - owner_id: owner_id.to_string(), - autotransfer, - approval_id: x.0.to_string(), - token_id: token_ids[u].0.to_string(), - store_id: store_id.to_string(), - } - }) - .collect::>(), - ); - env::log_str(&data.serialize_event()); -} - -// ---------------------------- update listings ----------------------------- // -// TODO: test! -#[cfg_attr(feature = "all", derive(Clone, Debug))] -#[near_event_data(standard = "mb_market", version = "0.1.0", event = "nft_update_list")] -pub struct NftUpdateListData { - pub list_id: String, - pub auto_transfer: Option, - pub price: Option, -} - -#[cfg(feature = "ser")] -pub fn log_set_token_autotransfer( - auto_transfer: bool, - list_id: &str, -) { - let data = NftUpdateListData { - list_id: list_id.to_string(), - auto_transfer: Option::from(auto_transfer), - price: None, - }; - env::log_str(&data.serialize_event()); -} - -#[cfg(feature = "ser")] -pub fn log_set_token_asking_price( - price: &U128, - list_id: &str, -) { - let data = NftUpdateListData { - list_id: list_id.to_string(), - auto_transfer: None, - price: Option::from(price.0.to_string()), - }; - env::log_str(&data.serialize_event()); -} - -// ------------------------------- unlisting -------------------------------- // -#[cfg_attr(feature = "all", derive(Clone, Debug))] -#[near_event_data_log(standard = "mb_market", version = "0.1.0", event = "nft_unlist")] -pub struct NftUnlistLog { - pub list_id: String, -} - -#[cfg(feature = "ser")] -pub fn log_token_removed(list_id: &str) { - let log = NftUnlistLog { - list_id: list_id.to_string(), - }; - env::log_str(&log.serialize_event()); -} - -// ------------------------------ sell listing ------------------------------ // -#[cfg_attr(feature = "all", derive(Clone, Debug))] -#[near_event_data(standard = "mb_market", version = "0.1.0", event = "nft_sold")] -pub struct NftSaleData { - pub list_id: String, - pub offer_num: u64, - pub token_key: String, - pub payout: HashMap, - // Not originally in 0.1.0, but option makes it backwards compatible with - // serde_json - pub mintbase_amount: Option, -} - -#[cfg(feature = "ser")] -pub fn log_sale( - list_id: &str, - offer_num: u64, - token_key: &str, - payout: &HashMap, - mintbase_amount: U128, -) { - let data = NftSaleData { - list_id: list_id.to_string(), - offer_num, - token_key: token_key.to_string(), - payout: payout.clone(), - mintbase_amount: Some(mintbase_amount), - }; - env::log_str(&data.serialize_event()); -} - -// ----------------------------- creating offer ----------------------------- // -#[cfg_attr(feature = "all", derive(Clone, Debug))] -#[cfg_attr(feature = "ser", derive(Serialize))] -#[cfg_attr(feature = "de", derive(Deserialize))] -#[cfg_attr(any(feature = "ser", feature = "de"), serde(crate = "near_sdk::serde"))] -pub struct NftMakeOfferLog { - pub offer: TokenOffer, // TODO: TokenOfferJson to stringify u128? - pub list_id: String, - pub token_key: String, - pub offer_num: u64, -} - -// FIXME: u128 is not supported -_____- -#[cfg_attr(feature = "all", derive(Clone, Debug))] -#[near_event_data(standard = "mb_market", version = "0.1.0", event = "nft_make_offer")] -pub struct NftMakeOfferData(Vec); - -#[cfg(feature = "ser")] -pub fn log_make_offer( - offer: Vec<&TokenOffer>, - token_key: Vec<&String>, - list_id: Vec, - offer_num: Vec, -) { - let data = NftMakeOfferData( - offer - .iter() - .enumerate() - .map(|(u, &x)| NftMakeOfferLog { - offer: x.clone(), - list_id: list_id[u].clone(), - token_key: token_key[u].clone(), - offer_num: offer_num[u], - }) - .collect::>(), - ); - env::log_str(&data.serialize_event()); -} - -// --------------------------- withdrawing offer ---------------------------- // -// TODO: testing! -#[cfg_attr(feature = "all", derive(Clone, Debug))] -#[near_event_data( - standard = "mb_market", - version = "0.1.0", - event = "nft_withdraw_offer" -)] -pub struct NftWithdrawOfferData { - pub list_id: String, - pub offer_num: u64, -} - -#[cfg(feature = "ser")] -pub fn log_withdraw_token_offer( - list_id: &str, - offer_num: u64, -) { - let data = NftWithdrawOfferData { - offer_num, - list_id: list_id.to_string(), - }; - env::log_str(&data.serialize_event()); -} - -// ----------------------- updating banlist/allowlist ----------------------- // -#[cfg_attr(feature = "all", derive(Clone, Debug))] -#[near_event_data(standard = "mb_market", version = "0.1.0", event = "update_banlist")] -pub struct UpdateBanlistData { - pub account_id: String, - pub state: bool, -} - -#[cfg(feature = "ser")] -pub fn log_banlist_update( - account_id: &AccountId, - state: bool, -) { - let data = UpdateBanlistData { - account_id: account_id.to_string(), - state, - }; - env::log_str(&data.serialize_event()); -} - -#[cfg_attr(feature = "all", derive(Clone, Debug))] -#[near_event_data(standard = "mb_market", version = "0.1.0", event = "update_allowlist")] -pub struct UpdateAllowlistData { - pub account_id: String, - pub state: bool, -} - -#[cfg(feature = "ser")] -pub fn log_allowlist_update( - account_id: &AccountId, - state: bool, -) { - let data = UpdateAllowlistData { - account_id: account_id.to_string(), - state, - }; - env::log_str(&data.serialize_event()); -} diff --git a/mintbase-deps/src/logging/market_events.rs b/mintbase-deps/src/logging/market_events.rs new file mode 100644 index 0000000..7ef080a --- /dev/null +++ b/mintbase-deps/src/logging/market_events.rs @@ -0,0 +1,94 @@ +use near_events::{ + near_event_data, + near_event_data_log, +}; +use near_sdk::json_types::U128; +#[cfg(feature = "de")] +use near_sdk::serde::Deserialize; +#[cfg(feature = "ser")] +use near_sdk::serde::Serialize; +use near_sdk::AccountId; + +#[cfg_attr(feature = "ser", derive(Serialize))] +#[cfg_attr(feature = "de", derive(Deserialize))] +#[cfg_attr(any(feature = "ser", feature = "de"), serde(crate = "near_sdk::serde"))] +pub struct NftListLog { + pub list_id: String, + pub price: String, + pub token_key: String, + pub owner_id: String, + pub autotransfer: bool, + pub approval_id: String, + pub token_id: String, + pub store_id: String, +} + +#[near_event_data(standard = "mb_market", version = "0.1.0", event = "nft_list")] +pub struct NftListData(pub Vec); + +#[cfg_attr(feature = "all", derive(Clone, Debug))] +#[near_event_data(standard = "mb_market", version = "0.1.0", event = "nft_update_list")] +pub struct NftUpdateListData { + pub list_id: String, + pub auto_transfer: Option, + pub price: Option, +} + +#[cfg_attr(feature = "all", derive(Clone, Debug))] +#[near_event_data_log(standard = "mb_market", version = "0.1.0", event = "nft_unlist")] +pub struct NftUnlistLog { + pub list_id: String, +} + +#[cfg_attr(feature = "all", derive(Clone, Debug))] +#[near_event_data(standard = "mb_market", version = "0.1.0", event = "nft_sold")] +pub struct NftSaleData { + pub list_id: String, + pub offer_num: u64, + pub token_key: String, + pub payout: std::collections::HashMap, + // Not originally in 0.1.0, but option makes it backwards compatible with + // serde_json + pub mintbase_amount: Option, +} + +#[cfg_attr(feature = "all", derive(Clone, Debug))] +#[cfg_attr(feature = "ser", derive(Serialize))] +#[cfg_attr(feature = "de", derive(Deserialize))] +#[cfg_attr(any(feature = "ser", feature = "de"), serde(crate = "near_sdk::serde"))] +pub struct NftMakeOfferLog { + pub offer: crate::market_data::TokenOffer, // TODO: TokenOfferJson to stringify u128? + pub list_id: String, + pub token_key: String, + pub offer_num: u64, +} + +// FIXME: u128 is not supported -_____- +#[cfg_attr(feature = "all", derive(Clone, Debug))] +#[near_event_data(standard = "mb_market", version = "0.1.0", event = "nft_make_offer")] +pub struct NftMakeOfferData(pub Vec); + +#[cfg_attr(feature = "all", derive(Clone, Debug))] +#[near_event_data( + standard = "mb_market", + version = "0.1.0", + event = "nft_withdraw_offer" +)] +pub struct NftWithdrawOfferData { + pub list_id: String, + pub offer_num: u64, +} + +#[cfg_attr(feature = "all", derive(Clone, Debug))] +#[near_event_data(standard = "mb_market", version = "0.1.0", event = "update_banlist")] +pub struct UpdateBanlistData { + pub account_id: String, + pub state: bool, +} + +#[cfg_attr(feature = "all", derive(Clone, Debug))] +#[near_event_data(standard = "mb_market", version = "0.1.0", event = "update_allowlist")] +pub struct UpdateAllowlistData { + pub account_id: String, + pub state: bool, +} diff --git a/mintbase-deps/src/logging/mb_store_settings.rs b/mintbase-deps/src/logging/mb_store_settings.rs deleted file mode 100644 index 7c1610f..0000000 --- a/mintbase-deps/src/logging/mb_store_settings.rs +++ /dev/null @@ -1,93 +0,0 @@ -use near_events::near_event_data; -#[cfg(feature = "de")] -use near_sdk::serde::Deserialize; -#[cfg(feature = "ser")] -use near_sdk::serde::Serialize; -use near_sdk::{ - env, - AccountId, -}; - -use crate::common::NFTContractMetadata; - -#[near_event_data(standard = "mb_store", version = "0.1.0", event = "deploy")] -pub struct MbStoreDeployData { - pub contract_metadata: NFTContractMetadata, - pub owner_id: String, - pub store_id: String, -} - -#[near_event_data(standard = "mb_store", version = "0.1.0", event = "change_setting")] -pub struct MbStoreChangeSettingData { - pub granted_minter: Option, - pub revoked_minter: Option, - pub new_owner: Option, - pub new_icon_base64: Option, - pub new_base_uri: Option, -} - -impl MbStoreChangeSettingData { - fn empty() -> Self { - MbStoreChangeSettingData { - granted_minter: None, - revoked_minter: None, - new_owner: None, - new_icon_base64: None, - new_base_uri: None, - } - } -} - -pub fn log_grant_minter(account_id: &AccountId) { - env::log_str( - &MbStoreChangeSettingData { - granted_minter: Some(account_id.to_string()), - ..MbStoreChangeSettingData::empty() - } - .serialize_event(), - ); -} - -pub fn log_revoke_minter(account_id: &AccountId) { - env::log_str( - &MbStoreChangeSettingData { - revoked_minter: Some(account_id.to_string()), - ..MbStoreChangeSettingData::empty() - } - .serialize_event(), - ); -} - -pub fn log_transfer_store(account_id: &AccountId) { - env::log_str( - &MbStoreChangeSettingData { - new_owner: Some(account_id.to_string()), - ..MbStoreChangeSettingData::empty() - } - .serialize_event(), - ); -} - -pub fn log_set_icon_base64(base64: &Option) { - // this will not take care of icon deletion -> no accessible via UI - // TODO: document for coders that deletion will happen e.g. by inserting - // empty icon - env::log_str( - &MbStoreChangeSettingData { - new_icon_base64: base64.clone(), - ..MbStoreChangeSettingData::empty() - } - .serialize_event(), - ); -} - -pub fn log_set_base_uri(base_uri: &str) { - // TODO: disallow this setting anyhow -> configurable on deploy only - env::log_str( - &MbStoreChangeSettingData { - new_base_uri: Some(base_uri.to_string()), - ..MbStoreChangeSettingData::empty() - } - .serialize_event(), - ); -} diff --git a/mintbase-deps/src/logging/nft_approvals.rs b/mintbase-deps/src/logging/nft_approvals.rs deleted file mode 100644 index 5efcfe3..0000000 --- a/mintbase-deps/src/logging/nft_approvals.rs +++ /dev/null @@ -1,87 +0,0 @@ -use near_events::near_event_data; -use near_sdk::json_types::U64; -#[cfg(feature = "de")] -use near_sdk::serde::Deserialize; -#[cfg(feature = "ser")] -use near_sdk::serde::Serialize; -use near_sdk::{ - env, - AccountId, -}; - -#[cfg_attr(feature = "ser", derive(Serialize))] -#[cfg_attr(feature = "de", derive(Deserialize))] -#[cfg_attr(any(feature = "ser", feature = "de"), serde(crate = "near_sdk::serde"))] -pub struct NftApproveLog { - pub token_id: U64, - pub approval_id: u64, - pub account_id: String, -} - -#[near_event_data(standard = "mb_store", version = "0.1.0", event = "nft_approve")] -pub struct NftApproveData(Vec); - -pub fn log_approve( - token_id: u64, - approval_id: u64, - account_id: &AccountId, -) { - let data = NftApproveData(vec![NftApproveLog { - token_id: token_id.into(), - approval_id, - account_id: account_id.to_string(), - }]); - env::log_str(&data.serialize_event()); -} - -pub fn log_batch_approve( - tokens: &[U64], - approvals: &[U64], - account_id: &AccountId, -) { - let data = NftApproveData( - approvals - .iter() - .zip(tokens.iter()) - .map(|(approval_id, token_id)| NftApproveLog { - token_id: *token_id, - approval_id: approval_id.0, - account_id: account_id.to_string(), - }) - .collect::>(), - ); - env::log_str(&data.serialize_event()); -} - -#[near_event_data(standard = "mb_store", version = "0.1.0", event = "nft_revoke")] -pub struct NftRevokeData { - pub token_id: U64, - pub account_id: String, -} - -pub fn log_revoke( - token_id: u64, - account_id: &AccountId, -) { - env::log_str( - &NftRevokeData { - token_id: token_id.into(), - account_id: account_id.to_string(), - } - .serialize_event(), - ); -} - -#[near_event_data(standard = "mb_store", version = "0.1.0", event = "nft_revoke_all")] -pub struct NftRevokeAllData { - pub token_id: U64, -} - -pub fn log_revoke_all(token_id: u64) { - env::log_str( - &NftRevokeAllData { - token_id: token_id.into(), - } - .serialize_event(), - ); -} diff --git a/mintbase-deps/src/logging/nft_composition.rs b/mintbase-deps/src/logging/nft_composition.rs deleted file mode 100644 index 6288580..0000000 --- a/mintbase-deps/src/logging/nft_composition.rs +++ /dev/null @@ -1,146 +0,0 @@ -use near_sdk::json_types::U64; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; -use near_sdk::{ - env, - AccountId, -}; - -use crate::logging::NearJsonEvent; - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct NftComposeLog { - pub token_ids: Vec, - /// direct parent of token_ids - pub parent: String, - /// - "t": owned directly by a token on this contract - /// - "k": owned directly by a token on another contract - pub ttype: String, - /// local root of chain of token_ids - pub lroot: Option, - /// holder of local root - pub holder: String, - pub depth: u8, -} - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct NftUncomposeLog { - pub token_ids: Vec, - pub holder: String, -} - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct NftOnComposeLog { - pub predecessor: String, - pub token_id: U64, - /// direct parent of token_ids - pub cross_child_id: U64, - /// local root of chain of token_ids - pub lroot: Option, - /// holder of local root - pub holder: String, - pub depth: u8, -} - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct NftOnUncomposeLog { - pub token_id: U64, - pub holder: String, - pub child_key: String, -} - -pub fn log_nfts_compose( - token_ids: &[U64], - // direct parent of token_ids - parent: &str, - // - "t": owned directly by a token on this contract - // - "k": owned directly by a token on another contract - ttype: String, - // local root of chain of token_ids - lroot: Option, - // holder of local root - holder: String, - depth: u8, -) { - let log = NftComposeLog { - token_ids: token_ids.to_vec(), - parent: parent.to_string(), - ttype, - lroot, - holder, - depth, - }; - let event = NearJsonEvent { - standard: "nep171".to_string(), - version: "1.0.0".to_string(), - event: "nft_compose".to_string(), - data: serde_json::to_string(&log).unwrap(), - }; - env::log_str(event.near_json_event().as_str()); -} - -pub fn log_nfts_uncompose( - token_ids: &[U64], - holder: AccountId, -) { - let log = NftUncomposeLog { - token_ids: token_ids.to_vec(), - holder: holder.to_string(), - }; - let event = NearJsonEvent { - standard: "nep171".to_string(), - version: "1.0.0".to_string(), - event: "nft_uncompose".to_string(), - data: serde_json::to_string(&log).unwrap(), - }; - env::log_str(event.near_json_event().as_str()); -} - -pub fn log_on_compose( - predecessor: AccountId, - token_id: U64, - // direct parent of token_ids - cross_child_id: U64, - // local root of chain of token_ids - lroot: Option, - // holder of local root - holder: String, - depth: u8, -) { - let log = NftOnComposeLog { - predecessor: predecessor.to_string(), - token_id, - cross_child_id, - lroot, - holder, - depth, - }; - let event = NearJsonEvent { - standard: "nep171".to_string(), - version: "1.0.0".to_string(), - event: "nft_on_compose".to_string(), - data: serde_json::to_string(&log).unwrap(), - }; - env::log_str(event.near_json_event().as_str()); -} - -pub fn log_on_uncompose( - token_id: U64, - holder: &str, - child_key: String, -) { - let log = NftOnUncomposeLog { - token_id, - holder: holder.to_string(), - child_key, - }; - let event = NearJsonEvent { - standard: "nep171".to_string(), - version: "1.0.0".to_string(), - event: "nft_on_uncompose".to_string(), - data: serde_json::to_string(&log).unwrap(), - }; - env::log_str(event.near_json_event().as_str()); -} diff --git a/mintbase-deps/src/logging/nft_core.rs b/mintbase-deps/src/logging/nft_core.rs deleted file mode 100644 index 5d88077..0000000 --- a/mintbase-deps/src/logging/nft_core.rs +++ /dev/null @@ -1,148 +0,0 @@ -use near_events::{ - near_event_data, - near_event_data_log, -}; -use near_sdk::json_types::U64; -#[cfg(feature = "de")] -use near_sdk::serde::Deserialize; -#[cfg(feature = "ser")] -use near_sdk::serde::Serialize; -use near_sdk::{ - env, - AccountId, -}; - -#[cfg_attr(feature = "all", derive(Clone, Debug))] -#[near_event_data_log(standard = "nep171", version = "1.0.0", event = "nft_mint")] -pub struct NftMintLog { - pub owner_id: String, - pub token_ids: Vec, - pub memo: Option, -} - -// #[near_event_data(standard = "nep171", version = "1.0.0", event = "nft_mint")] -// pub struct NftMintData(Vec); - -#[near_event_data_log(standard = "nep171", version = "1.0.0", event = "nft_burn")] -pub struct NftBurnLog { - pub owner_id: String, - pub authorized_id: Option, - pub token_ids: Vec, - pub memo: Option, -} - -// #[near_event_data(standard = "nep171", version = "1.0.0", event = "nft_burn")] -// pub struct NftBurnData(Vec); - -#[cfg_attr(feature = "ser", derive(Serialize))] -#[cfg_attr(feature = "de", derive(Deserialize))] -#[cfg_attr(any(feature = "ser", feature = "de"), serde(crate = "near_sdk::serde"))] -pub struct NftTransferLog { - pub authorized_id: Option, - pub old_owner_id: String, - pub new_owner_id: String, - pub token_ids: Vec, - pub memo: Option, -} - -#[near_event_data(standard = "nep171", version = "1.0.0", event = "nft_transfer")] -pub struct NftTransferData(Vec); - -#[cfg_attr(feature = "ser", derive(Serialize))] -#[cfg_attr(feature = "de", derive(Deserialize))] -#[cfg_attr(any(feature = "ser", feature = "de"), serde(crate = "near_sdk::serde"))] -pub struct NftMintLogMemo { - pub royalty: Option, - pub split_owners: Option, - pub meta_id: Option, - pub meta_extra: Option, - pub minter: String, -} - -#[allow(clippy::too_many_arguments)] -pub fn log_nft_batch_mint( - first_token_id: u64, - last_token_id: u64, - minter: &str, - owner: &str, - royalty: &Option, - split_owners: &Option, - meta_ref: &Option, - meta_extra: &Option, -) { - let memo = serde_json::to_string(&NftMintLogMemo { - royalty: royalty.clone(), - split_owners: split_owners.clone(), - meta_id: meta_ref.clone(), - meta_extra: meta_extra.clone(), - minter: minter.to_string(), - }) - .unwrap(); - let token_ids = (first_token_id..=last_token_id) - .map(|x| x.to_string()) - .collect::>(); - let log = NftMintLog { - owner_id: owner.to_string(), - token_ids, - memo: Option::from(memo), - }; - - env::log_str(log.serialize_event().as_str()); -} - -pub fn log_nft_transfer( - to: &AccountId, - token_id: u64, - memo: &Option, - old_owner: String, -) { - let data = NftTransferData(vec![NftTransferLog { - authorized_id: None, - old_owner_id: old_owner, - new_owner_id: to.to_string(), - token_ids: vec![token_id.to_string()], - memo: memo.clone(), - }]); - - env::log_str(data.serialize_event().as_str()); -} - -pub fn log_nft_batch_transfer( - tokens: &[U64], - accounts: &[AccountId], - old_owners: Vec, -) { - let data = NftTransferData( - accounts - .iter() - .enumerate() - .map(|(u, x)| NftTransferLog { - authorized_id: None, - old_owner_id: old_owners[u].clone(), - new_owner_id: x.to_string(), - token_ids: vec![tokens[u].0.to_string()], - memo: None, - }) - .collect::>(), - ); - - env::log_str(data.serialize_event().as_str()); -} - -pub fn log_nft_batch_burn( - token_ids: &[U64], - owner_id: String, -) { - let token_ids = token_ids - .iter() - .map(|x| x.0.to_string()) - .collect::>(); - let log = NftBurnLog { - owner_id, - authorized_id: None, - token_ids, - memo: None, - }; - - env::log_str(log.serialize_event().as_str()); -} diff --git a/mintbase-deps/src/logging/nft_loan.rs b/mintbase-deps/src/logging/nft_loan.rs deleted file mode 100644 index 66b5b7a..0000000 --- a/mintbase-deps/src/logging/nft_loan.rs +++ /dev/null @@ -1,33 +0,0 @@ -use near_sdk::serde::{ - Deserialize, - Serialize, -}; -use near_sdk::{ - env, - AccountId, -}; - -use crate::logging::NearJsonEvent; - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct NftLoanSetLog { - pub account_id: Option, - pub token_id: u64, -} - -pub fn log_nft_loan_set( - token_id: u64, - account_id: &Option, -) { - let log = NftLoanSetLog { - account_id: account_id.as_ref().map(|x| x.to_string()), - token_id, - }; - let event = NearJsonEvent { - standard: "nep171".to_string(), - version: "1.0.0".to_string(), - event: "nft_loan_set".to_string(), - data: serde_json::to_string(&log).unwrap(), - }; - env::log_str(event.near_json_event().as_str()); -} diff --git a/mintbase-deps/src/logging/nft_move.rs b/mintbase-deps/src/logging/nft_move.rs deleted file mode 100644 index f82f7bc..0000000 --- a/mintbase-deps/src/logging/nft_move.rs +++ /dev/null @@ -1,54 +0,0 @@ -use near_sdk::env; -use near_sdk::json_types::U64; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; - -use crate::logging::NearJsonEvent; - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct NftMovedLog { - pub token_id: U64, - pub contract_id: String, -} - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct NftOnMoveLog { - pub token_id: U64, - pub origin_key: String, -} - -pub fn log_on_move( - token_id: U64, - origin_key: &str, -) { - let log = NftOnMoveLog { - token_id, - origin_key: origin_key.to_string(), - }; - let event = NearJsonEvent { - standard: "nep171".to_string(), - version: "1.0.0".to_string(), - event: "nft_on_move".to_string(), - data: serde_json::to_string(&log).unwrap(), - }; - env::log_str(event.near_json_event().as_str()); -} - -pub fn log_nft_moved( - token_id: U64, - contract_id: String, -) { - let log = NftMovedLog { - token_id, - contract_id, - }; - let event = NearJsonEvent { - standard: "nep171".to_string(), - version: "1.0.0".to_string(), - event: "nft_moved".to_string(), - data: serde_json::to_string(&log).unwrap(), - }; - env::log_str(event.near_json_event().as_str()); -} diff --git a/mintbase-deps/src/logging/nft_payouts.rs b/mintbase-deps/src/logging/nft_payouts.rs deleted file mode 100644 index e7ff718..0000000 --- a/mintbase-deps/src/logging/nft_payouts.rs +++ /dev/null @@ -1,40 +0,0 @@ -use std::collections::HashMap; - -use near_events::near_event_data; -use near_sdk::json_types::U64; -#[cfg(feature = "de")] -use near_sdk::serde::Deserialize; -#[cfg(feature = "ser")] -use near_sdk::serde::Serialize; -use near_sdk::{ - env, - AccountId, -}; - -#[cfg_attr(feature = "all", derive(Debug, Clone))] -#[near_event_data( - standard = "mb_store", - version = "0.1.0", - event = "nft_set_split_owners" -)] -pub struct NftSetSplitOwnerData { - pub token_ids: Vec, - pub split_owners: HashMap, -} - -pub fn log_set_split_owners( - token_ids: Vec, - mut split_owners: crate::common::SplitOwners, -) { - env::log_str( - &NftSetSplitOwnerData { - token_ids, - split_owners: split_owners - .split_between - .drain() - .map(|(acc, fraction)| (acc, fraction.numerator as u16)) - .collect(), - } - .serialize_event(), - ); -} diff --git a/mintbase-deps/src/logging/store_events.rs b/mintbase-deps/src/logging/store_events.rs new file mode 100644 index 0000000..584cd07 --- /dev/null +++ b/mintbase-deps/src/logging/store_events.rs @@ -0,0 +1,129 @@ +use near_events::{ + near_event_data, + near_event_data_log, +}; +use near_sdk::json_types::U64; +#[cfg(feature = "de")] +use near_sdk::serde::Deserialize; +#[cfg(feature = "ser")] +use near_sdk::serde::Serialize; +use near_sdk::AccountId; + +// ----------------------------- Core (NEP171) ------------------------------ // +#[cfg_attr(feature = "all", derive(Clone, Debug))] +#[near_event_data_log(standard = "nep171", version = "1.0.0", event = "nft_mint")] +pub struct NftMintLog { + pub owner_id: String, + pub token_ids: Vec, + pub memo: Option, +} + +// #[near_event_data(standard = "nep171", version = "1.0.0", event = "nft_mint")] +// pub struct NftMintData(Vec); + +#[near_event_data_log(standard = "nep171", version = "1.0.0", event = "nft_burn")] +pub struct NftBurnLog { + pub owner_id: String, + pub authorized_id: Option, + pub token_ids: Vec, + pub memo: Option, +} + +// #[near_event_data(standard = "nep171", version = "1.0.0", event = "nft_burn")] +// pub struct NftBurnData(Vec); + +#[cfg_attr(feature = "ser", derive(Serialize))] +#[cfg_attr(feature = "de", derive(Deserialize))] +#[cfg_attr(any(feature = "ser", feature = "de"), serde(crate = "near_sdk::serde"))] +pub struct NftTransferLog { + pub authorized_id: Option, + pub old_owner_id: String, + pub new_owner_id: String, + pub token_ids: Vec, + pub memo: Option, +} + +#[near_event_data(standard = "nep171", version = "1.0.0", event = "nft_transfer")] +pub struct NftTransferData(pub Vec); + +#[cfg_attr(feature = "ser", derive(Serialize))] +#[cfg_attr(feature = "de", derive(Deserialize))] +#[cfg_attr(any(feature = "ser", feature = "de"), serde(crate = "near_sdk::serde"))] +pub struct NftMintLogMemo { + pub royalty: Option, + pub split_owners: Option, + pub meta_id: Option, + pub meta_extra: Option, + pub minter: String, +} + +// ------------------------------- Approvals -------------------------------- // +#[cfg_attr(feature = "ser", derive(Serialize))] +#[cfg_attr(feature = "de", derive(Deserialize))] +#[cfg_attr(any(feature = "ser", feature = "de"), serde(crate = "near_sdk::serde"))] +pub struct NftApproveLog { + pub token_id: U64, + pub approval_id: u64, + pub account_id: String, +} + +#[near_event_data(standard = "mb_store", version = "0.1.0", event = "nft_approve")] +pub struct NftApproveData(pub Vec); + +#[near_event_data(standard = "mb_store", version = "0.1.0", event = "nft_revoke")] +pub struct NftRevokeData { + pub token_id: U64, + pub account_id: String, +} + +#[near_event_data(standard = "mb_store", version = "0.1.0", event = "nft_revoke_all")] +pub struct NftRevokeAllData { + pub token_id: U64, +} + +// -------------------------------- Payouts --------------------------------- // +use std::collections::HashMap; + +// pub use market::*; +// pub use mb_store_settings::*; +#[cfg(feature = "de")] +use near_sdk::serde::Deserialize; +// #[cfg(feature = "ser")] +// use near_sdk::serde::Serialize; +// pub use nft_approvals::*; +// pub use nft_core::*; + +#[cfg_attr(feature = "all", derive(Debug, Clone))] +#[near_event_data( + standard = "mb_store", + version = "0.1.0", + event = "nft_set_split_owners" +)] +pub struct NftSetSplitOwnerData { + pub token_ids: Vec, + pub split_owners: HashMap, +} + +// ----------------------------- Store settings ----------------------------- // +#[near_event_data(standard = "mb_store", version = "0.1.0", event = "change_setting")] +pub struct MbStoreChangeSettingData { + pub granted_minter: Option, + pub revoked_minter: Option, + pub new_owner: Option, + pub new_icon_base64: Option, + pub new_base_uri: Option, +} + +impl MbStoreChangeSettingData { + pub fn empty() -> Self { + MbStoreChangeSettingData { + granted_minter: None, + revoked_minter: None, + new_owner: None, + new_icon_base64: None, + new_base_uri: None, + } + } +} + +// --------------------------------- Market --------------------------------- // diff --git a/mintbase-deps/src/market_data.rs b/mintbase-deps/src/market_data.rs new file mode 100644 index 0000000..bd9b833 --- /dev/null +++ b/mintbase-deps/src/market_data.rs @@ -0,0 +1,176 @@ +use near_sdk::borsh::{ + self, + BorshDeserialize, + BorshSerialize, +}; +use near_sdk::json_types::U128; +use near_sdk::{ + env, + AccountId, +}; +use serde::{ + Deserialize, + Serialize, +}; + +use crate::utils::TokenKey; + +/// A Token for sale on the Marketplace. +#[derive(Deserialize, Serialize, Debug, BorshDeserialize, BorshSerialize)] +pub struct TokenListing { + /// Id of this `Token`. + pub id: u64, + /// Owner of this `Token`. + pub owner_id: AccountId, + /// `Store` that originated this `Token`. + pub store_id: AccountId, + /// If `autotransfer` is enabled, the Token will automatically be + /// transferred to an Offerer if their `Offer::price` is greater than the + /// `asking_price`. Note that enabling `autotransfer` does not + /// retroactively trigger on the presently held `current_offer` + pub autotransfer: bool, + /// The price set by the owner of this Token. + pub asking_price: U128, + /// The `approval_id` of the Token allows the Marketplace to transfer the + /// Token, if purchased. The `approval_id` is also used to generate + /// unique identifiers for Token-listings. + pub approval_id: u64, + /// The current `Offer` for this listing. This `Offer` may have timed + /// out; if the `Marketplace::min_offer_hours` has transpired, the + /// `Offer` may be withdrawn by the account in `Offer::from`. + pub current_offer: Option, + /// The number of `Offer`s that have been made on this listing. Used to + /// generate Offer `id`s. + pub num_offers: u64, + /// When the transfer process is initiated, the token is locked, and no + /// further changes may be made on the token. + pub locked: bool, +} + +impl TokenListing { + /// Check that the given `account_id` is valid before instantiating a + /// `Token`. Note that all input validation for `Token` functions should + /// be performed at the `Marketplace` level. + pub fn new( + owner_id: AccountId, + store_id: AccountId, + id: u64, + approval_id: u64, + autotransfer: bool, + asking_price: U128, + ) -> Self { + Self { + id, + owner_id, + store_id, + approval_id, + autotransfer, + asking_price, + current_offer: None, + num_offers: 0, + locked: false, + } + } + + /// Unique identifier of the Token. + pub fn get_token_key(&self) -> TokenKey { + TokenKey { + token_id: self.id, + account_id: self.store_id.to_string(), + } + } + + /// Unique identifier of the Token, which is also unique across + /// relistings of the Token. + pub fn get_list_id(&self) -> String { + format!("{}:{}:{}", self.id, self.approval_id, self.store_id) + } + + pub fn assert_not_locked(&self) { + assert!(!self.locked); + } +} + +/// Type representing an offer for a `Token` the marketplace +#[derive(Serialize, Deserialize, Clone, Debug, BorshDeserialize, BorshSerialize)] +pub struct TokenOffer { + /// The id of this `Offer` is the num of the previous `Offer` + 1. Generated + /// from the field `Token::num_offers`. + pub id: u64, + /// The price the Offerer has posted. + pub price: u128, + /// The account who originated the `Offer`. + pub from: AccountId, + /// When the `Offer` was made. + pub timestamp: NearTime, + /// When the `Offer` will expire. + pub timeout: NearTime, +} + +impl TokenOffer { + /// Timeout is in days. + pub fn new( + price: u128, + timeout: TimeUnit, + id: u64, + ) -> Self { + Self { + id, + price, + from: env::predecessor_account_id(), + timestamp: NearTime::now(), + timeout: NearTime::new(timeout), + } + } + + /// An offer is active if it has yet to timeout. + pub fn is_active(&self) -> bool { + self.timeout.is_before_timeout() + } +} + +/// Time duration. +/// This enum used to support other time denominations, which were dropped +/// for simplicity. +#[derive(Debug, Serialize, Deserialize, Clone, BorshSerialize, BorshDeserialize)] +pub enum TimeUnit { + Hours(u64), +} + +/// Time instant, the u64 is in nanoseconds since epoch. +#[derive(Debug, Serialize, Deserialize, Clone, BorshDeserialize, BorshSerialize)] +pub struct NearTime(pub u64); + +impl NearTime { + fn is_before_timeout(&self) -> bool { + env::block_timestamp() < self.0 + } + + fn new(span: TimeUnit) -> Self { + match span { + TimeUnit::Hours(n) => Self::now_plus_n_hours(n), + } + } + + fn now() -> Self { + Self(env::block_timestamp()) + } + + fn now_plus_n_hours(n: u64) -> Self { + crate::near_assert!(n > 0, "Cannot set times into the past"); + crate::near_assert!( + n < 70_000, + "Cannot set times more than 70_000 hours into the future (~8 years)" + ); + let now = env::block_timestamp(); + let hour_ns = 10u64.pow(9) * 3600; + Self(now + n * hour_ns) + } +} + +/// ref: https://github.com/near-apps/nft-market/blob/main/contracts/market-simple/src/lib.rs#L54 +#[derive(Serialize, Deserialize)] +pub struct SaleArgs { + pub price: U128, + pub autotransfer: bool, +} diff --git a/mintbase-deps/src/store_data.rs b/mintbase-deps/src/store_data.rs new file mode 100644 index 0000000..c8febc4 --- /dev/null +++ b/mintbase-deps/src/store_data.rs @@ -0,0 +1,484 @@ +use std::collections::HashMap; +use std::fmt; + +use near_sdk::borsh::{ + self, + BorshDeserialize, + BorshSerialize, +}; +use near_sdk::json_types::{ + Base64VecU8, + U128, +}; +use near_sdk::serde::ser::Serializer; +use near_sdk::serde::{ + Deserialize, + Serialize, +}; +use near_sdk::AccountId; + +use crate::utils::{ + SafeFraction, + TokenKey, +}; + +// ------------------------ token and token metadata ------------------------ // +/// Supports NEP-171, 177, 178, 181. Ref: +/// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Core.md +#[derive(Clone)] +#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] +#[derive(Deserialize, Serialize)] +pub struct Token { + /// The id of this token on this `Store`. Not unique across `Store`s. + /// `token_id`s count up from 0. Ref: https://github.com/near/NEPs/discussions/171 + pub id: u64, + /// The current owner of this token. Either an account_id or a token_id (if composed). + pub owner_id: Owner, + /// Ref: + /// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/ApprovalManagement.md + /// Set of accounts that may transfer this token, other than the owner. + pub approvals: HashMap, + /// The metadata content for this token is stored in the Contract + /// `token_metadata` field, to avoid duplication of metadata across tokens. + /// Use metadata_id to lookup the metadata. `Metadata`s is permanently set + /// when the token is minted. + pub metadata_id: u64, + /// The Royalty for this token is stored in the Contract `token_royalty` + /// field, to avoid duplication across tokens. Use royalty_id to lookup the + /// royalty. `Royalty`s are permanently set when the token is minted. + pub royalty_id: Option, + /// Feature for owner of this token to split the token ownership accross + /// several accounts. + pub split_owners: Option, + /// The account that minted this token. + pub minter: AccountId, + /// Non-nil if Token is loaned out. While token is loaned, disallow + /// transfers, approvals, revokes, etc. for the token, except from the + /// approved loan contract. Mark this field with the address of the loan + /// contract. See neps::loan for more. + pub loan: Option, + /// Composeablility metrics for this token + pub composeable_stats: ComposeableStats, + /// If the token originated on another contract and was `nft_move`d to + /// this contract, this field will be non-nil. + pub origin_key: Option, +} + +impl Token { + /// - `metadata` validation performed in `TokenMetadataArgs::new` + /// - `royalty` validation performed in `Royalty::new` + pub fn new( + owner_id: AccountId, + token_id: u64, + metadata_id: u64, + royalty_id: Option, + split_owners: Option, + minter: AccountId, + ) -> Self { + Self { + owner_id: Owner::Account(owner_id), + id: token_id, + metadata_id, + royalty_id, + split_owners, + approvals: HashMap::new(), + minter, + loan: None, + composeable_stats: ComposeableStats::new(), + origin_key: None, + } + } + + /// If the token is loaned, return the loaner as the owner. + pub fn get_owner_or_loaner(&self) -> Owner { + self.loan + .as_ref() + .map(|l| Owner::Account(l.holder.clone())) + .unwrap_or_else(|| self.owner_id.clone()) + } + + pub fn is_pred_owner(&self) -> bool { + self.is_owned_by(&near_sdk::env::predecessor_account_id()) + } + + pub fn is_owned_by( + &self, + account_id: &AccountId, + ) -> bool { + self.owner_id.to_string() == account_id.to_string() + } + + pub fn is_loaned(&self) -> bool { + self.loan.is_some() + } +} + +// Supports NEP-171, 177, 178, 181. Ref: +/// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Core.md +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct TokenCompliant { + /// The id of this token on this `Store`. Not unique across `Store`s. + /// `token_id`s count up from 0. Ref: https://github.com/near/NEPs/discussions/171 + pub token_id: String, + /// The current owner of this token. Either an account_id or a token_id (if composed). + pub owner_id: Owner, + /// Ref: + /// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/ApprovalManagement.md + /// Set of accounts that may transfer this token, other than the owner. + pub approved_account_ids: HashMap, + /// The metadata content for this token is stored in the Contract + /// `token_metadata` field, to avoid duplication of metadata across tokens. + /// Use metadata_id to lookup the metadata. `Metadata`s is permanently set + /// when the token is minted. + pub metadata: TokenMetadataCompliant, + /// The Royalty for this token is stored in the Contract `token_royalty` + /// field, to avoid duplication across tokens. Use royalty_id to lookup the + /// royalty. `Royalty`s are permanently set when the token is minted. + pub royalty: Option, + /// Feature for owner of this token to split the token ownership accross + /// several accounts. + pub split_owners: Option, + /// The account that minted this token. + pub minter: AccountId, + /// Non-nil if Token is loaned out. While token is loaned, disallow + /// transfers, approvals, revokes, etc. for the token, except from the + /// approved loan contract. Mark this field with the address of the loan + /// contract. See neps::loan for more. + pub loan: Option, + /// Composeablility metrics for this token + pub composeable_stats: ComposeableStats, + /// If the token originated on another contract and was `nft_move`d to + /// this contract, this field will be non-nil. + pub origin_key: Option, +} + +// -------- token metadata +// NON-COMPLIANT https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Metadata.md +/// ref: +/// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Metadata.md +#[derive(Clone, Debug, Deserialize, Serialize)] +#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] +pub struct TokenMetadata { + /// the Title for this token. ex. "Arch Nemesis: Mail Carrier" or "Parcel 5055" + pub title: Option, + /// free-form description of this token. + pub description: Option, + /// URL to associated media, preferably to decentralized, content-addressed storage + pub media: Option, + /// Base64-encoded sha256 hash of content referenced by the `media` field. + /// Required if `media` is included. + pub media_hash: Option, + /// number of copies of this set of metadata in existence when token was minted. + pub copies: Option, + /// ISO 8601 datetime when token expires. + pub expires_at: Option, + /// ISO 8601 datetime when token starts being valid. + pub starts_at: Option, + /// When token was last updated, Unix epoch in milliseconds + pub extra: Option, + /// URL to an off-chain JSON file with more info. The Mintbase Indexer refers + /// to this field as `thing_id` or sometimes, `meta_id`. + pub reference: Option, + /// Base64-encoded sha256 hash of JSON from reference field. Required if + /// `reference` is included. + pub reference_hash: Option, +} + +// NON-COMPLIANT https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Metadata.md +/// ref: +/// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Metadata.md +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct TokenMetadataCompliant { + /// the Title for this token. ex. "Arch Nemesis: Mail Carrier" or "Parcel 5055" + pub title: Option, + /// free-form description of this token. + pub description: Option, + /// URL to associated media, preferably to decentralized, content-addressed storage + pub media: Option, + /// Base64-encoded sha256 hash of content referenced by the `media` field. + /// Required if `media` is included. + pub media_hash: Option, + /// number of copies of this set of metadata in existence when token was minted. + pub copies: Option, + /// When token was issued or minted, Unix epoch in milliseconds + pub issued_at: Option, + /// ISO 8601 datetime when token expires. + pub expires_at: Option, + /// ISO 8601 datetime when token starts being valid. + pub starts_at: Option, + /// When token was last updated, Unix epoch in milliseconds + pub updated_at: Option, + /// Brief description of what this thing is. Used by the mintbase indexer as "memo". + pub extra: Option, + /// URL to an off-chain JSON file with more info. The Mintbase Indexer refers + /// to this field as `thing_id` or sometimes, `meta_id`. + pub reference: Option, + /// Base64-encoded sha256 hash of JSON from reference field. Required if + /// `reference` is included. + pub reference_hash: Option, +} + +// -------- token owner +// This is mostly kept here to avoid storage migrations, but this should always +// be the `Account` variant. +#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] +#[derive(Deserialize, Clone, Debug)] +pub enum Owner { + /// Standard pattern: owned by a user. + Account(AccountId), + /// Compose pattern: owned by a token on this contract. + TokenId(u64), + /// Cross-compose pattern: owned by a token on another contract. + CrossKey(crate::utils::TokenKey), + /// Lock: temporarily locked until some callback returns. + Lock(AccountId), +} + +impl Serialize for Owner { + fn serialize( + &self, + serializer: S, + ) -> Result { + // TODO: create string and then clone? + serializer.serialize_str(&format!("{}", self)) + } +} + +impl fmt::Display for Owner { + fn fmt( + &self, + f: &mut fmt::Formatter, + ) -> fmt::Result { + match self { + Owner::Account(s) => write!(f, "{}", s), + Owner::TokenId(n) => write!(f, "{}", n), + Owner::CrossKey(key) => write!(f, "{}", key), + Owner::Lock(_) => panic!("locked"), + } + } +} + +// -------- loan +// This is only kept here to avoid storage migrations, it is no longer used +#[derive(Clone, Debug, Deserialize, Serialize)] +#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] +pub struct Loan { + pub holder: AccountId, + pub loan_contract: AccountId, +} + +impl Loan { + pub fn new( + holder: AccountId, + loan_contract: AccountId, + ) -> Self { + Self { + holder, + loan_contract, + } + } +} + +// -------- composability +// This is only kept here to avoid storage migrations, it is no longer used +/// To enable recursive composeability, need to track: +/// 1. How many levels deep a token is recursively composed +/// 2. Whether and how many cross-contract children a token has. +/// +/// Tracking depth limits potential bugs around recursive ownership +/// consuming excessive amounts of gas. +/// +/// Tracking the number of cross-contract children a token has prevents +/// breaking of the Only-One-Cross-Linkage Invariant. +#[derive(Clone, Debug, Deserialize, Serialize)] +#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] +pub struct ComposeableStats { + /// How deep this token is in a chain of composeability on THIS contract. + /// If this token is cross-composed, it's depth will STILL be 0. `depth` + /// equal to the parent's `depth`+1. If this is a top level token, this + /// number is 0. + pub local_depth: u8, + /// How many cross contract children this token has, direct AND indirect. + /// That is, any parent's `cross_contract_children` value equals the sum + /// of of its children's values. If this number is non-zero, deny calls + /// to `nft_cross_compose`. + pub cross_contract_children: u8, +} + +impl ComposeableStats { + pub(super) fn new() -> Self { + Self { + local_depth: 0, + cross_contract_children: 0, + } + } +} + +// ----------------------------- store metadata ----------------------------- // +#[derive(Clone, Debug, Deserialize, Serialize)] +#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] +pub struct NFTContractMetadata { + /// a version like "nft-1.0.0" + pub spec: String, + /// Subaccount of this `Store`. `Factory` is the super-account. + pub name: String, + /// Symbol of the Store. Up to 6 chars. + pub symbol: String, + /// a small image associated with this `Store`. + pub icon: Option, + /// Centralized gateway known to have reliable access to decentralized storage + /// assets referenced by `reference` or `media` URLs + pub base_uri: Option, + /// URL to a JSON file with more info + pub reference: Option, + /// Base64-encoded sha256 hash of the JSON file pointed at by the reference + /// field. Required if `reference` is included. + pub reference_hash: Option, +} + +impl Default for NFTContractMetadata { + fn default() -> Self { + Self { + spec: "".to_string(), + name: "".to_string(), + symbol: "".to_string(), + icon: None, + base_uri: None, + reference: None, + reference_hash: None, + } + } +} + +// /// ref: +// /// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Metadata.md +// pub trait NonFungibleContractMetadata { +// /// Get the metadata for this `Store`. +// fn nft_metadata(&self) -> &NFTContractMetadata; +// } + +// ------------------------ splits/royalties/payouts ------------------------ // + +/// Whom to pay. Generated from `OwnershipFractions`. +#[derive(Serialize, Deserialize)] +pub struct Payout { + pub payout: HashMap, +} + +pub type SplitBetweenUnparsed = HashMap; +pub type SplitBetween = HashMap; + +/// A representation of the splitting of ownership of the Token. Percentages +/// must add to 1. On purchase of the `Token`, the value of the transaction +/// (minus royalty percentage) will be paid out to each account in `SplitOwners` +/// mapping. The `SplitOwner` field on the `Token` will be set to `None` after +/// each transfer of the token. +#[derive(Clone, Debug, Deserialize, Serialize)] +#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] +pub struct SplitOwners { + pub split_between: HashMap, +} + +impl SplitOwners { + pub fn new(split_between: HashMap) -> Self { + crate::near_assert!( + split_between.len() >= 2, + "Requires at least two accounts to split revenue" + ); + // validate args + let mut sum: u32 = 0; + let split_between: HashMap = split_between + .into_iter() + .map(|(addr, numerator)| { + crate::near_assert!( + // TODO: different method than royalty? + near_sdk::env::is_valid_account_id(addr.as_bytes()), + "{} is not a valid account ID on NEAR", + addr + ); + let sf = SafeFraction::new(numerator); + sum += sf.numerator; + (addr, sf) + }) + .collect(); + crate::near_assert!(sum == 10_000, "Splits numerators must sum up to 10_000"); + + Self { split_between } + } +} + +/// A representation of permanent partial ownership of a Token's revenues. +/// Percentages must add to 10,000. On purchase of the `Token`, a percentage of +/// the value of the transaction will be paid out to each account in the +/// `Royalty` mapping. `Royalty` field once set can NEVER change for this +/// `Token`, even if removed and re-added. +#[derive(PartialEq, Eq)] +#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct Royalty { + /// Mapping of addresses to relative percentages of the overall royalty percentage + pub split_between: HashMap, + /// The overall royalty percentage taken + pub percentage: SafeFraction, +} + +/// Stable +impl Royalty { + /// Validates all arguments. Addresses must be valid and percentages must be + /// within accepted values. Hashmap percentages must add to 10000. + pub fn new(royalty_args: RoyaltyArgs) -> Self { + use std::convert::TryFrom; + + let percentage = royalty_args.percentage; + let split_between = royalty_args.split_between; + + crate::near_assert!( + percentage <= crate::constants::ROYALTY_UPPER_LIMIT, + "Royalties must not exceed 50% of a sale", + ); + crate::near_assert!(percentage > 0, "Royalty percentage cannot be zero"); + crate::near_assert!( + !split_between.is_empty(), + "Royalty mapping may not be empty" + ); + + let mut sum: u32 = 0; + let split_between: SplitBetween = split_between + .into_iter() + .map(|(addr, numerator)| { + // TODO: different method than splits? + + crate::near_assert!( + AccountId::try_from(addr.to_string()).is_ok(), + "{} is not a valid account ID on NEAR", + addr + ); + crate::near_assert!(numerator > 0, "Royalty for {} cannot be zero", addr); + let sf = SafeFraction::new(numerator); + sum += sf.numerator; + (addr, sf) + }) + .collect(); + crate::near_assert!(sum == 10_000, "Fractions need to add up to 10_000"); + + Self { + percentage: SafeFraction::new(percentage), + split_between, + } + } +} + +/// Unparsed pre-image of a Royalty struct. Used in `Store::mint_tokens`. +#[derive(Clone, Deserialize, Serialize)] +pub struct RoyaltyArgs { + pub split_between: SplitBetweenUnparsed, + pub percentage: u32, +} + +// ---------------------- args for initializing store ----------------------- // +#[derive(Clone, Debug, Deserialize, Serialize)] +#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] +pub struct StoreInitArgs { + pub metadata: NFTContractMetadata, + pub owner_id: AccountId, +} diff --git a/mintbase-deps/src/token.rs b/mintbase-deps/src/token.rs deleted file mode 100644 index fc01960..0000000 --- a/mintbase-deps/src/token.rs +++ /dev/null @@ -1,155 +0,0 @@ -use std::collections::HashMap; - -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; -use near_sdk::AccountId; - -use crate::common::{ - Royalty, - SplitOwners, - TokenKey, - TokenMetadataCompliant, -}; - -mod composeable_stats; -pub use composeable_stats::ComposeableStats; -mod loan; -pub use loan::Loan; -mod owner; -pub use owner::Owner; - -/// Supports NEP-171, 177, 178, 181. Ref: -/// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Core.md -#[derive(Clone)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -#[derive(Deserialize, Serialize)] -pub struct Token { - /// The id of this token on this `Store`. Not unique across `Store`s. - /// `token_id`s count up from 0. Ref: https://github.com/near/NEPs/discussions/171 - pub id: u64, - /// The current owner of this token. Either an account_id or a token_id (if composed). - pub owner_id: Owner, - /// Ref: - /// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/ApprovalManagement.md - /// Set of accounts that may transfer this token, other than the owner. - pub approvals: HashMap, - /// The metadata content for this token is stored in the Contract - /// `token_metadata` field, to avoid duplication of metadata across tokens. - /// Use metadata_id to lookup the metadata. `Metadata`s is permanently set - /// when the token is minted. - pub metadata_id: u64, - /// The Royalty for this token is stored in the Contract `token_royalty` - /// field, to avoid duplication across tokens. Use royalty_id to lookup the - /// royalty. `Royalty`s are permanently set when the token is minted. - pub royalty_id: Option, - /// Feature for owner of this token to split the token ownership accross - /// several accounts. - pub split_owners: Option, - /// The account that minted this token. - pub minter: AccountId, - /// Non-nil if Token is loaned out. While token is loaned, disallow - /// transfers, approvals, revokes, etc. for the token, except from the - /// approved loan contract. Mark this field with the address of the loan - /// contract. See neps::loan for more. - pub loan: Option, - /// Composeablility metrics for this token - pub composeable_stats: ComposeableStats, - /// If the token originated on another contract and was `nft_move`d to - /// this contract, this field will be non-nil. - pub origin_key: Option, -} - -impl Token { - /// - `metadata` validation performed in `TokenMetadataArgs::new` - /// - `royalty` validation performed in `Royalty::new` - pub fn new( - owner_id: AccountId, - token_id: u64, - metadata_id: u64, - royalty_id: Option, - split_owners: Option, - minter: AccountId, - ) -> Self { - Self { - owner_id: Owner::Account(owner_id), - id: token_id, - metadata_id, - royalty_id, - split_owners, - approvals: HashMap::new(), - minter, - loan: None, - composeable_stats: ComposeableStats::new(), - origin_key: None, - } - } - - /// If the token is loaned, return the loaner as the owner. - pub fn get_owner_or_loaner(&self) -> Owner { - self.loan - .as_ref() - .map(|l| Owner::Account(l.holder.clone())) - .unwrap_or_else(|| self.owner_id.clone()) - } - - pub fn is_pred_owner(&self) -> bool { - self.is_owned_by(&near_sdk::env::predecessor_account_id()) - } - - pub fn is_owned_by( - &self, - account_id: &AccountId, - ) -> bool { - self.owner_id.to_string() == account_id.to_string() - } - - pub fn is_loaned(&self) -> bool { - self.loan.is_some() - } -} - -// Supports NEP-171, 177, 178, 181. Ref: -/// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/Core.md -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct TokenCompliant { - /// The id of this token on this `Store`. Not unique across `Store`s. - /// `token_id`s count up from 0. Ref: https://github.com/near/NEPs/discussions/171 - pub token_id: String, - /// The current owner of this token. Either an account_id or a token_id (if composed). - pub owner_id: Owner, - /// Ref: - /// https://github.com/near/NEPs/blob/master/specs/Standards/NonFungibleToken/ApprovalManagement.md - /// Set of accounts that may transfer this token, other than the owner. - pub approved_account_ids: HashMap, - /// The metadata content for this token is stored in the Contract - /// `token_metadata` field, to avoid duplication of metadata across tokens. - /// Use metadata_id to lookup the metadata. `Metadata`s is permanently set - /// when the token is minted. - pub metadata: TokenMetadataCompliant, - /// The Royalty for this token is stored in the Contract `token_royalty` - /// field, to avoid duplication across tokens. Use royalty_id to lookup the - /// royalty. `Royalty`s are permanently set when the token is minted. - pub royalty: Option, - /// Feature for owner of this token to split the token ownership accross - /// several accounts. - pub split_owners: Option, - /// The account that minted this token. - pub minter: AccountId, - /// Non-nil if Token is loaned out. While token is loaned, disallow - /// transfers, approvals, revokes, etc. for the token, except from the - /// approved loan contract. Mark this field with the address of the loan - /// contract. See neps::loan for more. - pub loan: Option, - /// Composeablility metrics for this token - pub composeable_stats: ComposeableStats, - /// If the token originated on another contract and was `nft_move`d to - /// this contract, this field will be non-nil. - pub origin_key: Option, -} diff --git a/mintbase-deps/src/token/composeable_stats.rs b/mintbase-deps/src/token/composeable_stats.rs deleted file mode 100644 index 04cda51..0000000 --- a/mintbase-deps/src/token/composeable_stats.rs +++ /dev/null @@ -1,42 +0,0 @@ -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; - -/// To enable recursive composeability, need to track: -/// 1. How many levels deep a token is recursively composed -/// 2. Whether and how many cross-contract children a token has. -/// -/// Tracking depth limits potential bugs around recursive ownership -/// consuming excessive amounts of gas. -/// -/// Tracking the number of cross-contract children a token has prevents -/// breaking of the Only-One-Cross-Linkage Invariant. -#[derive(Clone, Debug, Deserialize, Serialize)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -pub struct ComposeableStats { - /// How deep this token is in a chain of composeability on THIS contract. - /// If this token is cross-composed, it's depth will STILL be 0. `depth` - /// equal to the parent's `depth`+1. If this is a top level token, this - /// number is 0. - pub local_depth: u8, - /// How many cross contract children this token has, direct AND indirect. - /// That is, any parent's `cross_contract_children` value equals the sum - /// of of its children's values. If this number is non-zero, deny calls - /// to `nft_cross_compose`. - pub cross_contract_children: u8, -} - -impl ComposeableStats { - pub(super) fn new() -> Self { - Self { - local_depth: 0, - cross_contract_children: 0, - } - } -} diff --git a/mintbase-deps/src/token/loan.rs b/mintbase-deps/src/token/loan.rs deleted file mode 100644 index d2611e1..0000000 --- a/mintbase-deps/src/token/loan.rs +++ /dev/null @@ -1,29 +0,0 @@ -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; -use near_sdk::AccountId; - -#[derive(Clone, Debug, Deserialize, Serialize)] -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -pub struct Loan { - pub holder: AccountId, - pub loan_contract: AccountId, -} - -impl Loan { - pub fn new( - holder: AccountId, - loan_contract: AccountId, - ) -> Self { - Self { - holder, - loan_contract, - } - } -} diff --git a/mintbase-deps/src/token/owner.rs b/mintbase-deps/src/token/owner.rs deleted file mode 100644 index 5909ae0..0000000 --- a/mintbase-deps/src/token/owner.rs +++ /dev/null @@ -1,51 +0,0 @@ -use std::fmt; - -use near_sdk::borsh::{ - self, - BorshDeserialize, - BorshSerialize, -}; -use near_sdk::serde::ser::Serializer; -use near_sdk::serde::{ - Deserialize, - Serialize, -}; -use near_sdk::AccountId; - -// TODO: rename to `TokenOwner` -#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] -#[derive(Deserialize, Clone, Debug)] -pub enum Owner { - /// Standard pattern: owned by a user. - Account(AccountId), - /// Compose pattern: owned by a token on this contract. - TokenId(u64), - /// Cross-compose pattern: owned by a token on another contract. - CrossKey(crate::common::TokenKey), - /// Lock: temporarily locked until some callback returns. - Lock(AccountId), -} - -impl Serialize for Owner { - fn serialize( - &self, - serializer: S, - ) -> Result { - // TODO: create string and then clone? - serializer.serialize_str(&format!("{}", self)) - } -} - -impl fmt::Display for Owner { - fn fmt( - &self, - f: &mut fmt::Formatter, - ) -> fmt::Result { - match self { - Owner::Account(s) => write!(f, "{}", s), - Owner::TokenId(n) => write!(f, "{}", n), - Owner::CrossKey(key) => write!(f, "{}", key), - Owner::Lock(_) => panic!("locked"), - } - } -} diff --git a/mintbase-deps/src/utils.rs b/mintbase-deps/src/utils.rs index d241a32..664813b 100644 --- a/mintbase-deps/src/utils.rs +++ b/mintbase-deps/src/utils.rs @@ -1,6 +1,13 @@ -#[cfg(feature = "market-wasm")] +use near_sdk::borsh::{ + self, + BorshDeserialize, + BorshSerialize, +}; +use near_sdk::serde::{ + Deserialize, + Serialize, +}; use near_sdk::Balance; -use near_sdk::Gas; /// Split a &str on the first colon pub fn split_colon(string: &str) -> (&str, &str) { @@ -8,31 +15,178 @@ pub fn split_colon(string: &str) -> (&str, &str) { (&string[..pos], &string[(pos + 1)..]) } -/// Gas is in TerraUnits, default gas call is 100TGas. -pub const fn ntot(near_amount: Gas) -> Gas { - Gas(near_amount.0 * 10u64.pow(12)) -} - /// Near denominated units are in 10^24 #[cfg(feature = "market-wasm")] pub const fn ntoy(near_amount: Balance) -> Balance { near_amount * 10u128.pow(24) } -// // TODO: unused, deprecated? -// pub fn to_yocto(value: &str) -> u128 { -// let vals: Vec<_> = value.split('.').collect(); -// let part1 = vals[0].parse::().unwrap() * 10u128.pow(24); -// if vals.len() > 1 { -// let power = vals[1].len() as u32; -// let part2 = vals[1].parse::().unwrap() * 10u128.pow(24 - power); -// part1 + part2 -// } else { -// part1 -// } -// } - -// // TODO: unused, deprecated? -// pub fn to_near(n: u128) -> u128 { -// n * 10u128.pow(24) -// } +/// A provisional safe fraction type, borrowed and modified from: +/// https://github.com/near/core-contracts/blob/master/staking-pool/src/lib.rs#L127 +/// The numerator is a value between 0 and 10,000. The denominator is +/// assumed to be 10,000. +#[derive(Debug, Clone, PartialEq, Eq, Copy)] +#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] +#[derive(Deserialize, Serialize)] +pub struct SafeFraction { + pub numerator: u32, +} + +impl SafeFraction { + /// Take a u32 numerator to a 10^4 denominator. + /// + /// Upper limit is 10^4 so as to prevent multiplication with overflow. + pub fn new(numerator: u32) -> Self { + crate::near_assert!( + (0..=10000).contains(&numerator), + "{} must be between 0 and 10_000", + numerator + ); + SafeFraction { numerator } + } + + /// Fractionalize a balance. + pub fn multiply_balance( + &self, + value: Balance, + ) -> Balance { + value / 10_000u128 * self.numerator as u128 + } +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[cfg_attr(feature = "wasm", derive(BorshDeserialize, BorshSerialize))] +pub struct TokenKey { + pub token_id: u64, + pub account_id: String, +} + +impl std::fmt::Display for TokenKey { + fn fmt( + &self, + f: &mut std::fmt::Formatter, + ) -> std::fmt::Result { + write!(f, "{}:{}", self.token_id, self.account_id) + } +} + +impl From<&str> for TokenKey { + fn from(s: &str) -> Self { + let (id, account_id) = split_colon(s); + Self { + token_id: id.parse::().unwrap(), + account_id: account_id.to_string(), + } + } +} + +// ---------------------------- assertion macros ---------------------------- // +#[macro_export] +macro_rules! near_panic { + ($msg:literal) => { + near_sdk::env::panic_str($msg) + }; + + ($msg:literal, $($arg:expr),*) => { + near_sdk::env::panic_str(format!($msg, $($arg),*).as_str()) + }; +} + +#[macro_export] +macro_rules! near_assert { + ($predicate:expr, $msg:literal) => { + if !$predicate { + $crate::near_panic!($msg) + } + }; + + ($predicate:expr, $msg:literal, $($arg:expr),*) => { + if !$predicate { + $crate::near_panic!($msg, $($arg),*) + } + }; +} + +#[macro_export] +macro_rules! assert_token_owned_by { + ($token:expr, $account:expr) => { + if !$token.is_owned_by($account) { + $crate::near_panic!( + "{} is required to own token {} ({}, {}:{})", + $account, + $token.id, + file!(), + line!(), + column!() + ); + } + }; +} + +#[macro_export] +macro_rules! assert_token_owned_by_predecessor { + ($token:expr) => { + $crate::assert_token_owned_by!($token, &$crate::near_sdk::env::predecessor_account_id()) + }; +} + +#[macro_export] +macro_rules! assert_token_owned_or_approved { + ($token:expr, $account:expr, $approval_id:expr) => { + if !$token.is_owned_by($account) { + let src = format!("{}, {}:{}", file!(), line!(), column!()); + match ($token.approvals.get($account), $approval_id) { + (_, None) => { + $crate::near_panic!("Disallowing approvals without approval ID! ({})", src) + }, + (None, _) => { + $crate::near_panic!( + "{} has no approval for token {} ({})", + $account, + $token.id, + src + ) + }, + (Some(a), Some(b)) if *a != b => { + $crate::near_panic!( + "The current approval ID is {}, but {} has been provided ({})", + a, + b, + src + ) + }, + _ => { /* everything ok */ }, + } + } + }; +} + +#[macro_export] +macro_rules! assert_token_unloaned { + ($token:expr) => { + if $token.is_loaned() { + $crate::near_panic!( + "Token {} must not be loaned ({}, {}:{})", + $token.id, + file!(), + line!(), + column!() + ); + } + }; +} + +#[macro_export] +macro_rules! assert_storage_deposit { + ($required:expr) => { + if env::attached_deposit() < $required { + $crate::near_panic!( + "Requires storage deposit of at least {} yoctoNEAR ({}, {}:{})", + $required, + file!(), + line!(), + column!() + ); + } + }; +} diff --git a/mintbase-near-indexer b/mintbase-near-indexer deleted file mode 160000 index 160f23e..0000000 --- a/mintbase-near-indexer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 160f23ef57182e0fbacb919ab28a1f693e908166 diff --git a/simple-market-contract b/simple-market-contract index a2c84ad..11c5532 160000 --- a/simple-market-contract +++ b/simple-market-contract @@ -1 +1 @@ -Subproject commit a2c84ad35254e1d427e3bad6eb3aab3cffb29683 +Subproject commit 11c55326033657794574fcbcf936e16b1a01fa2e diff --git a/store/qa.md b/store/qa.md new file mode 100644 index 0000000..243cc57 --- /dev/null +++ b/store/qa.md @@ -0,0 +1,34 @@ +## All functions documented + +- [x] `approvals.rs` +- [x] `burning.rs` +- [x] `core.rs` +- [x] `enumeration.rs` +- [x] `lib.rs` +- [x] `metadata.rs` +- [x] `minting.rs` +- [x] `ownership.rs` +- [x] `payout.rs` + +## Accessible storage variables + +- [x] `minters` +- [x] `metadata` +- [x] `token_metadata` +- [ ] `token_royalty` -> impossible due to `LookupMap` +- [x] `tokens` +- [ ] `tokens_per_owner` -> impossible due to `LookupMap` +- [x] `composeables` -> TODO: deprecate +- [x] `tokens_minted` +- [x] `tokens_burned` +- [x] `num_approved` +- [x] `owner_id` +- [x] `storage_costs` +- [x] `allow_moves` -> TODO: deprecate + +## Notes + +- Because multiply is not implemented contract-side, all the `copies` are + basically wrong, unnecessary amounts of storage are occupied, and methods are + wrong, e.g.: + - `get_token_remaining_copies` diff --git a/store/src/approvals.rs b/store/src/approvals.rs index fd1d40b..f9344aa 100644 --- a/store/src/approvals.rs +++ b/store/src/approvals.rs @@ -1,25 +1,25 @@ use mintbase_deps::constants::gas; -use mintbase_deps::interfaces::ext_on_approve; +use mintbase_deps::interfaces::ext_nft_on_approve; use mintbase_deps::logging::{ - log_approve, - log_batch_approve, - log_revoke, - log_revoke_all, + NftApproveData, + NftApproveLog, + NftRevokeAllData, + NftRevokeData, }; use mintbase_deps::near_sdk::json_types::U64; use mintbase_deps::near_sdk::{ self, + assert_one_yocto, env, near_bindgen, AccountId, Promise, }; -use mintbase_deps::token::Token; +use mintbase_deps::store_data::Token; use mintbase_deps::{ assert_storage_deposit, assert_token_owned_by_predecessor, assert_token_unloaned, - assert_yocto_deposit, }; use crate::*; @@ -28,6 +28,8 @@ use crate::*; #[near_bindgen] impl MintbaseStore { // -------------------------- change methods --------------------------- + /// Granting NFT transfer approval as specified by + /// [NEP-178](https://nomicon.io/Standards/Tokens/NonFungibleToken/ApprovalManagement) #[payable] pub fn nft_approve( &mut self, @@ -38,28 +40,23 @@ impl MintbaseStore { // Note: This method only guarantees that the store-storage is covered. // The market may still reject. assert_storage_deposit!(self.storage_costs.common); - // assert!(env::attached_deposit() > self.storage_costs.common); let token_idu64 = token_id.into(); // validates owner and loaned let approval_id = self.approve_internal(token_idu64, &account_id); log_approve(token_idu64, approval_id, &account_id); if let Some(msg) = msg { - ext_on_approve::nft_on_approve( - token_id, - env::predecessor_account_id(), - approval_id, - msg, - account_id, - 0, - gas::NFT_ON_APPROVE, - ) - .into() + ext_nft_on_approve::ext(account_id) + .with_static_gas(gas::NFT_ON_APPROVE) + .nft_on_approve(token_id, env::predecessor_account_id(), approval_id, msg) + .into() } else { None } } + /// Revokes NFT transfer approval as specified by + /// [NEP-178](https://nomicon.io/Standards/Tokens/NonFungibleToken/ApprovalManagement) #[payable] pub fn nft_revoke( &mut self, @@ -68,11 +65,9 @@ impl MintbaseStore { ) { let token_idu64 = token_id.into(); let mut token = self.nft_token_internal(token_idu64); - // token.assert_unloaned(); - // token.assert_owned_by_predecessor(); assert_token_unloaned!(token); assert_token_owned_by_predecessor!(token); - assert_yocto_deposit!(); + assert_one_yocto(); if token.approvals.remove(&account_id).is_some() { self.tokens.insert(&token_idu64, &token); @@ -81,6 +76,8 @@ impl MintbaseStore { // TODO: refund storage deposit } + /// Revokes all NFT transfer approvals as specified by + /// as specified by [NEP-178](https://nomicon.io/Standards/Tokens/NonFungibleToken/ApprovalManagement) #[payable] pub fn nft_revoke_all( &mut self, @@ -88,11 +85,9 @@ impl MintbaseStore { ) { let token_idu64 = token_id.into(); let mut token = self.nft_token_internal(token_idu64); - // token.assert_unloaned(); - // token.assert_owned_by_predecessor(); assert_token_unloaned!(token); assert_token_owned_by_predecessor!(token); - assert_yocto_deposit!(); + assert_one_yocto(); if !token.approvals.is_empty() { token.approvals.clear(); @@ -121,6 +116,10 @@ impl MintbaseStore { #[near_bindgen] impl MintbaseStore { // -------------------------- change methods --------------------------- + /// Like `nft_approve`, but it allows approving multiple tokens in one call. + /// The `msg` argument will be forwarded towards a `nft_on_batch_approve`. + /// As this is not standardized and only supported by the legacy Mintbase + /// market. #[payable] pub fn nft_batch_approve( &mut self, @@ -135,11 +134,6 @@ impl MintbaseStore { // Note: This method only guarantees that the store-storage is covered. // The financial contract may still reject. assert_storage_deposit!(storage_stake); - // assert!( - // env::attached_deposit() > store_approval_storage, - // "deposit less than: {}", - // store_approval_storage - // ); let approval_ids: Vec = token_ids .iter() // validates owner and loaned @@ -148,16 +142,11 @@ impl MintbaseStore { log_batch_approve(&token_ids, &approval_ids, &account_id); if let Some(msg) = msg { - ext_on_approve::nft_on_batch_approve( - token_ids, - approval_ids, - env::predecessor_account_id(), - msg, - account_id, - env::attached_deposit() - storage_stake, - gas::NFT_BATCH_APPROVE, - ) - .into() + ext_nft_on_approve::ext(account_id) + .with_attached_deposit(env::attached_deposit() - storage_stake) + .with_static_gas(gas::NFT_BATCH_APPROVE) + .nft_on_batch_approve(token_ids, approval_ids, env::predecessor_account_id(), msg) + .into() } else { None } @@ -220,3 +209,57 @@ impl MintbaseStore { } } } + +fn log_approve( + token_id: u64, + approval_id: u64, + account_id: &AccountId, +) { + let data = NftApproveData(vec![NftApproveLog { + token_id: token_id.into(), + approval_id, + account_id: account_id.to_string(), + }]); + env::log_str(&data.serialize_event()); +} + +fn log_batch_approve( + tokens: &[U64], + approvals: &[U64], + account_id: &AccountId, +) { + let data = NftApproveData( + approvals + .iter() + .zip(tokens.iter()) + .map(|(approval_id, token_id)| NftApproveLog { + token_id: *token_id, + approval_id: approval_id.0, + account_id: account_id.to_string(), + }) + .collect::>(), + ); + env::log_str(&data.serialize_event()); +} + +fn log_revoke( + token_id: u64, + account_id: &AccountId, +) { + env::log_str( + &NftRevokeData { + token_id: token_id.into(), + account_id: account_id.to_string(), + } + .serialize_event(), + ); +} + +fn log_revoke_all(token_id: u64) { + env::log_str( + &NftRevokeAllData { + token_id: token_id.into(), + } + .serialize_event(), + ); +} diff --git a/store/src/burning.rs b/store/src/burning.rs index 6c989bf..f3e2bd2 100644 --- a/store/src/burning.rs +++ b/store/src/burning.rs @@ -1,15 +1,14 @@ -use mintbase_deps::logging::log_nft_batch_burn; +use mintbase_deps::logging::NftBurnLog; use mintbase_deps::near_sdk::json_types::U64; use mintbase_deps::near_sdk::{ self, + assert_one_yocto, env, near_bindgen, - AccountId, }; use mintbase_deps::{ assert_token_owned_by, assert_token_unloaned, - assert_yocto_deposit, }; use crate::*; @@ -27,27 +26,15 @@ impl MintbaseStore { &mut self, token_ids: Vec, ) { - assert_yocto_deposit!(); + assert_one_yocto(); assert!(!token_ids.is_empty()); - self.burn_triaged(token_ids, env::predecessor_account_id()); - } - /// A helper to burn tokens. Necessary to satisfy the `nft_move` method, - /// where the callback prevents the use of - /// `env::predecessor_account_id()` to determine whether the owner is the - /// method caller. - fn burn_triaged( - &mut self, - token_ids: Vec, - account_id: AccountId, - ) { + let account_id = env::predecessor_account_id(); let mut set_owned = self.tokens_per_owner.get(&account_id).expect("none owned"); token_ids.iter().for_each(|&token_id| { let token_id: u64 = token_id.into(); let token = self.nft_token_internal(token_id); - // token.assert_unloaned(); - // token.assert_owned_by(&account_id); assert_token_unloaned!(token); assert_token_owned_by!(token, &account_id); @@ -83,21 +70,25 @@ impl MintbaseStore { log_nft_batch_burn(&token_ids, account_id.to_string()); } - /// Get info about the store. - pub fn get_info(&self) { - let s = format!("owner: {}", self.owner_id); - env::log_str(s.as_str()); - let s = format!("minted: {}", self.tokens_minted); - env::log_str(s.as_str()); - let s = format!("burned: {}", self.tokens_burned); - env::log_str(s.as_str()); - let s = format!("approved: {}", self.num_approved); - env::log_str(s.as_str()); - let s = format!("allow_moves: {}", self.allow_moves); - env::log_str(s.as_str()); - } - // -------------------------- view methods ----------------------------- // -------------------------- private methods -------------------------- // -------------------------- internal methods ------------------------- } + +fn log_nft_batch_burn( + token_ids: &[U64], + owner_id: String, +) { + let token_ids = token_ids + .iter() + .map(|x| x.0.to_string()) + .collect::>(); + let log = NftBurnLog { + owner_id, + authorized_id: None, + token_ids, + memo: None, + }; + + env::log_str(log.serialize_event().as_str()); +} diff --git a/store/src/core.rs b/store/src/core.rs index 7eaef6f..c34f2b3 100644 --- a/store/src/core.rs +++ b/store/src/core.rs @@ -1,27 +1,25 @@ use std::collections::HashMap; use std::convert::TryFrom; -use mintbase_deps::constants::{ - gas, - NO_DEPOSIT, -}; +use mintbase_deps::constants::gas; // contract interface modules -use mintbase_deps::interfaces::ext_on_transfer; +use mintbase_deps::interfaces::ext_nft_on_transfer; // logging functions use mintbase_deps::logging::{ - log_nft_batch_transfer, - log_nft_transfer, + NftTransferData, + NftTransferLog, }; use mintbase_deps::near_sdk::json_types::U64; use mintbase_deps::near_sdk::{ self, + assert_one_yocto, env, near_bindgen, AccountId, Promise, PromiseResult, }; -use mintbase_deps::token::{ +use mintbase_deps::store_data::{ Owner, Token, TokenCompliant, @@ -30,9 +28,7 @@ use mintbase_deps::{ assert_token_owned_by, assert_token_owned_or_approved, assert_token_unloaned, - assert_yocto_deposit, - near_assert_eq, - near_assert_ne, + near_assert, }; use crate::*; @@ -42,6 +38,7 @@ use crate::*; impl MintbaseStore { // -------------------------- change methods --------------------------- + /// Transfer function as specified by [NEP-171](https://nomicon.io/Standards/Tokens/NonFungibleToken/Core). #[payable] pub fn nft_transfer( &mut self, @@ -50,7 +47,7 @@ impl MintbaseStore { approval_id: Option, memo: Option, ) { - assert_yocto_deposit!(); + assert_one_yocto(); let token_idu64 = token_id.into(); let mut token = self.nft_token_internal(token_idu64); let old_owner = token.owner_id.to_string(); @@ -61,6 +58,7 @@ impl MintbaseStore { log_nft_transfer(&receiver_id, token_idu64, &memo, old_owner); } + /// Transfer-and-call function as specified by [NEP-171](https://nomicon.io/Standards/Tokens/NonFungibleToken/Core). #[payable] pub fn nft_transfer_call( &mut self, @@ -69,7 +67,7 @@ impl MintbaseStore { approval_id: Option, msg: String, ) -> Promise { - assert_yocto_deposit!(); + assert_one_yocto(); let token_idu64 = token_id.into(); let mut token = self.nft_token_internal(token_idu64); let pred = env::predecessor_account_id(); @@ -79,28 +77,19 @@ impl MintbaseStore { let owner_id = AccountId::new_unchecked(token.owner_id.to_string()); self.lock_token(&mut token); - ext_on_transfer::nft_on_transfer( - pred, - owner_id.clone(), - token_id, - msg, - receiver_id.clone(), - NO_DEPOSIT, - gas::NFT_TRANSFER_CALL, - ) - .then(store_self::nft_resolve_transfer( - owner_id, - receiver_id, - token_id.0.to_string(), - None, - env::current_account_id(), - NO_DEPOSIT, - gas::NFT_TRANSFER_CALL, - )) + ext_nft_on_transfer::ext(receiver_id.clone()) + .with_static_gas(gas::NFT_TRANSFER_CALL) + .nft_on_transfer(pred, owner_id.clone(), token_id, msg) + .then( + store_self::ext(env::current_account_id()) + .with_static_gas(gas::NFT_TRANSFER_CALL) + .nft_resolve_transfer(owner_id, receiver_id, token_id.0.to_string(), None), + ) } // -------------------------- view methods ----------------------------- + /// Token view method as specified by [NEP-171](https://nomicon.io/Standards/Tokens/NonFungibleToken/Core). pub fn nft_token( &self, token_id: U64, @@ -110,6 +99,7 @@ impl MintbaseStore { // -------------------------- private methods -------------------------- + /// Call back of a transfer-and-call as specified by [NEP-171](https://nomicon.io/Standards/Tokens/NonFungibleToken/Core). #[private] pub fn nft_resolve_transfer( &mut self, @@ -131,9 +121,8 @@ impl MintbaseStore { let token_id_u64 = token_id.parse::().unwrap(); let mut token = self.nft_token_internal(token_id_u64); self.unlock_token(&mut token); - near_assert_eq!( - env::promise_results_count(), - 1, + near_assert!( + env::promise_results_count() == 1, "Wtf? Had more than one DataReceipt to process" ); // Get whether token should be returned @@ -156,6 +145,28 @@ impl MintbaseStore { false } } + + /// Locking an NFT during a transfer-and-call chain + fn lock_token( + &mut self, + token: &mut Token, + ) { + if let Owner::Account(ref s) = token.owner_id { + token.owner_id = Owner::Lock(s.clone()); + self.tokens.insert(&token.id, token); + } + } + + /// Unlocking an NFT after a transfer-and-call chain + fn unlock_token( + &mut self, + token: &mut Token, + ) { + if let Owner::Lock(ref s) = token.owner_id { + token.owner_id = Owner::Account(s.clone()); + self.tokens.insert(&token.id, token); + } + } } // --------------------- non-standardized core methods ---------------------- // @@ -163,12 +174,14 @@ impl MintbaseStore { impl MintbaseStore { // -------------------------- change methods --------------------------- + /// Like `nft_transfer`, but allows transferring multiple tokens in a + /// single call. #[payable] pub fn nft_batch_transfer( &mut self, token_ids: Vec<(U64, AccountId)>, ) { - assert_yocto_deposit!(); + assert_one_yocto(); near_assert!(!token_ids.is_empty(), "Token IDs cannot be empty"); let pred = env::predecessor_account_id(); let mut set_owned = self.tokens_per_owner.get(&pred).expect("none owned"); @@ -180,9 +193,8 @@ impl MintbaseStore { let old_owner = token.owner_id.to_string(); assert_token_unloaned!(token); assert_token_owned_by!(token, &pred); - near_assert_ne!( - account_id.to_string(), - token.owner_id.to_string(), + near_assert!( + account_id.to_string() != token.owner_id.to_string(), "Token {} is already owned by {}", token.id, account_id @@ -232,7 +244,7 @@ impl MintbaseStore { self.tokens.insert(&token.id, token); } - // TODO: documentation + /// Gets the token as stored on the smart contract pub(crate) fn nft_token_internal( &self, token_id: u64, @@ -242,6 +254,7 @@ impl MintbaseStore { .unwrap_or_else(|| panic!("token: {} doesn't exist", token_id)) } + /// Gets the token as specified by relevant NEPs. // TODO: fix this abomination pub(crate) fn nft_token_compliant_internal( &self, @@ -279,3 +292,42 @@ impl MintbaseStore { }) } } + +fn log_nft_transfer( + to: &AccountId, + token_id: u64, + memo: &Option, + old_owner: String, +) { + let data = NftTransferData(vec![NftTransferLog { + authorized_id: None, + old_owner_id: old_owner, + new_owner_id: to.to_string(), + token_ids: vec![token_id.to_string()], + memo: memo.clone(), + }]); + + env::log_str(data.serialize_event().as_str()); +} + +fn log_nft_batch_transfer( + tokens: &[U64], + accounts: &[AccountId], + old_owners: Vec, +) { + let data = NftTransferData( + accounts + .iter() + .enumerate() + .map(|(u, x)| NftTransferLog { + authorized_id: None, + old_owner_id: old_owners[u].clone(), + new_owner_id: x.to_string(), + token_ids: vec![tokens[u].0.to_string()], + memo: None, + }) + .collect::>(), + ); + + env::log_str(data.serialize_event().as_str()); +} diff --git a/store/src/enumeration.rs b/store/src/enumeration.rs index 08b4a0b..17e38b5 100644 --- a/store/src/enumeration.rs +++ b/store/src/enumeration.rs @@ -4,18 +4,21 @@ use mintbase_deps::near_sdk::{ near_bindgen, AccountId, }; -use mintbase_deps::token::TokenCompliant; +use mintbase_deps::store_data::TokenCompliant; use crate::*; // -------------------- standardized enumeration methods -------------------- // #[near_bindgen] impl MintbaseStore { + /// Total number of available NFTs on this smart contract according to + /// [NEP-181](https://nomicon.io/Standards/Tokens/NonFungibleToken/Enumeration) pub fn nft_total_supply(&self) -> U64 { - // TODO: shouldn't this subtract all burned tokens? - self.tokens_minted.into() + (self.tokens_minted - self.tokens_burned).into() } + /// List NFTs according to + /// [NEP-181](https://nomicon.io/Standards/Tokens/NonFungibleToken/Enumeration) pub fn nft_tokens( &self, from_index: Option, // default: "0" @@ -32,6 +35,8 @@ impl MintbaseStore { .collect() } + /// Total number of available NFTs for specified owner according to + /// [NEP-181](https://nomicon.io/Standards/Tokens/NonFungibleToken/Enumeration) pub fn nft_supply_for_owner( &self, account_id: AccountId, @@ -43,6 +48,8 @@ impl MintbaseStore { .into() } + /// List NFTs for specified owner according to + /// [NEP-181](https://nomicon.io/Standards/Tokens/NonFungibleToken/Enumeration) pub fn nft_tokens_for_owner( &self, account_id: AccountId, @@ -64,7 +71,3 @@ impl MintbaseStore { .collect::>() } } - -// ------------------ non-standardized enumeration methods ------------------ // -#[near_bindgen] -impl MintbaseStore {} diff --git a/store/src/lib.rs b/store/src/lib.rs index c159707..16bc903 100644 --- a/store/src/lib.rs +++ b/store/src/lib.rs @@ -1,9 +1,3 @@ -use mintbase_deps::common::{ - NFTContractMetadata, - Royalty, - TokenMetadata, - TokenMetadataCompliant, -}; use mintbase_deps::constants::{ storage_stake, StorageCosts, @@ -31,9 +25,12 @@ use mintbase_deps::near_sdk::{ AccountId, StorageUsage, }; -use mintbase_deps::token::{ - Owner, +use mintbase_deps::store_data::{ + NFTContractMetadata, + Royalty, Token, + TokenMetadata, + TokenMetadataCompliant, }; /// Implementing approval management as [described in the Nomicon](https://nomicon.io/Standards/NonFungibleToken/ApprovalManagement). @@ -82,6 +79,8 @@ pub struct MintbaseStore { /// A mapping from each user to the tokens owned by that user. The owner /// of the token is also stored on the token itself. pub tokens_per_owner: LookupMap>, + /// DEPRECATED. Kept to avoid storage migrations. + /// /// A map from a token_id of a token on THIS contract to a set of tokens, /// that may be on ANY contract. If the owned-token is on this contract, /// the id will have format "". If the token is on another contract, @@ -102,6 +101,8 @@ pub struct MintbaseStore { /// to 10^19, but this may change in the future, thus this /// future-proofing field. pub storage_costs: StorageCosts, + /// DEPRECATED. Kept to avoid storage migrations. + /// /// If false, disallow users to call `nft_move`. pub allow_moves: bool, } @@ -146,25 +147,6 @@ impl MintbaseStore { // -------------------------- change methods --------------------------- // -------------------------- view methods ----------------------------- - /// Get the holder of the token. The token may be owned by: - /// - a normal account: return that account. - /// - a lent out account : in that case, return the loan holder. - /// - a token on this contract: recursively search for the root token and - /// return its owner - /// - a token on another contract. Return: "PARENT_TOKEN_ID:CONTRACT_ID". - pub fn nft_holder( - &self, - token_id: U64, - ) -> String { - let token = self.nft_token_internal(token_id.into()); - match token.get_owner_or_loaner() { - Owner::Account(owner) => owner.to_string(), - Owner::TokenId(id) => self.nft_holder(id.into()), - Owner::CrossKey(key) => (key.to_string()), - Owner::Lock(_) => (env::panic_str("token locked")), - } - } - /// A non-indexed implementation. `from_index` and `limit are removed, so as /// to support the: /// @@ -184,15 +166,21 @@ impl MintbaseStore { .collect() } - /// Get the number of unburned copies of the token in existance. - pub fn get_token_remaining_copies( - &self, - token_id: U64, - ) -> u16 { - self.token_metadata - .get(&self.nft_token_internal(token_id.into()).metadata_id) - .expect("bad metadata_id") - .0 + /// Get total count of minted NFTs on this smart contracts. Can be used to + /// predict next token ID. + pub fn get_tokens_minted(&self) -> U64 { + self.tokens_minted.into() + } + + /// Get total count of burned NFTs on this smart contracts. + pub fn get_tokens_burned(&self) -> U64 { + self.tokens_burned.into() + } + + /// Get count of all issued approvals ever. Can be used to predict next + /// approval ID. + pub fn get_num_approved(&self) -> u64 { + self.num_approved } // -------------------------- private methods -------------------------- @@ -208,44 +196,55 @@ impl MintbaseStore { Self { metadata, ..old } } + /// Intended to introduce a consistent storage scheme to all stores. + /// This migration is currently paused because of problems with + /// MyNearWallet. + /// + /// Pros for the migration: + /// + /// - More flexibility + /// - Enables usage of multiple storage providers + /// - Reduces dependence on arweave + /// - Current inconsistency causes a lot of confusion, but all of the NEAR + /// NFT ecosystem is already fragmented in their usage of `base_uri` + /// + /// Cons for the migration: + /// + /// - Gas costs + /// - Permanently increased storage costs + /// - Very slim probability for data corruption (worked fine on testnet), + /// which should also be reversible + /// - Will require partial reindexing #[private] - pub fn prepend_base_uri( + pub fn set_reference_media( &mut self, - base_uri: String, - token_ids_with_media: Vec<(String, Option)>, + specs: Vec<(String, Option, Option)>, ) { - for (token_id, media) in token_ids_with_media - .iter() - .map(|(id, media)| (id.parse::().unwrap(), media)) - { - let metadata_id = self.tokens.get(&token_id).unwrap().metadata_id; + for (token_id, reference, media) in specs { + let metadata_id = self + .tokens + .get(&token_id.parse().unwrap()) + .unwrap() + .metadata_id; let (n, mut metadata) = self.token_metadata.get(&metadata_id).unwrap(); - metadata.reference = concat_uri(&base_uri, &metadata.reference); - metadata.media = concat_uri(&base_uri, &media); + metadata.reference = reference; + metadata.media = media; self.token_metadata.insert(&metadata_id, &(n, metadata)); } } + /// Drops the base_uri after successfully migration all tokens with + /// `prepend_base_uri` #[private] - pub fn drop_base_uri(&mut self) { - self.metadata.base_uri = None; - } - - // -------------------------- internal methods ------------------------- - - /// If allow_moves is false, disallow token owners from calling - /// `nft_move` on this contract, AND on other contracts targetting this - /// contract. `nft_move` allows the user to burn a token they own on one - /// contract, and re-mint it on another contract. - #[payable] - pub fn set_allow_moves( + pub fn set_base_uri( &mut self, - state: bool, + base_uri: Option, ) { - self.assert_store_owner(); - self.allow_moves = state; + self.metadata.base_uri = base_uri; } + // -------------------------- internal methods ------------------------- + /// Internal /// Transfer a token_id from one account's owned-token-set to another's. /// Callers of this method MUST validate that `from` owns the token before @@ -278,44 +277,6 @@ impl MintbaseStore { } } - // TODO: unused, deprecated? - // /// Internal - // /// update the set of tokens composed underneath parent. If insert is - // /// true, insert token_id; if false, try to remove it. - // fn update_composed_sets( - // &mut self, - // child: String, - // parent: String, - // insert: bool, - // ) { - // let mut set = self.get_or_new_composed(parent.to_string()); - // if insert { - // set.insert(&child); - // } else { - // set.remove(&child); - // } - // if set.is_empty() { - // self.composeables.remove(&parent); - // } else { - // self.composeables.insert(&parent, &set); - // } - // } - - // TODO: unused, deprecated? - // /// Internal - // /// update the set of tokens composed underneath parent. If insert is - // /// true, insert token_id; if false, try to remove it. - // pub(crate) fn get_or_new_composed( - // &mut self, - // parent: String, - // ) -> UnorderedSet { - // self.composeables.get(&parent).unwrap_or_else(|| { - // let mut prefix: Vec = vec![b'h']; - // prefix.extend_from_slice(parent.to_string().as_bytes()); - // UnorderedSet::new(prefix) - // }) - // } - /// If an account_id has never owned tokens on this store, we must /// construct an `UnorderedSet` for them. If they have owned tokens on /// this store, get that set. @@ -330,28 +291,6 @@ impl MintbaseStore { UnorderedSet::new(prefix) }) } - - /// Internal - fn lock_token( - &mut self, - token: &mut Token, - ) { - if let Owner::Account(ref s) = token.owner_id { - token.owner_id = Owner::Lock(s.clone()); - self.tokens.insert(&token.id, token); - } - } - - /// Internal - fn unlock_token( - &mut self, - token: &mut Token, - ) { - if let Owner::Lock(ref s) = token.owner_id { - token.owner_id = Owner::Account(s.clone()); - self.tokens.insert(&token.id, token); - } - } } // ----------------------- contract interface modules ----------------------- // @@ -394,15 +333,3 @@ pub trait NonFungibleResolveTransfer { approved_account_ids: Option>, ); } - -fn concat_uri( - base: &str, - uri: &Option, -) -> Option { - match uri { - None => None, - Some(uri) if uri.starts_with(base) => Some(uri.to_string()), - Some(uri) if base.ends_with('/') => Some(format!("{}{}", base, uri)), - Some(uri) => Some(format!("{}/{}", base, uri)), - } -} diff --git a/store/src/metadata.rs b/store/src/metadata.rs index 4af23c0..c368b24 100644 --- a/store/src/metadata.rs +++ b/store/src/metadata.rs @@ -1,22 +1,23 @@ -use mintbase_deps::common::{ - NFTContractMetadata, - NonFungibleContractMetadata, - TokenMetadata, -}; -use mintbase_deps::logging::log_set_icon_base64; +use mintbase_deps::logging::MbStoreChangeSettingData; +use mintbase_deps::near_panic; use mintbase_deps::near_sdk::json_types::U64; use mintbase_deps::near_sdk::{ self, - env, near_bindgen, }; +use mintbase_deps::store_data::{ + NFTContractMetadata, + TokenMetadata, +}; use crate::*; // --------------------- standardized metadata methods ---------------------- // #[near_bindgen] -impl NonFungibleContractMetadata for MintbaseStore { - fn nft_metadata(&self) -> &NFTContractMetadata { +impl MintbaseStore { + /// Contract-level metadata view method as described in + /// [NEP-177](https://nomicon.io/Standards/Tokens/NonFungibleToken/Metadata) + pub fn nft_metadata(&self) -> &NFTContractMetadata { &self.metadata } } @@ -26,26 +27,6 @@ impl NonFungibleContractMetadata for MintbaseStore { impl MintbaseStore { // -------------------------- change methods --------------------------- - // /// The `base_uri` for the `Store` is the identifier used to look up the - // /// `Store` on Arweave. Changing the `base_uri` requires the `Store` - // /// owner to be responsible for making sure their `Store` location is - // /// maintained by their preferred storage provider. - // /// - // /// Only the `Store` owner may call this function. - // #[payable] - // pub fn set_base_uri( - // &mut self, - // base_uri: String, - // ) { - // self.assert_store_owner(); - // near_assert!( - // base_uri.len() <= 100, - // "Base URI must be less then 100 chars" - // ); - // log_set_base_uri(&base_uri); - // self.metadata.base_uri = Some(base_uri); - // } - /// `icon_base64` is best understood as the `Store` logo/icon. /// /// Only the store owner may call this function. @@ -84,28 +65,31 @@ impl MintbaseStore { /// The Token URI is generated to index the token on whatever distributed /// storage platform this `Store` uses. Mintbase publishes token data on /// Arweave. `Store` owners may opt to use their own storage platform. - pub fn nft_token_uri( + pub fn nft_token_reference_uri( &self, token_id: U64, ) -> String { - let base = &self.metadata.base_uri.as_ref().expect("no base_uri"); - let metadata_reference = self - .nft_token_metadata(token_id) - .reference - .expect("no reference"); - format!("{}/{}", base, metadata_reference) + let base = self.metadata.base_uri.clone(); + let reference = self.nft_token_metadata(token_id).reference; + match (base, reference) { + (Some(b), Some(r)) if r.starts_with(&b) => r, + (Some(b), Some(r)) if b.ends_with('/') => format!("{}{}", b, r), + (Some(b), Some(r)) => format!("{}/{}", b, r), + (Some(b), None) => b, + (None, Some(r)) => r, + (None, None) => { + near_panic!("Cannot construct URI, as neither base_uri nor reference exist.") + }, + } } +} - /// Get the `token_key` for `token_id`. The `token_key` is the - /// combination of the token's `token_id` (unique within this `Store`), - /// and the `Store` address (unique across all contracts). The String is - /// unique across `Store`s. The String is used by other Mintbase - /// contracts as a permanent unique identifier for tokens. - pub fn nft_token_key( - &self, - token_id: U64, - ) -> String { - let id: u64 = token_id.into(); - format!("{}:{}", id, env::current_account_id()) - } +fn log_set_icon_base64(base64: &Option) { + env::log_str( + &MbStoreChangeSettingData { + new_icon_base64: base64.clone(), + ..MbStoreChangeSettingData::empty() + } + .serialize_event(), + ); } diff --git a/store/src/minting.rs b/store/src/minting.rs index 68fbeea..3f08921 100644 --- a/store/src/minting.rs +++ b/store/src/minting.rs @@ -1,30 +1,29 @@ -use mintbase_deps::common::{ - Royalty, - RoyaltyArgs, - SplitBetweenUnparsed, - SplitOwners, - TokenMetadata, -}; use mintbase_deps::constants::{ MAX_LEN_PAYOUT, MINIMUM_FREE_STORAGE_STAKE, }; use mintbase_deps::logging::{ - log_grant_minter, - log_nft_batch_mint, - log_revoke_minter, + MbStoreChangeSettingData, + NftMintLog, + NftMintLogMemo, }; +use mintbase_deps::near_assert; use mintbase_deps::near_sdk::{ self, + assert_one_yocto, env, near_bindgen, + serde_json, AccountId, Balance, }; -use mintbase_deps::token::Token; -use mintbase_deps::{ - assert_yocto_deposit, - near_assert, +use mintbase_deps::store_data::{ + Royalty, + RoyaltyArgs, + SplitBetweenUnparsed, + SplitOwners, + Token, + TokenMetadata, }; use crate::*; @@ -50,7 +49,8 @@ impl MintbaseStore { pub fn nft_batch_mint( &mut self, owner_id: AccountId, - metadata: TokenMetadata, + #[allow(unused_mut)] // cargo complains, but it's required + mut metadata: TokenMetadata, num_to_mint: u64, royalty_args: Option, split_owners: Option, @@ -71,11 +71,29 @@ impl MintbaseStore { minter_id ); + near_assert!( + !option_string_starts_with(&metadata.reference, &self.metadata.base_uri), + "`metadata.reference` must not start with contract base URI" + ); + near_assert!( + !option_string_starts_with(&metadata.media, &self.metadata.base_uri), + "`metadata.media` must not start with contract base URI" + ); + near_assert!( + option_string_is_u64(&metadata.starts_at), + "`metadata.starts_at` needs to parse to a u64" + ); + near_assert!( + option_string_is_u64(&metadata.expires_at), + "`metadata.expires_at` needs to parse to a u64" + ); + // Calculating storage consuption upfront saves gas if the transaction // were to fail later. let covered_storage = env::account_balance() - (env::storage_usage() as u128 * self.storage_costs.storage_price_per_byte); - let (metadata, md_size) = TokenMetadata::from_with_size(metadata, num_to_mint); + metadata.copies = metadata.copies.or(Some(num_to_mint as u16)); + let md_size = borsh::to_vec(&metadata).unwrap().len() as u64; let roy_len = royalty_args .as_ref() .map(|pre_roy| { @@ -172,6 +190,7 @@ impl MintbaseStore { /// /// This method increases storage costs of the contract, but covering them /// is optional. + // TODO: deprecate in favor of batch_change_minters #[payable] pub fn grant_minter( &mut self, @@ -181,6 +200,7 @@ impl MintbaseStore { self.grant_minter_internal(&account_id) } + /// Adds an account ID to the minters list and logs the corresponding event. fn grant_minter_internal( &mut self, account_id: &AccountId, @@ -196,12 +216,13 @@ impl MintbaseStore { /// themselves. /// /// Only the store owner may call this function. + // TODO: deprecate in favor of batch_change_minters #[payable] pub fn revoke_minter( &mut self, account_id: AccountId, ) { - assert_yocto_deposit!(); + assert_one_yocto(); near_assert!( env::predecessor_account_id() == self.owner_id || env::predecessor_account_id() == account_id, @@ -212,6 +233,8 @@ impl MintbaseStore { self.revoke_minter_internal(&account_id); } + /// Tries to remove an acount ID from the minters list, will only fail + /// if the owner should be removed from the minters list. fn revoke_minter_internal( &mut self, account_id: &AccountId, @@ -259,6 +282,14 @@ impl MintbaseStore { } } + /// The calling account will try to withdraw as minter from this NFT smart + /// contract. If the calling account is not a minter on the NFT smart + /// contract, this will still succeed but have no effect. + pub fn withdraw_minter(&mut self) { + assert_one_yocto(); + self.revoke_minter_internal(&env::predecessor_account_id()) + } + // -------------------------- view methods ----------------------------- /// Check if `account_id` is a minter. @@ -298,3 +329,71 @@ impl MintbaseStore { + num_tokens as u128 * (self.storage_costs.token + num_splits as u128 * self.storage_costs.common) } } + +fn option_string_starts_with( + string: &Option, + prefix: &Option, +) -> bool { + match (string, prefix) { + (Some(s), Some(p)) => s.starts_with(p), + _ => false, + } +} + +fn option_string_is_u64(opt_s: &Option) -> bool { + opt_s + .as_ref() + .map(|s| s.parse::().is_ok()) + .unwrap_or(true) +} + +#[allow(clippy::too_many_arguments)] +fn log_nft_batch_mint( + first_token_id: u64, + last_token_id: u64, + minter: &str, + owner: &str, + royalty: &Option, + split_owners: &Option, + meta_ref: &Option, + meta_extra: &Option, +) { + let memo = serde_json::to_string(&NftMintLogMemo { + royalty: royalty.clone(), + split_owners: split_owners.clone(), + meta_id: meta_ref.clone(), + meta_extra: meta_extra.clone(), + minter: minter.to_string(), + }) + .unwrap(); + let token_ids = (first_token_id..=last_token_id) + .map(|x| x.to_string()) + .collect::>(); + let log = NftMintLog { + owner_id: owner.to_string(), + token_ids, + memo: Option::from(memo), + }; + + env::log_str(log.serialize_event().as_str()); +} + +pub(crate) fn log_grant_minter(account_id: &AccountId) { + env::log_str( + &MbStoreChangeSettingData { + granted_minter: Some(account_id.to_string()), + ..MbStoreChangeSettingData::empty() + } + .serialize_event(), + ); +} + +pub(crate) fn log_revoke_minter(account_id: &AccountId) { + env::log_str( + &MbStoreChangeSettingData { + revoked_minter: Some(account_id.to_string()), + ..MbStoreChangeSettingData::empty() + } + .serialize_event(), + ); +} diff --git a/store/src/ownership.rs b/store/src/ownership.rs index 8a06c4a..45d6e12 100644 --- a/store/src/ownership.rs +++ b/store/src/ownership.rs @@ -1,19 +1,16 @@ -use mintbase_deps::logging::{ - log_grant_minter, - log_revoke_minter, - log_transfer_store, -}; +use mintbase_deps::logging::MbStoreChangeSettingData; +use mintbase_deps::near_assert; use mintbase_deps::near_sdk::{ self, + assert_one_yocto, near_bindgen, AccountId, }; -use mintbase_deps::{ - assert_yocto_deposit, - near_assert_eq, - near_assert_ne, -}; +use crate::minting::{ + log_grant_minter, + log_revoke_minter, +}; use crate::*; #[near_bindgen] @@ -31,9 +28,8 @@ impl MintbaseStore { keep_old_minters: bool, ) { self.assert_store_owner(); - near_assert_ne!( - new_owner, - self.owner_id, + near_assert!( + new_owner != self.owner_id, "{} already owns this store", new_owner ); @@ -87,18 +83,35 @@ impl MintbaseStore { } // -------------------------- view methods ----------------------------- - // TODO: get_owner - // TODO: get_storage_price_per_byte + /// Show the current owner of this NFT contract + pub fn get_owner_id(&self) -> AccountId { + self.owner_id.clone() + } + + /// Show the current owner of this NFT contract + pub fn get_storage_costs(&self) -> StorageCosts { + self.storage_costs.clone() + } + // -------------------------- private methods -------------------------- // -------------------------- internal methods ------------------------- /// Validate the caller of this method matches the owner of this `Store`. pub(crate) fn assert_store_owner(&self) { - assert_yocto_deposit!(); - near_assert_eq!( - self.owner_id, - env::predecessor_account_id(), + assert_one_yocto(); + near_assert!( + self.owner_id == env::predecessor_account_id(), "This method can only be called by the store owner" ); } } + +fn log_transfer_store(account_id: &AccountId) { + env::log_str( + &MbStoreChangeSettingData { + new_owner: Some(account_id.to_string()), + ..MbStoreChangeSettingData::empty() + } + .serialize_event(), + ); +} diff --git a/store/src/payout.rs b/store/src/payout.rs index 592262e..20158d5 100644 --- a/store/src/payout.rs +++ b/store/src/payout.rs @@ -1,28 +1,29 @@ -use mintbase_deps::common::{ - OwnershipFractions, - Payout, - Royalty, - SplitBetweenUnparsed, - SplitOwners, -}; +use std::collections::HashMap; + use mintbase_deps::constants::MAX_LEN_PAYOUT; -use mintbase_deps::logging::log_set_split_owners; use mintbase_deps::near_sdk::json_types::{ U128, U64, }; use mintbase_deps::near_sdk::{ self, + assert_one_yocto, env, near_bindgen, AccountId, + Balance, +}; +use mintbase_deps::store_data::{ + Owner, + Payout, + Royalty, + SplitBetweenUnparsed, + SplitOwners, }; -use mintbase_deps::token::Owner; use mintbase_deps::{ assert_storage_deposit, assert_token_owned_by_predecessor, assert_token_unloaned, - assert_yocto_deposit, near_assert, }; @@ -32,44 +33,43 @@ use crate::*; #[near_bindgen] impl MintbaseStore { // -------------------------- change methods --------------------------- + /// Transfer and return payout according to [NEP-199](https://nomicon.io/Standards/Tokens/NonFungibleToken/Payout) #[payable] pub fn nft_transfer_payout( &mut self, receiver_id: AccountId, token_id: U64, - approval_id: u64, + approval_id: Option, + memo: Option, balance: near_sdk::json_types::U128, - max_len_payout: u32, + max_len_payout: Option, ) -> Payout { - assert_yocto_deposit!(); + assert_one_yocto(); let payout = self.nft_payout(token_id, balance, max_len_payout); - self.nft_transfer(receiver_id, token_id, Some(approval_id), None); + self.nft_transfer(receiver_id, token_id, approval_id, memo); payout } // -------------------------- view methods ----------------------------- + /// Show payout according to [NEP-199](https://nomicon.io/Standards/Tokens/NonFungibleToken/Payout) pub fn nft_payout( &self, token_id: U64, balance: U128, - max_len_payout: u32, + max_len_payout: Option, ) -> Payout { let token = self.nft_token(token_id).expect("no token"); - match token.owner_id { - Owner::Account(_) => {}, + let owner_id = match token.owner_id { + Owner::Account(id) => id, _ => env::panic_str("token is composed"), - } - let payout = OwnershipFractions::new( - &token.owner_id.to_string(), - &self.get_token_royalty(token_id), - &token.split_owners, + }; + + OwnershipFractions::new( + owner_id, + self.get_token_royalty(token_id), + token.split_owners, ) - .into_payout(balance.into()); - let payout_len = payout.payout.len(); - if max_len_payout < payout_len as u32 { - near_sdk::env::panic_str(format!("payout too long: {}", payout_len).as_str()); - } - payout + .into_payout(balance.into(), max_len_payout) } } @@ -154,3 +154,127 @@ impl MintbaseStore { // -------------------------- private methods -------------------------- // -------------------------- internal methods ------------------------- } + +/// This struct is a helper used for computing payouts from stored +/// payouts/splits fractions to actual balances, given a token total price and +/// maybe a max length of the payouts. +struct OwnershipFractions { + fractions: HashMap, + remaining: u32, + royalty_percentage: u32, + split_percentage: u32, +} + +impl OwnershipFractions { + fn new( + owner_id: AccountId, + royalty: Option, + split_owners: Option, + ) -> Self { + let royalty_percentage = royalty + .as_ref() + .map(|r| r.percentage.numerator) + .unwrap_or(0); + let split_percentage = 10_000 - royalty_percentage; + let mut fractions = OwnershipFractions { + fractions: HashMap::new(), + remaining: 10_000, + royalty_percentage, + split_percentage, + }; + + if let Some(Royalty { + mut split_between, + percentage: _, + }) = royalty + { + for (owner_id, percentage) in split_between.drain() { + fractions.add_royalty_owner(owner_id, percentage.numerator); + } + } + + if let Some(SplitOwners { mut split_between }) = split_owners { + for (owner_id, percentage) in split_between.drain() { + fractions.add_split_owner(owner_id, percentage.numerator); + } + } else { + fractions.fill_owner(owner_id); + } + + fractions + } + + fn add_royalty_owner( + &mut self, + owner_id: AccountId, + percentage: u32, + ) { + let p = percentage * self.royalty_percentage / 10_000; + // No need to check existence because royalty owners are inserted first + self.fractions.insert(owner_id, p); + self.remaining -= p; + } + + fn add_split_owner( + &mut self, + owner_id: AccountId, + percentage: u32, + ) { + let p = percentage * self.split_percentage / 10_000; + let entry = self.fractions.entry(owner_id).or_insert(0); + *entry += p; + self.remaining -= p; + } + + fn fill_owner( + &mut self, + owner_id: AccountId, + ) { + let entry = self.fractions.entry(owner_id).or_insert(0); + *entry += self.remaining; + self.remaining = 0; + } + + fn into_payout( + mut self, + balance: Balance, + max_len: Option, + ) -> Payout { + let balances_iter = self + .fractions + .drain() + .map(|(owner_id, percentage)| (owner_id, percentage as Balance * balance / 10_000)); + let payout = match max_len { + None => balances_iter + .map(|(owner_id, balance)| (owner_id, balance.into())) + .collect::>(), + Some(max_len) => { + let mut v = balances_iter.collect::>(); + v.sort_by(|(_, balance_a), (_, balance_b)| balance_b.cmp(balance_a)); + v.into_iter() + .take(max_len as usize) + .map(|(owner_id, balance)| (owner_id, balance.into())) + .collect::>() + }, + }; + + Payout { payout } + } +} + +fn log_set_split_owners( + token_ids: Vec, + mut split_owners: SplitOwners, +) { + env::log_str( + &mintbase_deps::logging::NftSetSplitOwnerData { + token_ids, + split_owners: split_owners + .split_between + .drain() + .map(|(acc, fraction)| (acc, fraction.numerator as u16)) + .collect(), + } + .serialize_event(), + ); +} diff --git a/test.sh b/test.sh index 1e5f4e8..990a4de 100755 --- a/test.sh +++ b/test.sh @@ -25,14 +25,12 @@ touch wasm/store.wasm cargo check -p mintbase-deps --features store-wasm --message-format short || fail "Checking store" cargo check -p mintbase-deps --features factory-wasm --message-format short || fail "Checking factory" -cargo check -p mintbase-deps --features helper-wasm --message-format short || fail "Checking helper" cargo check -p simple-market-contract --message-format short || fail "Checking market" -cargo check -p mintbase-near-indexer --bin mintlake --features mintlake || fail "Checking mintlake" -cargo check -p mintbase-near-indexer --bin p2p_indexer --features p2p_indexer || fail "Checking p2p indexer" +# cargo check -p mintbase-near-indexer --bin mintlake --features mintlake || fail "Checking mintlake" +# cargo check -p mintbase-near-indexer --bin p2p_indexer --features p2p_indexer || fail "Checking p2p indexer" build_wasm store build_wasm factory -build_wasm helper build_wasm market # Sandbox node is sometimes running in the background and causing problems diff --git a/testing/__tests__/market.auction.ava.ts b/testing/__tests__/market.auction.ava.ts index d14f551..5b7d0d5 100644 --- a/testing/__tests__/market.auction.ava.ts +++ b/testing/__tests__/market.auction.ava.ts @@ -1,4 +1,5 @@ -import { TransactionResult } from "near-workspaces-ava"; +import { TransactionResult } from "near-workspaces"; +import avaTest from "ava"; import { assertContractPanics, assertContractTokenOwner, @@ -6,7 +7,6 @@ import { assertMakeOfferEvent, assertWithdrawOfferEvent, failPromiseRejection, - MARKET_WORKSPACE, mNEAR, NEAR, Tgas, @@ -15,283 +15,286 @@ import { assertBalanceChange, createPayout, prepareTokenListing, -} from "./test-utils"; +} from "./utils/index.js"; -MARKET_WORKSPACE.test( - "market::auction", - async (test, { root, factory, store, market, alice, bob, carol }) => { - await prepareTokenListing(test, { root, alice, store, market, factory }); +import { setup } from "./setup.js"; - await alice - .call( - store, - "nft_approve", +const test = setup(avaTest); + +test("market::auction", async (test) => { + const { root, factory, store, market, alice, bob, carol } = + test.context.accounts; + await prepareTokenListing(test, { root, alice, store, market, factory }); + + await alice + .call( + store, + "nft_approve", + { + token_id: "0", + account_id: market.accountId, + msg: JSON.stringify({ price: NEAR(1), autotransfer: false }), + }, + { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "listing token")); + const tokenKey = `0:${store.accountId}`; + + // -------------------------- create first offer --------------------------- + const bobBalance0 = await getBalance(bob); + const marketBalance0 = await getBalance(market); + const makeOfferCall0 = await bob + .callRaw( + market, + "make_offer", + { + token_key: [tokenKey], + price: [NEAR(1)], + timeout: [{ Hours: 24 }], + }, + { attachedDeposit: NEAR(1), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "making first auction offer")); + // check event logs + assertMakeOfferEvent( + { test, eventLog: (makeOfferCall0 as TransactionResult).logs[0] }, + { + id: 1, + store: store, + maker: bob, + specs: [ { token_id: "0", - account_id: market.accountId, - msg: JSON.stringify({ price: NEAR(1), autotransfer: false }), + approval_id: 0, + price: NEAR(1).toString(), + timeout: hours(24), }, - { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "listing token")); - const tokenKey = `0:${store.accountId}`; + ], + }, + "Making first auction offer" + ); + test.is( + (makeOfferCall0 as TransactionResult).logs.length, + 1, + "Emitted too many events on making first auction offer" + ); - // -------------------------- create first offer --------------------------- - const bobBalance0 = await getBalance(bob); - const marketBalance0 = await getBalance(market); - const makeOfferCall0 = await bob - .call_raw( - market, - "make_offer", - { - token_key: [tokenKey], - price: [NEAR(1)], - timeout: [{ Hours: 24 }], - }, - { attachedDeposit: NEAR(1), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "making first auction offer")); - // check event logs - assertMakeOfferEvent( - { test, eventLog: (makeOfferCall0 as TransactionResult).logs[0] }, - { - id: 1, - store: store, - maker: bob, - specs: [ - { - token_id: "0", - approval_id: 0, - price: NEAR(1).toString(), - timeout: hours(24), - }, - ], - }, + // check chain state: token owner hasn't changed + await assertContractTokenOwner( + { test, store }, + { token_id: "0", owner_id: alice.accountId }, + "Token auto-transferred on making auction offer" + ); + // check chain state: highest offer is 1N + test.like( + // FIXME::market::low: price should be a string + await market.view("get_current_offer", { token_key: tokenKey }), + { id: 1, price: parseInt(NEAR(1).toString()) }, + "Highest offer not set correctly" + ); + // check chain state: bob has 1N less + await Promise.all([ + assertBalanceChange( + test, + { account: bob, ref: bobBalance0, diff: NEAR(-1) }, "Making first auction offer" - ); - test.is( - (makeOfferCall0 as TransactionResult).logs.length, - 1, - "Emitted too many events on making first auction offer" - ); + ), + // check chain state: market has 1N more + assertBalanceChange( + test, // FIXME::market::medium: where do the 10 mNEAR come from? + { account: market, ref: marketBalance0, diff: NEAR(1.01) }, + "Making first auction offer" + ), + ]); + // test.fail(); + // ---------------------- withdraw offer and recreate ---------------------- + // TODO::testing::medium: withdraw offer -> not feasible until `min_offer_hours` + // can be set to e.g. minutes or seconds + // when this is implemented, we need at least three offers: + // offer -> withdraw -> offer again -> offer (replaces current highest offer) -> accept + // TODO: check event logs + // TODO: check chain state -> token owner hasn't changed, no highest offer + // TODO: try accepting withdrawn offer -> should fail - // check chain state: token owner hasn't changed - await assertContractTokenOwner( - { test, store }, - { token_id: "0", owner_id: alice.accountId }, - "Token auto-transferred on making auction offer" - ); - // check chain state: highest offer is 1N - test.like( - // FIXME::market::low: price should be a string - await market.view("get_current_offer", { token_key: tokenKey }), - { id: 1, price: parseInt(NEAR(1).toString()) }, - "Highest offer not set correctly" - ); - // check chain state: bob has 1N less - await Promise.all([ - assertBalanceChange( - test, - { account: bob, ref: bobBalance0, diff: NEAR(-1) }, - "Making first auction offer" - ), - // check chain state: market has 1N more - assertBalanceChange( - test, // FIXME::market::medium: where do the 10 mNEAR come from? - { account: market, ref: marketBalance0, diff: NEAR(1.01) }, - "Making first auction offer" - ), - ]); - // test.fail(); - // ---------------------- withdraw offer and recreate ---------------------- - // TODO::testing::medium: withdraw offer -> not feasible until `min_offer_hours` - // can be set to e.g. minutes or seconds - // when this is implemented, we need at least three offers: - // offer -> withdraw -> offer again -> offer (replaces current highest offer) -> accept - // TODO: check event logs - // TODO: check chain state -> token owner hasn't changed, no highest offer - // TODO: try accepting withdrawn offer -> should fail + // -------------------------- create second offer -------------------------- + const carolBalance1 = await getBalance(carol); + const marketBalance1 = await getBalance(market); + const bobBalance1 = await getBalance(bob); - // -------------------------- create second offer -------------------------- - const carolBalance1 = await getBalance(carol); - const marketBalance1 = await getBalance(market); - const bobBalance1 = await getBalance(bob); + const makeOfferCall1 = await carol + .callRaw( + market, + "make_offer", + { + token_key: [tokenKey], + price: [NEAR(2)], + timeout: [{ Hours: 24 }], + }, + { attachedDeposit: NEAR(2), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "making second auction offer")); - const makeOfferCall1 = await carol - .call_raw( - market, - "make_offer", + // check event logs + assertWithdrawOfferEvent( + // TODO: actually impl this + { test, eventLog: (makeOfferCall1 as TransactionResult).logs[0] }, + { + list_id: `0:0:${store.accountId}`, + offer_num: 1, + }, + "Withdrawing first auction offer" + ); + assertMakeOfferEvent( + { test, eventLog: (makeOfferCall1 as TransactionResult).logs[1] }, + { + id: 2, + store: store, + maker: carol, + specs: [ { - token_key: [tokenKey], - price: [NEAR(2)], - timeout: [{ Hours: 24 }], + token_id: "0", + approval_id: 0, + price: NEAR(2).toString(), + timeout: hours(24), }, - { attachedDeposit: NEAR(2), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "making second auction offer")); + ], + }, + "Making second auction offer" + ); + test.is( + (makeOfferCall1 as TransactionResult).logs.length, + 2, + "Outbidding offer needs two events to be emitted" + ); - // check event logs - assertWithdrawOfferEvent( - // TODO: actually impl this - { test, eventLog: (makeOfferCall1 as TransactionResult).logs[0] }, - { - list_id: `0:0:${store.accountId}`, - offer_num: 1, + // check chain state: token owner still hasn't changed + await assertContractTokenOwner( + { test, store }, + { token_id: "0", owner_id: alice.accountId }, + "Token auto-transferred on making auction offer" + ); + // check chain state: highest offer is 2N + test.like( + await market.view("get_current_offer", { token_key: tokenKey }), + { id: 2, price: parseInt(NEAR(2).toString()) }, + "Highest offer not replaced" + ); + await Promise.all([ + // check chain state: carol has 2N less now + assertBalanceChange( + test, + { account: carol, ref: carolBalance1, diff: NEAR(-2) }, + "outbidding on auction" + ), + // check chain state: market has 1N more now + assertBalanceChange( + test, // FIXME::market::medium: where do the 10 mNEAR come from? + { account: market, ref: marketBalance1, diff: NEAR(1.01) }, + "outbidding on auction" + ), + // check chain state: bob got his 1N back + assertBalanceChange( + test, + { account: bob, ref: bobBalance1, diff: NEAR(1) }, + "outbidding on auction" + ), + ]); + // ----------------------------- accept offer ------------------------------ + const aliceBalance2 = await getBalance(alice); + const marketBalance2 = await getBalance(market); + await assertContractPanics(test, [ + // try accepting offer as non-owner + [ + async () => { + await bob.call( + market, + "accept_and_transfer", + { token_key: tokenKey }, + { attachedDeposit: "1", gas: Tgas(200) } + ); }, - "Withdrawing first auction offer" - ); - assertMakeOfferEvent( - { test, eventLog: (makeOfferCall1 as TransactionResult).logs[1] }, + `${bob.accountId} does not own token ${tokenKey}`, + "Bob tried to accept an offer for Alice's token", + ], + // try accepting offer without yoctoNEAR deposit + [ + async () => { + await alice.call( + market, + "accept_and_transfer", + { token_key: tokenKey }, + { gas: Tgas(200) } + ); + }, + "Requires attached deposit of exactly 1 yoctoNEAR", + "Alice tried to accept an offer without yoctoNEAR deposit", + ], + ]); + + const acceptOfferCall = await alice + .callRaw( + market, + "accept_and_transfer", + { token_key: tokenKey }, + { attachedDeposit: "1", gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "accepting auction offer")); + + // check event logs + assertEventLogs( + test, + (acceptOfferCall as TransactionResult).logs, + [ { - id: 2, - store: store, - maker: carol, - specs: [ + standard: "nep171", + version: "1.0.0", + event: "nft_transfer", + data: [ { - token_id: "0", - approval_id: 0, - price: NEAR(2).toString(), - timeout: hours(24), + authorized_id: null, // FIXME::store::low, + old_owner_id: alice.accountId, + new_owner_id: carol.accountId, + token_ids: ["0"], + memo: null, }, ], }, - "Making second auction offer" - ); - test.is( - (makeOfferCall1 as TransactionResult).logs.length, - 2, - "Outbidding offer needs two events to be emitted" - ); - - // check chain state: token owner still hasn't changed - await assertContractTokenOwner( - { test, store }, - { token_id: "0", owner_id: alice.accountId }, - "Token auto-transferred on making auction offer" - ); - // check chain state: highest offer is 2N - test.like( - await market.view("get_current_offer", { token_key: tokenKey }), - { id: 2, price: parseInt(NEAR(2).toString()) }, - "Highest offer not replaced" - ); - await Promise.all([ - // check chain state: carol has 2N less now - assertBalanceChange( - test, - { account: carol, ref: carolBalance1, diff: NEAR(-2) }, - "outbidding on auction" - ), - // check chain state: market has 1N more now - assertBalanceChange( - test, // FIXME::market::medium: where do the 10 mNEAR come from? - { account: market, ref: marketBalance1, diff: NEAR(1.01) }, - "outbidding on auction" - ), - // check chain state: bob got his 1N back - assertBalanceChange( - test, - { account: bob, ref: bobBalance1, diff: NEAR(1) }, - "outbidding on auction" - ), - ]); - // ----------------------------- accept offer ------------------------------ - const aliceBalance2 = await getBalance(alice); - const marketBalance2 = await getBalance(market); - await assertContractPanics(test, [ - // try accepting offer as non-owner - [ - async () => { - await bob.call( - market, - "accept_and_transfer", - { token_key: tokenKey }, - { attachedDeposit: "1", gas: Tgas(200) } - ); - }, - `${bob.accountId} does not own token ${tokenKey}`, - "Bob tried to accept an offer for Alice's token", - ], - // try accepting offer without yoctoNEAR deposit - [ - async () => { - await alice.call( - market, - "accept_and_transfer", - { token_key: tokenKey }, - { gas: Tgas(200) } - ); + { + standard: "mb_market", + version: "0.1.0", + event: "nft_sold", + data: { + list_id: `0:0:${store.accountId}`, + mintbase_amount: "50000000000000000000000", + offer_num: 2, + token_key: `0:${store.accountId}`, + payout: createPayout([[alice, NEAR(1.95).toString()]]), }, - "Requires attached deposit of exactly 1 yoctoNEAR", - "Alice tried to accept an offer without yoctoNEAR deposit", - ], - ]); + }, + ], + "accepting auction offer" + ); - const acceptOfferCall = await alice - .call_raw( - market, - "accept_and_transfer", - { token_key: tokenKey }, - { attachedDeposit: "1", gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "accepting auction offer")); + // check chain state: token is owned by carol now + assertContractTokenOwner( + { test, store }, + { token_id: "0", owner_id: carol.accountId }, + "accepting auction offer" + ); - // check event logs - assertEventLogs( + await Promise.all([ + // check chain state: alice has received her share + assertBalanceChange( test, - (acceptOfferCall as TransactionResult).logs, - [ - { - standard: "nep171", - version: "1.0.0", - event: "nft_transfer", - data: [ - { - authorized_id: null, // FIXME::store::low, - old_owner_id: alice.accountId, - new_owner_id: carol.accountId, - token_ids: ["0"], - memo: null, - }, - ], - }, - { - standard: "mb_market", - version: "0.1.0", - event: "nft_sold", - data: { - list_id: `0:0:${store.accountId}`, - mintbase_amount: "50000000000000000000000", - offer_num: 2, - token_key: `0:${store.accountId}`, - payout: createPayout([[alice, NEAR(1.95).toString()]]), - }, - }, - ], + { account: alice, ref: aliceBalance2, diff: NEAR(1.95) }, "accepting auction offer" - ); - - // check chain state: token is owned by carol now - assertContractTokenOwner( - { test, store }, - { token_id: "0", owner_id: carol.accountId }, + ), + // check chain state: market has transferred some funds but kept its fee + assertBalanceChange( + test, + // FIXME::market::medium: why does the market retain more than it should? + { account: market, ref: marketBalance2, diff: NEAR(-1.94) }, "accepting auction offer" - ); - - await Promise.all([ - // check chain state: alice has received her share - assertBalanceChange( - test, - { account: alice, ref: aliceBalance2, diff: NEAR(1.95) }, - "accepting auction offer" - ), - // check chain state: market has transferred some funds but kept its fee - assertBalanceChange( - test, - // FIXME::market::medium: why does the market retain more than it should? - { account: market, ref: marketBalance2, diff: NEAR(-1.94) }, - "accepting auction offer" - ), - ]); - } -); + ), + ]); +}); diff --git a/testing/__tests__/market.buynow.ava.ts b/testing/__tests__/market.buynow.ava.ts index c9747ae..778b5f6 100644 --- a/testing/__tests__/market.buynow.ava.ts +++ b/testing/__tests__/market.buynow.ava.ts @@ -1,4 +1,5 @@ -import { TransactionResult } from "near-workspaces-ava"; +import { TransactionResult } from "near-workspaces"; +import avaTest from "ava"; import { assertContractPanic, assertContractTokenOwner, @@ -7,275 +8,276 @@ import { assertBalanceChanges, failPromiseRejection, getBalance, - MARKET_WORKSPACE, mNEAR, NEAR, Tgas, hours, prepareTokenListing, createPayout, -} from "./test-utils"; -MARKET_WORKSPACE.test( - "market::buynow", - async (test, { root, factory, store, market, alice, bob }) => { - await prepareTokenListing(test, { root, alice, store, market, factory }); +} from "./utils/index.js"; +import { setup } from "./setup.js"; - // TODO::testing::low: test this function - await root.call( - market, - "set_min_offer_hours", - { min_offer_hours: 0 }, - { attachedDeposit: "1" } - ); +const test = setup(avaTest); - await alice - .call( - store, - "nft_batch_approve", - { - token_ids: ["0", "1"], - account_id: market.accountId, - msg: JSON.stringify({ price: NEAR(1), autotransfer: true }), - }, - { attachedDeposit: mNEAR(8.8), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "listing token")); +test("market::buynow", async (test) => { + const { root, factory, store, market, alice, bob } = test.context.accounts; - const token0Key = `0:${store.accountId}`; - const token1Key = `1:${store.accountId}`; + await prepareTokenListing(test, { root, alice, store, market, factory }); - // need to assert panics in series, so we don't get into race conditions - // regarding locked tokens - // try to attach less than claimed - await assertContractPanic( - test, - async () => { - await bob.call( - market, - "make_offer", - { - token_key: [token0Key], - price: [NEAR(1.1)], - timeout: [{ Hours: 1 }], - }, - { attachedDeposit: NEAR(1), gas: Tgas(200) } - ); - }, - `Summed prices must match the attached deposit`, - "Bob tried attaching less than claimed" - ); - // try to set price below ask - await assertContractPanic( - test, - // ownership - async () => { - await bob.call( - market, - "make_offer", - { - token_key: [token0Key, token1Key], - price: [NEAR(0.95), NEAR(1.05)], - timeout: [{ Hours: 1 }, { Hours: 1 }], - }, - { attachedDeposit: NEAR(2) } - ); - }, - "Cannot set offer below ask", - "Bob tried setting the price below the asking price" - ); - // try to set instant expiry - await assertContractPanic( - test, - async () => { - await bob.call( - market, - "make_offer", - { - token_key: [token0Key], - price: [NEAR(1)], - timeout: [{ Hours: 0 }], - }, - { attachedDeposit: NEAR(1), gas: Tgas(200) } - ); - }, - "Cannot set times into the past", - "Bob tried to set instant expiry" - ); - // fuzzing: to few arguments - await assertContractPanic( - test, - async () => { - await bob.call( - market, - "make_offer", - { - token_key: [token0Key, token1Key], - price: [NEAR(1)], - timeout: [{ Hours: 1 }], - }, - { attachedDeposit: NEAR(1), gas: Tgas(200) } - ); - }, - "Price list doesn't match up with token list", - "Bob tried fuzzing by omitting arguments" - ); - // fuzzing: to many arguments - await assertContractPanic( - test, - async () => { - await bob.call( - market, - "make_offer", - { - token_key: [token0Key, token1Key], - price: [NEAR(1), NEAR(1.5), NEAR(0.5)], - timeout: [{ Hours: 1 }, { Hours: 1 }, { Hours: 1 }], - }, - { attachedDeposit: NEAR(3), gas: Tgas(200) } - ); + // TODO::testing::low: test this function + await market.call( + market, + "set_min_offer_hours", + { min_offer_hours: 0 }, + { attachedDeposit: "1" } + ); + + await alice + .call( + store, + "nft_batch_approve", + { + token_ids: ["0", "1"], + account_id: market.accountId, + msg: JSON.stringify({ price: NEAR(1), autotransfer: true }), }, - "Price list doesn't match up with token list", - "Bob tried fuzzing by adding arguments" - ); + { attachedDeposit: mNEAR(8.8), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "listing token")); - const aliceBalance0 = await getBalance(alice); - const bobBalance0 = await getBalance(bob); - const marketBalance0 = await getBalance(market); + const token0Key = `0:${store.accountId}`; + const token1Key = `1:${store.accountId}`; - // TODO::market::low: improve this interface - const makeOfferCall = await bob - .call_raw( + // need to assert panics in series, so we don't get into race conditions + // regarding locked tokens + // try to attach less than claimed + await assertContractPanic( + test, + async () => { + await bob.call( + market, + "make_offer", + { + token_key: [token0Key], + price: [NEAR(1.1)], + timeout: [{ Hours: 1 }], + }, + { attachedDeposit: NEAR(1), gas: Tgas(200) } + ); + }, + `Summed prices must match the attached deposit`, + "Bob tried attaching less than claimed" + ); + // try to set price below ask + await assertContractPanic( + test, + // ownership + async () => { + await bob.call( market, "make_offer", { token_key: [token0Key, token1Key], - price: [NEAR(1), NEAR(1.5)], + price: [NEAR(0.95), NEAR(1.05)], timeout: [{ Hours: 1 }, { Hours: 1 }], }, - { attachedDeposit: NEAR(2.5), gas: Tgas(225) } - ) - .catch(failPromiseRejection(test, 'making "buy now" offer')); + { attachedDeposit: NEAR(2) } + ); + }, + "Cannot set offer below ask", + "Bob tried setting the price below the asking price" + ); + // try to set instant expiry + await assertContractPanic( + test, + async () => { + await bob.call( + market, + "make_offer", + { + token_key: [token0Key], + price: [NEAR(1)], + timeout: [{ Hours: 0 }], + }, + { attachedDeposit: NEAR(1), gas: Tgas(200) } + ); + }, + "Cannot set times into the past", + "Bob tried to set instant expiry" + ); + // fuzzing: to few arguments + await assertContractPanic( + test, + async () => { + await bob.call( + market, + "make_offer", + { + token_key: [token0Key, token1Key], + price: [NEAR(1)], + timeout: [{ Hours: 1 }], + }, + { attachedDeposit: NEAR(1), gas: Tgas(200) } + ); + }, + "Price list doesn't match up with token list", + "Bob tried fuzzing by omitting arguments" + ); + // fuzzing: to many arguments + await assertContractPanic( + test, + async () => { + await bob.call( + market, + "make_offer", + { + token_key: [token0Key, token1Key], + price: [NEAR(1), NEAR(1.5), NEAR(0.5)], + timeout: [{ Hours: 1 }, { Hours: 1 }, { Hours: 1 }], + }, + { attachedDeposit: NEAR(3), gas: Tgas(200) } + ); + }, + "Price list doesn't match up with token list", + "Bob tried fuzzing by adding arguments" + ); + + const aliceBalance0 = await getBalance(alice); + const bobBalance0 = await getBalance(bob); + const marketBalance0 = await getBalance(market); - // check event logs - // this needs to be `test.like` because of the contained timestamps - assertMakeOfferEvent( - { test, eventLog: (makeOfferCall as TransactionResult).logs[0] }, + // TODO::market::low: improve this interface + const makeOfferCall = await bob + .callRaw( + market, + "make_offer", { - id: 1, // TODO::market::low: why do we start counting at 1? - store: store, - maker: bob, - specs: [ - { - token_id: "0", - approval_id: 0, - price: NEAR(1).toString(), - timeout: hours(1), - }, - { - token_id: "1", - approval_id: 1, - price: NEAR(1.5).toString(), - timeout: hours(1), - }, - ], + token_key: [token0Key, token1Key], + price: [NEAR(1), NEAR(1.5)], + timeout: [{ Hours: 1 }, { Hours: 1 }], }, - 'Making "buy now" offer' - ); - assertEventLogs( - test, - (makeOfferCall as TransactionResult).logs.slice(1), - [ + { attachedDeposit: NEAR(2.5), gas: Tgas(225) } + ) + .catch(failPromiseRejection(test, 'making "buy now" offer')); + + // check event logs + // this needs to be `test.like` because of the contained timestamps + assertMakeOfferEvent( + { test, eventLog: (makeOfferCall as TransactionResult).logs[0] }, + { + id: 1, // TODO::market::low: why do we start counting at 1? + store: store, + maker: bob, + specs: [ { - standard: "nep171", - version: "1.0.0", - event: "nft_transfer", - data: [ - { - authorized_id: null, // FIXME::store::low - memo: null, - new_owner_id: bob.accountId, - old_owner_id: alice.accountId, - token_ids: ["0"], - }, - ], + token_id: "0", + approval_id: 0, + price: NEAR(1).toString(), + timeout: hours(1), }, { - standard: "mb_market", - version: "0.1.0", - event: "nft_sold", - data: { - list_id: `0:0:${store.accountId}`, - mintbase_amount: "25000000000000000000000", - offer_num: 1, - token_key: `0:${store.accountId}`, - payout: createPayout([[alice, NEAR(0.975).toString()]]), - }, + token_id: "1", + approval_id: 1, + price: NEAR(1.5).toString(), + timeout: hours(1), }, - { - standard: "nep171", - version: "1.0.0", - event: "nft_transfer", - data: [ - { - authorized_id: null, // FIXME::store::low - memo: null, - new_owner_id: bob.accountId, - old_owner_id: alice.accountId, - token_ids: ["1"], - }, - ], + ], + }, + 'Making "buy now" offer' + ); + assertEventLogs( + test, + (makeOfferCall as TransactionResult).logs.slice(1), + [ + { + standard: "nep171", + version: "1.0.0", + event: "nft_transfer", + data: [ + { + authorized_id: null, // FIXME::store::low + memo: null, + new_owner_id: bob.accountId, + old_owner_id: alice.accountId, + token_ids: ["0"], + }, + ], + }, + { + standard: "mb_market", + version: "0.1.0", + event: "nft_sold", + data: { + list_id: `0:0:${store.accountId}`, + mintbase_amount: "25000000000000000000000", + offer_num: 1, + token_key: `0:${store.accountId}`, + payout: createPayout([[alice, NEAR(0.975).toString()]]), }, - { - standard: "mb_market", - version: "0.1.0", - event: "nft_sold", - data: { - list_id: `1:1:${store.accountId}`, - mintbase_amount: "37500000000000000000000", - offer_num: 1, - token_key: `1:${store.accountId}`, - payout: createPayout([[alice, mNEAR(1462.5).toString()]]), + }, + { + standard: "nep171", + version: "1.0.0", + event: "nft_transfer", + data: [ + { + authorized_id: null, // FIXME::store::low + memo: null, + new_owner_id: bob.accountId, + old_owner_id: alice.accountId, + token_ids: ["1"], }, + ], + }, + { + standard: "mb_market", + version: "0.1.0", + event: "nft_sold", + data: { + list_id: `1:1:${store.accountId}`, + mintbase_amount: "37500000000000000000000", + offer_num: 1, + token_key: `1:${store.accountId}`, + payout: createPayout([[alice, mNEAR(1462.5).toString()]]), }, - ], - 'making "buy now" offer' - ); + }, + ], + 'making "buy now" offer' + ); - await assertContractTokenOwner( - { test, store }, - { token_id: "0", owner_id: bob.accountId }, - "After transfers" - ).catch(failPromiseRejection(test, "checking token ownership")); - await assertContractTokenOwner( - { test, store }, - { token_id: "1", owner_id: bob.accountId }, - "After transfers" - ).catch(failPromiseRejection(test, "checking token ownership")); + await assertContractTokenOwner( + { test, store }, + { token_id: "0", owner_id: bob.accountId }, + "After transfers" + ).catch(failPromiseRejection(test, "checking token ownership")); + await assertContractTokenOwner( + { test, store }, + { token_id: "1", owner_id: bob.accountId }, + "After transfers" + ).catch(failPromiseRejection(test, "checking token ownership")); - // check market state (tokens unlisted) - await test.throwsAsync(async () => { - await market.view("get_token", { token_key: `0:${store.accountId}` }); - }); - await test.throwsAsync(async () => { - await market.view("get_token", { token_key: `1:${store.accountId}` }); - }); + // check market state (tokens unlisted) + await test.throwsAsync(async () => { + await market.view("get_token", { token_key: `0:${store.accountId}` }); + }); + await test.throwsAsync(async () => { + await market.view("get_token", { token_key: `1:${store.accountId}` }); + }); - // chain state: account balances - await assertBalanceChanges( - test, - [ - // 30 mNEAR extra gas costs for bob - { account: bob, ref: bobBalance0, diff: NEAR(-2.53) }, - { account: alice, ref: aliceBalance0, diff: mNEAR(975 * 2.5) }, - // FIXME::market::low: where do the 15 mNEAR come from? - { account: market, ref: marketBalance0, diff: mNEAR(25 * 2.5 + 15) }, - ], - "After accepting 'buy now' offer" - ); + // chain state: account balances + await assertBalanceChanges( + test, + [ + { account: bob, ref: bobBalance0, diff: NEAR(-2.5) }, + { account: alice, ref: aliceBalance0, diff: mNEAR(975 * 2.5) }, + // FIXME::market::low: where do the 15 mNEAR come from? + { account: market, ref: marketBalance0, diff: mNEAR(25 * 2.5 + 15) }, + ], + "After accepting 'buy now' offer" + ); - // TODO::testing::low what happens in the case where one offer is valid and the other is not? + // TODO::testing::low what happens in the case where one offer is valid and the other is not? - // TODO::testing::medium: Users don't need to pay for replacing an offer - // TODO::testing::medium: Users don't need to pay for replacing multiple offers - } -); + // TODO::testing::medium: Users don't need to pay for replacing an offer + // TODO::testing::medium: Users don't need to pay for replacing multiple offers +}); diff --git a/testing/__tests__/market.core.ava.ts b/testing/__tests__/market.core.ava.ts index 8497360..ce9b415 100644 --- a/testing/__tests__/market.core.ava.ts +++ b/testing/__tests__/market.core.ava.ts @@ -1,311 +1,312 @@ -import { TransactionResult } from "near-workspaces-ava"; +import { TransactionResult } from "near-workspaces"; +import avaTest from "ava"; import { assertEventLogs, batchMint, failPromiseRejection, - MARKET_WORKSPACE, mNEAR, NEAR, Tgas, -} from "./test-utils"; +} from "./utils/index.js"; +import { setup } from "./setup.js"; -MARKET_WORKSPACE.test( - "market::core", - async (test, { root, factory, store, market, alice }) => { - await batchMint({ owner: alice, store, num_to_mint: 2 }).catch( - failPromiseRejection(test, "minting") - ); +const test = setup(avaTest); - // ----------- allow the store to list tokens to the marketplace ----------- - const updateAllowlistCall = await root - .call_raw( - market, - "update_allowlist", - { account_id: factory.accountId, state: true }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection(test, "buy now listing with auto transfer")); +test("market::core", async (test) => { + const { root, factory, store, market, alice } = test.context.accounts; + await batchMint({ owner: alice, store, num_to_mint: 2 }).catch( + failPromiseRejection(test, "minting") + ); - // check event logs - assertEventLogs( - test, - (updateAllowlistCall as TransactionResult).logs, - [ - { - standard: "mb_market", - version: "0.1.0", - event: "update_allowlist", - data: { account_id: factory.accountId, state: true }, - }, - ], - "buy now listing with auto transfer" - ); + // ----------- allow the store to list tokens to the marketplace ----------- + const updateAllowlistCall = await market + .callRaw( + market, + "update_allowlist", + { account_id: factory.accountId, state: true }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "updating allowlist")); - // TODO: try allowing as non-owner - // TODO: try allowing without yoctoNEAR deposit + // check event logs + assertEventLogs( + test, + (updateAllowlistCall as TransactionResult).logs, + [ + { + standard: "mb_market", + version: "0.1.0", + event: "update_allowlist", + data: { account_id: factory.accountId, state: true }, + }, + ], + "updating allowlist" + ); + + // TODO: try allowing as non-owner + // TODO: try allowing without yoctoNEAR deposit + + // check on-chain state + test.deepEqual(await market.view("get_allowlist", {}), [factory.accountId]); - // check on-chain state - test.deepEqual(await market.view("get_allowlist", {}), [factory.accountId]); + // ---------------------------- list as auction ---------------------------- + const auctionApproveCall = await alice + .callRaw( + store, + "nft_approve", + { + token_id: "0", + account_id: market.accountId, + // TODO::market::medium: doesn't make sense to list a price for an + // auction + msg: JSON.stringify({ + price: NEAR(1).toString(), + autotransfer: false, + }), + }, + { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } + ) + // TODO::market::low: Complained about `alice.factory.test.near` not + // being allowed, which was on the allowlist. The requirement however is + // for `factory.test.near` to be on the allowlist. + // => better error message + .catch(failPromiseRejection(test, "auction listing")); - // ---------------------------- list as auction ---------------------------- - const auctionApproveCall = await alice - .call_raw( - store, - "nft_approve", - { - token_id: "0", - account_id: market.accountId, - // TODO::market::medium: doesn't make sense to list a price for an - // auction - msg: JSON.stringify({ + // check event logs + assertEventLogs( + test, + // we already tested the approval event on the store, so skip that + (auctionApproveCall as TransactionResult).logs.slice(1), + [ + { + standard: "mb_market", + version: "0.1.0", + event: "nft_list", + data: [ + { + // TODO::market::low: why this duplication? + list_id: `0:0:${store.accountId}`, price: NEAR(1).toString(), + // TODO::market::low: why this duplication? + token_key: `0:${store.accountId}`, + owner_id: alice.accountId, autotransfer: false, - }), - }, - { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } - ) - // TODO::market::low: Complained about `alice.factory.test.near` not - // being allowed, which was on the allowlist. The requirement however is - // for `factory.test.near` to be on the allowlist. - // => better error message - .catch(failPromiseRejection(test, "auction listing")); + approval_id: "0", + token_id: "0", + store_id: store.accountId, + // meta_id: null, + }, + ], + }, + ], + "auction listing" + ); + // TODO::testing::medium: what happens when I approve the same token twice? - // check event logs - assertEventLogs( - test, - // we already tested the approval event on the store, so skip that - (auctionApproveCall as TransactionResult).logs.slice(1), - [ - { - standard: "mb_market", - version: "0.1.0", - event: "nft_list", - data: [ - { - // TODO::market::low: why this duplication? - list_id: `0:0:${store.accountId}`, - price: NEAR(1).toString(), - // TODO::market::low: why this duplication? - token_key: `0:${store.accountId}`, - owner_id: alice.accountId, - autotransfer: false, - approval_id: "0", - token_id: "0", - store_id: store.accountId, - // meta_id: null, - }, - ], - }, - ], - "auction listing" - ); - // TODO::testing::medium: what happens when I approve the same token twice? + // checking market state + // TODO::market::low: more descriptive method name + test.deepEqual( + await market.view("get_token", { token_key: `0:${store.accountId}` }), + { + id: 0, // TODO::market::low: rename to token_id, use string type + owner_id: alice.accountId, + store_id: store.accountId, + autotransfer: false, + asking_price: NEAR(1).toString(), + approval_id: 0, + current_offer: null, + num_offers: 0, + locked: false, + } + ); - // checking market state - // TODO::market::low: more descriptive method name - test.deepEqual( - await market.view("get_token", { token_key: `0:${store.accountId}` }), - { - id: 0, // TODO::market::low: rename to token_id, use string type - owner_id: alice.accountId, - store_id: store.accountId, - autotransfer: false, - asking_price: NEAR(1).toString(), - approval_id: 0, - current_offer: null, - num_offers: 0, - locked: false, - } - ); + // ------------------------ revoke auction approval ------------------------ + const auctionRevokeCall = await alice + .callRaw( + store, + "nft_revoke", + { token_id: "0", account_id: market.accountId }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "revoke auction listing")); - // ------------------------ revoke auction approval ------------------------ - const auctionRevokeCall = await alice - .call_raw( - store, - "nft_revoke", - { token_id: "0", account_id: market.accountId }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection(test, "revoke auction listing")); + // check event logs + assertEventLogs( + test, + // we already tested the revoke event on the store, so skip that + (auctionRevokeCall as TransactionResult).logs.slice(1), + [], + "revoke auction listing" + ); - // check event logs - assertEventLogs( - test, - // we already tested the revoke event on the store, so skip that - (auctionRevokeCall as TransactionResult).logs.slice(1), - [], - "revoke auction listing" - ); + // TODO: check market state -> do we have the functionality for that? + // TODO: find out if the indexer picks up on this revoke + // if so, we have divergent state between indexer and marketplace + // marketplace::check_approvals method is unfeasible because we have about + // half a million tokens on offer on a normal day - // TODO: check market state -> do we have the functionality for that? - // TODO: find out if the indexer picks up on this revoke - // if so, we have divergent state between indexer and marketplace - // marketplace::check_approvals method is unfeasible because we have about - // half a million tokens on offer on a normal day + // --------------------------- list as "buy now" --------------------------- + const buynowApproveCall = await alice + .callRaw( + store, + "nft_approve", + { + token_id: "0", + account_id: market.accountId, + msg: JSON.stringify({ + price: NEAR(1).toString(), + autotransfer: true, + }), + }, + { attachedDeposit: mNEAR(0.81).toString(), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "buy now listing")); - // --------------------------- list as "buy now" --------------------------- - const buynowApproveCall = await alice - .call_raw( - store, - "nft_approve", - { - token_id: "0", - account_id: market.accountId, - msg: JSON.stringify({ + // check event logs + assertEventLogs( + test, + // we already tested the approval event, so skip that + (buynowApproveCall as TransactionResult).logs.slice(1), + [ + { + standard: "mb_market", + version: "0.1.0", + event: "nft_unlist", + data: [{ list_id: `0:0:${store.accountId}` }], + }, + { + standard: "mb_market", + version: "0.1.0", + event: "nft_list", + data: [ + { + // TODO::market::low: why this duplication? + list_id: `0:1:${store.accountId}`, price: NEAR(1).toString(), + // TODO::market::low: why this duplication? + token_key: `0:${store.accountId}`, + owner_id: alice.accountId, autotransfer: true, - }), - }, - { attachedDeposit: mNEAR(0.81).toString(), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "buy now listing")); + approval_id: "1", + token_id: "0", + store_id: store.accountId, + // thing_id: null, + }, + ], + }, + ], + "buy now listing" + ); - // check event logs - assertEventLogs( - test, - // we already tested the approval event, so skip that - (buynowApproveCall as TransactionResult).logs.slice(1), - [ - { - standard: "mb_market", - version: "0.1.0", - event: "nft_unlist", - data: [{ list_id: `0:0:${store.accountId}` }], - }, - { - standard: "mb_market", - version: "0.1.0", - event: "nft_list", - data: [ - { - // TODO::market::low: why this duplication? - list_id: `0:1:${store.accountId}`, - price: NEAR(1).toString(), - // TODO::market::low: why this duplication? - token_key: `0:${store.accountId}`, - owner_id: alice.accountId, - autotransfer: true, - approval_id: "1", - token_id: "0", - store_id: store.accountId, - // thing_id: null, - }, - ], - }, - ], - "buy now listing" - ); + // check market state + test.deepEqual( + await market.view("get_token", { token_key: `0:${store.accountId}` }), + { + id: 0, // FIXME::market::low: rename to token_id, use string type + owner_id: alice.accountId, + store_id: store.accountId, + autotransfer: true, + asking_price: NEAR(1).toString(), + approval_id: 1, + current_offer: null, + num_offers: 0, + locked: false, + } + ); - // check market state - test.deepEqual( - await market.view("get_token", { token_key: `0:${store.accountId}` }), - { - id: 0, // FIXME::market::low: rename to token_id, use string type - owner_id: alice.accountId, - store_id: store.accountId, - autotransfer: true, - asking_price: NEAR(1).toString(), - approval_id: 1, - current_offer: null, - num_offers: 0, - locked: false, - } - ); + // ----------------------- revoke "buy now" approval ----------------------- + const buynowRevokeCall = await alice + .callRaw( + store, + "nft_revoke", + { token_id: "0", account_id: market.accountId }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "revoke auction listing")); - // ----------------------- revoke "buy now" approval ----------------------- - const buynowRevokeCall = await alice - .call_raw( - store, - "nft_revoke", - { token_id: "0", account_id: market.accountId }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection(test, "revoke auction listing")); + // check event logs + assertEventLogs( + test, + // we already tested the revoke event on the store, so skip that + (buynowRevokeCall as TransactionResult).logs.slice(1), + [], + "revoke auction listing" + ); - // check event logs - assertEventLogs( - test, - // we already tested the revoke event on the store, so skip that - (buynowRevokeCall as TransactionResult).logs.slice(1), - [], - "revoke auction listing" - ); + // ----------------------------- batch listing ----------------------------- + const batchApproveLogs = await alice.callRaw( + store, + "nft_batch_approve", + { + token_ids: ["0", "1"], + account_id: market.accountId, + msg: JSON.stringify({ price: NEAR(1).toString(), autotransfer: true }), + }, + // TODO::store::medium: why does thir require more storage deposit than + // batch approving without tail call? + // -> we might and probably should require a deposit on the market for + // each token on offer + { attachedDeposit: mNEAR(8.8).toString(), gas: Tgas(200) } + ); - // ----------------------------- batch listing ----------------------------- - const batchApproveLogs = await alice.call_raw( - store, - "nft_batch_approve", + // check event logs + assertEventLogs( + test, + (batchApproveLogs as TransactionResult).logs.slice(1), + [ { - token_ids: ["0", "1"], - account_id: market.accountId, - msg: JSON.stringify({ price: NEAR(1).toString(), autotransfer: true }), + standard: "mb_market", + version: "0.1.0", + event: "nft_unlist", + data: [{ list_id: `0:1:${store.accountId}` }], }, - // TODO::store::medium: why does thir require more storage deposit than - // batch approving without tail call? - // -> we might and probably should require a deposit on the market for - // each token on offer - { attachedDeposit: mNEAR(8.8).toString(), gas: Tgas(200) } - ); - - // check event logs - assertEventLogs( - test, - (batchApproveLogs as TransactionResult).logs.slice(1), - [ - { - standard: "mb_market", - version: "0.1.0", - event: "nft_unlist", - data: [{ list_id: `0:1:${store.accountId}` }], - }, - { - standard: "mb_market", - version: "0.1.0", - event: "nft_list", - data: [ - { - list_id: `0:2:${store.accountId}`, - price: NEAR(1).toString(), - token_key: `0:${store.accountId}`, - owner_id: alice.accountId, - autotransfer: true, - approval_id: "2", - token_id: "0", - store_id: store.accountId, - }, - { - list_id: `1:3:${store.accountId}`, - price: NEAR(1).toString(), - token_key: `1:${store.accountId}`, - owner_id: alice.accountId, - autotransfer: true, - approval_id: "3", - token_id: "1", - store_id: store.accountId, - }, - ], - }, - ], - "batch approving" - ); + { + standard: "mb_market", + version: "0.1.0", + event: "nft_list", + data: [ + { + list_id: `0:2:${store.accountId}`, + price: NEAR(1).toString(), + token_key: `0:${store.accountId}`, + owner_id: alice.accountId, + autotransfer: true, + approval_id: "2", + token_id: "0", + store_id: store.accountId, + }, + { + list_id: `1:3:${store.accountId}`, + price: NEAR(1).toString(), + token_key: `1:${store.accountId}`, + owner_id: alice.accountId, + autotransfer: true, + approval_id: "3", + token_id: "1", + store_id: store.accountId, + }, + ], + }, + ], + "batch approving" + ); - // check market state - test.like( - await market.view("get_token", { token_key: `0:${store.accountId}` }), - { autotransfer: true, asking_price: NEAR(1).toString() } - ); - test.like( - await market.view("get_token", { token_key: `1:${store.accountId}` }), - { autotransfer: true, asking_price: NEAR(1).toString() } - ); + // check market state + test.like( + await market.view("get_token", { token_key: `0:${store.accountId}` }), + { autotransfer: true, asking_price: NEAR(1).toString() } + ); + test.like( + await market.view("get_token", { token_key: `1:${store.accountId}` }), + { autotransfer: true, asking_price: NEAR(1).toString() } + ); - // ---------------------------- batch revoking ----------------------------- - // doesn't make any sense at the moment - // TODO::testing::medium: batch revoking of tokens - // TODO: check event logs - // TODO: check market state - } -); + // ---------------------------- batch revoking ----------------------------- + // doesn't make any sense at the moment + // TODO::testing::medium: batch revoking of tokens + // TODO: check event logs + // TODO: check market state +}); // TODO: market::allowlist/banlist diff --git a/testing/__tests__/market.royalties.ava.ts b/testing/__tests__/market.royalties.ava.ts index 7311400..048edbb 100644 --- a/testing/__tests__/market.royalties.ava.ts +++ b/testing/__tests__/market.royalties.ava.ts @@ -1,9 +1,8 @@ -import { TransactionResult } from "near-workspaces-ava"; +import { TransactionResult } from "near-workspaces"; +import avaTest from "ava"; import { assertEventLogs, failPromiseRejection, - MARKET_WORKSPACE, - createPayout, createPayoutNumerators, createPayoutPercentage, NEAR, @@ -11,220 +10,222 @@ import { Tgas, getBalance, assertBalanceChange, -} from "./test-utils"; +} from "./utils/index.js"; +import { setup } from "./setup.js"; -MARKET_WORKSPACE.test( - "market::royalties", - async (test, { root, factory, store, market, alice, bob, carol, dave }) => { - // cannot use `prepareTokenListing`, because royalties need to be set - // during minting - await root - .call( - market, - "update_allowlist", - { account_id: factory.accountId, state: true }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection(test, "allowing store on market")); +const test = setup(avaTest); - // --------------------------- setting royalties --------------------------- - const mintCall = await alice - .call_raw( - store, - "nft_batch_mint", - { - owner_id: alice.accountId, - num_to_mint: 1, - metadata: {}, - royalty_args: { - split_between: createPayoutPercentage([ - [alice, 5000], - [bob, 5000], - ]), - percentage: 5000, // this is 50 % - }, +test("market::royalties", async (test) => { + const { factory, store, market, alice, bob, carol, dave } = + test.context.accounts; + // cannot use `prepareTokenListing`, because royalties need to be set + // during minting + await market + .call( + market, + "update_allowlist", + { account_id: factory.accountId, state: true }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "allowing store on market")); + + // --------------------------- setting royalties --------------------------- + const mintCall = await alice + .callRaw( + store, + "nft_batch_mint", + { + owner_id: alice.accountId, + num_to_mint: 1, + metadata: {}, + royalty_args: { + split_between: createPayoutPercentage([ + [alice, 5000], + [bob, 5000], + ]), + percentage: 5000, // this is 50 % }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection(test, "minting with royalties")); + }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "minting with royalties")); - // check event logs - // TODO::store::low: format seems clunky - const storeFormattedRoyalties = { - split_between: createPayoutNumerators([ - [alice, 5000], - [bob, 5000], - ]), - percentage: { numerator: 5000 }, - }; + // check event logs + // TODO::store::low: format seems clunky + const storeFormattedRoyalties = { + split_between: createPayoutNumerators([ + [alice, 5000], + [bob, 5000], + ]), + percentage: { numerator: 5000 }, + }; - assertEventLogs( - test, - (mintCall as TransactionResult).logs, - [ - { - standard: "nep171", - version: "1.0.0", - event: "nft_mint", - data: [ - { - owner_id: "alice.test.near", - token_ids: ["0"], - // memo should be a string, as it's standardized like that! - memo: JSON.stringify({ - royalty: storeFormattedRoyalties, - split_owners: null, - meta_id: null, - meta_extra: null, - minter: alice.accountId, - }), - }, - ], - }, - ], - "minting" - ); + assertEventLogs( + test, + (mintCall as TransactionResult).logs, + [ + { + standard: "nep171", + version: "1.0.0", + event: "nft_mint", + data: [ + { + owner_id: "alice.test.near", + token_ids: ["0"], + // memo should be a string, as it's standardized like that! + memo: JSON.stringify({ + royalty: storeFormattedRoyalties, + split_owners: null, + meta_id: null, + meta_extra: null, + minter: alice.accountId, + }), + }, + ], + }, + ], + "minting" + ); - // check chain state: royalties in token info - test.deepEqual( - ((await store.view("nft_token", { token_id: "0" })) as any).royalty, - storeFormattedRoyalties, - "Bad onchain royalties (querying `nft_token`)" - ); - test.deepEqual( - await store.view("get_token_royalty", { token_id: "0" }), - storeFormattedRoyalties, - "Bad onchain royalties (querying `nft_token_royalty`)" - ); - test.log("royalties as known by store:", storeFormattedRoyalties); - // // check chain state: royalties in payout info - // // FIXME::store::medium: these shouldn't be zero - // test.deepEqual( - // ( - // (await store.view("nft_payout", { - // token_id: "0", - // balance: "1000", - // max_len_payout: 5, - // })) as any - // ).payout, - // createPayout([ - // [alice, "750"], - // [bob, "250"], - // ]), - // "Bad onchain royalties (querying `nft_payout`)" - // ); + // check chain state: royalties in token info + test.deepEqual( + ((await store.view("nft_token", { token_id: "0" })) as any).royalty, + storeFormattedRoyalties, + "Bad onchain royalties (querying `nft_token`)" + ); + test.deepEqual( + await store.view("get_token_royalty", { token_id: "0" }), + storeFormattedRoyalties, + "Bad onchain royalties (querying `nft_token_royalty`)" + ); + // test.log("royalties as known by store:", storeFormattedRoyalties); + // // check chain state: royalties in payout info + // // FIXME::store::medium: these shouldn't be zero + // test.deepEqual( + // ( + // (await store.view("nft_payout", { + // token_id: "0", + // balance: "1000", + // max_len_payout: 5, + // })) as any + // ).payout, + // createPayout([ + // [alice, "750"], + // [bob, "250"], + // ]), + // "Bad onchain royalties (querying `nft_payout`)" + // ); - // ------------------- executing transfer with royalties ------------------- - await alice - .call( - store, - "nft_approve", - { - token_id: "0", - account_id: market.accountId, - msg: JSON.stringify({ price: NEAR(1), autotransfer: true }), - }, - { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "listing token")); - // events have been checked previously -> no need here - const tokenKey = `0:${store.accountId}`; + // ------------------- executing transfer with royalties ------------------- + await alice + .call( + store, + "nft_approve", + { + token_id: "0", + account_id: market.accountId, + msg: JSON.stringify({ price: NEAR(1), autotransfer: true }), + }, + { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "listing token")); + // events have been checked previously -> no need here + const tokenKey = `0:${store.accountId}`; - const aliceBalance0 = await getBalance(alice); - const bobBalance0 = await getBalance(bob); - await carol - .call( - market, - "make_offer", - { - token_key: [tokenKey], - price: [NEAR(1)], - timeout: [{ Hours: 24 }], - }, - { attachedDeposit: NEAR(1), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "making offer")); - // events have been checked previously -> no need here + const aliceBalance0 = await getBalance(alice); + const bobBalance0 = await getBalance(bob); + await carol + .call( + market, + "make_offer", + { + token_key: [tokenKey], + price: [NEAR(1)], + timeout: [{ Hours: 24 }], + }, + { attachedDeposit: NEAR(1), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "making offer")); + // events have been checked previously -> no need here - // check chain state: alice received 0.75 * 0.975 NEAR - await assertBalanceChange( - test, - { account: alice, ref: aliceBalance0, diff: mNEAR(0.75 * 975) }, - "Checking first royalties payout" - ); - // check chain state: bob received 0.25 * 0.975 NEAR - await assertBalanceChange( - test, - { account: bob, ref: bobBalance0, diff: mNEAR(0.25 * 975) }, - "Checking first royalties payout" - ); - // -------------- executing again -> royalties are perpetual --------------- - // // check chain state: royalties in payout info - // // FIXME::store::medium: these shouldn't be zero - // test.deepEqual( - // ( - // (await store.view("nft_payout", { - // token_id: "0", - // balance: "1000", - // max_len_payout: 5, - // })) as any - // ).payout, - // createPayout([ - // [alice, "250"], - // [bob, "250"], - // [carol, "500"], - // ]), - // "Bad onchain royalties (querying `nft_payout`)" - // ); - await carol - .call( - store, - "nft_approve", - { - token_id: "0", - account_id: market.accountId, - msg: JSON.stringify({ price: NEAR(1), autotransfer: true }), - }, - { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "listing token")); - // events have been checked previously -> no need here + // check chain state: alice received 0.75 * 0.975 NEAR + await assertBalanceChange( + test, + { account: alice, ref: aliceBalance0, diff: mNEAR(0.75 * 975) }, + "Checking first royalties payout" + ); + // check chain state: bob received 0.25 * 0.975 NEAR + await assertBalanceChange( + test, + { account: bob, ref: bobBalance0, diff: mNEAR(0.25 * 975) }, + "Checking first royalties payout" + ); + // -------------- executing again -> royalties are perpetual --------------- + // // check chain state: royalties in payout info + // // FIXME::store::medium: these shouldn't be zero + // test.deepEqual( + // ( + // (await store.view("nft_payout", { + // token_id: "0", + // balance: "1000", + // max_len_payout: 5, + // })) as any + // ).payout, + // createPayout([ + // [alice, "250"], + // [bob, "250"], + // [carol, "500"], + // ]), + // "Bad onchain royalties (querying `nft_payout`)" + // ); + await carol + .call( + store, + "nft_approve", + { + token_id: "0", + account_id: market.accountId, + msg: JSON.stringify({ price: NEAR(1), autotransfer: true }), + }, + { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "listing token")); + // events have been checked previously -> no need here - const aliceBalance1 = await getBalance(alice); - const bobBalance1 = await getBalance(bob); - const carolBalance1 = await getBalance(carol); + const aliceBalance1 = await getBalance(alice); + const bobBalance1 = await getBalance(bob); + const carolBalance1 = await getBalance(carol); - await dave - .call( - market, - "make_offer", - { - token_key: [tokenKey], - price: [NEAR(1)], - timeout: [{ Hours: 24 }], - }, - { attachedDeposit: NEAR(1), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "making offer")); - // events have been checked previously -> no need here + await dave + .call( + market, + "make_offer", + { + token_key: [tokenKey], + price: [NEAR(1)], + timeout: [{ Hours: 24 }], + }, + { attachedDeposit: NEAR(1), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "making offer")); + // events have been checked previously -> no need here - // check chain state: alice received 0.75 * 0.975 NEAR - await assertBalanceChange( - test, - { account: alice, ref: aliceBalance1, diff: mNEAR(0.25 * 975) }, - "Checking second royalties payout" - ); - // check chain state: bob received 0.25 * 0.975 NEAR - await assertBalanceChange( - test, - { account: bob, ref: bobBalance1, diff: mNEAR(0.25 * 975) }, - "Checking second royalties payout" - ); - // check chain state: bob received 0.50 * 0.975 NEAR - await assertBalanceChange( - test, - { account: carol, ref: carolBalance1, diff: mNEAR(0.5 * 975) }, - "Checking second royalties payout" - ); - } -); + // check chain state: alice received 0.75 * 0.975 NEAR + await assertBalanceChange( + test, + { account: alice, ref: aliceBalance1, diff: mNEAR(0.25 * 975) }, + "Checking second royalties payout" + ); + // check chain state: bob received 0.25 * 0.975 NEAR + await assertBalanceChange( + test, + { account: bob, ref: bobBalance1, diff: mNEAR(0.25 * 975) }, + "Checking second royalties payout" + ); + // check chain state: bob received 0.50 * 0.975 NEAR + await assertBalanceChange( + test, + { account: carol, ref: carolBalance1, diff: mNEAR(0.5 * 975) }, + "Checking second royalties payout" + ); +}); diff --git a/testing/__tests__/market.splits.ava.ts b/testing/__tests__/market.splits.ava.ts index e96007d..3e95648 100644 --- a/testing/__tests__/market.splits.ava.ts +++ b/testing/__tests__/market.splits.ava.ts @@ -1,8 +1,8 @@ -import { ava, TransactionResult } from "near-workspaces-ava"; +import { TransactionResult } from "near-workspaces"; +import avaTest from "ava"; import { batchMint, failPromiseRejection, - MARKET_WORKSPACE, mNEAR, NEAR, Tgas, @@ -12,215 +12,217 @@ import { createPayoutNumerators, assertEventLogs, assertContractPanics, -} from "./test-utils"; +} from "./utils/index.js"; +import { setup } from "./setup.js"; -MARKET_WORKSPACE.test( - "market::splits", - async (test, { root, factory, store, market, alice, bob, carol, dave }) => { - // cannot use `prepareTokenListing`, because royalties need to be set - // during minting - await root - .call( - market, - "update_allowlist", - { account_id: factory.accountId, state: true }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection(test, "allowing store on market")); +const test = setup(avaTest); - await batchMint({ owner: alice, store, num_to_mint: 1 }).catch( - failPromiseRejection(test, "minting") - ); +test("market::splits", async (test) => { + const { factory, store, market, alice, bob, carol, dave } = + test.context.accounts; + // cannot use `prepareTokenListing`, because royalties need to be set + // during minting + await market + .call( + market, + "update_allowlist", + { account_id: factory.accountId, state: true }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "allowing store on market")); - // ---------------------------- setting splits ----------------------------- - await assertContractPanics(test, [ - // only token owner can set - [ - async () => { - await bob.call( - store, - "set_split_owners", - { - token_ids: ["0"], - split_between: createPayoutPercentage([ - [alice, 6000], - [bob, 4000], - ]), - }, - { attachedDeposit: mNEAR(1.6) } - ); - }, - `${bob.accountId} is required to own token 0`, - "Bob tried setting splits on Alice's token", - ], - [ - // requires storage deposit - async () => { - await alice.call( - store, - "set_split_owners", - { - token_ids: ["0"], - split_between: createPayoutPercentage([ - [alice, 6000], - [bob, 4000], - ]), - }, - { attachedDeposit: mNEAR(1.59) } - ); - }, - `Requires storage deposit of at least ${mNEAR(1.6)}`, - "Alice tried setting splits with insufficient storage deposit", - ], - ]); - const setSplitsCall = await alice - .call_raw( - store, - "set_split_owners", - { - token_ids: ["0"], - split_between: createPayoutPercentage([ - [alice, 6000], - [bob, 4000], - ]), - }, - { attachedDeposit: mNEAR(1.6) } - ) - .catch(failPromiseRejection(test, "setting splits")); + await batchMint({ owner: alice, store, num_to_mint: 1 }).catch( + failPromiseRejection(test, "minting") + ); - // check event logs - assertEventLogs( - test, - (setSplitsCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "nft_set_split_owners", - data: { - split_owners: createPayoutPercentage([ + // ---------------------------- setting splits ----------------------------- + await assertContractPanics(test, [ + // only token owner can set + [ + async () => { + await bob.call( + store, + "set_split_owners", + { + token_ids: ["0"], + split_between: createPayoutPercentage([ [alice, 6000], [bob, 4000], ]), + }, + { attachedDeposit: mNEAR(1.6) } + ); + }, + `${bob.accountId} is required to own token 0`, + "Bob tried setting splits on Alice's token", + ], + [ + // requires storage deposit + async () => { + await alice.call( + store, + "set_split_owners", + { token_ids: ["0"], + split_between: createPayoutPercentage([ + [alice, 6000], + [bob, 4000], + ]), }, - }, - ], - "setting splits" - ); - - // check chain state: splits in `nft_token` - test.deepEqual( - ((await store.view("nft_token", { token_id: "0" })) as any).split_owners, + { attachedDeposit: mNEAR(1.59) } + ); + }, + `Requires storage deposit of at least ${mNEAR(1.6)}`, + "Alice tried setting splits with insufficient storage deposit", + ], + ]); + const setSplitsCall = await alice + .callRaw( + store, + "set_split_owners", { - split_between: createPayoutNumerators([ + token_ids: ["0"], + split_between: createPayoutPercentage([ [alice, 6000], [bob, 4000], ]), }, - "Bad onchain splits (querying `nft_token`)" - ); - // so far, I cannot find a direct method to query the split owners + { attachedDeposit: mNEAR(1.6) } + ) + .catch(failPromiseRejection(test, "setting splits")); - // ------------------- executing transfer with royalties ------------------- - await alice - .call( - store, - "nft_approve", - { - token_id: "0", - account_id: market.accountId, - msg: JSON.stringify({ price: NEAR(1), autotransfer: true }), + // check event logs + assertEventLogs( + test, + (setSplitsCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "nft_set_split_owners", + data: { + split_owners: createPayoutPercentage([ + [alice, 6000], + [bob, 4000], + ]), + token_ids: ["0"], }, - { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "listing token")); - // events have been checked previously -> no need here - const tokenKey = `0:${store.accountId}`; + }, + ], + "setting splits" + ); - const aliceBalance0 = await getBalance(alice); - const bobBalance0 = await getBalance(bob); - await carol - .call( - market, - "make_offer", - { - token_key: [tokenKey], - price: [NEAR(1)], - timeout: [{ Hours: 24 }], - }, - { attachedDeposit: NEAR(1), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "making offer")); - // events have been checked previously -> no need here + // check chain state: splits in `nft_token` + test.deepEqual( + ((await store.view("nft_token", { token_id: "0" })) as any).split_owners, + { + split_between: createPayoutNumerators([ + [alice, 6000], + [bob, 4000], + ]), + }, + "Bad onchain splits (querying `nft_token`)" + ); + // so far, I cannot find a direct method to query the split owners - // check chain state: alice received 0.75 * 0.975 NEAR - await assertBalanceChange( - test, - { account: alice, ref: aliceBalance0, diff: mNEAR(0.6 * 975) }, - "Checking royalties (without splits)" - ); - // check chain state: bob received 0.25 * 0.975 NEAR - await assertBalanceChange( - test, - { account: bob, ref: bobBalance0, diff: mNEAR(0.4 * 975) }, - "Checking royalties (without splits)" - ); + // ------------------- executing transfer with royalties ------------------- + await alice + .call( + store, + "nft_approve", + { + token_id: "0", + account_id: market.accountId, + msg: JSON.stringify({ price: NEAR(1), autotransfer: true }), + }, + { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "listing token")); + // events have been checked previously -> no need here + const tokenKey = `0:${store.accountId}`; - // --------------------- redo, splits should be reset ---------------------- - test.deepEqual( - ((await store.view("nft_token", { token_id: "0" })) as any).split_owners, - null, - "Bad onchain splits after transfer (querying `nft_token`)" - ); + const aliceBalance0 = await getBalance(alice); + const bobBalance0 = await getBalance(bob); + await carol + .call( + market, + "make_offer", + { + token_key: [tokenKey], + price: [NEAR(1)], + timeout: [{ Hours: 24 }], + }, + { attachedDeposit: NEAR(1), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "making offer")); + // events have been checked previously -> no need here - await carol - .call( - store, - "nft_approve", - { - token_id: "0", - account_id: market.accountId, - msg: JSON.stringify({ price: NEAR(1), autotransfer: true }), - }, - { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "listing token again")); + // check chain state: alice received 0.75 * 0.975 NEAR + await assertBalanceChange( + test, + { account: alice, ref: aliceBalance0, diff: mNEAR(0.6 * 975) }, + "Checking royalties (without splits)" + ); + // check chain state: bob received 0.25 * 0.975 NEAR + await assertBalanceChange( + test, + { account: bob, ref: bobBalance0, diff: mNEAR(0.4 * 975) }, + "Checking royalties (without splits)" + ); - const aliceBalance1 = await getBalance(alice); - const bobBalance1 = await getBalance(bob); - const carolBalance1 = await getBalance(carol); + // --------------------- redo, splits should be reset ---------------------- + test.deepEqual( + ((await store.view("nft_token", { token_id: "0" })) as any).split_owners, + null, + "Bad onchain splits after transfer (querying `nft_token`)" + ); - await dave - .call( - market, - "make_offer", - { - token_key: [tokenKey], - price: [NEAR(1)], - timeout: [{ Hours: 24 }], - }, - { attachedDeposit: NEAR(1), gas: Tgas(200) } - ) - .catch(failPromiseRejection(test, "making offer again")); + await carol + .call( + store, + "nft_approve", + { + token_id: "0", + account_id: market.accountId, + msg: JSON.stringify({ price: NEAR(1), autotransfer: true }), + }, + { attachedDeposit: mNEAR(0.81), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "listing token again")); + + const aliceBalance1 = await getBalance(alice); + const bobBalance1 = await getBalance(bob); + const carolBalance1 = await getBalance(carol); + + await dave + .call( + market, + "make_offer", + { + token_key: [tokenKey], + price: [NEAR(1)], + timeout: [{ Hours: 24 }], + }, + { attachedDeposit: NEAR(1), gas: Tgas(200) } + ) + .catch(failPromiseRejection(test, "making offer again")); - // check chain state: alice received nothing - await assertBalanceChange( - test, - { account: alice, ref: aliceBalance1, diff: NEAR(0) }, - "Checking royalties (without splits)" - ); - // check chain state: bob received nothing - await assertBalanceChange( - test, - { account: bob, ref: bobBalance1, diff: NEAR(0) }, - "Checking royalties (without splits)" - ); - // check chain state: carol received 0.975 NEAR - await assertBalanceChange( - test, - { account: carol, ref: carolBalance1, diff: mNEAR(975) }, - "Checking royalties (without splits)" - ); - } -); + // check chain state: alice received nothing + await assertBalanceChange( + test, + { account: alice, ref: aliceBalance1, diff: NEAR(0) }, + "Checking royalties (without splits)" + ); + // check chain state: bob received nothing + await assertBalanceChange( + test, + { account: bob, ref: bobBalance1, diff: NEAR(0) }, + "Checking royalties (without splits)" + ); + // check chain state: carol received 0.975 NEAR + await assertBalanceChange( + test, + { account: carol, ref: carolBalance1, diff: mNEAR(975) }, + "Checking royalties (without splits)" + ); +}); diff --git a/testing/__tests__/misc.ava.ts b/testing/__tests__/misc.ava.ts index d5e790e..134f2e8 100644 --- a/testing/__tests__/misc.ava.ts +++ b/testing/__tests__/misc.ava.ts @@ -1,16 +1,18 @@ -import { TransactionResult, Workspace } from "near-workspaces-ava"; +import { TransactionResult } from "near-workspaces"; import avaTest from "ava"; import { NEAR, mNEAR, uNEAR, nNEAR, - STORE_WORKSPACE, assertEventLogs, failPromiseRejection, assertMinters, assertContractPanics, -} from "./test-utils"; +} from "./utils/index.js"; +import { setup } from "./setup.js"; + +const test = setup(avaTest); // No need to fire up the chain for testing my utils avaTest("util tests", (test) => { @@ -18,15 +20,10 @@ avaTest("util tests", (test) => { test.is(mNEAR(1.5).toString(), "1500000000000000000000"); test.is(uNEAR(1.5).toString(), "1500000000000000000"); test.is(nNEAR(1.5).toString(), "1500000000000000"); - - // TODO::testing::low: assertTokenIs? - // TODO::testing::low: assertTokensAre? - // TODO::testing::low: assertEventLog? - // TODO::testing::low: assertEventLogs? }); const changeSettingsData = (subset: Record) => { - const data = { + const data: Record = { granted_minter: null, revoked_minter: null, new_icon_base64: null, @@ -41,210 +38,200 @@ const changeSettingsData = (subset: Record) => { return data; }; -// As this tests deployment, we do it in a clean-state environment -Workspace.init().test("deployment", async (test, { root }) => { - // TODO::testing::low: edge cases of deployment - const failDeploymentError = (name: string) => (e: any) => { - test.log(`Failed to deploy ${name} contract`); - test.log(e); - test.fail(); - }; - - await root - .createAndDeploy( - "factory", // subaccount name - "../wasm/factory.wasm", // path to wasm - { method: "new", args: {} } +// // As this tests deployment, we do it in a clean-state environment +// Workspace.init().test("deployment", async (test, { root }) => { +// const failDeploymentError = (name: string) => (e: any) => { +// test.log(`Failed to deploy ${name} contract`); +// test.log(e); +// test.fail(); +// }; + +// await root +// .createAndDeploy( +// "factory", // subaccount name +// "../wasm/factory.wasm", // path to wasm +// { method: "new", args: {} } +// ) +// .catch(failDeploymentError("factory")); + +// await root +// .createAndDeploy("store", "../wasm/store.wasm", { +// method: "new", +// args: { +// owner_id: root.accountId, +// metadata: { +// spec: "nft-1.0.0", +// name: "store.root", +// symbol: "ROOT", +// }, +// }, +// }) +// .catch(failDeploymentError("store")); + +// await root +// .createAndDeploy("helper", "../wasm/helper.wasm", { +// method: "new", +// args: {}, +// }) +// .catch(failDeploymentError("helper")); + +// await root +// .createAndDeploy("market", "../wasm/market.wasm", { +// method: "new", +// args: { init_allowlist: [] }, +// }) +// .catch(failDeploymentError("market")); +// }); + +test("ownership::transfer-store", async (test) => { + const { alice, bob, carol, store } = test.context.accounts; + + await alice + .call(store, "grant_minter", { account_id: bob }, { attachedDeposit: "1" }) + .catch(failPromiseRejection(test, "granting minter rights")); + + // ---------------------------- remove minters ----------------------------- + const transferStoreClearMintersCall = await alice + .callRaw( + store, + "transfer_store_ownership", + { new_owner: carol.accountId, keep_old_minters: false }, + { attachedDeposit: "1" } ) - .catch(failDeploymentError("factory")); - - await root - .createAndDeploy("store", "../wasm/store.wasm", { - method: "new", - args: { - owner_id: root.accountId, - metadata: { - spec: "nft-1.0.0", - name: "store.root", - symbol: "ROOT", - }, - }, - }) - .catch(failDeploymentError("store")); - - await root - .createAndDeploy("helper", "../wasm/helper.wasm", { - method: "new", - args: {}, - }) - .catch(failDeploymentError("helper")); - - await root - .createAndDeploy("market", "../wasm/market.wasm", { - method: "new", - args: { init_allowlist: [] }, - }) - .catch(failDeploymentError("market")); -}); - -STORE_WORKSPACE.test( - "ownership::transfer-store", - async (test, { alice, bob, carol, store }) => { - await alice - .call( - store, - "grant_minter", - { account_id: bob }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection(test, "granting minter rights")); - - // ---------------------------- remove minters ----------------------------- - const transferStoreClearMintersCall = await alice - .call_raw( - store, - "transfer_store_ownership", - { new_owner: carol.accountId, keep_old_minters: false }, - { attachedDeposit: "1" } + .catch( + failPromiseRejection( + test, + "transferring store ownership (minters cleared)" ) - .catch( - failPromiseRejection( - test, - "transferring store ownership (minters cleared)" - ) - ); - - // check logs - assertEventLogs( - test, - (transferStoreClearMintersCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ - revoked_minter: alice.accountId, - }), - }, - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ - revoked_minter: bob.accountId, - }), - }, - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ - granted_minter: carol.accountId, - }), - }, - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ - new_owner: carol.accountId, - }), - }, - ], - "transferring store ownership (minters cleared)" ); - // TODO::store::medium query owner - - // query minters - await assertMinters( - { test, store }, - [ - [alice, false], - [bob, false], - [carol, true], - ], - "transferring store ownership (minters cleared)" - ); - - await assertContractPanics(test, [ - // require ownership - [ - async () => { - await alice.call( - store, - "transfer_store_ownership", - { new_owner: alice.accountId, keep_old_minters: false }, - { attachedDeposit: "1" } - ); - }, - "This method can only be called by the store owner", - "Non-owner tried to transfer store ownership", - ], - // require yoctoNEAR deposit - [ - async () => { - await carol.call(store, "transfer_store_ownership", { - new_owner: alice.accountId, - keep_old_minters: false, - }); - }, - "Requires attached deposit of exactly 1 yoctoNEAR", - "Tried to transfer store ownership without yoctoNEAR deposit", - ], - ]); - - // ----------------------------- keep minters ------------------------------ - const transferStoreKeepMintersCall = await carol - .call_raw( - store, - "transfer_store_ownership", - { new_owner: alice.accountId, keep_old_minters: true }, - { attachedDeposit: "1" } - ) - .catch( - failPromiseRejection( - test, - "transferring store ownership (keep minters)" - ) - ); - - // check logs - assertEventLogs( - test, - (transferStoreKeepMintersCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ - granted_minter: alice.accountId, - }), - }, - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ - new_owner: alice.accountId, - }), - }, - ], - "transferring store ownership (keep minters)" + // check logs + assertEventLogs( + test, + (transferStoreClearMintersCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ + revoked_minter: alice.accountId, + }), + }, + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ + revoked_minter: bob.accountId, + }), + }, + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ + granted_minter: carol.accountId, + }), + }, + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ + new_owner: carol.accountId, + }), + }, + ], + "transferring store ownership (minters cleared)" + ); + + test.is(await store.view("get_owner_id"), carol.accountId); + + // query minters + await assertMinters( + { test, store }, + [ + [alice, false], + [bob, false], + [carol, true], + ], + "transferring store ownership (minters cleared)" + ); + + await assertContractPanics(test, [ + // require ownership + [ + async () => { + await alice.call( + store, + "transfer_store_ownership", + { new_owner: alice.accountId, keep_old_minters: false }, + { attachedDeposit: "1" } + ); + }, + "This method can only be called by the store owner", + "Non-owner tried to transfer store ownership", + ], + // require yoctoNEAR deposit + [ + async () => { + await carol.call(store, "transfer_store_ownership", { + new_owner: alice.accountId, + keep_old_minters: false, + }); + }, + "Requires attached deposit of exactly 1 yoctoNEAR", + "Tried to transfer store ownership without yoctoNEAR deposit", + ], + ]); + + // // ----------------------------- keep minters ------------------------------ + const transferStoreKeepMintersCall = await carol + .callRaw( + store, + "transfer_store_ownership", + { new_owner: alice.accountId, keep_old_minters: true }, + { attachedDeposit: "1" } + ) + .catch( + failPromiseRejection(test, "transferring store ownership (keep minters)") ); - // TODO::store::medium query owner - // query minters - await assertMinters( - { test, store }, - [ - [alice, true], - [bob, false], - [carol, true], - ], - "transferring store ownership (keep minters)" - ); - } -); + // check logs + assertEventLogs( + test, + (transferStoreKeepMintersCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ + granted_minter: alice.accountId, + }), + }, + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ + new_owner: alice.accountId, + }), + }, + ], + "transferring store ownership (keep minters)" + ); + + test.is(await store.view("get_owner_id"), alice.accountId); + // query minters + await assertMinters( + { test, store }, + [ + [alice, true], + [bob, false], + [carol, true], + ], + "transferring store ownership (keep minters)" + ); +}); diff --git a/testing/__tests__/nft.approvals.ava.ts b/testing/__tests__/nft.approvals.ava.ts index 72cb6f8..ac30de1 100644 --- a/testing/__tests__/nft.approvals.ava.ts +++ b/testing/__tests__/nft.approvals.ava.ts @@ -1,20 +1,22 @@ -import { BN, TransactionResult } from "near-workspaces-ava"; +import { TransactionResult } from "near-workspaces"; +import avaTest from "ava"; import { assertApprovals, assertNoApprovals, assertContractPanics, assertEventLogs, - assertBalanceChange, batchMint, - STORE_WORKSPACE, mNEAR, getBalance, assertContractTokenOwners, assertNoApproval, -} from "./test-utils"; +} from "./utils/index.js"; +import { setup } from "./setup.js"; + +const test = setup(avaTest); const changeSettingsData = (subset: Record) => { - const data = { + const data: Record = { granted_minter: null, revoked_minter: null, new_icon_base64: null, @@ -29,891 +31,784 @@ const changeSettingsData = (subset: Record) => { return data; }; -STORE_WORKSPACE.test( - "approvals::core", - async (test, { alice, bob, carol, store }) => { - const failPromiseRejection = (msg: string) => (e: any) => { - test.log(`Promise rejected while ${msg}:`); - test.log(e); - test.fail(); - }; - - await batchMint({ owner: alice, store, num_to_mint: 4 }).catch( - failPromiseRejection("minting") - ); - // // assert correctness of current owners - // await assertContractTokenOwners( - // test, - // store, - // [ - // { id: "0", owner_id: alice.accountId }, - // { id: "1", owner_id: alice.accountId }, - // { id: "2", owner_id: alice.accountId }, - // { id: "3", owner_id: alice.accountId }, - // ], - // "minting" - // ); - - // assert correctness of current approvals - await assertNoApprovals( - { test, store }, - [ - { token_id: "0", approved_account_id: bob.accountId }, - { token_id: "1", approved_account_id: bob.accountId }, - { token_id: "2", approved_account_id: bob.accountId }, - { token_id: "3", approved_account_id: bob.accountId }, - ], - "minting" - ); - - // -------------------------------- approve -------------------------------- - const approveCall = await alice - .call_raw( - store, - "nft_approve", - { token_id: "0", account_id: bob.accountId }, - { attachedDeposit: mNEAR(0.8) } - ) - .catch(failPromiseRejection("approving")); - // check event logs - assertEventLogs( - test, - (approveCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "nft_approve", - data: [{ token_id: "0", approval_id: 0, account_id: bob.accountId }], - }, - ], - "approving" - ); - - await assertContractPanics(test, [ - // try approving when not owning token - [ - async () => - bob.call( - store, - "nft_approve", - { token_id: "1", account_id: bob.accountId }, - { attachedDeposit: mNEAR(0.8) } - ), - `${bob.accountId} is required to own token 1`, - "Bob tried approving on unowned token", - ], - // require at least one yoctoNEAR to approve - [ - async () => - alice.call( - store, - "nft_approve", - { token_id: "1", account_id: bob.accountId }, - { attachedDeposit: mNEAR(0.79) } - ), - "Requires storage deposit of at least 800000000000000000000 yoctoNEAR", - "Alice tried approving with insufficient deposit", - ], - ]); - - // assert correctness of current approvals - await assertApprovals( - { test, store }, - [{ token_id: "0", approved_account_id: bob.accountId, approval_id: 0 }], - "approving" - ); - await assertNoApprovals( - { test, store }, - [ - { token_id: "1", approved_account_id: bob.accountId }, - { token_id: "2", approved_account_id: bob.accountId }, - { token_id: "3", approved_account_id: bob.accountId }, - ], - "approving" - ); - test.is( - await store.view("nft_approval_id", { - token_id: "0", - account_id: bob.accountId, - }), - 0 - ); - - // ----------------------------- batch approve ----------------------------- - const batchApproveCall = await alice - .call_raw( - store, - "nft_batch_approve", - { token_ids: ["1", "2"], account_id: bob.accountId }, - { attachedDeposit: mNEAR(1.6) } // no value for this in mintbase-js - ) - .catch(failPromiseRejection("batch approving")); - // check event logs - assertEventLogs( - test, - (batchApproveCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "nft_approve", - data: [ - { token_id: "1", approval_id: 1, account_id: bob.accountId }, - { token_id: "2", approval_id: 2, account_id: bob.accountId }, - ], - }, - ], - "batch approving" - ); - - await assertContractPanics(test, [ - // try batch approving when not owning token - [ - async () => - bob.call( - store, - "nft_batch_approve", - { token_ids: ["2", "3"], account_id: bob.accountId }, - { attachedDeposit: mNEAR(1.6) } - ), - `${bob.accountId} is required to own token 2`, - "Bob tried batch approving on unowned tokens", - ], - // require at sufficient deposit to cover storage rent - [ - async () => - alice.call( - store, - "nft_batch_approve", - { token_ids: ["3"], account_id: bob.accountId }, - { attachedDeposit: mNEAR(0.79) } - ), - "Requires storage deposit of at least 800000000000000000000 yoctoNEAR", - "Alice tried batch approving with insufficient deposit", - ], - ]); - - // assert correctness of current approvals - await assertApprovals( - { test, store }, - [ - { token_id: "0", approved_account_id: bob.accountId, approval_id: 0 }, - { token_id: "1", approved_account_id: bob.accountId, approval_id: 1 }, - { token_id: "2", approved_account_id: bob.accountId, approval_id: 2 }, - ], - "batch approving" - ); - await assertNoApprovals( - { test, store }, - [{ token_id: "3", approved_account_id: bob.accountId }], - "batch approving" - ); - - // -------------------------------- revoke --------------------------------- - // get bob's balance to check the refunding - const aliceBalance1 = await getBalance(alice); - const revokeCall = await alice - .call_raw( - store, - "nft_revoke", - { - token_id: "2", - account_id: bob.accountId, - }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection("revoking")); - // const aliceBalance2 = await getBalance(alice); - // const balanceDiff = aliceBalance1.sub(aliceBalance2); - // const gas = (revokeCall as TransactionResult).gas_burnt; - // const nearGasBN = new BN(gas.toString()).mul(new BN(100e6)).toString(); - // const nearGas = new ava.NEAR(nearGasBN); - // test.log(`Alice's balance before revoking: ${aliceBalance1.toHuman()}`); - // test.log(`Alice's balance after revoking: ${aliceBalance2.toHuman()}`); - // test.log(`Difference: ${balanceDiff.toHuman()}`); - // test.log(`Gas costs (1 Tgas = 0.3 mNEAR): ${nearGas.toHuman()}`); - // test.log(`Gas costs (gas units): ${gas.toHuman()}`); - // test.fail(); - - // check event logs - assertEventLogs( - test, - (revokeCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "nft_revoke", - // TODO::store::low: for `nft_approve`, data is an array, here - // it's an object -> should have the same predictable structure - data: { token_id: "2", account_id: bob.accountId }, - }, - ], - "revoking" - ); - // check if revoking refunds the storage deposit - // TODO::idk::medium: 6 mNEAR gone missing -> create issue on github - // await assertBalanceChange( - // test, - // { - // account: alice, - // // subtract the yoctoNEAR deposit - // ref: aliceBalance1.sub(new BN("1")), - // diff: mNEAR(0.8), - // gas: (revokeCall as TransactionResult).gas_burnt, - // }, - // "Revoking" - // ); - - await assertContractPanics(test, [ - // try revoking when not owning token - [ - async () => - bob.call( - store, - "nft_revoke", - { - token_id: "1", - account_id: bob.accountId, - }, - { attachedDeposit: "1" } - ), - `${bob.accountId} is required to own token 1`, - "Bob tried revoking on unowned token", - ], - // require at least one yoctoNEAR to revoke - [ - async () => - alice.call(store, "nft_revoke", { - token_id: "0", - account_id: bob.accountId, - }), - "Requires attached deposit of exactly 1 yoctoNEAR", - "Alice tried revoking without yoctoNEAR deposit", - ], - ]); - - // assert correctness of current approvals - await assertApprovals( - { test, store }, - [ - { token_id: "0", approved_account_id: bob.accountId, approval_id: 0 }, - { token_id: "1", approved_account_id: bob.accountId, approval_id: 1 }, - ], - "revoking" - ); - await assertNoApprovals( - { test, store }, - [ - { token_id: "2", approved_account_id: bob.accountId }, - { token_id: "3", approved_account_id: bob.accountId }, - ], - "revoking" - ); - - // ------------------------------ revoke_all ------------------------------- - // prior to revoking all, we need a token with two approvals - await alice.call( +test("approvals::core", async (test) => { + const { alice, bob, carol, store } = test.context.accounts; + + const failPromiseRejection = (msg: string) => (e: any) => { + test.log(`Promise rejected while ${msg}:`); + test.log(e); + test.fail(); + }; + + await batchMint({ owner: alice, store, num_to_mint: 4 }).catch( + failPromiseRejection("minting") + ); + // // assert correctness of current owners + // await assertContractTokenOwners( + // test, + // store, + // [ + // { id: "0", owner_id: alice.accountId }, + // { id: "1", owner_id: alice.accountId }, + // { id: "2", owner_id: alice.accountId }, + // { id: "3", owner_id: alice.accountId }, + // ], + // "minting" + // ); + + // assert correctness of current approvals + await assertNoApprovals( + { test, store }, + [ + { token_id: "0", approved_account_id: bob.accountId }, + { token_id: "1", approved_account_id: bob.accountId }, + { token_id: "2", approved_account_id: bob.accountId }, + { token_id: "3", approved_account_id: bob.accountId }, + ], + "minting" + ); + + // -------------------------------- approve -------------------------------- + const approveCall = await alice + .callRaw( + store, + "nft_approve", + { token_id: "0", account_id: bob.accountId }, + { attachedDeposit: mNEAR(0.8) } + ) + .catch(failPromiseRejection("approving")); + // check event logs + assertEventLogs( + test, + (approveCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "nft_approve", + data: [{ token_id: "0", approval_id: 0, account_id: bob.accountId }], + }, + ], + "approving" + ); + + await assertContractPanics(test, [ + // try approving when not owning token + [ + async () => + bob.call( + store, + "nft_approve", + { token_id: "1", account_id: bob.accountId }, + { attachedDeposit: mNEAR(0.8) } + ), + `${bob.accountId} is required to own token 1`, + "Bob tried approving on unowned token", + ], + // require at least one yoctoNEAR to approve + [ + async () => + alice.call( + store, + "nft_approve", + { token_id: "1", account_id: bob.accountId }, + { attachedDeposit: mNEAR(0.79) } + ), + "Requires storage deposit of at least 800000000000000000000 yoctoNEAR", + "Alice tried approving with insufficient deposit", + ], + ]); + + // assert correctness of current approvals + await assertApprovals( + { test, store }, + [{ token_id: "0", approved_account_id: bob.accountId, approval_id: 0 }], + "approving" + ); + await assertNoApprovals( + { test, store }, + [ + { token_id: "1", approved_account_id: bob.accountId }, + { token_id: "2", approved_account_id: bob.accountId }, + { token_id: "3", approved_account_id: bob.accountId }, + ], + "approving" + ); + test.is( + await store.view("nft_approval_id", { + token_id: "0", + account_id: bob.accountId, + }), + 0 + ); + + // ----------------------------- batch approve ----------------------------- + const batchApproveCall = await alice + .callRaw( store, "nft_batch_approve", - { token_ids: ["0", "1"], account_id: carol.accountId }, - { attachedDeposit: mNEAR(1.61) } // no value for this in mintbase-js - ); - await assertApprovals( - { test, store }, - [ - { token_id: "0", approved_account_id: carol.accountId, approval_id: 3 }, - { token_id: "1", approved_account_id: carol.accountId, approval_id: 4 }, - ], - "preparing revoke_all" - ); - - // actual call - // const aliceBalance2 = await getBalance(alice); - const revokeAllCall = await alice - .call_raw( - store, - "nft_revoke_all", - { token_id: "1" }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection("revoking all")); - // check event logs - assertEventLogs( - test, - (revokeAllCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "nft_revoke_all", - data: { token_id: "1" }, - }, - ], - "revoking all" - ); - // // check if revoking all refunds the required security deposit - // // FIXME::testing::low: this cannot test properly because the cost is so low - // // -> use TransactionResult::gas_burnt() - // await assertBalanceChange( - // test, - // { account: alice, ref: aliceBalance2, diff: mNEAR(1.6) }, - // "Revoking all" - // ); - - await assertContractPanics(test, [ - // try revoking all when not owning token - [ - async () => - bob.call( - store, - "nft_revoke_all", - { token_id: "0" }, - { attachedDeposit: "1" } - ), - `${bob.accountId} is required to own token 0`, - "Bob tried revoking all on unowned token", - ], - // require at least one yoctoNEAR to revoke all - [ - async () => alice.call(store, "nft_revoke_all", { token_id: "0" }), - "Requires attached deposit of exactly 1 yoctoNEAR", - "Alice tried revoking all without yoctoNEAR deposit", - ], - ]); - - // // assert correctness of current approvals - await assertApprovals( - { test, store }, - [ - { token_id: "0", approved_account_id: bob.accountId, approval_id: 0 }, - { token_id: "0", approved_account_id: carol.accountId, approval_id: 3 }, - ], - "revoking all" - ); - await assertNoApprovals( - { test, store }, - [ - { token_id: "1", approved_account_id: carol.accountId }, - { token_id: "1", approved_account_id: bob.accountId }, - { token_id: "2", approved_account_id: bob.accountId }, - { token_id: "3", approved_account_id: bob.accountId }, - ], - "revoking all" - ); - } -); - -STORE_WORKSPACE.test( - "approvals::minting", - async (test, { alice, bob, carol, dave, store }) => { - const failPromiseRejection = (msg: string) => (e: any) => { - test.log(`Promise rejected while ${msg}:`); - test.log(e); - test.fail(); - }; - - // ---------------------------- authorized mint ---------------------------- - // TODO::store::low: this increases storage, shouldn't it then require - // a sufficient deposit? -> this is not third party-territory, only the - // owner can call this - const grantMinterCall = await alice - .call_raw( - store, - "grant_minter", - { account_id: bob.accountId }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection("grant minting rights")); - - // check logs - assertEventLogs( - test, - (grantMinterCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ granted_minter: bob.accountId }), - }, - ], - "grant minting rights" - ); - - await assertContractPanics(test, [ - // only owner can grant minting rights - [ - async () => - bob.call( - store, - "grant_minter", - { account_id: bob.accountId }, - { attachedDeposit: "1" } - ), - "This method can only be called by the store owner", - "Bob tried granting himself minting rights", - ], - // require deposit - [ - async () => - alice.call(store, "grant_minter", { account_id: bob.accountId }), - "Requires attached deposit of exactly 1 yoctoNEAR", - "Alice tried to grant minting rights without yoctoNEAR deposit", - ], - ]); - - // check contract state (implicitly tests `check_is_minter`) - test.true( - await store.view("check_is_minter", { account_id: bob.accountId }), - "Failed to grant minting rights to Bob" - ); - test.false( - await store.view("check_is_minter", { account_id: carol.accountId }), - "How on earth did Carol get minting rights?" - ); - // checking the list_minters method - test.deepEqual( - await store.view("list_minters"), - [alice.accountId, bob.accountId], - "Bad minters list after granting minting rigths to Bob" - ); - - // actual minting - // TODO::store::low: shouldn't third party minting require deposits to - // cover storage costs? -> otherwise third-party minters might exhaust a - // contracts storage - const batchMintCall = await bob - .call_raw( - store, - "nft_batch_mint", - { owner_id: bob.accountId, num_to_mint: 2, metadata: {} }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection("approved minting")); - - // check logs - assertEventLogs( - test, - (batchMintCall as TransactionResult).logs, - [ - { - standard: "nep171", - version: "1.0.0", - event: "nft_mint", - data: [ - { - owner_id: bob.accountId, - token_ids: ["0", "1"], - memo: JSON.stringify({ - royalty: null, - split_owners: null, - meta_id: null, - meta_extra: null, - minter: bob.accountId, - }), - }, - ], - }, - ], - "approved minting" - ); - - // check contract state - assertContractTokenOwners( - { test, store }, - [ - { token_id: "0", owner_id: bob.accountId }, - { token_id: "1", owner_id: bob.accountId }, - ], - "approved minting" - ); - - // revoke minting rights - const revokeMinterCall = await alice - .call_raw( - store, - "revoke_minter", - { account_id: bob.accountId }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection("revoke minting rights")); - - // check logs - assertEventLogs( - test, - (revokeMinterCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ revoked_minter: bob.accountId }), - }, - ], - "approved minting" - ); - - await assertContractPanics(test, [ - // requires yoctoNEAR deposit - [ - async () => - alice.call(store, "revoke_minter", { account_id: bob.accountId }), - "Requires attached deposit of exactly 1 yoctoNEAR", - "Alice tried to revoke minting rights without yoctoNEAR deposit", - ], - // owner cannot revoke their own minting rights - [ - async () => - alice.call( - store, - "revoke_minter", - { account_id: alice.accountId }, - { attachedDeposit: "1" } - ), - "Owner cannot be removed from minters", - "Alice tried to revoke her own minting rights", - ], - ]); - - // check contract state - test.false( - await store.view("check_is_minter", { account_id: bob.accountId }), - "Failed to revoke Bob's minting rights" - ); - // checking the list_minters method - test.deepEqual( - await store.view("list_minters"), - [alice.accountId], - "Bad minters list after granting minting rights to Bob" - ); - - // batch_change_minters: add bob and carol - const batchGrantMinterCall = await alice - .call_raw( - store, - "batch_change_minters", - { grant: [bob.accountId, carol.accountId] }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection("batch grant minter rights")); - - // check logs - assertEventLogs( - test, - (batchGrantMinterCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ granted_minter: bob.accountId }), - }, - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ granted_minter: carol.accountId }), - }, - ], - "batch grant minter rights" - ); - test.deepEqual( - await store.view("list_minters"), - [alice.accountId, bob.accountId, carol.accountId], - "Bad minters list after batch granting minter rights" - ); - - // TODO: batch_change_minters: change carol to dave - const batchChangeMinterCall = await alice - .call_raw( - store, - "batch_change_minters", - { revoke: [carol.accountId], grant: [dave.accountId] }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection("batch change minter rights")); - // check logs - assertEventLogs( - test, - (batchChangeMinterCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ granted_minter: dave.accountId }), - }, - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ revoked_minter: carol.accountId }), - }, - ], - "batch change minter rights" - ); - test.deepEqual( - await store.view("list_minters"), - [alice.accountId, bob.accountId, dave.accountId], - "Bad minters list after batch changing minter rights" - ); - - // batch_change_minters: revoke bob and dave - const batchRevokeMinterCall = await alice - .call_raw( - store, - "batch_change_minters", - { revoke: [bob.accountId, dave.accountId] }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection("batch revoke minter rights")); - // check logs - assertEventLogs( - test, - (batchRevokeMinterCall as TransactionResult).logs, - [ - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ revoked_minter: bob.accountId }), - }, - { - standard: "mb_store", - version: "0.1.0", - event: "change_setting", - data: changeSettingsData({ revoked_minter: dave.accountId }), - }, - ], - "batch revoke minter rights" - ); - test.deepEqual( - await store.view("list_minters"), - [alice.accountId], - "Bad minters list after batch revoking minter rights" - ); - } -); - -STORE_WORKSPACE.test( - "approvals::token-actions", - async (test, { alice, bob, carol, store }) => { - const failPromiseRejection = (msg: string) => (e: any) => { - test.log(`Promise rejected while ${msg}:`); - test.log(e); - test.fail(); - }; - - await batchMint({ owner: alice, store, num_to_mint: 5 }).catch( - failPromiseRejection("minting") - ); - - await alice - .call( - store, - "nft_batch_approve", - { - token_ids: ["0", "1", "2", "3"], - account_id: bob.accountId, - }, - { attachedDeposit: mNEAR(3.21) } // no value for this in mintbase-js - ) - .catch(failPromiseRejection("approving")); - - // -------------------------- authorized transfer -------------------------- - const transferCall = await bob - .call_raw( - store, - "nft_transfer", - { receiver_id: carol.accountId, token_id: "0", approval_id: 0 }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection("transferring (approved)")); - assertEventLogs( - test, - (transferCall as TransactionResult).logs, - [ - { - standard: "nep171", - version: "1.0.0", - event: "nft_transfer", - data: [ - { - authorized_id: null, // FIXME::store::medium: why null? - old_owner_id: alice.accountId, - new_owner_id: carol.accountId, - token_ids: ["0"], - memo: null, - }, - ], - }, - ], - "transferring (approved)" - ); - - await assertContractPanics(test, [ - // try transferring without approval ID - [ - async () => { - await bob.call( - store, - "nft_transfer", - { receiver_id: carol.accountId, token_id: "1" }, - { attachedDeposit: "1" } - ); - }, - "Disallowing approvals without approval ID", - "Bob tried transferring (approved) without approval_id", - ], - // require at least one yoctoNEAR to transfer - [ - async () => { - await bob.call(store, "nft_transfer", { - receiver_id: carol.accountId, + { token_ids: ["1", "2"], account_id: bob.accountId }, + { attachedDeposit: mNEAR(1.6) } // no value for this in mintbase-js + ) + .catch(failPromiseRejection("batch approving")); + // check event logs + assertEventLogs( + test, + (batchApproveCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "nft_approve", + data: [ + { token_id: "1", approval_id: 1, account_id: bob.accountId }, + { token_id: "2", approval_id: 2, account_id: bob.accountId }, + ], + }, + ], + "batch approving" + ); + + await assertContractPanics(test, [ + // try batch approving when not owning token + [ + async () => + bob.call( + store, + "nft_batch_approve", + { token_ids: ["2", "3"], account_id: bob.accountId }, + { attachedDeposit: mNEAR(1.6) } + ), + `${bob.accountId} is required to own token 2`, + "Bob tried batch approving on unowned tokens", + ], + // require at sufficient deposit to cover storage rent + [ + async () => + alice.call( + store, + "nft_batch_approve", + { token_ids: ["3"], account_id: bob.accountId }, + { attachedDeposit: mNEAR(0.79) } + ), + "Requires storage deposit of at least 800000000000000000000 yoctoNEAR", + "Alice tried batch approving with insufficient deposit", + ], + ]); + + // assert correctness of current approvals + await assertApprovals( + { test, store }, + [ + { token_id: "0", approved_account_id: bob.accountId, approval_id: 0 }, + { token_id: "1", approved_account_id: bob.accountId, approval_id: 1 }, + { token_id: "2", approved_account_id: bob.accountId, approval_id: 2 }, + ], + "batch approving" + ); + await assertNoApprovals( + { test, store }, + [{ token_id: "3", approved_account_id: bob.accountId }], + "batch approving" + ); + + // -------------------------------- revoke --------------------------------- + // get bob's balance to check the refunding + const aliceBalance1 = await getBalance(alice); + const revokeCall = await alice + .callRaw( + store, + "nft_revoke", + { + token_id: "2", + account_id: bob.accountId, + }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection("revoking")); + // const aliceBalance2 = await getBalance(alice); + // const balanceDiff = aliceBalance1.sub(aliceBalance2); + // const gas = (revokeCall as TransactionResult).gas_burnt; + // const nearGasBN = new BN(gas.toString()).mul(new BN(100e6)).toString(); + // const nearGas = new ava.NEAR(nearGasBN); + // test.log(`Alice's balance before revoking: ${aliceBalance1.toHuman()}`); + // test.log(`Alice's balance after revoking: ${aliceBalance2.toHuman()}`); + // test.log(`Difference: ${balanceDiff.toHuman()}`); + // test.log(`Gas costs (1 Tgas = 0.3 mNEAR): ${nearGas.toHuman()}`); + // test.log(`Gas costs (gas units): ${gas.toHuman()}`); + // test.fail(); + + // check event logs + assertEventLogs( + test, + (revokeCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "nft_revoke", + // TODO::store::low: for `nft_approve`, data is an array, here + // it's an object -> should have the same predictable structure + data: { token_id: "2", account_id: bob.accountId }, + }, + ], + "revoking" + ); + // check if revoking refunds the storage deposit + // TODO::idk::medium: 6 mNEAR gone missing -> create issue on github + // await assertBalanceChange( + // test, + // { + // account: alice, + // // subtract the yoctoNEAR deposit + // ref: aliceBalance1.sub(new BN("1")), + // diff: mNEAR(0.8), + // gas: (revokeCall as TransactionResult).gas_burnt, + // }, + // "Revoking" + // ); + + await assertContractPanics(test, [ + // try revoking when not owning token + [ + async () => + bob.call( + store, + "nft_revoke", + { token_id: "1", - approval_id: 1, - }); - }, - "Requires attached deposit of exactly 1 yoctoNEAR", - "Bob tried transferring (approved) without yoctoNEAR deposit", - ], - // TODO::testing::medium workaround until fixed for not being able to - // check absence of approval - [ - async () => { - await bob.call( - store, - "nft_transfer", - { receiver_id: carol.accountId, token_id: "0", approval_id: 0 }, - { attachedDeposit: "1" } - ); - }, - `${bob.accountId} has no approval for token 0`, - "Bob tried transferring without having approval", - ], - ]); - - // token must now belong to carol - await assertContractTokenOwners( - { test, store }, - [ - { token_id: "0", owner_id: carol.accountId }, - { token_id: "1", owner_id: alice.accountId }, - { token_id: "2", owner_id: alice.accountId }, - { token_id: "3", owner_id: alice.accountId }, - ], - "Bad ownership state after approved transfer" - ); - // approval must have cleared -> FIXME: cannot check properly, because API is broken - assertNoApproval( - { test, store }, + account_id: bob.accountId, + }, + { attachedDeposit: "1" } + ), + `${bob.accountId} is required to own token 1`, + "Bob tried revoking on unowned token", + ], + // require at least one yoctoNEAR to revoke + [ + async () => + alice.call(store, "nft_revoke", { + token_id: "0", + account_id: bob.accountId, + }), + "Requires attached deposit of exactly 1 yoctoNEAR", + "Alice tried revoking without yoctoNEAR deposit", + ], + ]); + + // assert correctness of current approvals + await assertApprovals( + { test, store }, + [ + { token_id: "0", approved_account_id: bob.accountId, approval_id: 0 }, + { token_id: "1", approved_account_id: bob.accountId, approval_id: 1 }, + ], + "revoking" + ); + await assertNoApprovals( + { test, store }, + [ + { token_id: "2", approved_account_id: bob.accountId }, + { token_id: "3", approved_account_id: bob.accountId }, + ], + "revoking" + ); + + // ------------------------------ revoke_all ------------------------------- + // prior to revoking all, we need a token with two approvals + await alice.call( + store, + "nft_batch_approve", + { token_ids: ["0", "1"], account_id: carol.accountId }, + { attachedDeposit: mNEAR(1.61) } // no value for this in mintbase-js + ); + await assertApprovals( + { test, store }, + [ + { token_id: "0", approved_account_id: carol.accountId, approval_id: 3 }, + { token_id: "1", approved_account_id: carol.accountId, approval_id: 4 }, + ], + "preparing revoke_all" + ); + + // actual call + // const aliceBalance2 = await getBalance(alice); + const revokeAllCall = await alice + .callRaw( + store, + "nft_revoke_all", + { token_id: "1" }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection("revoking all")); + // check event logs + assertEventLogs( + test, + (revokeAllCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "nft_revoke_all", + data: { token_id: "1" }, + }, + ], + "revoking all" + ); + // // check if revoking all refunds the required security deposit + // // FIXME::testing::low: this cannot test properly because the cost is so low + // // -> use TransactionResult::gas_burnt() + // await assertBalanceChange( + // test, + // { account: alice, ref: aliceBalance2, diff: mNEAR(1.6) }, + // "Revoking all" + // ); + + await assertContractPanics(test, [ + // try revoking all when not owning token + [ + async () => + bob.call( + store, + "nft_revoke_all", + { token_id: "0" }, + { attachedDeposit: "1" } + ), + `${bob.accountId} is required to own token 0`, + "Bob tried revoking all on unowned token", + ], + // require at least one yoctoNEAR to revoke all + [ + async () => alice.call(store, "nft_revoke_all", { token_id: "0" }), + "Requires attached deposit of exactly 1 yoctoNEAR", + "Alice tried revoking all without yoctoNEAR deposit", + ], + ]); + + // // assert correctness of current approvals + await assertApprovals( + { test, store }, + [ + { token_id: "0", approved_account_id: bob.accountId, approval_id: 0 }, + { token_id: "0", approved_account_id: carol.accountId, approval_id: 3 }, + ], + "revoking all" + ); + await assertNoApprovals( + { test, store }, + [ + { token_id: "1", approved_account_id: carol.accountId }, { token_id: "1", approved_account_id: bob.accountId }, - "Bob didn't loose approval after transfer" - ); - - // // ----------------------- authorized batch_transfer ----------------------- - // // currently, only the owner of tokens may batch-transfer them - // const batchTransferCall = await bob - // .call_raw( - // store, - // "nft_batch_transfer", - // { - // token_ids: [ - // // ["1", bob.accountId], - // ["2", carol.accountId], - // ], - // }, - // { attachedDeposit: "1" } - // ) - // // FIXME::testing::medium: tokens loaned?! - // .catch(failPromiseRejection("batch transferring (approved)")); - - // assertEventLogs( - // test, - // (batchTransferCall as TransactionResult).logs, - // [ - // { - // standard: "nep171", - // version: "1.0.0", - // event: "nft_transfer", - // data: [ - // { - // authorized_id: null, - // old_owner_id: alice.accountId, - // new_owner_id: bob.accountId, - // token_ids: ["1"], - // memo: null, - // }, - // { - // authorized_id: null, - // old_owner_id: alice.accountId, - // new_owner_id: carol.accountId, - // token_ids: ["2"], - // memo: null, - // }, - // ], - // }, - // ], - // "batch transferring (approved)" - // ); - - // // await assertContractPanics(test, [ - // // // TODO::testing::low: try batch transferring without approval IDs - // // [async () => {}, " ".repeat(180), ""], - // // // TODO::testing::low: require at least one yoctoNEAR to approve - // // [async () => {}, " ".repeat(180), ""], - // // ]); - - // await assertContractTokenOwners( - // test, - // store, - // [ - // { id: "0", owner_id: carol.accountId }, - // { id: "1", owner_id: bob.accountId }, - // { id: "2", owner_id: carol.accountId }, - // { id: "3", owner_id: alice.accountId }, - // ], - // "Bad ownership state after approved batch transfer" - // ); - - // // ---------------------------- authorized burn ---------------------------- - // // currently, only the owner of a token may burn it - // const burnCall = await bob - // .call_raw( - // store, - // "nft_batch_burn", - // { token_ids: ["3"] }, - // { attachedDeposit: "1" } - // ) - // .catch(failPromiseRejection("burning (approved)")); - // assertEventLogs( - // test, - // (burnCall as TransactionResult).logs, - // [ - // { - // standard: "nep171", - // version: "1.0.0", - // event: "nft_burn", - // data: [ - // { - // owner_id: "alice.test.near", - // authorized_id: null, - // token_ids: ["4", "5"], - // memo: null, - // }, - // ], - // }, - // ], - // "burning (approved)" - // ); - - // await assertContractPanics(test, [ - // // TODO::testing::low: try approving when not owning token - // [async () => {}, " ".repeat(180), ""], - // // TODO::testing::low: require at least one yoctoNEAR to approve - // [async () => {}, " ".repeat(180), ""], - // ]); - } -); + { token_id: "2", approved_account_id: bob.accountId }, + { token_id: "3", approved_account_id: bob.accountId }, + ], + "revoking all" + ); +}); + +test("approvals::minting", async (test) => { + const { alice, bob, carol, dave, store } = test.context.accounts; + const failPromiseRejection = (msg: string) => (e: any) => { + test.log(`Promise rejected while ${msg}:`); + test.log(e); + test.fail(); + }; + + // ---------------------------- authorized mint ---------------------------- + // TODO::store::low: this increases storage, shouldn't it then require + // a sufficient deposit? -> this is not third party-territory, only the + // owner can call this + const grantMinterCall = await alice + .callRaw( + store, + "grant_minter", + { account_id: bob.accountId }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection("grant minting rights")); + + // check logs + assertEventLogs( + test, + (grantMinterCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ granted_minter: bob.accountId }), + }, + ], + "grant minting rights" + ); + + await assertContractPanics(test, [ + // only owner can grant minting rights + [ + async () => + bob.call( + store, + "grant_minter", + { account_id: bob.accountId }, + { attachedDeposit: "1" } + ), + "This method can only be called by the store owner", + "Bob tried granting himself minting rights", + ], + // require deposit + [ + async () => + alice.call(store, "grant_minter", { account_id: bob.accountId }), + "Requires attached deposit of exactly 1 yoctoNEAR", + "Alice tried to grant minting rights without yoctoNEAR deposit", + ], + ]); + + // check contract state (implicitly tests `check_is_minter`) + test.true( + await store.view("check_is_minter", { account_id: bob.accountId }), + "Failed to grant minting rights to Bob" + ); + test.false( + await store.view("check_is_minter", { account_id: carol.accountId }), + "How on earth did Carol get minting rights?" + ); + // checking the list_minters method + test.deepEqual( + await store.view("list_minters"), + [alice.accountId, bob.accountId], + "Bad minters list after granting minting rigths to Bob" + ); + + // actual minting + // TODO::store::low: shouldn't third party minting require deposits to + // cover storage costs? -> otherwise third-party minters might exhaust a + // contracts storage + const batchMintCall = await bob + .callRaw( + store, + "nft_batch_mint", + { owner_id: bob.accountId, num_to_mint: 2, metadata: {} }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection("approved minting")); + + // check logs + assertEventLogs( + test, + (batchMintCall as TransactionResult).logs, + [ + { + standard: "nep171", + version: "1.0.0", + event: "nft_mint", + data: [ + { + owner_id: bob.accountId, + token_ids: ["0", "1"], + memo: JSON.stringify({ + royalty: null, + split_owners: null, + meta_id: null, + meta_extra: null, + minter: bob.accountId, + }), + }, + ], + }, + ], + "approved minting" + ); + + // check contract state + assertContractTokenOwners( + { test, store }, + [ + { token_id: "0", owner_id: bob.accountId }, + { token_id: "1", owner_id: bob.accountId }, + ], + "approved minting" + ); + + // revoke minting rights + const revokeMinterCall = await alice + .callRaw( + store, + "revoke_minter", + { account_id: bob.accountId }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection("revoke minting rights")); + + // check logs + assertEventLogs( + test, + (revokeMinterCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ revoked_minter: bob.accountId }), + }, + ], + "approved minting" + ); + + await assertContractPanics(test, [ + // requires yoctoNEAR deposit + [ + async () => + alice.call(store, "revoke_minter", { account_id: bob.accountId }), + "Requires attached deposit of exactly 1 yoctoNEAR", + "Alice tried to revoke minting rights without yoctoNEAR deposit", + ], + // owner cannot revoke their own minting rights + [ + async () => + alice.call( + store, + "revoke_minter", + { account_id: alice.accountId }, + { attachedDeposit: "1" } + ), + "Owner cannot be removed from minters", + "Alice tried to revoke her own minting rights", + ], + ]); + + // check contract state + test.false( + await store.view("check_is_minter", { account_id: bob.accountId }), + "Failed to revoke Bob's minting rights" + ); + // checking the list_minters method + test.deepEqual( + await store.view("list_minters"), + [alice.accountId], + "Bad minters list after granting minting rights to Bob" + ); + + // batch_change_minters: add bob and carol + const batchGrantMinterCall = await alice + .callRaw( + store, + "batch_change_minters", + { grant: [bob.accountId, carol.accountId] }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection("batch grant minter rights")); + + // check logs + assertEventLogs( + test, + (batchGrantMinterCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ granted_minter: bob.accountId }), + }, + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ granted_minter: carol.accountId }), + }, + ], + "batch grant minter rights" + ); + test.deepEqual( + await store.view("list_minters"), + [alice.accountId, bob.accountId, carol.accountId], + "Bad minters list after batch granting minter rights" + ); + + // TODO: batch_change_minters: change carol to dave + const batchChangeMinterCall = await alice + .callRaw( + store, + "batch_change_minters", + { revoke: [carol.accountId], grant: [dave.accountId] }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection("batch change minter rights")); + // check logs + assertEventLogs( + test, + (batchChangeMinterCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ granted_minter: dave.accountId }), + }, + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ revoked_minter: carol.accountId }), + }, + ], + "batch change minter rights" + ); + test.deepEqual( + await store.view("list_minters"), + [alice.accountId, bob.accountId, dave.accountId], + "Bad minters list after batch changing minter rights" + ); + + // batch_change_minters: revoke bob and dave + const batchRevokeMinterCall = await alice + .callRaw( + store, + "batch_change_minters", + { revoke: [bob.accountId, dave.accountId] }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection("batch revoke minter rights")); + // check logs + assertEventLogs( + test, + (batchRevokeMinterCall as TransactionResult).logs, + [ + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ revoked_minter: bob.accountId }), + }, + { + standard: "mb_store", + version: "0.1.0", + event: "change_setting", + data: changeSettingsData({ revoked_minter: dave.accountId }), + }, + ], + "batch revoke minter rights" + ); + test.deepEqual( + await store.view("list_minters"), + [alice.accountId], + "Bad minters list after batch revoking minter rights" + ); +}); + +test("approvals::token-actions", async (test) => { + const { alice, bob, carol, store } = test.context.accounts; + + const failPromiseRejection = (msg: string) => (e: any) => { + test.log(`Promise rejected while ${msg}:`); + test.log(e); + test.fail(); + }; + + await batchMint({ owner: alice, store, num_to_mint: 5 }).catch( + failPromiseRejection("minting") + ); + + await alice + .call( + store, + "nft_batch_approve", + { + token_ids: ["0", "1", "2", "3"], + account_id: bob.accountId, + }, + { attachedDeposit: mNEAR(3.21) } // no value for this in mintbase-js + ) + .catch(failPromiseRejection("approving")); + + // -------------------------- authorized transfer -------------------------- + const transferCall = await bob + .callRaw( + store, + "nft_transfer", + { receiver_id: carol.accountId, token_id: "0", approval_id: 0 }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection("transferring (approved)")); + assertEventLogs( + test, + (transferCall as TransactionResult).logs, + [ + { + standard: "nep171", + version: "1.0.0", + event: "nft_transfer", + data: [ + { + authorized_id: null, // FIXME::store::medium: why null? + old_owner_id: alice.accountId, + new_owner_id: carol.accountId, + token_ids: ["0"], + memo: null, + }, + ], + }, + ], + "transferring (approved)" + ); + + await assertContractPanics(test, [ + // try transferring without approval ID + [ + async () => { + await bob.call( + store, + "nft_transfer", + { receiver_id: carol.accountId, token_id: "1" }, + { attachedDeposit: "1" } + ); + }, + "Disallowing approvals without approval ID", + "Bob tried transferring (approved) without approval_id", + ], + // require at least one yoctoNEAR to transfer + [ + async () => { + await bob.call(store, "nft_transfer", { + receiver_id: carol.accountId, + token_id: "1", + approval_id: 1, + }); + }, + "Requires attached deposit of exactly 1 yoctoNEAR", + "Bob tried transferring (approved) without yoctoNEAR deposit", + ], + // TODO::testing::medium workaround until fixed for not being able to + // check absence of approval + [ + async () => { + await bob.call( + store, + "nft_transfer", + { receiver_id: carol.accountId, token_id: "0", approval_id: 0 }, + { attachedDeposit: "1" } + ); + }, + `${bob.accountId} has no approval for token 0`, + "Bob tried transferring without having approval", + ], + ]); + + // token must now belong to carol + await assertContractTokenOwners( + { test, store }, + [ + { token_id: "0", owner_id: carol.accountId }, + { token_id: "1", owner_id: alice.accountId }, + { token_id: "2", owner_id: alice.accountId }, + { token_id: "3", owner_id: alice.accountId }, + ], + "Bad ownership state after approved transfer" + ); + // approval must have cleared -> FIXME: cannot check properly, because API is broken + assertNoApproval( + { test, store }, + { token_id: "1", approved_account_id: bob.accountId }, + "Bob didn't loose approval after transfer" + ); +}); diff --git a/testing/__tests__/nft.core.ava.ts b/testing/__tests__/nft.core.ava.ts index 36de455..bf26e4f 100644 --- a/testing/__tests__/nft.core.ava.ts +++ b/testing/__tests__/nft.core.ava.ts @@ -1,386 +1,406 @@ -import { TransactionResult } from "near-workspaces-ava"; +import { TransactionResult } from "near-workspaces"; +import avaTest from "ava"; import { assertContractPanics, - FACTORY_WORKSPACE, DEPLOY_STORE_RENT, DEPLOY_STORE_GAS, assertContractTokenOwners, assertEventLogs, failPromiseRejection, -} from "./test-utils"; + Tgas, +} from "./utils/index.js"; +import { setup } from "./setup.js"; -FACTORY_WORKSPACE.test( - "core", - async (test, { root, factory, alice, bob, carol }) => { - // const failPromiseRejection = (msg: string) => (e: any) => { - // test.log(`Promise rejected while ${msg}:`); - // test.log(e); - // test.fail(); - // }; +const test = setup(avaTest); - // store creation - await alice - .call( - factory, - "create_store", - { - owner_id: alice.accountId, - metadata: { - spec: "nft-1.0.0", - name: "alice", - symbol: "ALICE", - }, +test("core", async (test) => { + const { factory, store, alice, bob, carol } = test.context.accounts; + + // store creation + await bob + .call( + factory, + "create_store", + { + owner_id: alice.accountId, + metadata: { + spec: "nft-1.0.0", + name: "bob", + symbol: "BOB", }, - { attachedDeposit: DEPLOY_STORE_RENT, gas: DEPLOY_STORE_GAS } - ) - .catch(failPromiseRejection(test, "creating store")); - const store = root.getFullAccount(`alice.${factory.accountId}`); - // TODO::testing::medium: check event logs + }, + { attachedDeposit: DEPLOY_STORE_RENT, gas: DEPLOY_STORE_GAS } + ) + .catch(failPromiseRejection(test, "creating store")); + // const store = root.getAccount(`bob.${factory.accountId}`); + // TODO::testing::medium: check event logs - // TODO::testing::medium trying deployment with forbidden names - // - reserved names: "market", "loan" - // - taken names, in this case "alice" + // TODO::testing::medium trying deployment with forbidden names + // - reserved names: "market", "loan" + // - taken names, in this case "alice" - // minting - const mintCall = await alice - .call_raw( - store, - "nft_batch_mint", - { owner_id: alice.accountId, metadata: {}, num_to_mint: 6 }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection(test, "minting")); + // minting + const mintCall = await alice + .callRaw( + store, + "nft_batch_mint", + { owner_id: alice.accountId, metadata: {}, num_to_mint: 6 }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "minting")); - // check minting logs - assertEventLogs( - test, - (mintCall as TransactionResult).logs, - [ - { - standard: "nep171", - version: "1.0.0", - event: "nft_mint", - data: [ - { - owner_id: "alice.test.near", - token_ids: ["0", "1", "2", "3", "4", "5"], - // memo should be a string, as it's standardized like that! - memo: JSON.stringify({ - royalty: null, - split_owners: null, - meta_id: null, - meta_extra: null, - minter: alice.accountId, - }), - }, - ], - }, - ], - "minting" - ); + // check minting logs + assertEventLogs( + test, + (mintCall as TransactionResult).logs, + [ + { + standard: "nep171", + version: "1.0.0", + event: "nft_mint", + data: [ + { + owner_id: "alice.test.near", + token_ids: ["0", "1", "2", "3", "4", "5"], + // memo should be a string, as it's standardized like that! + memo: JSON.stringify({ + royalty: null, + split_owners: null, + meta_id: null, + meta_extra: null, + minter: alice.accountId, + }), + }, + ], + }, + ], + "minting" + ); - // inspecting minted tokens (implicitly tests `nft_token`) - await assertContractTokenOwners( - { test, store }, - [ - { token_id: "0", owner_id: alice.accountId }, - { token_id: "1", owner_id: alice.accountId }, - { token_id: "2", owner_id: alice.accountId }, - { token_id: "3", owner_id: alice.accountId }, - { token_id: "4", owner_id: alice.accountId }, - { token_id: "5", owner_id: alice.accountId }, - ], - "After minting" - ).catch(failPromiseRejection(test, "checking token format")); + // inspecting minted tokens (implicitly tests `nft_token`) + await assertContractTokenOwners( + { test, store }, + [ + { token_id: "0", owner_id: alice.accountId }, + { token_id: "1", owner_id: alice.accountId }, + { token_id: "2", owner_id: alice.accountId }, + { token_id: "3", owner_id: alice.accountId }, + { token_id: "4", owner_id: alice.accountId }, + { token_id: "5", owner_id: alice.accountId }, + ], + "After minting" + ).catch(failPromiseRejection(test, "checking token format")); - await assertContractPanics(test, [ - // try to mint while not being minter - [ - async () => { - await bob.call( - store, - "nft_batch_mint", - { owner_id: bob.accountId, metadata: {}, num_to_mint: 1 }, - { attachedDeposit: "1" } - ); - }, - `${bob.accountId} is not allowed to mint on this store`, - "Bob tried minting without minter permission", - ], - // try minting without yoctoNEAR deposit - [ - async () => { - await alice.call(store, "nft_batch_mint", { - owner_id: alice.accountId, - metadata: {}, - num_to_mint: 1, - }); - }, - "Requires deposit of at least 1 yoctoNEAR", - "Alice tried minting without yoctoNEAR deposit", - ], - ]); + await assertContractPanics(test, [ + // try to mint while not being minter + [ + async () => { + await bob.call( + store, + "nft_batch_mint", + { owner_id: bob.accountId, metadata: {}, num_to_mint: 1 }, + { attachedDeposit: "1" } + ); + }, + `${bob.accountId} is not allowed to mint on this store`, + "Bob tried minting without minter permission", + ], + // try minting without yoctoNEAR deposit + [ + async () => { + await alice.call(store, "nft_batch_mint", { + owner_id: alice.accountId, + metadata: {}, + num_to_mint: 1, + }); + }, + "Requires deposit of at least 1 yoctoNEAR", + "Alice tried minting without yoctoNEAR deposit", + ], + ]); - // transfering a single token - const transferCall = await alice - .call_raw( - store, - "nft_transfer", - { receiver_id: bob.accountId, token_id: "0" }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection(test, "transferring")); + // transfering a single token + const transferCall = await alice + .callRaw( + store, + "nft_transfer", + { receiver_id: bob.accountId, token_id: "0" }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "transferring")); - // check transfer logs - assertEventLogs( - test, - (transferCall as TransactionResult).logs, - [ - { - standard: "nep171", - version: "1.0.0", - event: "nft_transfer", - data: [ - { - authorized_id: null, - old_owner_id: "alice.test.near", - new_owner_id: "bob.test.near", - token_ids: ["0"], - memo: null, - }, - ], - }, - ], - "transferring" - ); + // check transfer logs + assertEventLogs( + test, + (transferCall as TransactionResult).logs, + [ + { + standard: "nep171", + version: "1.0.0", + event: "nft_transfer", + data: [ + { + authorized_id: null, + old_owner_id: "alice.test.near", + new_owner_id: "bob.test.near", + token_ids: ["0"], + memo: null, + }, + ], + }, + ], + "transferring" + ); - await assertContractPanics(test, [ - // try to transfer unowned token (random bob) - [ - async () => { - await bob.call( - store, - "nft_transfer", - { receiver_id: bob.accountId, token_id: "1" }, - { attachedDeposit: "1" } - ); - }, - "Disallowing approvals without approval ID", - "Bob tried to transfer an unowned token", - ], - // try to transfer unowned token (store owner) - [ - async () => { - await alice.call( - store, - "nft_transfer", - { receiver_id: alice.accountId, token_id: "0" }, - { attachedDeposit: "1" } - ); - }, - "Disallowing approvals without approval ID", - "Alice tried to transfer an unowned token", - ], - ]); + await assertContractPanics(test, [ + // try to transfer unowned token (random bob) + [ + async () => { + await bob.call( + store, + "nft_transfer", + { receiver_id: bob.accountId, token_id: "1" }, + { attachedDeposit: "1" } + ); + }, + "Disallowing approvals without approval ID", + "Bob tried to transfer an unowned token", + ], + // try to transfer unowned token (store owner) + [ + async () => { + await alice.call( + store, + "nft_transfer", + { receiver_id: alice.accountId, token_id: "0" }, + { attachedDeposit: "1" } + ); + }, + "Disallowing approvals without approval ID", + "Alice tried to transfer an unowned token", + ], + ]); - // batch transfering tokens - const batchTransferCall = await alice - .call_raw( - store, - "nft_batch_transfer", - // TODO::contracts::low: undescriptive param name - // TODO::contracts::low: why is this a tuple whereas `nft_transfer` is - // a record? - // TODO::contracts::low: missing memo parameter? - { - token_ids: [ - ["1", bob.accountId], - ["2", carol.accountId], - ], - }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection(test, "batch transferring")); + // batch transfering tokens + const batchTransferCall = await alice + .callRaw( + store, + "nft_batch_transfer", + // TODO::contracts::low: undescriptive param name + // TODO::contracts::low: why is this a tuple whereas `nft_transfer` is + // a record? + // TODO::contracts::low: missing memo parameter? + { + token_ids: [ + ["1", bob.accountId], + ["2", carol.accountId], + ], + }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "batch transferring")); - // check transfer logs - // TODO::contracts::low: should empty fields be serialized as null or - // simply omitted? -> null might make sense for the indexer - // TODO::testing::low: assert event when batch transferring two to the same - // address - assertEventLogs( - test, - (batchTransferCall as TransactionResult).logs, - [ - { - standard: "nep171", - version: "1.0.0", - event: "nft_transfer", - data: [ - { - authorized_id: null, - old_owner_id: "alice.test.near", - new_owner_id: "bob.test.near", - token_ids: ["1"], - memo: null, - }, - { - authorized_id: null, - old_owner_id: "alice.test.near", - new_owner_id: "carol.test.near", - token_ids: ["2"], - memo: null, - }, - ], - }, - ], - "batch transferring" - ); + // check transfer logs + // TODO::contracts::low: should empty fields be serialized as null or + // simply omitted? -> null might make sense for the indexer + // TODO::testing::low: assert event when batch transferring two to the same + // address + assertEventLogs( + test, + (batchTransferCall as TransactionResult).logs, + [ + { + standard: "nep171", + version: "1.0.0", + event: "nft_transfer", + data: [ + { + authorized_id: null, + old_owner_id: "alice.test.near", + new_owner_id: "bob.test.near", + token_ids: ["1"], + memo: null, + }, + { + authorized_id: null, + old_owner_id: "alice.test.near", + new_owner_id: "carol.test.near", + token_ids: ["2"], + memo: null, + }, + ], + }, + ], + "batch transferring" + ); - await assertContractPanics(test, [ - // try to batch transfer unowned tokens (random bob) - [ - async () => { - await bob.call( - store, - "nft_batch_transfer", - { - token_ids: [ - ["1", carol.accountId], - ["2", bob.accountId], - ], - }, - { attachedDeposit: "1" } - ); - }, - `${bob.accountId} is required to own token 2`, - "Bob tried to batch transfer unowned tokens", - ], - // try to batch transfer unowned tokens (store owner) - [ - async () => { - await alice.call( - store, - "nft_batch_transfer", - { - token_ids: [ - ["0", alice.accountId], - ["1", alice.accountId], - ], - }, - { attachedDeposit: "1" } - ); - }, - `${alice.accountId} is required to own token 0`, - "Alice tried to batch transfer unowned tokens", - ], - // try to batch transfer without yoctoNEAR deposit - [ - async () => { - await alice.call(store, "nft_batch_transfer", { + await assertContractPanics(test, [ + // try to batch transfer unowned tokens (random bob) + [ + async () => { + await bob.call( + store, + "nft_batch_transfer", + { + token_ids: [ + ["1", carol.accountId], + ["2", bob.accountId], + ], + }, + { attachedDeposit: "1" } + ); + }, + `${bob.accountId} is required to own token 2`, + "Bob tried to batch transfer unowned tokens", + ], + // try to batch transfer unowned tokens (store owner) + [ + async () => { + await alice.call( + store, + "nft_batch_transfer", + { token_ids: [ ["0", alice.accountId], ["1", alice.accountId], ], - }); - }, - "Requires attached deposit of exactly 1 yoctoNEAR", - "Alice tried to batch transfer tokens without yoctoNEAR deposit", - ], - ]); + }, + { attachedDeposit: "1" } + ); + }, + `${alice.accountId} is required to own token 0`, + "Alice tried to batch transfer unowned tokens", + ], + // try to batch transfer without yoctoNEAR deposit + [ + async () => { + await alice.call(store, "nft_batch_transfer", { + token_ids: [ + ["0", alice.accountId], + ["1", alice.accountId], + ], + }); + }, + "Requires attached deposit of exactly 1 yoctoNEAR", + "Alice tried to batch transfer tokens without yoctoNEAR deposit", + ], + ]); - // checking token ownership - await assertContractTokenOwners( - { test, store }, - [ - { token_id: "0", owner_id: bob.accountId }, - { token_id: "1", owner_id: bob.accountId }, - { token_id: "2", owner_id: carol.accountId }, - { token_id: "3", owner_id: alice.accountId }, - { token_id: "4", owner_id: alice.accountId }, - { token_id: "5", owner_id: alice.accountId }, - ], - "After transfers" - ).catch(failPromiseRejection(test, "checking token ownership")); + // checking token ownership + await assertContractTokenOwners( + { test, store }, + [ + { token_id: "0", owner_id: bob.accountId }, + { token_id: "1", owner_id: bob.accountId }, + { token_id: "2", owner_id: carol.accountId }, + { token_id: "3", owner_id: alice.accountId }, + { token_id: "4", owner_id: alice.accountId }, + { token_id: "5", owner_id: alice.accountId }, + ], + "After transfers" + ).catch(failPromiseRejection(test, "checking token ownership")); - // burning tokens - const burnCall = await alice - .call_raw( - store, - "nft_batch_burn", - { token_ids: ["4", "5"] }, - { attachedDeposit: "1" } - ) - .catch(failPromiseRejection(test, "burning")); + // burning tokens + const burnCall = await alice + .callRaw( + store, + "nft_batch_burn", + { token_ids: ["4", "5"] }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "burning")); - // check burn logs - assertEventLogs( - test, - (burnCall as TransactionResult).logs, - [ - { - standard: "nep171", - version: "1.0.0", - event: "nft_burn", - data: [ - { - owner_id: "alice.test.near", - authorized_id: null, - token_ids: ["4", "5"], - memo: null, - }, - ], - }, - ], - "burning" - ); + // check burn logs + assertEventLogs( + test, + (burnCall as TransactionResult).logs, + [ + { + standard: "nep171", + version: "1.0.0", + event: "nft_burn", + data: [ + { + owner_id: "alice.test.near", + authorized_id: null, + token_ids: ["4", "5"], + memo: null, + }, + ], + }, + ], + "burning" + ); - await assertContractPanics(test, [ - // try to burn unowned tokens (random bob) - [ - async () => { - await bob.call( - store, - "nft_batch_burn", - { token_ids: ["1", "2"] }, - { attachedDeposit: "1" } - ); - }, - `${bob.accountId} is required to own token 2`, - "Bob tried to burn unowned tokens", - ], - // try to burn unowned tokens (store owner) - [ - async () => { - await alice.call( - store, - "nft_batch_burn", - { token_ids: ["0"] }, - { attachedDeposit: "1" } - ); - }, - `${alice.accountId} is required to own token 0`, - "Alice tried to burn unowned tokens", - ], - // try to burn tokens without deposit - [ - async () => { - await alice.call(store, "nft_batch_burn", { - token_ids: ["3"], - }); - }, - "Requires attached deposit of exactly 1 yoctoNEAR", - "Alice tried to burn tokens without yoctoNEAR deposit", - ], - // TODO: figure out if alice is still token owner - // TODO::testing::medium: can no longer transfer burned token - // TODO::testing::medium: cannot burn token twice - ]); + await assertContractPanics(test, [ + // try to burn unowned tokens (random bob) + [ + async () => { + await bob.call( + store, + "nft_batch_burn", + { token_ids: ["1", "2"] }, + { attachedDeposit: "1" } + ); + }, + `${bob.accountId} is required to own token 2`, + "Bob tried to burn unowned tokens", + ], + // try to burn unowned tokens (store owner) + [ + async () => { + await alice.call( + store, + "nft_batch_burn", + { token_ids: ["0"] }, + { attachedDeposit: "1" } + ); + }, + `${alice.accountId} is required to own token 0`, + "Alice tried to burn unowned tokens", + ], + // try to burn tokens without deposit + [ + async () => { + await alice.call(store, "nft_batch_burn", { + token_ids: ["3"], + }); + }, + "Requires attached deposit of exactly 1 yoctoNEAR", + "Alice tried to burn tokens without yoctoNEAR deposit", + ], + // TODO: figure out if alice is still token owner + // TODO::testing::medium: can no longer transfer burned token + // TODO::testing::medium: cannot burn token twice + ]); + + // TODO::testing::low: transfer store ownership + // TODO::testing::low: try to transfer store ownership (random bob) + // TODO::testing::low: try to transfer store ownership without yN deposit + + // TODO::testing::low: try to undeploy contract (random bob) + // TODO::testing::low: undeploy contract (store owner) +}); + +test("batch-mint", async (test) => { + const { alice, store } = test.context.accounts; - // TODO::testing::low: transfer store ownership - // TODO::testing::low: try to transfer store ownership (random bob) - // TODO::testing::low: try to transfer store ownership without yN deposit + const mintCall = await alice.callRaw( + store, + "nft_batch_mint", + { + owner_id: alice.accountId, + metadata: { + reference: "x".repeat(43), // 43 chars hash, would be 63 with arweave base URI included + media: "x".repeat(43), + starts_at: "1672531200000000000", + expires_at: "1672531200000000000", + }, + num_to_mint: 125, + }, + { attachedDeposit: "1", gas: Tgas(225) } + ); - // TODO::testing::low: try to undeploy contract (random bob) - // TODO::testing::low: undeploy contract (store owner) - } -); + // @ts-ignore + test.is(typeof mintCall.status.SuccessValue, "string"); +}); diff --git a/testing/__tests__/nft.enumeration.ava.ts b/testing/__tests__/nft.enumeration.ava.ts index 6fbeea8..5d6958c 100644 --- a/testing/__tests__/nft.enumeration.ava.ts +++ b/testing/__tests__/nft.enumeration.ava.ts @@ -1,6 +1,12 @@ -import { STORE_WORKSPACE, assertTokensAre, batchMint } from "./test-utils"; +import avaTest from "ava"; +import { assertTokensAre, batchMint } from "./utils/index.js"; +import { setup } from "./setup.js"; + +const test = setup(avaTest); + +test("enumeration", async (test) => { + const { alice, bob, store } = test.context.accounts; -STORE_WORKSPACE.test("enumeration", async (test, { alice, bob, store }) => { const failPromiseRejection = (msg: string) => (e: any) => { test.log(`Promise rejected while ${msg}:`); test.log(e); @@ -136,7 +142,3 @@ STORE_WORKSPACE.test("enumeration", async (test, { alice, bob, store }) => { "`nft_tokens_for_owner({})` output is wrong after burning" ); }); - -// TODO: -// - [] test `nft_tokens_for_owner_set`, but only after syncing back wether it -// is used e.g. in mintbase-js, otherwise make it private diff --git a/testing/__tests__/nft.metadata.ava.ts b/testing/__tests__/nft.metadata.ava.ts index 124ee14..0e319a8 100644 --- a/testing/__tests__/nft.metadata.ava.ts +++ b/testing/__tests__/nft.metadata.ava.ts @@ -1,6 +1,11 @@ -import { batchMint, failPromiseRejection, STORE_WORKSPACE } from "./test-utils"; +import avaTest from "ava"; +import { failPromiseRejection } from "./utils/index.js"; +import { setup } from "./setup.js"; -STORE_WORKSPACE.test("metadata", async (test, { alice, store }) => { +const test = setup(avaTest); + +test("metadata", async (test) => { + const { alice, store } = test.context.accounts; test.deepEqual(await store.view("nft_metadata"), { base_uri: null, icon: null, @@ -24,8 +29,8 @@ STORE_WORKSPACE.test("metadata", async (test, { alice, store }) => { reference_hash: "cmVmZXJlbmNl", media: "media", media_hash: "bWVkaWE=", - starts_at: "2022-02-02T02:02:02Z+02", - expires_at: "3033-03-03T03:03:03Z+03", + starts_at: "1672531200000000000", + expires_at: "1672531200000000000", extra: "No more extras for you!", }, num_to_mint: 2, @@ -42,8 +47,8 @@ STORE_WORKSPACE.test("metadata", async (test, { alice, store }) => { reference_hash: "cmVmZXJlbmNl", media: "media", media_hash: "bWVkaWE=", - starts_at: "2022-02-02T02:02:02Z+02", - expires_at: "3033-03-03T03:03:03Z+03", + starts_at: "1672531200000000000", + expires_at: "1672531200000000000", extra: "No more extras for you!", }); diff --git a/testing/__tests__/nft.payout.ava.ts b/testing/__tests__/nft.payout.ava.ts new file mode 100644 index 0000000..2dfdf05 --- /dev/null +++ b/testing/__tests__/nft.payout.ava.ts @@ -0,0 +1,236 @@ +import avaTest from "ava"; +import { failPromiseRejection } from "./utils/index.js"; +import { setup } from "./setup.js"; + +const test = setup(avaTest); + +test("payout::splits", async (test) => { + const { alice, store } = test.context.accounts; + + const split_owners = (() => { + const o: Record = {}; + o["a.near"] = 6000; + o["b.near"] = 4000; + return o; + })(); + + await alice + .call( + store, + "nft_batch_mint", + { + owner_id: alice.accountId, + metadata: {}, + num_to_mint: 1, + split_owners, + }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "minting")); + + const payout = (() => { + const p: Record = {}; + p["a.near"] = "6000000000000000"; + p["b.near"] = "4000000000000000"; + return p; + })(); + test.deepEqual( + await store.view("nft_payout", { + token_id: "0", + balance: "10000000000000000", + }), + { payout } + ); +}); + +test("payout::royalties", async (test) => { + const { alice, store } = test.context.accounts; + + const split_between = (() => { + const o: Record = {}; + o["a.near"] = 5000; + o["b.near"] = 5000; + return o; + })(); + + await alice + .call( + store, + "nft_batch_mint", + { + owner_id: alice.accountId, + metadata: {}, + num_to_mint: 1, + royalty_args: { split_between, percentage: 4000 }, + }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "minting")); + + const payout = (() => { + const p: Record = {}; + p["a.near"] = "2000000000000000"; + p["b.near"] = "2000000000000000"; + p[alice.accountId] = "6000000000000000"; + return p; + })(); + test.deepEqual( + await store.view("nft_payout", { + token_id: "0", + balance: "10000000000000000", + }), + { payout } + ); +}); + +test("payout::royalties_splits", async (test) => { + const { alice, store } = test.context.accounts; + + const split_between = (() => { + const o: Record = {}; + o["a.near"] = 7500; + o["b.near"] = 2500; + return o; + })(); + + const split_owners = (() => { + const o: Record = {}; + o["c.near"] = 7500; + o["d.near"] = 2500; + return o; + })(); + + await alice + .call( + store, + "nft_batch_mint", + { + owner_id: alice.accountId, + metadata: {}, + num_to_mint: 1, + royalty_args: { split_between, percentage: 2000 }, + split_owners, + }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "minting")); + + const payout = (() => { + const p: Record = {}; + p["a.near"] = "1500000000000000"; + p["b.near"] = "500000000000000"; + p["c.near"] = "6000000000000000"; + p["d.near"] = "2000000000000000"; + return p; + })(); + test.deepEqual( + await store.view("nft_payout", { + token_id: "0", + balance: "10000000000000000", + }), + { payout } + ); +}); + +test("payout::low_balance", async (test) => { + const { alice, store } = test.context.accounts; + + const split_owners = (() => { + const o: Record = {}; + o["a.near"] = 6000; + o["b.near"] = 4000; + return o; + })(); + + await alice + .call( + store, + "nft_batch_mint", + { + owner_id: alice.accountId, + metadata: {}, + num_to_mint: 1, + split_owners, + }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "minting")); + + const payout = (() => { + const p: Record = {}; + p["a.near"] = "6000"; + p["b.near"] = "4000"; + return p; + })(); + test.deepEqual( + await store.view("nft_payout", { + token_id: "0", + balance: "10000", + }), + { payout } + ); +}); + +// FIXME: doesn't work +test("payout::max_len", async (test) => { + const { alice, store } = test.context.accounts; + + const split_owners = (() => { + const o: Record = {}; + o["a.near"] = 1000; + o["b.near"] = 950; + o["c.near"] = 900; + o["d.near"] = 850; + o["e.near"] = 800; + o["f.near"] = 750; + o["g.near"] = 700; + o["h.near"] = 650; + o["i.near"] = 600; + o["j.near"] = 550; + o["k.near"] = 500; + o["l.near"] = 450; + o["m.near"] = 400; + o["n.near"] = 350; + o["o.near"] = 300; + o["p.near"] = 250; + return o; + })(); + + await alice + .call( + store, + "nft_batch_mint", + { + owner_id: alice.accountId, + metadata: {}, + num_to_mint: 1, + split_owners, + }, + { attachedDeposit: "1" } + ) + .catch(failPromiseRejection(test, "minting")); + + // FIXME: should work with lower number + const payout = (() => { + const p: Record = {}; + p["a.near"] = "1000000000000000"; + p["b.near"] = "950000000000000"; + p["c.near"] = "900000000000000"; + p["d.near"] = "850000000000000"; + p["e.near"] = "800000000000000"; + p["f.near"] = "750000000000000"; + p["g.near"] = "700000000000000"; + p["h.near"] = "650000000000000"; + p["i.near"] = "600000000000000"; + p["j.near"] = "550000000000000"; + return p; + })(); + test.deepEqual( + await store.view("nft_payout", { + token_id: "0", + balance: "10000000000000000", + max_len_payout: 10, + }), + { payout } + ); +}); diff --git a/testing/__tests__/nft.upgrade.ava.ts b/testing/__tests__/nft.upgrade.ava.ts index da4d67b..8135966 100644 --- a/testing/__tests__/nft.upgrade.ava.ts +++ b/testing/__tests__/nft.upgrade.ava.ts @@ -1,47 +1,50 @@ -import { Workspace, NearAccount } from "near-workspaces-ava"; +import { NearAccount } from "near-workspaces"; +import avaTest from "ava"; import { batchMint, - createAccounts, downloadContracts, failPromiseRejection, mNEAR, NEAR, Tgas, -} from "./test-utils"; +} from "./utils/index.js"; +import { readFile } from "fs/promises"; -Workspace.init().test("upgrade::mainnet", async (test, { root }) => { +import { setup, createAndDeploy } from "./setup.js"; + +const test = setup(avaTest); + +test("upgrade::mainnet", async (test) => { + const { root, alice } = test.context.accounts; // download current contracts from blockchain await downloadContracts(); - // create accounts - const [alice] = await createAccounts(root); - // deploy old factory + store + market - const factory = await root.createAndDeploy( - "factory", - "./downloads/mainnet-factory.wasm", - { method: "new", args: {} } - ); - const store = await root.createAndDeploy( - "store", - "./downloads/mainnet-store.wasm", - { - method: "new", - args: { - owner_id: alice.accountId, - metadata: { - spec: "nft-1.0.0", - name: "store", - symbol: "ALICE", - }, + const factory = await createAndDeploy(root, "f", { + initialBalanceNear: "10", + codePath: "./downloads/mainnet-factory.wasm", + initMethod: "new", + initArgs: {}, + }); + const store = await createAndDeploy(root, "s", { + initialBalanceNear: "10", + codePath: "./downloads/mainnet-store.wasm", + initMethod: "new", + initArgs: { + owner_id: alice.accountId, + metadata: { + spec: "nft-1.0.0", + name: "store", + symbol: "ALICE", }, - } - ); - const market = await root.createAndDeploy( - "market", - "./downloads/mainnet-market.wasm", - { method: "new", args: { init_allowlist: [] } } - ); + }, + }); + const market = await createAndDeploy(root, "m", { + initialBalanceNear: "10", + codePath: "./downloads/mainnet-market.wasm", + initMethod: "new", + initArgs: { init_allowlist: [] }, + }); const accounts = { root, @@ -110,13 +113,13 @@ interface Accounts { } async function createState(accounts: Accounts): Promise { - const { root, alice, store, market, factory } = accounts; + const { root, alice, store, market } = accounts; // mint some tokens await batchMint({ owner: alice, store, num_to_mint: 2 }); // set allowlist on market - await root.call( + await market.call( market, "update_allowlist", { account_id: root.accountId, state: true }, @@ -173,8 +176,13 @@ async function queryState(accounts: Accounts): Promise { } async function updateContract(contract: NearAccount, what: string) { - const tx = await contract - .createTransaction(contract) - .deployContractFile(`../wasm/${what}.wasm`); - await tx.signAndSend(); + const wasmPath = `../wasm/${what}.wasm`; + const wasmBlob = await readFile(wasmPath); + await contract.deploy(wasmBlob); } +// async function updateContract(contract: NearAccount, what: string) { +// const tx = await contract +// .createTransaction(contract) +// .deployContractFile(`../wasm/${what}.wasm`); +// await tx.signAndSend(); +// } diff --git a/testing/__tests__/setup.ts b/testing/__tests__/setup.ts new file mode 100644 index 0000000..6ae8827 --- /dev/null +++ b/testing/__tests__/setup.ts @@ -0,0 +1,130 @@ +import { TestFn } from "ava"; +import { Worker, NearAccount } from "near-workspaces"; +import * as nearAPI from "near-api-js"; +import { DEPLOY_STORE_RENT, DEPLOY_STORE_GAS } from "./utils/balances.js"; + +const createSubaccount = async ( + root: NearAccount, + name: string, + { initialBalanceNear }: { initialBalanceNear: string } +): Promise => + root.createAccount(`${name}.${root.accountId}`, { + initialBalance: nearAPI.utils.format.parseNearAmount( + initialBalanceNear + ) as string, + }); + +export const createAndDeploy = async ( + root: NearAccount, + name: string, + args: { + initialBalanceNear: string; + codePath: string; + initMethod: string; + initArgs: any; + } +): Promise => { + const { codePath, initMethod, initArgs } = args; + const account = await createSubaccount(root, name, args); + await account.deploy(codePath); + await account.call(account, initMethod, initArgs); + return account; +}; + +export const deployStore = async ({ + factory, + owner, + name, +}: { + factory: NearAccount; + owner: NearAccount; + name: string; +}): Promise => { + await owner.call( + factory, + "create_store", + { + owner_id: owner.accountId, + metadata: { + spec: "nft-1.0.0", + name, + symbol: "ALICE", + }, + }, + { attachedDeposit: DEPLOY_STORE_RENT, gas: DEPLOY_STORE_GAS } + ); + return factory.getAccount(`${name}.${factory.accountId}`); +}; + +type TestContext = { + worker: Worker; + accounts: Record; +}; + +export const setup = (test: TestFn): TestFn => { + test.beforeEach(async (t) => { + const worker = await Worker.init(); + const root = worker.rootAccount; + const alice = await createSubaccount(root, "alice", { + initialBalanceNear: "20", + }); + const bob = await createSubaccount(root, "bob", { + initialBalanceNear: "20", + }); + const carol = await createSubaccount(root, "carol", { + initialBalanceNear: "20", + }); + const dave = await createSubaccount(root, "dave", { + initialBalanceNear: "20", + }); + + const factory = await createAndDeploy(root, "factory", { + initialBalanceNear: "10", + codePath: "../wasm/factory.wasm", + initMethod: "new", + initArgs: {}, + }); + // const store = await createAndDeploy(root, "store", { + // initialBalanceNear: "10", + // codePath: "../wasm/store.wasm", + // initMethod: "new", + // initArgs: { + // owner_id: root, + // metadata: { + // spec: "nft-1.0.0", + // name: `store.${root}`, + // symbol: "STORE", + // }, + // }, + // }); + const market = await createAndDeploy(root, "market", { + initialBalanceNear: "10", + codePath: "../wasm/market.wasm", + initMethod: "new", + initArgs: { init_allowlist: [] }, + }); + + const store = await deployStore({ owner: alice, factory, name: "alice" }); + + (t.context as TestContext).worker = worker; + (t.context as TestContext).accounts = { + root, + alice, + bob, + carol, + dave, + factory, + store, + market, + }; + }); + + test.afterEach(async (t) => { + await (t.context as TestContext).worker.tearDown().catch((e) => { + console.log("Failed to tear down the worker:", e); + }); + }); + + return test as TestFn; +}; +export default setup; diff --git a/testing/__tests__/test-utils/workspaces.ts b/testing/__tests__/test-utils/workspaces.ts deleted file mode 100644 index 548bbf0..0000000 --- a/testing/__tests__/test-utils/workspaces.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { NearAccount, Workspace } from "near-workspaces-ava"; -import { NEAR, DEPLOY_STORE_RENT, DEPLOY_STORE_GAS } from "./balances"; - -export async function createAccounts( - root: NearAccount -): Promise { - // const alice = await root.createAccount("alice", { initialBalance: NEAR(20) }); - // const bob = await root.createAccount("bob", { initialBalance: NEAR(20) }); - // const carol = await root.createAccount("carol", { initialBalance: NEAR(20) }); - // return [alice, bob, carol]; - return Promise.all([ - root.createAccount("alice", { initialBalance: NEAR(20).toString() }), - root.createAccount("bob", { initialBalance: NEAR(20).toString() }), - root.createAccount("carol", { initialBalance: NEAR(20).toString() }), - root.createAccount("dave", { initialBalance: NEAR(20).toString() }), - ]); -} - -/** deploys the factory to a subaccount `factory` of `root` */ -export async function deployFactory(root: NearAccount): Promise { - return root.createAndDeploy( - "factory", // subaccount name - "../wasm/factory.wasm", // path to wasm - { method: "new", args: {} } - ); -} - -/** deploys the market to a subaccount `market` of `root` */ -export async function deployMarket(root: NearAccount): Promise { - return root.createAndDeploy( - "market", // subaccount name - "../wasm/market.wasm", // path to wasm - { method: "new", args: { init_allowlist: [] } } - ); -} - -/** - * deploys the store to a subaccount `name` of `factory`, setting the store - * owner to `owner` - */ -export async function deployStore({ - factory, - owner, - name, -}: { - factory: NearAccount; - owner: NearAccount; - name: string; -}): Promise { - await owner.call( - factory, - "create_store", - { - owner_id: owner.accountId, - metadata: { - spec: "nft-1.0.0", - name, - symbol: "ALICE", - }, - }, - { attachedDeposit: DEPLOY_STORE_RENT, gas: DEPLOY_STORE_GAS } - ); - return factory.getFullAccount(`${name}.${factory.accountId}`); -} - -/** A workspace with the factory deployed by root, no store deployed */ -export const FACTORY_WORKSPACE = Workspace.init(async ({ root }) => { - const [alice, bob, carol, dave] = await createAccounts(root); - - const factory = await deployFactory(root); - - return { alice, bob, carol, dave, factory }; -}); - -/** A workspace with the factory deployed by root, store deployed by Alice */ -export const STORE_WORKSPACE = Workspace.init(async ({ root }) => { - const [alice, bob, carol, dave] = await createAccounts(root); - - const factory = await deployFactory(root); - const store = await deployStore({ factory, owner: alice, name: "alice" }); - - return { alice, bob, carol, dave, factory, store }; -}); - -/** - * A workspace with the factory and market deployed by root, - * store deployed by Alice - */ -export const MARKET_WORKSPACE = Workspace.init(async ({ root }) => { - const [alice, bob, carol, dave] = await createAccounts(root); - - const factory = await deployFactory(root); - const store = await deployStore({ factory, owner: alice, name: "alice" }); - const market = await deployMarket(root); - - return { alice, bob, carol, dave, factory, store, market }; -}); diff --git a/testing/__tests__/test-utils/approvals.ts b/testing/__tests__/utils/approvals.ts similarity index 97% rename from testing/__tests__/test-utils/approvals.ts rename to testing/__tests__/utils/approvals.ts index 23e1a81..9c6c0cd 100644 --- a/testing/__tests__/test-utils/approvals.ts +++ b/testing/__tests__/utils/approvals.ts @@ -1,4 +1,4 @@ -import { NearAccount } from "near-workspaces-ava"; +import { NearAccount } from "near-workspaces"; import { ExecutionContext } from "ava"; interface ApprovalSpec { diff --git a/testing/__tests__/test-utils/balances.ts b/testing/__tests__/utils/balances.ts similarity index 71% rename from testing/__tests__/test-utils/balances.ts rename to testing/__tests__/utils/balances.ts index f466d7d..5eb6e18 100644 --- a/testing/__tests__/test-utils/balances.ts +++ b/testing/__tests__/utils/balances.ts @@ -1,5 +1,5 @@ -import { Gas, BN, NearAccount } from "near-workspaces-ava"; -import * as ava from "near-workspaces-ava"; +import { Gas, BN, NearAccount } from "near-workspaces"; +import * as nearWs from "near-workspaces"; import { ExecutionContext } from "ava"; // TODO: move from this format to `ava.NEAR.parse` @@ -8,40 +8,40 @@ import { ExecutionContext } from "ava"; * Interprets a float as NEAR and builds the corresponding string. * Rounded to closest milliNEAR. */ -export function NEAR(x: number): ava.NEAR { - return mNEAR(x).mul(new ava.NEAR(1e3)); +export function NEAR(x: number): nearWs.NEAR { + return mNEAR(x).mul(new nearWs.NEAR(1e3)); } /** * Interprets a float as milliNEAR and builds the corresponding string. * Rounded to closest microNEAR. */ -export function mNEAR(x: number): ava.NEAR { - return uNEAR(x).mul(new ava.NEAR(1e3)); +export function mNEAR(x: number): nearWs.NEAR { + return uNEAR(x).mul(new nearWs.NEAR(1e3)); } /** * Interprets a float as microNEAR and builds the corresponding string. * Rounded to closest nanoNEAR. */ -export function uNEAR(x: number): ava.NEAR { - return nNEAR(x).mul(new ava.NEAR(1e3)); +export function uNEAR(x: number): nearWs.NEAR { + return nNEAR(x).mul(new nearWs.NEAR(1e3)); } /** * Interprets a float as nanoNEAR and builds the corresponding string. * Rounded to closest picoNEAR. */ -export function nNEAR(x: number): ava.NEAR { - return new ava.NEAR((x * 1e3).toString() + "0".repeat(12)); +export function nNEAR(x: number): nearWs.NEAR { + return new nearWs.NEAR((x * 1e3).toString() + "0".repeat(12)); } /** * Interprets a float as Teragas and builds the corresponding string. * Rounded to closest Gigagas. */ -export function Tgas(x: number): ava.Gas { - return new ava.Gas((x * 1e3).toString() + "0".repeat(9)); +export function Tgas(x: number): nearWs.Gas { + return new nearWs.Gas((x * 1e3).toString() + "0".repeat(9)); } /** @@ -95,7 +95,7 @@ export const DEPLOY_STORE_RENT = NEAR(7); * Mostly a wrapper for getting total balance of an account, might change to * available balance in the future. */ -export async function getBalance(account: NearAccount): Promise { +export async function getBalance(account: NearAccount): Promise { return (await account.balance()).total; } @@ -103,7 +103,11 @@ export async function getBalance(account: NearAccount): Promise { /** Asserts balance changes for multiple accounts in parallel */ export async function assertBalanceChanges( test: ExecutionContext, - specs: { account: NearAccount; ref: ava.NEAR; diff: ava.NEAR }[], + specs: { + account: NearAccount; + ref: nearWs.NEAR; + diff: nearWs.NEAR; + }[], msg: string ) { await Promise.all(specs.map((spec) => assertBalanceChange(test, spec, msg))); @@ -116,7 +120,12 @@ export async function assertBalanceChanges( */ export async function assertBalanceChange( test: ExecutionContext, - params: { account: NearAccount; ref: ava.NEAR; diff: ava.NEAR; gas?: Gas }, + params: { + account: NearAccount; + ref: nearWs.NEAR; + diff: nearWs.NEAR; + gas?: Gas; + }, msg: string ) { const now = await getBalance(params.account); @@ -124,7 +133,7 @@ export async function assertBalanceChange( const { gas } = params; assertBalanceDiffExact(test, { ...params, now, gas }, msg); } else { - const maxGas = NEAR(0.04).toString(); // allow 40 mNEAR of gas costs + const maxGas = NEAR(0.05).toString(); // allow 40 mNEAR of gas costs assertBalanceDiffRange(test, { ...params, now, maxGas }, msg); } } @@ -139,23 +148,23 @@ function assertBalanceDiffExact( gas, }: { account: NearAccount; - now: ava.NEAR; - ref: ava.NEAR; - diff: ava.NEAR; + now: nearWs.NEAR; + ref: nearWs.NEAR; + diff: nearWs.NEAR; gas: Gas; }, msg: string ) { - const nearGas = new ava.NEAR(gas.mul(new BN(100e6)).toString()); + const nearGas = new nearWs.NEAR(gas.mul(new BN(100e6)).toString()); const expected = ref.add(diff).sub(nearGas); - test.log({ - account: account.accountId, - expected: expected.toString(), - now: now.toString(), - ref: ref.toString(), - diff: diff.toString(), - nearGas: nearGas.toString(), - }); + // test.log({ + // account: account.accountId, + // expected: expected.toString(), + // now: now.toString(), + // ref: ref.toString(), + // diff: diff.toString(), + // nearGas: nearGas.toString(), + // }); test.true( now.eq(expected), @@ -186,24 +195,24 @@ function assertBalanceDiffRange( maxGas, }: { account: NearAccount; - now: ava.NEAR; - ref: ava.NEAR; - diff: ava.NEAR; + now: nearWs.NEAR; + ref: nearWs.NEAR; + diff: nearWs.NEAR; maxGas: string; }, msg: string ) { - test.log("entering assertBalanceDiffRange"); + // test.log("entering assertBalanceDiffRange"); const max = ref.add(new BN(diff)); const min = max.sub(new BN(maxGas)); - test.log({ - account: account.accountId, - now: now.toString(), - ref: ref.toString(), - diff: diff.toString(), // cannot use toHuman on negative diff! - min: min.toString(), - max: max.toString(), - }); + // test.log({ + // account: account.accountId, + // now: now.toString(), + // ref: ref.toString(), + // diff: diff.toString(), // cannot use toHuman on negative diff! + // min: min.toString(), + // max: max.toString(), + // }); test.true(now.lte(max), `${msg}: balance too high for ${account}`); test.true(now.gte(min), `${msg}: balance too low for ${account}`); } diff --git a/testing/__tests__/test-utils/download-contracts.ts b/testing/__tests__/utils/download-contracts.ts similarity index 76% rename from testing/__tests__/test-utils/download-contracts.ts rename to testing/__tests__/utils/download-contracts.ts index 7b0e064..2876537 100644 --- a/testing/__tests__/test-utils/download-contracts.ts +++ b/testing/__tests__/utils/download-contracts.ts @@ -2,18 +2,7 @@ import { Near, keyStores } from "near-api-js"; import { writeFile } from "fs/promises"; function getNear(network: string): Near { - if (network === "mainnet") { - return new Near({ - networkId: "mainnet", - keyStore: new keyStores.InMemoryKeyStore(), - nodeUrl: "https://rpc.mainnet.near.org", - // archivalUrl: "https://archival-rpc.mainnet.near.org", - walletUrl: "https://wallet.mainnet.near.org", - helperUrl: "https://helper.mainnet.near.org", - headers: {}, - // explorerUrl: "https://explorer.mainnet.near.org", - }); - } else if (network === "testnet") { + if (network === "testnet") { return new Near({ networkId: "testnet", keyStore: new keyStores.InMemoryKeyStore(), @@ -24,6 +13,16 @@ function getNear(network: string): Near { // explorerUrl: "https://explorer.testnet.near.org", }); } + return new Near({ + networkId: "mainnet", + keyStore: new keyStores.InMemoryKeyStore(), + nodeUrl: "https://rpc.mainnet.near.org", + // archivalUrl: "https://archival-rpc.mainnet.near.org", + walletUrl: "https://wallet.mainnet.near.org", + helperUrl: "https://helper.mainnet.near.org", + headers: {}, + // explorerUrl: "https://explorer.mainnet.near.org", + }); } function base64ToBytes(strb64: string): Uint8Array { diff --git a/testing/__tests__/test-utils/events.ts b/testing/__tests__/utils/events.ts similarity index 96% rename from testing/__tests__/test-utils/events.ts rename to testing/__tests__/utils/events.ts index aa196c2..dc5ebec 100644 --- a/testing/__tests__/test-utils/events.ts +++ b/testing/__tests__/utils/events.ts @@ -1,4 +1,4 @@ -import { NearAccount } from "near-workspaces-ava"; +import { NearAccount } from "near-workspaces"; import { ExecutionContext } from "ava"; export function assertEventLogs( @@ -75,7 +75,7 @@ export function assertMakeOfferEvent( `${msg}: length of parsed event.data doesn't match expectation` ); - event.data.map((chunk, i) => { + event.data.map((chunk: any, i: number) => { // TODO::testing::low: use the timeout const { token_id, approval_id, price, timeout } = specs[i]; const list_id = `${token_id}:${approval_id}:${store.accountId}`; @@ -96,7 +96,7 @@ export function assertMakeOfferEvent( const chunkTimeout = chunk.offer.timeout; test.is( chunkTimeout - chunkTimestamp, - timeout, + timeout as number, `${msg}: data chunk ${i} has bad timeout` ); }); diff --git a/testing/__tests__/test-utils/index.ts b/testing/__tests__/utils/index.ts similarity index 79% rename from testing/__tests__/test-utils/index.ts rename to testing/__tests__/utils/index.ts index 2b8b7e7..f1144f7 100644 --- a/testing/__tests__/test-utils/index.ts +++ b/testing/__tests__/utils/index.ts @@ -1,16 +1,15 @@ -import { NearAccount, TestnetRpc } from "near-workspaces-ava"; +import { NearAccount } from "near-workspaces"; import { ExecutionContext } from "ava"; // TODO::testing::low: commenting all my test utils -export * from "./balances"; -export * from "./workspaces"; -export * from "./panics"; -export * from "./token"; -export * from "./approvals"; -export * from "./events"; -export * from "./payouts"; -export * from "./download-contracts"; +export * from "./balances.js"; +export * from "./panics.js"; +export * from "./token.js"; +export * from "./approvals.js"; +export * from "./events.js"; +export * from "./payouts.js"; +export * from "./download-contracts.js"; // ---------------------------------- misc ---------------------------------- // export async function batchMint({ @@ -39,13 +38,14 @@ export async function batchMint({ export async function prepareTokenListing( test: ExecutionContext, - { root, alice, store, market, factory } + accounts: Record ) { + const { alice, store, market, factory } = accounts; await batchMint({ owner: alice, store, num_to_mint: 2 }).catch( failPromiseRejection(test, "minting") ); - await root + await market .call( market, "update_allowlist", @@ -70,5 +70,3 @@ export function failPromiseRejection( export function hours(x: number): number { return Math.round(x * 3600 * 1e9); } - -// ---- xxxx ---- // diff --git a/testing/__tests__/test-utils/panics.ts b/testing/__tests__/utils/panics.ts similarity index 82% rename from testing/__tests__/test-utils/panics.ts rename to testing/__tests__/utils/panics.ts index 54f73bd..46bf308 100644 --- a/testing/__tests__/test-utils/panics.ts +++ b/testing/__tests__/utils/panics.ts @@ -33,18 +33,13 @@ export function assertContractPanicMsg( // The slicing assures we don't assert against source location, the comma at // the message end assures that we capture everything but source location const expectedPanicMsg = `Smart contract panicked: ${panicMsg}`; - const actualPanicMsg = error.kind.ExecutionError.slice( + const actualPanicMsg = JSON.parse( + error.message + ).result.status.Failure.ActionError.kind.FunctionCallError.ExecutionError.slice( 0, expectedPanicMsg.length ); - // // log full error message in case anything goes wrong - // test.log(error.kind.ExecutionError); - test.is( - error.type, - "FunctionCallError", - `Wrong error/panic type when ${assertMsg}` - ); test.is( actualPanicMsg, expectedPanicMsg, diff --git a/testing/__tests__/test-utils/payouts.ts b/testing/__tests__/utils/payouts.ts similarity index 73% rename from testing/__tests__/test-utils/payouts.ts rename to testing/__tests__/utils/payouts.ts index 2042efc..279d750 100644 --- a/testing/__tests__/test-utils/payouts.ts +++ b/testing/__tests__/utils/payouts.ts @@ -1,7 +1,7 @@ -import { NearAccount } from "near-workspaces-ava"; +import { NearAccount } from "near-workspaces"; export function createPayout(spec: [NearAccount, string][]) { - const payout = {}; + const payout: Record = {}; spec.forEach(([account, amount]) => { payout[account.accountId] = amount; }); @@ -9,7 +9,7 @@ export function createPayout(spec: [NearAccount, string][]) { } export function createPayoutPercentage(spec: [NearAccount, number][]) { - const payout = {}; + const payout: Record = {}; spec.forEach(([account, amount]) => { payout[account.accountId] = amount; }); @@ -17,7 +17,7 @@ export function createPayoutPercentage(spec: [NearAccount, number][]) { } export function createPayoutNumerators(spec: [NearAccount, number][]) { - const payout = {}; + const payout: Record = {}; spec.forEach(([account, amount]) => { payout[account.accountId] = { numerator: amount }; }); diff --git a/testing/__tests__/test-utils/token.ts b/testing/__tests__/utils/token.ts similarity index 93% rename from testing/__tests__/test-utils/token.ts rename to testing/__tests__/utils/token.ts index 7ee4534..56f774d 100644 --- a/testing/__tests__/test-utils/token.ts +++ b/testing/__tests__/utils/token.ts @@ -1,4 +1,4 @@ -import { NearAccount } from "near-workspaces-ava"; +import { NearAccount } from "near-workspaces"; import { ExecutionContext } from "ava"; /** The current interface of a token as described in NEP171 */ @@ -33,8 +33,8 @@ export function assertTokensAre( expected: Nep171Token[], msg: string ) { - test.log("Actual token list:", actual); - test.log("Expected token list:", expected); + // test.log("Actual token list:", actual); + // test.log("Expected token list:", expected); test.is( actual.length, expected.length, diff --git a/testing/ava.config.cjs b/testing/ava.config.cjs deleted file mode 100644 index 52ce721..0000000 --- a/testing/ava.config.cjs +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('near-workspaces-ava/ava.config.cjs'); diff --git a/testing/ava.testnet.config.cjs b/testing/ava.testnet.config.cjs deleted file mode 100644 index f1d9a8f..0000000 --- a/testing/ava.testnet.config.cjs +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - ...require('near-workspaces-ava/ava.testnet.config.cjs'), - ...require('./ava.config.cjs'), -}; - -// Add files you only want to run in Sandbox mode here -module.exports.files.push( - // '!__tests__/example-file-name*', - // '!__tests__/another-example-file-name*', -); diff --git a/testing/package-lock.json b/testing/package-lock.json index 7430ab9..4533b89 100644 --- a/testing/package-lock.json +++ b/testing/package-lock.json @@ -1,173 +1,54 @@ { - "name": "testing", + "name": "tests", "lockfileVersion": 2, "requires": true, "packages": { "": { + "name": "tests", "devDependencies": { - "near-api-js": "^0.44.2", - "near-workspaces-ava": "1.0.0" + "@types/bn.js": "^5.1.1", + "ava": "^5.1.0", + "near-api-js": "^1.1.0", + "near-workspaces": "^3.2.2", + "ts-node": "^10.9.1", + "typescript": "^4.9.4" } }, - "node_modules/@ava/typescript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@ava/typescript/-/typescript-2.0.0.tgz", - "integrity": "sha512-sn+upcMk81AMrlnx/hb/9T7gCGuBfw7hi+p79NPSSQMvY2G64mOB7qRaDExiHiZfZ7FN9j7HwQeFhHZLGD/NWQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^4.0.0", - "execa": "^5.0.0" - }, - "engines": { - "node": ">=12.22 <13 || >=14.16 <15 || >=15" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", - "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { - "node": ">=4" + "node": ">=12" } }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" + "node": ">=6.0.0" } }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@concordance/react": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@concordance/react/-/react-2.0.0.tgz", - "integrity": "sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA==", - "dev": true, - "dependencies": { - "arrify": "^1.0.1" - }, - "engines": { - "node": ">=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0" - } - }, - "node_modules/@concordance/react/node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", - "dev": true, - "engines": { - "node": ">= 12" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "dependencies": { - "@cspotcode/source-map-consumer": "0.8.0" - }, - "engines": { - "node": ">=12" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, "node_modules/@nodelib/fs.scandir": { @@ -206,9 +87,9 @@ } }, "node_modules/@sindresorhus/is": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.4.0.tgz", - "integrity": "sha512-QppPM/8l3Mawvh4rn9CNEYIU9bxpXUCRMaX9yUpvBk1nMKusLKpfXGDEKExKaPhLzcn3lzil7pR6rnJ11HgeRQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", "dev": true, "engines": { "node": ">=10" @@ -230,48 +111,48 @@ } }, "node_modules/@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", "dev": true }, "node_modules/@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true }, "node_modules/@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true }, "node_modules/@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", "dev": true }, "node_modules/@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", "dev": true, "dependencies": { "@types/http-cache-semantics": "*", - "@types/keyv": "*", + "@types/keyv": "^3.1.4", "@types/node": "*", - "@types/responselike": "*" + "@types/responselike": "^1.0.0" } }, "node_modules/@types/http-cache-semantics": { @@ -281,24 +162,18 @@ "dev": true }, "node_modules/@types/keyv": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz", - "integrity": "sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/node": { - "version": "16.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz", - "integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==", - "dev": true - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "version": "18.11.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", + "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==", "dev": true }, "node_modules/@types/responselike": { @@ -311,9 +186,9 @@ } }, "node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -332,52 +207,49 @@ } }, "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", + "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", "dev": true, "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" + "clean-stack": "^4.0.0", + "indent-string": "^5.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "dependencies": { - "string-width": "^4.1.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { "normalize-path": "^3.0.0", @@ -405,21 +277,12 @@ "node_modules/array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/arrgv": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/arrgv/-/arrgv-1.0.2.tgz", @@ -430,91 +293,82 @@ } }, "node_modules/arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz", + "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/ava": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/ava/-/ava-3.15.0.tgz", - "integrity": "sha512-HGAnk1SHPk4Sx6plFAUkzV/XC1j9+iQhOzt4vBly18/yo0AV8Oytx7mtJd/CR8igCJ5p160N/Oo/cNJi2uSeWA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ava/-/ava-5.1.0.tgz", + "integrity": "sha512-e5VFrSQ0WBPyZJWRXVrO7RFOizFeNM0t2PORwrPvWtApgkORI6cvGnY3GX1G+lzpd0HjqNx5Jus22AhxVnUMNA==", "dev": true, "dependencies": { - "@concordance/react": "^2.0.0", - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "ansi-styles": "^5.0.0", + "acorn": "^8.8.1", + "acorn-walk": "^8.2.0", + "ansi-styles": "^6.2.1", "arrgv": "^1.0.2", - "arrify": "^2.0.1", - "callsites": "^3.1.0", - "chalk": "^4.1.0", - "chokidar": "^3.4.3", + "arrify": "^3.0.0", + "callsites": "^4.0.0", + "cbor": "^8.1.0", + "chalk": "^5.1.2", + "chokidar": "^3.5.3", "chunkd": "^2.0.1", - "ci-info": "^2.0.0", + "ci-info": "^3.6.1", "ci-parallel-vars": "^1.0.1", "clean-yaml-object": "^0.1.0", - "cli-cursor": "^3.1.0", - "cli-truncate": "^2.1.0", - "code-excerpt": "^3.0.0", + "cli-truncate": "^3.1.0", + "code-excerpt": "^4.0.0", "common-path-prefix": "^3.0.0", - "concordance": "^5.0.1", - "convert-source-map": "^1.7.0", + "concordance": "^5.0.4", "currently-unhandled": "^0.4.1", - "debug": "^4.3.1", - "del": "^6.0.0", - "emittery": "^0.8.0", - "equal-length": "^1.0.0", - "figures": "^3.2.0", - "globby": "^11.0.1", - "ignore-by-default": "^2.0.0", - "import-local": "^3.0.2", - "indent-string": "^4.0.0", + "debug": "^4.3.4", + "del": "^7.0.0", + "emittery": "^1.0.1", + "figures": "^5.0.0", + "globby": "^13.1.2", + "ignore-by-default": "^2.1.0", + "indent-string": "^5.0.0", "is-error": "^2.2.2", "is-plain-object": "^5.0.0", "is-promise": "^4.0.0", - "lodash": "^4.17.20", - "matcher": "^3.0.0", - "md5-hex": "^3.0.1", - "mem": "^8.0.0", + "matcher": "^5.0.0", + "mem": "^9.0.2", "ms": "^2.1.3", - "ora": "^5.2.0", - "p-event": "^4.2.0", - "p-map": "^4.0.0", - "picomatch": "^2.2.2", - "pkg-conf": "^3.1.0", - "plur": "^4.0.0", - "pretty-ms": "^7.0.1", - "read-pkg": "^5.2.0", + "p-event": "^5.0.1", + "p-map": "^5.5.0", + "picomatch": "^2.3.1", + "pkg-conf": "^4.0.0", + "plur": "^5.1.0", + "pretty-ms": "^8.0.0", "resolve-cwd": "^3.0.0", "slash": "^3.0.0", - "source-map-support": "^0.5.19", - "stack-utils": "^2.0.3", - "strip-ansi": "^6.0.0", - "supertap": "^2.0.0", - "temp-dir": "^2.0.0", - "trim-off-newlines": "^1.0.1", - "update-notifier": "^5.0.1", - "write-file-atomic": "^3.0.3", - "yargs": "^16.2.0" + "stack-utils": "^2.0.6", + "strip-ansi": "^7.0.1", + "supertap": "^3.0.1", + "temp-dir": "^3.0.0", + "write-file-atomic": "^5.0.0", + "yargs": "^17.6.2" }, "bin": { - "ava": "cli.js" + "ava": "entrypoints/cli.mjs" }, "engines": { - "node": ">=10.18.0 <11 || >=12.14.0 <12.17.0 || >=12.17.0 <13 || >=14.0.0 <15 || >=15" + "node": ">=14.19 <15 || >=16.15 <17 || >=18" + }, + "peerDependencies": { + "@ava/typescript": "*" + }, + "peerDependenciesMeta": { + "@ava/typescript": { + "optional": true + } } }, "node_modules/balanced-match": { @@ -532,26 +386,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/base64url": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", @@ -570,17 +404,6 @@ "node": ">=8" } }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, "node_modules/blueimp-md5": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", @@ -588,15 +411,15 @@ "dev": true }, "node_modules/bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, "node_modules/borsh": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.5.0.tgz", - "integrity": "sha512-p9w/qGBeeFdUf2GPBPHdX5JQyez8K5VtoFN7PqSfmR+cVUMSmcwAKhP9n2aXoDSKbtS7xZlZt3MVnrJL7GdYhg==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", + "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", "dev": true, "dependencies": { "bn.js": "^5.2.0", @@ -604,40 +427,6 @@ "text-encoding-utf-8": "^1.0.2" } }, - "node_modules/boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "dev": true, - "dependencies": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -663,42 +452,12 @@ "node_modules/bs58": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", "dev": true, "dependencies": { "base-x": "^3.0.2" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, "node_modules/cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -726,37 +485,13 @@ "node": ">=8" } }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.0.0.tgz", + "integrity": "sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12.20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -765,38 +500,31 @@ "node_modules/capability": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/capability/-/capability-0.2.5.tgz", - "integrity": "sha1-Ua2HNT8ZNv/Xfy8hx0YzpN6oiAE=", + "integrity": "sha512-rsJZYVCgXd08sPqwmaIqjAd5SUTfonV0z/gDJ8D6cN8wQphky1kkAYEqQ+hmDxTw7UihvBfjUVUSY+DBEe44jg==", "dev": true }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/cbor": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", + "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "nofilter": "^3.1.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=12.19" } }, - "node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/chalk": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { - "node": ">=8" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/chokidar": { @@ -842,126 +570,152 @@ "dev": true }, "node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "node_modules/ci-parallel-vars": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.1.tgz", + "integrity": "sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/ci-parallel-vars": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ci-parallel-vars/-/ci-parallel-vars-1.0.1.tgz", "integrity": "sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==", "dev": true }, "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", + "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", "dev": true, + "dependencies": { + "escape-string-regexp": "5.0.0" + }, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/clean-yaml-object": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", - "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=", + "integrity": "sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "node_modules/cli-truncate": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", + "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", "dev": true, + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^5.0.0" + }, "engines": { - "node": ">=6" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { - "restore-cursor": "^3.1.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/cli-spinners": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", - "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==", + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "node_modules/cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" - }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, "engines": { - "node": ">=0.8" + "node": ">=8" } }, "node_modules/clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", "dev": true, "dependencies": { "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/code-excerpt": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-3.0.0.tgz", - "integrity": "sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz", + "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==", "dev": true, "dependencies": { - "convert-to-spaces": "^1.0.1" + "convert-to-spaces": "^2.0.1" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/color-convert": { @@ -991,7 +745,7 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "node_modules/concordance": { @@ -1013,39 +767,13 @@ "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=14" } }, - "node_modules/configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, "node_modules/convert-to-spaces": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz", - "integrity": "sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz", + "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==", "dev": true, "engines": { - "node": ">= 4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/create-require": { @@ -1054,33 +782,10 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==", "dev": true, "dependencies": { "array-find-index": "^1.0.1" @@ -1102,9 +807,9 @@ } }, "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -1151,24 +856,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dev": true, - "dependencies": { - "clone": "^1.0.2" - } - }, "node_modules/defer-to-connect": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", @@ -1179,22 +866,34 @@ } }, "node_modules/del": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz", - "integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-7.0.0.tgz", + "integrity": "sha512-tQbV/4u5WVB8HMJr08pgw0b6nG4RGt/tj+7Numvq+zqcvUFeMaIWWOUFltiU+6go8BSO2/ogsB4EasDaj0y68Q==", "dev": true, "dependencies": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", + "globby": "^13.1.2", + "graceful-fs": "^4.2.10", + "is-glob": "^4.0.3", + "is-path-cwd": "^3.0.0", + "is-path-inside": "^4.0.0", + "p-map": "^5.5.0", "rimraf": "^3.0.2", - "slash": "^3.0.0" + "slash": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/del/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "engines": { + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -1230,40 +929,28 @@ "node": ">=8" } }, - "node_modules/dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, "node_modules/emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-1.0.1.tgz", + "integrity": "sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ==", "dev": true, "engines": { - "node": ">=10" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "node_modules/end-of-stream": { @@ -1275,24 +962,6 @@ "once": "^1.4.0" } }, - "node_modules/equal-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz", - "integrity": "sha1-IcoRLUirJLTh5//A5TOdMf38J0w=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, "node_modules/error-polyfill": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/error-polyfill/-/error-polyfill-0.1.3.tgz", @@ -1313,22 +982,13 @@ "node": ">=6" } }, - "node_modules/escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -1356,29 +1016,6 @@ "node": ">=0.10.0" } }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, "node_modules/fast-diff": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", @@ -1386,9 +1023,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -1402,38 +1039,30 @@ } }, "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "dependencies": { "reusify": "^1.0.4" } }, "node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz", + "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==", "dev": true, "dependencies": { - "escape-string-regexp": "^1.0.5" + "escape-string-regexp": "^5.0.0", + "is-unicode-supported": "^1.2.0" }, "engines": { - "node": ">=8" + "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/figures/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -1447,21 +1076,25 @@ } }, "node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", "dev": true, "dependencies": { - "locate-path": "^3.0.0" + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" }, "engines": { - "node": ">=6" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/fs-extra": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", - "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -1484,10 +1117,22 @@ "node": ">= 8" } }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "node_modules/fsevents": { @@ -1504,12 +1149,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1520,27 +1159,30 @@ } }, "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -1563,45 +1205,41 @@ "node": ">= 6" } }, - "node_modules/global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "node_modules/globby": { + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz", + "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==", "dev": true, "dependencies": { - "ini": "2.0.0" + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.11", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^4.0.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/globby/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/got": { - "version": "11.8.3", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.3.tgz", - "integrity": "sha512-7gtQ5KiPh1RtGS9/Jbv1ofDpBFuq42gyfEib+ejaRBJuj/3tQFeR5+gw57e4ipaU8c/rCjvX6fkQz2lyDlGAOg==", + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "dev": true, "dependencies": { "@sindresorhus/is": "^4.0.0", @@ -1624,45 +1262,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "node_modules/http-cache-semantics": { @@ -1690,7 +1292,7 @@ "node_modules/http-errors/node_modules/depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", "dev": true, "engines": { "node": ">= 0.6" @@ -1709,103 +1311,49 @@ "node": ">=10.19.0" } }, - "node_modules/human-signals": { + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-by-default": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.1.0.tgz", + "integrity": "sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==", "dev": true, "engines": { - "node": ">=10.17.0" + "node": ">=10 <11 || >=12 <13 || >=14" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/ignore-by-default": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.0.0.tgz", - "integrity": "sha512-+mQSgMRiFD3L3AOxLYOCxjIq4OnAmo5CIuC+lj5ehCJcPtV++QacEV7FdpzvYxH6DaOySWzQU6RR0lPLy37ckA==", - "dev": true, - "engines": { - "node": ">=10 <11 || >=12 <13 || >=14" - } - }, - "node_modules/import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.8.19" } }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "dependencies": { "once": "^1.3.0", @@ -1818,15 +1366,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/irregular-plurals": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.3.0.tgz", @@ -1836,12 +1375,6 @@ "node": ">=8" } }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -1854,30 +1387,6 @@ "node": ">=8" } }, - "node_modules/is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "dependencies": { - "ci-info": "^2.0.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, - "node_modules/is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-error": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz", @@ -1887,19 +1396,22 @@ "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-glob": { @@ -1914,43 +1426,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "dependencies": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -1960,31 +1435,28 @@ "node": ">=0.12.0" } }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-3.0.0.tgz", + "integrity": "sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==", "dev": true, "engines": { - "node": ">=6" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-plain-object": { @@ -2002,48 +1474,18 @@ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", "dev": true }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, "node_modules/js-sha256": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", @@ -2053,18 +1495,12 @@ "node_modules/js-string-escape": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", - "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", + "integrity": "sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==", "dev": true, "engines": { "node": ">= 0.8" } }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, "node_modules/js-yaml": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", @@ -2084,18 +1520,6 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -2109,59 +1533,39 @@ } }, "node_modules/keyv": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.1.1.tgz", - "integrity": "sha512-tGv1yP6snQVDSM4X6yxrv2zzq/EvpW+oYiUz6aueW1u9CtS8RzUQYxxmFwgZlO2jSgCxQbchhxaqXXp2hnKGpQ==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", + "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", "dev": true, "dependencies": { "json-buffer": "3.0.1" } }, - "node_modules/latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "dev": true, - "dependencies": { - "package-json": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, "node_modules/load-json-file": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz", + "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==", "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - }, "engines": { - "node": ">=6" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.1.1.tgz", + "integrity": "sha512-vJXaRMJgRVD3+cUZs3Mncj2mxpt5mP0EmNOsxRSZRMlbqjvxzDEOIUWXGmavo0ZC9+tNZCBLQ66reA11nbpHZg==", "dev": true, "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^6.0.0" }, "engines": { - "node": ">=6" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash": { @@ -2170,22 +1574,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", @@ -2207,30 +1595,6 @@ "node": ">=10" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -2250,15 +1614,18 @@ } }, "node_modules/matcher": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", - "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-5.0.0.tgz", + "integrity": "sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==", "dev": true, "dependencies": { - "escape-string-regexp": "^4.0.0" + "escape-string-regexp": "^5.0.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/md5-hex": { @@ -2274,27 +1641,21 @@ } }, "node_modules/mem": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/mem/-/mem-8.1.1.tgz", - "integrity": "sha512-qFCFUDs7U3b8mBDPyz5EToEKoAkgCzqquIgi9nkkR9bixxOVOre+09lbuH7+9Kn2NFpm56M3GUWVbU2hQgdACA==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", + "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==", "dev": true, "dependencies": { "map-age-cleaner": "^0.1.3", - "mimic-fn": "^3.1.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=12.20" }, "funding": { "url": "https://github.com/sindresorhus/mem?sponsor=1" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2305,25 +1666,28 @@ } }, "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.2", + "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, "node_modules/mimic-fn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", - "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/mimic-response": { @@ -2347,16 +1711,10 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "node_modules/minipass": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", - "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", "dev": true, "dependencies": { "yallist": "^4.0.0" @@ -2378,6 +1736,18 @@ "node": ">= 8" } }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -2406,13 +1776,13 @@ } }, "node_modules/near-api-js": { - "version": "0.44.2", - "resolved": "https://registry.npmjs.org/near-api-js/-/near-api-js-0.44.2.tgz", - "integrity": "sha512-eMnc4V+geggapEUa3nU2p8HSHn/njtloI4P2mceHQWO8vDE1NGpnAw8FuTBrLmXSgIv9m6oocgFc9t3VNf5zwg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/near-api-js/-/near-api-js-1.1.0.tgz", + "integrity": "sha512-qYKv1mYsaDZc2uYndhS+ttDhR9+60qFc+ZjD6lWsAxr3ZskMjRwPffDGQZYhC7BRDQMe1HEbk6d5mf+TVm0Lqg==", "dev": true, "dependencies": { - "bn.js": "5.2.0", - "borsh": "^0.6.0", + "bn.js": "5.2.1", + "borsh": "^0.7.0", "bs58": "^4.0.0", "depd": "^2.0.0", "error-polyfill": "^0.1.3", @@ -2424,21 +1794,10 @@ "tweetnacl": "^1.0.1" } }, - "node_modules/near-api-js/node_modules/borsh": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.6.0.tgz", - "integrity": "sha512-sl5k89ViqsThXQpYa9XDtz1sBl3l1lI313cFUY1HKr+wvMILnb+58xpkqTNrYbelh99dY7K8usxoCusQmqix9Q==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.0", - "bs58": "^4.0.0", - "text-encoding-utf-8": "^1.0.2" - } - }, "node_modules/near-sandbox": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/near-sandbox/-/near-sandbox-0.0.8.tgz", - "integrity": "sha512-3JrDcA9rI+wA9lWqfOtSovGxBE/TDZL011TLk+jz5wGezVbm7m3tDh/zCfq+++eFyJ3ZbGkG0KF6+trMQJFPQQ==", + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/near-sandbox/-/near-sandbox-0.0.14.tgz", + "integrity": "sha512-wQ1jcD6W6U4V83D0Zxgi2qedMkmTh5iiqm2t/oriKR4rrTql/j8QR/Ip/NfoIH/plFT+vGungKL+B4HxfNyyNg==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -2463,9 +1822,9 @@ } }, "node_modules/near-workspaces": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/near-workspaces/-/near-workspaces-1.0.0.tgz", - "integrity": "sha512-TiF3Qk7vpm6twqSxwR1UhVpXtXsUGLr2DrrlRu/DvIstMRI6GOnIWvx9FlvM+x/ERiivACi7s2IWd5hyNJ5YrA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/near-workspaces/-/near-workspaces-3.2.2.tgz", + "integrity": "sha512-Y26FyPccs3lTKFpOzeWQy5urtSe0hcdME4ePbidzHNQPOXCub06htnvsoVEUNGVejc50f5nVHcdCiYO8mtEdTA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -2476,8 +1835,8 @@ "callsites": "^4.0.0", "fs-extra": "^10.0.0", "js-sha256": "^0.9.0", - "near-api-js": "^0.43.1", - "near-sandbox": "^0.0.8", + "near-api-js": "^0.44.1", + "near-sandbox": "^0.0.14", "near-units": "^0.1.9", "node-port-check": "^2.0.1", "promisify-child-process": "^4.1.1", @@ -2490,45 +1849,27 @@ "npm": ">= 6.0.0" } }, - "node_modules/near-workspaces-ava": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/near-workspaces-ava/-/near-workspaces-ava-1.0.0.tgz", - "integrity": "sha512-CFbQ0CLFEP8p7gKlYwVf9nVV8WvP5qaZDiNX6oHyHKng8wJ9uEw32wlv/z8tP0MgJVHeFq5jg8Jm+VG+q0O5Bw==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@ava/typescript": "^2.0.0", - "@types/bn.js": "^5.1.0", - "@types/node": "^16.4.10", - "ava": "3.15.0", - "near-workspaces": "^1.0.0", - "ts-node": "^10.1.0", - "typescript": "^4.3.5" - }, - "bin": { - "near-workspaces-ava": "scripts/cli.js" - }, - "engines": { - "node": ">= 14.0.0", - "npm": ">= 6.0.0" - } + "node_modules/near-workspaces/node_modules/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true }, - "node_modules/near-workspaces/node_modules/callsites": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.0.0.tgz", - "integrity": "sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==", + "node_modules/near-workspaces/node_modules/borsh": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.5.0.tgz", + "integrity": "sha512-p9w/qGBeeFdUf2GPBPHdX5JQyez8K5VtoFN7PqSfmR+cVUMSmcwAKhP9n2aXoDSKbtS7xZlZt3MVnrJL7GdYhg==", "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" } }, "node_modules/near-workspaces/node_modules/near-api-js": { - "version": "0.43.1", - "resolved": "https://registry.npmjs.org/near-api-js/-/near-api-js-0.43.1.tgz", - "integrity": "sha512-bgFuboD/a3eintaWqWMN9oWcGHkxbrKiJhxkJwHmwJrYx49y9QvWwEtoxeHSjKskJHUVXGKvaYRsc9XirrJ5JQ==", + "version": "0.44.2", + "resolved": "https://registry.npmjs.org/near-api-js/-/near-api-js-0.44.2.tgz", + "integrity": "sha512-eMnc4V+geggapEUa3nU2p8HSHn/njtloI4P2mceHQWO8vDE1NGpnAw8FuTBrLmXSgIv9m6oocgFc9t3VNf5zwg==", "dev": true, "dependencies": { "bn.js": "5.2.0", @@ -2555,6 +1896,15 @@ "text-encoding-utf-8": "^1.0.2" } }, + "node_modules/near-workspaces/node_modules/temp-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -2581,25 +1931,13 @@ "integrity": "sha512-PV1tj5OPbWwxvhPcChXxwCIKl/IfVEdPP4u/gQz2lao/VGoeIUXb/4U72KSHLZpTVBmgTnMm0me7yR0wUsIuPg==", "dev": true }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", "dev": true, - "bin": { - "semver": "bin/semver" + "engines": { + "node": ">=12.19" } }, "node_modules/normalize-path": { @@ -2623,22 +1961,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/o3": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/o3/-/o3-1.0.3.tgz", - "integrity": "sha1-GSzod6iC36Z1HwQSqGX6+y2h2sA=", + "integrity": "sha512-f+4n+vC6s4ysy7YO7O2gslWZBUu8Qj2i2OUJOvjRxQva7jVjYjB29jrr9NCjmxZQR0gzrOcv1RnqoYOeMs5VRQ==", "dev": true, "dependencies": { "capability": "^0.2.5" @@ -2647,59 +1973,12 @@ "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { "wrappy": "1" } }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/onetime/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dev": true, - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-cancelable": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", @@ -2712,344 +1991,114 @@ "node_modules/p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-5.0.1.tgz", + "integrity": "sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==", "dev": true, "dependencies": { - "p-timeout": "^3.1.0" + "p-timeout": "^5.0.2" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "yocto-queue": "^1.0.0" }, "engines": { - "node": ">=6" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", "dev": true, "dependencies": { - "p-limit": "^2.0.0" + "p-limit": "^4.0.0" }, "engines": { - "node": ">=6" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz", + "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==", "dev": true, "dependencies": { - "aggregate-error": "^3.0.0" + "aggregate-error": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "dev": true, - "dependencies": { - "p-finally": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "dev": true, - "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/package-json/node_modules/@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json/node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "dependencies": { - "defer-to-connect": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json/node_modules/cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/package-json/node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz", + "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==", "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json/node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/package-json/node_modules/defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, - "node_modules/package-json/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json/node_modules/got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/package-json/node_modules/got/node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/package-json/node_modules/json-buffer": { + "node_modules/parse-ms": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "node_modules/package-json/node_modules/keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.0" - } - }, - "node_modules/package-json/node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz", + "integrity": "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==", "dev": true, "engines": { - "node": ">=8" - } - }, - "node_modules/package-json/node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json/node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "dependencies": { - "lowercase-keys": "^1.0.0" - } - }, - "node_modules/package-json/node_modules/responselike/node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/package-json/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "node": ">=12" }, - "engines": { - "node": ">=4" - } - }, - "node_modules/parse-ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", - "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", - "dev": true, - "engines": { - "node": ">=6" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", "dev": true, "engines": { - "node": ">=4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -3071,120 +2120,47 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/pkg-conf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", - "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz", + "integrity": "sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" + "find-up": "^6.0.0", + "load-json-file": "^7.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/plur": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", - "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz", + "integrity": "sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==", "dev": true, "dependencies": { - "irregular-plurals": "^3.2.0" + "irregular-plurals": "^3.3.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/pretty-ms": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", - "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-8.0.0.tgz", + "integrity": "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==", "dev": true, "dependencies": { - "parse-ms": "^2.1.0" + "parse-ms": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -3209,18 +2185,6 @@ "once": "^1.3.1" } }, - "node_modules/pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", - "dev": true, - "dependencies": { - "escape-goat": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/pure-uuid": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/pure-uuid/-/pure-uuid-1.6.2.tgz", @@ -3262,83 +2226,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/read-pkg/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -3351,56 +2238,15 @@ "node": ">=8.10.0" } }, - "node_modules/registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", - "dev": true, - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "dev": true, - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/resolve-alpn": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", @@ -3428,26 +2274,16 @@ "node": ">=8" } }, - "node_modules/responselike": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", - "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", - "dev": true, - "dependencies": { - "lowercase-keys": "^2.0.0" - } - }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", "dev": true, "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "lowercase-keys": "^2.0.0" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/reusify": { @@ -3499,15 +2335,29 @@ } }, "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -3519,27 +2369,6 @@ "node": ">=10" } }, - "node_modules/semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "dependencies": { - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semver-diff/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/serialize-error": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", @@ -3555,45 +2384,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/serialize-error/node_modules/type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -3610,95 +2406,31 @@ } }, "node_modules/slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/spdx-license-ids": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", - "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", - "dev": true - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "dependencies": { "escape-string-regexp": "^2.0.0" @@ -3719,158 +2451,83 @@ "node_modules/statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", "dev": true, "engines": { "node": ">= 0.6" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/supertap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supertap/-/supertap-2.0.0.tgz", - "integrity": "sha512-jRzcXlCeDYvKoZGA5oRhYyR3jUIYu0enkSxtmAgHRlD7HwrovTpH4bDSi0py9FtuA8si9cW/fKommJHuaoDHJA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/supertap/-/supertap-3.0.1.tgz", + "integrity": "sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==", "dev": true, "dependencies": { - "arrify": "^2.0.1", - "indent-string": "^4.0.0", - "js-yaml": "^3.14.0", + "indent-string": "^5.0.0", + "js-yaml": "^3.14.1", "serialize-error": "^7.0.1", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", "dev": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", + "minipass": "^4.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, "engines": { - "node": ">= 10" + "node": ">=10" } }, "node_modules/temp-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", - "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-3.0.0.tgz", + "integrity": "sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==", "dev": true, "engines": { - "node": ">=8" + "node": ">=14.16" } }, "node_modules/text-encoding-utf-8": { @@ -3882,21 +2539,12 @@ "node_modules/time-zone": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", - "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=", + "integrity": "sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==", "dev": true, "engines": { "node": ">=4" } }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3921,25 +2569,16 @@ "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, - "node_modules/trim-off-newlines": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.3.tgz", - "integrity": "sha512-kh6Tu6GbeSNMGfrrZh6Bb/4ZEHV1QlB4xNDBeog8Y9/QwFlKTRyWvY3Fs9tRDAMZliVUwieMgEdIeL/FtqjkJg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ts-node": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.5.0.tgz", - "integrity": "sha512-6kEJKwVxAJ35W4akuiysfKwKmjkbYxwQMTBaAxo9KKAx/Yd26mPUyhGz3ji+EsJoAgrLqVsYHNuuYwQe22lbtw==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, "dependencies": { - "@cspotcode/source-map-support": "0.7.0", + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -3950,12 +2589,13 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "bin": { "ts-node": "dist/bin.js", "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", "ts-node-script": "dist/bin-script.js", "ts-node-transpile-only": "dist/bin-transpile.js", "ts-script": "dist/bin-script-deprecated.js" @@ -3982,138 +2622,55 @@ "dev": true }, "node_modules/type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/u3": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/u3/-/u3-0.1.1.tgz", - "integrity": "sha512-+J5D5ir763y+Am/QY6hXNRlwljIeRMZMGs0cT6qqZVVzzT3X3nFPXVyPOFRMOR4kupB0T8JnCdpWdp6Q/iXn3w==", - "dev": true - }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", "dev": true, - "dependencies": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "node_modules/typescript": { + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true, - "dependencies": { - "prepend-http": "^2.0.0" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4" + "node": ">=4.2.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", - "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==", + "node_modules/u3": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/u3/-/u3-0.1.1.tgz", + "integrity": "sha512-+J5D5ir763y+Am/QY6hXNRlwljIeRMZMGs0cT6qqZVVzzT3X3nFPXVyPOFRMOR4kupB0T8JnCdpWdp6Q/iXn3w==", "dev": true }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "engines": { + "node": ">= 10.0.0" } }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", - "dev": true, - "dependencies": { - "defaults": "^1.0.3" - } + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, "node_modules/well-known-symbols": { @@ -4128,40 +2685,13 @@ "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dev": true, - "dependencies": { - "string-width": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -4179,6 +2709,15 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -4194,31 +2733,64 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.0.tgz", + "integrity": "sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true, + "signal-exit": "^3.0.7" + }, "engines": { - "node": ">=8" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/y18n": { @@ -4237,167 +2809,134 @@ "dev": true }, "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "17.6.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", + "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", "dev": true, "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": ">=6" + "node": ">=8" } - } - }, - "dependencies": { - "@ava/typescript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@ava/typescript/-/typescript-2.0.0.tgz", - "integrity": "sha512-sn+upcMk81AMrlnx/hb/9T7gCGuBfw7hi+p79NPSSQMvY2G64mOB7qRaDExiHiZfZ7FN9j7HwQeFhHZLGD/NWQ==", + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "requires": { - "escape-string-regexp": "^4.0.0", - "execa": "^5.0.0" + "engines": { + "node": ">=8" } }, - "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "requires": { - "@babel/highlight": "^7.16.7" + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, - "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", - "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "@concordance/react": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@concordance/react/-/react-2.0.0.tgz", - "integrity": "sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA==", + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, - "requires": { - "arrify": "^1.0.1" + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true, + "engines": { + "node": ">=12.20" }, - "dependencies": { - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" } }, - "@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "dev": true }, - "@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "requires": { - "@cspotcode/source-map-consumer": "0.8.0" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, "@nodelib/fs.scandir": { @@ -4427,9 +2966,9 @@ } }, "@sindresorhus/is": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.4.0.tgz", - "integrity": "sha512-QppPM/8l3Mawvh4rn9CNEYIU9bxpXUCRMaX9yUpvBk1nMKusLKpfXGDEKExKaPhLzcn3lzil7pR6rnJ11HgeRQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", "dev": true }, "@szmarczak/http-timer": { @@ -4442,48 +2981,48 @@ } }, "@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", "dev": true }, "@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true }, "@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true }, "@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", "dev": true }, "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", "dev": true, "requires": { "@types/node": "*" } }, "@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", "dev": true, "requires": { "@types/http-cache-semantics": "*", - "@types/keyv": "*", + "@types/keyv": "^3.1.4", "@types/node": "*", - "@types/responselike": "*" + "@types/responselike": "^1.0.0" } }, "@types/http-cache-semantics": { @@ -4493,24 +3032,18 @@ "dev": true }, "@types/keyv": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz", - "integrity": "sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", "dev": true, "requires": { "@types/node": "*" } }, "@types/node": { - "version": "16.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz", - "integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==", - "dev": true - }, - "@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "version": "18.11.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", + "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==", "dev": true }, "@types/responselike": { @@ -4523,9 +3056,9 @@ } }, "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true }, "acorn-walk": { @@ -4535,40 +3068,31 @@ "dev": true }, "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", + "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", "dev": true, "requires": { - "string-width": "^4.1.0" + "clean-stack": "^4.0.0", + "indent-string": "^5.0.0" } }, "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true }, "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -4593,13 +3117,7 @@ "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", "dev": true }, "arrgv": { @@ -4609,79 +3127,62 @@ "dev": true }, "arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "dev": true - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz", + "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==", "dev": true }, "ava": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/ava/-/ava-3.15.0.tgz", - "integrity": "sha512-HGAnk1SHPk4Sx6plFAUkzV/XC1j9+iQhOzt4vBly18/yo0AV8Oytx7mtJd/CR8igCJ5p160N/Oo/cNJi2uSeWA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ava/-/ava-5.1.0.tgz", + "integrity": "sha512-e5VFrSQ0WBPyZJWRXVrO7RFOizFeNM0t2PORwrPvWtApgkORI6cvGnY3GX1G+lzpd0HjqNx5Jus22AhxVnUMNA==", "dev": true, "requires": { - "@concordance/react": "^2.0.0", - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "ansi-styles": "^5.0.0", + "acorn": "^8.8.1", + "acorn-walk": "^8.2.0", + "ansi-styles": "^6.2.1", "arrgv": "^1.0.2", - "arrify": "^2.0.1", - "callsites": "^3.1.0", - "chalk": "^4.1.0", - "chokidar": "^3.4.3", + "arrify": "^3.0.0", + "callsites": "^4.0.0", + "cbor": "^8.1.0", + "chalk": "^5.1.2", + "chokidar": "^3.5.3", "chunkd": "^2.0.1", - "ci-info": "^2.0.0", + "ci-info": "^3.6.1", "ci-parallel-vars": "^1.0.1", "clean-yaml-object": "^0.1.0", - "cli-cursor": "^3.1.0", - "cli-truncate": "^2.1.0", - "code-excerpt": "^3.0.0", + "cli-truncate": "^3.1.0", + "code-excerpt": "^4.0.0", "common-path-prefix": "^3.0.0", - "concordance": "^5.0.1", - "convert-source-map": "^1.7.0", + "concordance": "^5.0.4", "currently-unhandled": "^0.4.1", - "debug": "^4.3.1", - "del": "^6.0.0", - "emittery": "^0.8.0", - "equal-length": "^1.0.0", - "figures": "^3.2.0", - "globby": "^11.0.1", - "ignore-by-default": "^2.0.0", - "import-local": "^3.0.2", - "indent-string": "^4.0.0", + "debug": "^4.3.4", + "del": "^7.0.0", + "emittery": "^1.0.1", + "figures": "^5.0.0", + "globby": "^13.1.2", + "ignore-by-default": "^2.1.0", + "indent-string": "^5.0.0", "is-error": "^2.2.2", "is-plain-object": "^5.0.0", "is-promise": "^4.0.0", - "lodash": "^4.17.20", - "matcher": "^3.0.0", - "md5-hex": "^3.0.1", - "mem": "^8.0.0", + "matcher": "^5.0.0", + "mem": "^9.0.2", "ms": "^2.1.3", - "ora": "^5.2.0", - "p-event": "^4.2.0", - "p-map": "^4.0.0", - "picomatch": "^2.2.2", - "pkg-conf": "^3.1.0", - "plur": "^4.0.0", - "pretty-ms": "^7.0.1", - "read-pkg": "^5.2.0", + "p-event": "^5.0.1", + "p-map": "^5.5.0", + "picomatch": "^2.3.1", + "pkg-conf": "^4.0.0", + "plur": "^5.1.0", + "pretty-ms": "^8.0.0", "resolve-cwd": "^3.0.0", "slash": "^3.0.0", - "source-map-support": "^0.5.19", - "stack-utils": "^2.0.3", - "strip-ansi": "^6.0.0", - "supertap": "^2.0.0", - "temp-dir": "^2.0.0", - "trim-off-newlines": "^1.0.1", - "update-notifier": "^5.0.1", - "write-file-atomic": "^3.0.3", - "yargs": "^16.2.0" + "stack-utils": "^2.0.6", + "strip-ansi": "^7.0.1", + "supertap": "^3.0.1", + "temp-dir": "^3.0.0", + "write-file-atomic": "^5.0.0", + "yargs": "^17.6.2" } }, "balanced-match": { @@ -4699,12 +3200,6 @@ "safe-buffer": "^5.0.1" } }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, "base64url": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", @@ -4713,20 +3208,9 @@ }, "binary-extensions": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true }, "blueimp-md5": { "version": "2.19.0", @@ -4735,15 +3219,15 @@ "dev": true }, "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", "dev": true }, "borsh": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.5.0.tgz", - "integrity": "sha512-p9w/qGBeeFdUf2GPBPHdX5JQyez8K5VtoFN7PqSfmR+cVUMSmcwAKhP9n2aXoDSKbtS7xZlZt3MVnrJL7GdYhg==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", + "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", "dev": true, "requires": { "bn.js": "^5.2.0", @@ -4751,30 +3235,6 @@ "text-encoding-utf-8": "^1.0.2" } }, - "boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "dev": true, - "requires": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - } - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -4797,28 +3257,12 @@ "bs58": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", "dev": true, "requires": { "base-x": "^3.0.2" } }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, "cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -4838,58 +3282,35 @@ "lowercase-keys": "^2.0.0", "normalize-url": "^6.0.1", "responselike": "^2.0.0" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - } } }, "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.0.0.tgz", + "integrity": "sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==", "dev": true }, "capability": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/capability/-/capability-0.2.5.tgz", - "integrity": "sha1-Ua2HNT8ZNv/Xfy8hx0YzpN6oiAE=", + "integrity": "sha512-rsJZYVCgXd08sPqwmaIqjAd5SUTfonV0z/gDJ8D6cN8wQphky1kkAYEqQ+hmDxTw7UihvBfjUVUSY+DBEe44jg==", "dev": true }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "cbor": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", + "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", "dev": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - } + "nofilter": "^3.1.0" } }, + "chalk": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "dev": true + }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -4919,9 +3340,9 @@ "dev": true }, "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.1.tgz", + "integrity": "sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==", "dev": true }, "ci-parallel-vars": { @@ -4931,81 +3352,97 @@ "dev": true }, "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, - "clean-yaml-object": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", - "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=", - "dev": true - }, - "cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", - "dev": true - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", + "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", "dev": true, "requires": { - "restore-cursor": "^3.1.0" + "escape-string-regexp": "5.0.0" } }, - "cli-spinners": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", - "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==", + "clean-yaml-object": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", + "integrity": "sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==", "dev": true }, "cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", + "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", "dev": true, "requires": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" + "slice-ansi": "^5.0.0", + "string-width": "^5.0.0" } }, "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "requires": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } } }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", "dev": true, "requires": { "mimic-response": "^1.0.0" } }, "code-excerpt": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-3.0.0.tgz", - "integrity": "sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz", + "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==", "dev": true, "requires": { - "convert-to-spaces": "^1.0.1" + "convert-to-spaces": "^2.0.1" } }, "color-convert": { @@ -5032,7 +3469,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "concordance": { @@ -5051,33 +3488,10 @@ "well-known-symbols": "^2.0.0" } }, - "configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - } - }, - "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, "convert-to-spaces": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz", - "integrity": "sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz", + "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==", "dev": true }, "create-require": { @@ -5086,27 +3500,10 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true - }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==", "dev": true, "requires": { "array-find-index": "^1.0.1" @@ -5122,9 +3519,9 @@ } }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -5155,21 +3552,6 @@ } } }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dev": true, - "requires": { - "clone": "^1.0.2" - } - }, "defer-to-connect": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", @@ -5177,19 +3559,27 @@ "dev": true }, "del": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz", - "integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-7.0.0.tgz", + "integrity": "sha512-tQbV/4u5WVB8HMJr08pgw0b6nG4RGt/tj+7Numvq+zqcvUFeMaIWWOUFltiU+6go8BSO2/ogsB4EasDaj0y68Q==", "dev": true, "requires": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", + "globby": "^13.1.2", + "graceful-fs": "^4.2.10", + "is-glob": "^4.0.3", + "is-path-cwd": "^3.0.0", + "is-path-inside": "^4.0.0", + "p-map": "^5.5.0", "rimraf": "^3.0.2", - "slash": "^3.0.0" + "slash": "^4.0.0" + }, + "dependencies": { + "slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true + } } }, "depd": { @@ -5213,31 +3603,22 @@ "path-type": "^4.0.0" } }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, "emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-1.0.1.tgz", + "integrity": "sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ==", "dev": true }, "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "end-of-stream": { @@ -5249,21 +3630,6 @@ "once": "^1.4.0" } }, - "equal-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz", - "integrity": "sha1-IcoRLUirJLTh5//A5TOdMf38J0w=", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, "error-polyfill": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/error-polyfill/-/error-polyfill-0.1.3.tgz", @@ -5281,16 +3647,10 @@ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, - "escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", - "dev": true - }, "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "dev": true }, "esprima": { @@ -5305,23 +3665,6 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, "fast-diff": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", @@ -5329,9 +3672,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -5342,29 +3685,22 @@ } }, "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "requires": { "reusify": "^1.0.4" } }, "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz", + "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } + "escape-string-regexp": "^5.0.0", + "is-unicode-supported": "^1.2.0" } }, "fill-range": { @@ -5377,18 +3713,19 @@ } }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" } }, "fs-extra": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", - "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "requires": { "graceful-fs": "^4.2.0", @@ -5403,12 +3740,23 @@ "dev": true, "requires": { "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + } } }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "fsevents": { @@ -5418,12 +3766,6 @@ "dev": true, "optional": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -5431,21 +3773,24 @@ "dev": true }, "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } }, "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } @@ -5459,33 +3804,31 @@ "is-glob": "^4.0.1" } }, - "global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "dev": true, - "requires": { - "ini": "2.0.0" - } - }, "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz", + "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==", "dev": true, "requires": { - "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", + "fast-glob": "^3.2.11", "ignore": "^5.2.0", "merge2": "^1.4.1", - "slash": "^3.0.0" + "slash": "^4.0.0" + }, + "dependencies": { + "slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true + } } }, "got": { - "version": "11.8.3", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.3.tgz", - "integrity": "sha512-7gtQ5KiPh1RtGS9/Jbv1ofDpBFuq42gyfEib+ejaRBJuj/3tQFeR5+gw57e4ipaU8c/rCjvX6fkQz2lyDlGAOg==", + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "dev": true, "requires": { "@sindresorhus/is": "^4.0.0", @@ -5502,36 +3845,9 @@ } }, "graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "http-cache-semantics": { @@ -5556,7 +3872,7 @@ "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", "dev": true } } @@ -5571,62 +3887,34 @@ "resolve-alpn": "^1.0.0" } }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, "ignore-by-default": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.0.0.tgz", - "integrity": "sha512-+mQSgMRiFD3L3AOxLYOCxjIq4OnAmo5CIuC+lj5ehCJcPtV++QacEV7FdpzvYxH6DaOySWzQU6RR0lPLy37ckA==", - "dev": true - }, - "import-lazy": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.1.0.tgz", + "integrity": "sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==", "dev": true }, - "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true }, "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", "dev": true }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "requires": { "once": "^1.3.0", @@ -5639,24 +3927,12 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true - }, "irregular-plurals": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.3.0.tgz", "integrity": "sha512-MVBLKUTangM3EfRPFROhmWQQKRDsrgI83J8GS3jXy+OwYqiR2/aoWndYQ5416jLE3uaGgLH7ncme3X9y09gZ3g==", "dev": true }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -5666,24 +3942,6 @@ "binary-extensions": "^2.0.0" } }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } - }, - "is-core-module": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", - "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, "is-error": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz", @@ -5693,13 +3951,13 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true }, "is-glob": { @@ -5708,30 +3966,8 @@ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "requires": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - } - }, - "is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true - }, - "is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", - "dev": true + "is-extglob": "^2.1.1" + } }, "is-number": { "version": "7.0.0", @@ -5739,22 +3975,16 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true - }, "is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-3.0.0.tgz", + "integrity": "sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==", "dev": true }, "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", "dev": true }, "is-plain-object": { @@ -5769,34 +3999,10 @@ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", "dev": true }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", "dev": true }, "js-sha256": { @@ -5808,13 +4014,7 @@ "js-string-escape": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", - "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "integrity": "sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==", "dev": true }, "js-yaml": { @@ -5833,18 +4033,6 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -5856,50 +4044,27 @@ } }, "keyv": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.1.1.tgz", - "integrity": "sha512-tGv1yP6snQVDSM4X6yxrv2zzq/EvpW+oYiUz6aueW1u9CtS8RzUQYxxmFwgZlO2jSgCxQbchhxaqXXp2hnKGpQ==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", + "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", "dev": true, "requires": { "json-buffer": "3.0.1" } }, - "latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "dev": true, - "requires": { - "package-json": "^6.3.0" - } - }, - "lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, "load-json-file": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - } + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz", + "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==", + "dev": true }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.1.1.tgz", + "integrity": "sha512-vJXaRMJgRVD3+cUZs3Mncj2mxpt5mP0EmNOsxRSZRMlbqjvxzDEOIUWXGmavo0ZC9+tNZCBLQ66reA11nbpHZg==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^6.0.0" } }, "lodash": { @@ -5908,16 +4073,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, "lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", @@ -5933,23 +4088,6 @@ "yallist": "^4.0.0" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -5966,12 +4104,12 @@ } }, "matcher": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", - "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-5.0.0.tgz", + "integrity": "sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==", "dev": true, "requires": { - "escape-string-regexp": "^4.0.0" + "escape-string-regexp": "^5.0.0" } }, "md5-hex": { @@ -5984,21 +4122,15 @@ } }, "mem": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/mem/-/mem-8.1.1.tgz", - "integrity": "sha512-qFCFUDs7U3b8mBDPyz5EToEKoAkgCzqquIgi9nkkR9bixxOVOre+09lbuH7+9Kn2NFpm56M3GUWVbU2hQgdACA==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", + "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==", "dev": true, "requires": { "map-age-cleaner": "^0.1.3", - "mimic-fn": "^3.1.0" + "mimic-fn": "^4.0.0" } }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -6006,19 +4138,19 @@ "dev": true }, "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.2", + "picomatch": "^2.3.1" } }, "mimic-fn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", - "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true }, "mimic-response": { @@ -6036,16 +4168,10 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "minipass": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", - "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", "dev": true, "requires": { "yallist": "^4.0.0" @@ -6059,6 +4185,17 @@ "requires": { "minipass": "^3.0.0", "yallist": "^4.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + } } }, "mkdirp": { @@ -6080,13 +4217,13 @@ "dev": true }, "near-api-js": { - "version": "0.44.2", - "resolved": "https://registry.npmjs.org/near-api-js/-/near-api-js-0.44.2.tgz", - "integrity": "sha512-eMnc4V+geggapEUa3nU2p8HSHn/njtloI4P2mceHQWO8vDE1NGpnAw8FuTBrLmXSgIv9m6oocgFc9t3VNf5zwg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/near-api-js/-/near-api-js-1.1.0.tgz", + "integrity": "sha512-qYKv1mYsaDZc2uYndhS+ttDhR9+60qFc+ZjD6lWsAxr3ZskMjRwPffDGQZYhC7BRDQMe1HEbk6d5mf+TVm0Lqg==", "dev": true, "requires": { - "bn.js": "5.2.0", - "borsh": "^0.6.0", + "bn.js": "5.2.1", + "borsh": "^0.7.0", "bs58": "^4.0.0", "depd": "^2.0.0", "error-polyfill": "^0.1.3", @@ -6096,25 +4233,12 @@ "node-fetch": "^2.6.1", "text-encoding-utf-8": "^1.0.2", "tweetnacl": "^1.0.1" - }, - "dependencies": { - "borsh": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.6.0.tgz", - "integrity": "sha512-sl5k89ViqsThXQpYa9XDtz1sBl3l1lI313cFUY1HKr+wvMILnb+58xpkqTNrYbelh99dY7K8usxoCusQmqix9Q==", - "dev": true, - "requires": { - "bn.js": "^5.2.0", - "bs58": "^4.0.0", - "text-encoding-utf-8": "^1.0.2" - } - } } }, "near-sandbox": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/near-sandbox/-/near-sandbox-0.0.8.tgz", - "integrity": "sha512-3JrDcA9rI+wA9lWqfOtSovGxBE/TDZL011TLk+jz5wGezVbm7m3tDh/zCfq+++eFyJ3ZbGkG0KF6+trMQJFPQQ==", + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/near-sandbox/-/near-sandbox-0.0.14.tgz", + "integrity": "sha512-wQ1jcD6W6U4V83D0Zxgi2qedMkmTh5iiqm2t/oriKR4rrTql/j8QR/Ip/NfoIH/plFT+vGungKL+B4HxfNyyNg==", "dev": true, "requires": { "got": "^11.8.2", @@ -6131,9 +4255,9 @@ } }, "near-workspaces": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/near-workspaces/-/near-workspaces-1.0.0.tgz", - "integrity": "sha512-TiF3Qk7vpm6twqSxwR1UhVpXtXsUGLr2DrrlRu/DvIstMRI6GOnIWvx9FlvM+x/ERiivACi7s2IWd5hyNJ5YrA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/near-workspaces/-/near-workspaces-3.2.2.tgz", + "integrity": "sha512-Y26FyPccs3lTKFpOzeWQy5urtSe0hcdME4ePbidzHNQPOXCub06htnvsoVEUNGVejc50f5nVHcdCiYO8mtEdTA==", "dev": true, "requires": { "base64url": "^3.0.1", @@ -6143,8 +4267,8 @@ "callsites": "^4.0.0", "fs-extra": "^10.0.0", "js-sha256": "^0.9.0", - "near-api-js": "^0.43.1", - "near-sandbox": "^0.0.8", + "near-api-js": "^0.44.1", + "near-sandbox": "^0.0.14", "near-units": "^0.1.9", "node-port-check": "^2.0.1", "promisify-child-process": "^4.1.1", @@ -6153,16 +4277,27 @@ "temp-dir": "^2.0.0" }, "dependencies": { - "callsites": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.0.0.tgz", - "integrity": "sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==", + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", "dev": true }, + "borsh": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.5.0.tgz", + "integrity": "sha512-p9w/qGBeeFdUf2GPBPHdX5JQyez8K5VtoFN7PqSfmR+cVUMSmcwAKhP9n2aXoDSKbtS7xZlZt3MVnrJL7GdYhg==", + "dev": true, + "requires": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, "near-api-js": { - "version": "0.43.1", - "resolved": "https://registry.npmjs.org/near-api-js/-/near-api-js-0.43.1.tgz", - "integrity": "sha512-bgFuboD/a3eintaWqWMN9oWcGHkxbrKiJhxkJwHmwJrYx49y9QvWwEtoxeHSjKskJHUVXGKvaYRsc9XirrJ5JQ==", + "version": "0.44.2", + "resolved": "https://registry.npmjs.org/near-api-js/-/near-api-js-0.44.2.tgz", + "integrity": "sha512-eMnc4V+geggapEUa3nU2p8HSHn/njtloI4P2mceHQWO8vDE1NGpnAw8FuTBrLmXSgIv9m6oocgFc9t3VNf5zwg==", "dev": true, "requires": { "bn.js": "5.2.0", @@ -6190,24 +4325,15 @@ } } } + }, + "temp-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "dev": true } } }, - "near-workspaces-ava": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/near-workspaces-ava/-/near-workspaces-ava-1.0.0.tgz", - "integrity": "sha512-CFbQ0CLFEP8p7gKlYwVf9nVV8WvP5qaZDiNX6oHyHKng8wJ9uEw32wlv/z8tP0MgJVHeFq5jg8Jm+VG+q0O5Bw==", - "dev": true, - "requires": { - "@ava/typescript": "^2.0.0", - "@types/bn.js": "^5.1.0", - "@types/node": "^16.4.10", - "ava": "3.15.0", - "near-workspaces": "^1.0.0", - "ts-node": "^10.1.0", - "typescript": "^4.3.5" - } - }, "node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -6223,25 +4349,11 @@ "integrity": "sha512-PV1tj5OPbWwxvhPcChXxwCIKl/IfVEdPP4u/gQz2lao/VGoeIUXb/4U72KSHLZpTVBmgTnMm0me7yR0wUsIuPg==", "dev": true }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } + "nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "dev": true }, "normalize-path": { "version": "3.0.0", @@ -6255,19 +4367,10 @@ "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", "dev": true }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, "o3": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/o3/-/o3-1.0.3.tgz", - "integrity": "sha1-GSzod6iC36Z1HwQSqGX6+y2h2sA=", + "integrity": "sha512-f+4n+vC6s4ysy7YO7O2gslWZBUu8Qj2i2OUJOvjRxQva7jVjYjB29jrr9NCjmxZQR0gzrOcv1RnqoYOeMs5VRQ==", "dev": true, "requires": { "capability": "^0.2.5" @@ -6276,46 +4379,12 @@ "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" } }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - }, - "dependencies": { - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - } - } - }, - "ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dev": true, - "requires": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - } - }, "p-cancelable": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", @@ -6325,260 +4394,67 @@ "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==", "dev": true }, "p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-5.0.1.tgz", + "integrity": "sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==", "dev": true, "requires": { - "p-timeout": "^3.1.0" + "p-timeout": "^5.0.2" } }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "yocto-queue": "^1.0.0" } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^4.0.0" } }, "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz", + "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==", "dev": true, "requires": { - "aggregate-error": "^3.0.0" + "aggregate-error": "^4.0.0" } }, "p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz", + "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==", "dev": true }, - "package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "dev": true, - "requires": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "dependencies": { - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true - }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "requires": { - "defer-to-connect": "^1.0.1" - } - }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - } - } - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "dependencies": { - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - } - } - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "requires": { - "json-buffer": "3.0.0" - } - }, - "normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true - }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "requires": { - "lowercase-keys": "^1.0.0" - }, - "dependencies": { - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - } - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, "parse-ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", - "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz", + "integrity": "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==", "dev": true }, "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", "dev": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, "path-type": { @@ -6593,89 +4469,32 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, "pkg-conf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", - "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" - } - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz", + "integrity": "sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==", + "dev": true, + "requires": { + "find-up": "^6.0.0", + "load-json-file": "^7.0.0" } }, "plur": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", - "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz", + "integrity": "sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==", "dev": true, "requires": { - "irregular-plurals": "^3.2.0" + "irregular-plurals": "^3.3.0" } }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, "pretty-ms": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", - "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-8.0.0.tgz", + "integrity": "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==", "dev": true, "requires": { - "parse-ms": "^2.1.0" + "parse-ms": "^3.0.0" } }, "promisify-child-process": { @@ -6694,15 +4513,6 @@ "once": "^1.3.1" } }, - "pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", - "dev": true, - "requires": { - "escape-goat": "^2.0.0" - } - }, "pure-uuid": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/pure-uuid/-/pure-uuid-1.6.2.tgz", @@ -6721,69 +4531,6 @@ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "dev": true }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - } - } - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -6793,41 +4540,12 @@ "picomatch": "^2.2.1" } }, - "registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", - "dev": true, - "requires": { - "rc": "^1.2.8" - } - }, - "registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "dev": true, - "requires": { - "rc": "^1.2.8" - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, - "resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", - "dev": true, - "requires": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, "resolve-alpn": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", @@ -6850,24 +4568,14 @@ "dev": true }, "responselike": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", - "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", "dev": true, "requires": { "lowercase-keys": "^2.0.0" } }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -6893,37 +4601,20 @@ } }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "requires": { "lru-cache": "^6.0.0" } }, - "semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, "serialize-error": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", @@ -6931,14 +4622,6 @@ "dev": true, "requires": { "type-fest": "^0.13.1" - }, - "dependencies": { - "type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "dev": true - } } }, "setprototypeof": { @@ -6947,21 +4630,6 @@ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -6975,85 +4643,25 @@ "dev": true }, "slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - } - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" } }, - "spdx-license-ids": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", - "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", - "dev": true - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "requires": { "escape-string-regexp": "^2.0.0" @@ -7070,110 +4678,59 @@ "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", "dev": true }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - } - } - }, "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" } }, "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "requires": { - "ansi-regex": "^5.0.1" + "ansi-regex": "^6.0.1" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, "supertap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supertap/-/supertap-2.0.0.tgz", - "integrity": "sha512-jRzcXlCeDYvKoZGA5oRhYyR3jUIYu0enkSxtmAgHRlD7HwrovTpH4bDSi0py9FtuA8si9cW/fKommJHuaoDHJA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/supertap/-/supertap-3.0.1.tgz", + "integrity": "sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==", "dev": true, "requires": { - "arrify": "^2.0.1", - "indent-string": "^4.0.0", - "js-yaml": "^3.14.0", + "indent-string": "^5.0.0", + "js-yaml": "^3.14.1", "serialize-error": "^7.0.1", - "strip-ansi": "^6.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" + "strip-ansi": "^7.0.1" } }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, "tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", "dev": true, "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", + "minipass": "^4.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" } }, "temp-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", - "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-3.0.0.tgz", + "integrity": "sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==", "dev": true }, "text-encoding-utf-8": { @@ -7185,13 +4742,7 @@ "time-zone": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", - "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=", - "dev": true - }, - "to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "integrity": "sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==", "dev": true }, "to-regex-range": { @@ -7212,22 +4763,16 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", - "dev": true - }, - "trim-off-newlines": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.3.tgz", - "integrity": "sha512-kh6Tu6GbeSNMGfrrZh6Bb/4ZEHV1QlB4xNDBeog8Y9/QwFlKTRyWvY3Fs9tRDAMZliVUwieMgEdIeL/FtqjkJg==", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, "ts-node": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.5.0.tgz", - "integrity": "sha512-6kEJKwVxAJ35W4akuiysfKwKmjkbYxwQMTBaAxo9KKAx/Yd26mPUyhGz3ji+EsJoAgrLqVsYHNuuYwQe22lbtw==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, "requires": { - "@cspotcode/source-map-support": "0.7.0", + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -7238,7 +4783,7 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" } }, @@ -7249,24 +4794,15 @@ "dev": true }, "type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", "dev": true }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true }, "u3": { @@ -7275,87 +4811,22 @@ "integrity": "sha512-+J5D5ir763y+Am/QY6hXNRlwljIeRMZMGs0cT6qqZVVzzT3X3nFPXVyPOFRMOR4kupB0T8JnCdpWdp6Q/iXn3w==", "dev": true }, - "unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "requires": { - "crypto-random-string": "^2.0.0" - } - }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true }, - "update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "dev": true, - "requires": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - } - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "requires": { - "prepend-http": "^2.0.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, "v8-compile-cache-lib": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", - "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", - "dev": true, - "requires": { - "defaults": "^1.0.3" - } - }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, "well-known-symbols": { @@ -7367,31 +4838,13 @@ "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dev": true, - "requires": { - "string-width": "^4.0.0" - } - }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -7403,6 +4856,12 @@ "strip-ansi": "^6.0.0" }, "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -7411,33 +4870,57 @@ "requires": { "color-convert": "^2.0.1" } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } } } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.0.tgz", + "integrity": "sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w==", "dev": true, "requires": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "signal-exit": "^3.0.7" } }, - "xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true - }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -7451,24 +4934,64 @@ "dev": true }, "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "17.6.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", + "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", "dev": true, "requires": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } } }, "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true }, "yn": { @@ -7476,6 +4999,12 @@ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true + }, + "yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true } } } diff --git a/testing/package.json b/testing/package.json index 44759aa..301acd5 100644 --- a/testing/package.json +++ b/testing/package.json @@ -1,11 +1,29 @@ { - "private": true, + "name": "tests", + "type": "module", "scripts": { - "test": "near-workspaces-ava", - "test:testnet": "near-workspaces-ava --config ./ava.testnet.config.cjs" + "test": "ava --timeout=75s" }, "devDependencies": { - "near-workspaces-ava": "1.0.0", - "near-api-js": "^0.44.2" + "@types/bn.js": "^5.1.1", + "ava": "^5.1.0", + "near-api-js": "^1.1.0", + "near-workspaces": "^3.2.2", + "ts-node": "^10.9.1", + "typescript": "^4.9.4" + }, + "ava": { + "extensions": { + "ts": "module" + }, + "files": [ + "__tests__/*.ava.ts" + ], + "nodeArguments": [ + "--loader=ts-node/esm" + ], + "require": [ + "ts-node/register/transpile-only" + ] } } diff --git a/testing/tsconfig.json b/testing/tsconfig.json index c4e598d..7a2bde7 100644 --- a/testing/tsconfig.json +++ b/testing/tsconfig.json @@ -1,3 +1,12 @@ { - "extends": "near-workspaces-ava/tsconfig.ava.json" -} \ No newline at end of file + "compilerOptions": { + "target": "es2016", + "lib": ["es2020", "esnext"], + "module": "es2020", + "moduleResolution": "node16", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + } +}