diff --git a/Cargo.lock b/Cargo.lock index 67ea09e..63c4927 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,7 +40,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -61,7 +61,16 @@ checksum = "7c7db3d5a9718568e4cf4a537cfd7070e6e6ff7481510d0237fb529ac850f6d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli 0.28.1", ] [[package]] @@ -92,18 +101,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "ahash" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.2" @@ -234,18 +231,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -265,6 +262,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.11.0" @@ -382,16 +394,6 @@ dependencies = [ "hashbrown 0.11.2", ] -[[package]] -name = "borsh" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" -dependencies = [ - "borsh-derive 0.10.3", - "hashbrown 0.13.2", -] - [[package]] name = "borsh" version = "1.3.1" @@ -408,21 +410,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ - "borsh-derive-internal 0.9.3", - "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" -dependencies = [ - "borsh-derive-internal 0.10.3", - "borsh-schema-derive-internal 0.10.3", + "borsh-derive-internal", + "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", "proc-macro2", "syn 1.0.109", @@ -438,7 +427,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", "syn_derive", ] @@ -453,17 +442,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "borsh-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "borsh-schema-derive-internal" version = "0.9.3" @@ -475,17 +453,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "brownstone" version = "1.1.0" @@ -753,7 +720,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -918,7 +885,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -942,7 +909,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -953,7 +920,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -983,7 +950,7 @@ checksum = "53e0efad4403bfc52dc201159c4b842a246a14b98c64b55dfd0f2d89729dfeb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -1157,7 +1124,7 @@ checksum = "04d0b288e3bb1d861c4403c1774a6f7a798781dfc519b3647df2a3dd4ae95f25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -1193,7 +1160,7 @@ dependencies = [ name = "exploit-stub" version = "0.1.0" dependencies = [ - "near-sdk", + "near-sdk 4.1.1", ] [[package]] @@ -1372,7 +1339,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -1447,6 +1414,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "goblin" version = "0.5.4" @@ -1483,7 +1456,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash 0.7.7", + "ahash", ] [[package]] @@ -1492,15 +1465,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.6", -] - [[package]] name = "hashbrown" version = "0.14.2" @@ -1621,7 +1585,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -1755,13 +1719,12 @@ version = "1.0.0" dependencies = [ "anyhow", "async-trait", - "borsh 0.10.3", - "integration-utils", "maplit", "near-contract-standards", - "near-sdk", + "near-sdk 4.1.1", "near-units", "near-workspaces", + "nitka", "pkg-config", "sweat-model", "tokio", @@ -1769,32 +1732,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "integration-trait" -version = "0.1.0" -source = "git+https://github.com/sweatco/integration-utils.git?rev=e54dc392ef42837123dd2c0ad19b6d6b815192d7#e54dc392ef42837123dd2c0ad19b6d6b815192d7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", -] - -[[package]] -name = "integration-utils" -version = "0.1.0" -source = "git+https://github.com/sweatco/integration-utils.git?rev=e54dc392ef42837123dd2c0ad19b6d6b815192d7#e54dc392ef42837123dd2c0ad19b6d6b815192d7" -dependencies = [ - "anyhow", - "async-trait", - "dotenv", - "fake", - "futures", - "near-sdk", - "near-units", - "near-workspaces", - "tokio", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -2113,7 +2050,7 @@ name = "near-contract-standards" version = "4.1.1" source = "git+https://github.com/sweatco/near-sdk-rs?rev=8c48b26cc48d969c1e5f3162141fe9c824fccecd#8c48b26cc48d969c1e5f3162141fe9c824fccecd" dependencies = [ - "near-sdk", + "near-sdk 4.1.1", "schemars", "serde", "serde_json", @@ -2246,7 +2183,7 @@ dependencies = [ "prometheus", "serde", "serde_json", - "strum", + "strum 0.24.1", "thiserror", "tokio", "tracing", @@ -2270,7 +2207,7 @@ dependencies = [ "serde", "serde_repr", "serde_yaml", - "strum", + "strum 0.24.1", "thiserror", ] @@ -2299,7 +2236,7 @@ dependencies = [ "serde", "serde_json", "smart-default", - "strum", + "strum 0.24.1", "thiserror", ] @@ -2339,7 +2276,7 @@ dependencies = [ "serde_yaml", "sha3", "smart-default", - "strum", + "strum 0.24.1", "thiserror", "time", "tracing", @@ -2359,7 +2296,7 @@ dependencies = [ "num-rational", "serde", "sha2 0.10.8", - "strum", + "strum 0.24.1", ] [[package]] @@ -2380,7 +2317,7 @@ dependencies = [ "serde_repr", "serde_with", "sha2 0.10.8", - "strum", + "strum 0.24.1", "thiserror", ] @@ -2403,7 +2340,7 @@ checksum = "80fca203c51edd9595ec14db1d13359fb9ede32314990bf296b6c5c4502f6ab7" dependencies = [ "quote", "serde", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -2426,7 +2363,7 @@ dependencies = [ "fs2", "near-rpc-error-core 0.20.1", "serde", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -2455,8 +2392,8 @@ dependencies = [ "near-crypto 0.14.0", "near-primitives 0.14.0", "near-primitives-core 0.14.0", - "near-sdk-macros", - "near-sys", + "near-sdk-macros 4.1.1", + "near-sys 0.2.0", "near-vm-logic", "once_cell", "schemars", @@ -2465,6 +2402,26 @@ dependencies = [ "wee_alloc", ] +[[package]] +name = "near-sdk" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5c2e7c9524308b1b301cca05d875de13b3b20dc8b92e71f3890b380372e4c88" +dependencies = [ + "base64 0.21.5", + "borsh 1.3.1", + "bs58 0.5.0", + "near-account-id 1.0.0", + "near-gas", + "near-sdk-macros 5.0.0", + "near-sys 0.2.1", + "near-token", + "once_cell", + "serde", + "serde_json", + "wee_alloc", +] + [[package]] name = "near-sdk-macros" version = "4.1.1" @@ -2476,6 +2433,23 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "near-sdk-macros" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e9b23d9d7757ade258921c9cbc7923542e64d9d3b52a6cd91f746c77cb0a0f" +dependencies = [ + "Inflector", + "darling", + "proc-macro2", + "quote", + "serde", + "serde_json", + "strum 0.26.2", + "strum_macros 0.26.2", + "syn 2.0.52", +] + [[package]] name = "near-stdx" version = "0.20.1" @@ -2487,12 +2461,19 @@ name = "near-sys" version = "0.2.0" source = "git+https://github.com/sweatco/near-sdk-rs?rev=8c48b26cc48d969c1e5f3162141fe9c824fccecd#8c48b26cc48d969c1e5f3162141fe9c824fccecd" +[[package]] +name = "near-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397688591acf8d3ebf2c2485ba32d4b24fc10aad5334e3ad8ec0b7179bfdf06b" + [[package]] name = "near-token" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b68f3f8a2409f72b43efdbeff8e820b81e70824c49fee8572979d789d1683fb" dependencies = [ + "borsh 1.3.1", "serde", ] @@ -2586,7 +2567,7 @@ dependencies = [ "serde_with", "sha2 0.10.8", "sha3", - "strum", + "strum 0.24.1", "thiserror", "tracing", "zeropool-bn", @@ -2633,6 +2614,33 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +[[package]] +name = "nitka" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eaa205f149de38d17bc5d9a648cd56040de40b0ecda4fd50c454ef8007d4cc" +dependencies = [ + "anyhow", + "dotenv", + "fake", + "futures", + "near-sdk 5.0.0", + "near-units", + "near-workspaces", + "tokio", +] + +[[package]] +name = "nitka-proc" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58f943784b90b720e6596109e45e3400c2c2826dc13123aa8b831fe10fdf152c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "nom" version = "7.1.3" @@ -2729,6 +2737,15 @@ dependencies = [ "libc", ] +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.18.0" @@ -2764,7 +2781,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -2982,7 +2999,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -3104,9 +3121,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -3187,9 +3204,9 @@ checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -3429,6 +3446,12 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -3553,7 +3576,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -3634,7 +3657,7 @@ checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -3667,7 +3690,7 @@ checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -3708,7 +3731,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -3841,6 +3864,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys", +] + [[package]] name = "spin" version = "0.5.2" @@ -3891,9 +3924,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", ] +[[package]] +name = "strum" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" + [[package]] name = "strum_macros" version = "0.24.3" @@ -3907,6 +3946,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.52", +] + [[package]] name = "subtle" version = "2.5.0" @@ -3918,7 +3970,7 @@ name = "sweat" version = "1.2.1" dependencies = [ "near-contract-standards", - "near-sdk", + "near-sdk 4.1.1", "static_assertions", "sweat-model", ] @@ -3929,11 +3981,11 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "integration-trait", - "integration-utils", "near-contract-standards", - "near-sdk", + "near-sdk 4.1.1", "near-workspaces", + "nitka", + "nitka-proc", ] [[package]] @@ -3959,7 +4011,7 @@ dependencies = [ "elementtree", "fallible-iterator", "flate2", - "gimli", + "gimli 0.26.2", "goblin", "lazy_static", "lazycell", @@ -3991,9 +4043,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -4009,7 +4061,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -4095,7 +4147,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -4154,11 +4206,11 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", @@ -4166,7 +4218,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.5", "tokio-macros", "windows-sys", ] @@ -4183,13 +4235,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -4395,7 +4447,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] @@ -4429,6 +4481,17 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + [[package]] name = "tracing-opentelemetry" version = "0.17.4" @@ -4439,15 +4502,15 @@ dependencies = [ "opentelemetry", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.1.4", "tracing-subscriber", ] [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -4458,7 +4521,7 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.2.0", ] [[package]] @@ -4633,7 +4696,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", "wasm-bindgen-shared", ] @@ -4667,7 +4730,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4879,26 +4942,6 @@ version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" -[[package]] -name = "zerocopy" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd66a62464e3ffd4e37bd09950c2b9dd6c4f8767380fabba0d523f9a775bc85a" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255c4596d41e6916ced49cfafea18727b24d67878fa180ddfd69b9df34fd1726" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", -] - [[package]] name = "zeroize" version = "1.3.0" @@ -4916,7 +4959,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.52", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f7c4544..8ad381c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ near-workspaces = "0.10.0" near-sdk = { git = "https://github.com/sweatco/near-sdk-rs", rev = "8c48b26cc48d969c1e5f3162141fe9c824fccecd" } near-contract-standards = { git = "https://github.com/sweatco/near-sdk-rs", rev = "8c48b26cc48d969c1e5f3162141fe9c824fccecd" } -integration-trait = { git = "https://github.com/sweatco/integration-utils.git", rev = "e54dc392ef42837123dd2c0ad19b6d6b815192d7" } -integration-utils = { git = "https://github.com/sweatco/integration-utils.git", rev = "e54dc392ef42837123dd2c0ad19b6d6b815192d7" } +nitka = "0.1.1" +nitka-proc = "0.1.1" sweat-model = { path = "model" } diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index eb0b457..292b1da 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -15,14 +15,13 @@ anyhow = { workspace = true } tokio = { workspace = true } near-units = { workspace = true } -borsh = "0.10.3" maplit = "1.0" -tracing = "0.1.37" -tracing-subscriber = { version = "0.3.11", features = ["env-filter"] } -pkg-config = "0.3.1" +tracing = "0.1.40" +tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } +pkg-config = "0.3.27" [dependencies] -async-trait = "0.1.73" +async-trait = "0.1.77" -sweat-model = { workspace = true, features = ["integration-test"] } -integration-utils = { workspace = true } +sweat-model = { workspace = true, features = ["integration-api"] } +nitka = { workspace = true } diff --git a/integration-tests/src/callback_attack.rs b/integration-tests/src/callback_attack.rs index 2ad734d..8017d21 100644 --- a/integration-tests/src/callback_attack.rs +++ b/integration-tests/src/callback_attack.rs @@ -1,7 +1,7 @@ #![cfg(test)] -use integration_utils::misc::ToNear; use near_sdk::{json_types::U128, serde_json::json}; +use nitka::misc::ToNear; use sweat_model::FungibleTokenCoreIntegration; use crate::{ diff --git a/integration-tests/src/defer.rs b/integration-tests/src/defer.rs index 5a8df3f..75e15a0 100644 --- a/integration-tests/src/defer.rs +++ b/integration-tests/src/defer.rs @@ -1,6 +1,6 @@ #![cfg(test)] -use integration_utils::misc::ToNear; +use nitka::misc::ToNear; use sweat_model::{FungibleTokenCoreIntegration, IntegrationTestMethodsIntegration, SweatDeferIntegration}; use crate::prepare::{prepare_contract, IntegrationContext}; diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index e6d078b..120b520 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -1,6 +1,6 @@ #![cfg(test)] -use integration_utils::misc::ToNear; +use nitka::misc::ToNear; use sweat_model::{FungibleTokenCoreIntegration, SweatApiIntegration, SweatDeferIntegration}; use crate::prepare::{prepare_contract, IntegrationContext}; diff --git a/integration-tests/src/measure/record_batch.rs b/integration-tests/src/measure/record_batch.rs index 0f081f7..8afaf21 100644 --- a/integration-tests/src/measure/record_batch.rs +++ b/integration-tests/src/measure/record_batch.rs @@ -3,8 +3,8 @@ use std::future::IntoFuture; use anyhow::Result; -use integration_utils::measure::outcome_storage::OutcomeStorage; use near_workspaces::types::Gas; +use nitka::measure::outcome_storage::OutcomeStorage; use sweat_model::SweatApiIntegration; use crate::{prepare::IntegrationContext, prepare_contract}; diff --git a/integration-tests/src/mint.rs b/integration-tests/src/mint.rs index 512a6d2..1d86e79 100644 --- a/integration-tests/src/mint.rs +++ b/integration-tests/src/mint.rs @@ -1,5 +1,5 @@ -use integration_utils::misc::ToNear; use near_sdk::json_types::{U128, U64}; +use nitka::misc::ToNear; use sweat_model::{FungibleTokenCoreIntegration, Payout, SweatApiIntegration}; use crate::prepare::{prepare_contract, IntegrationContext}; diff --git a/integration-tests/src/prepare.rs b/integration-tests/src/prepare.rs index 430dccc..565287c 100644 --- a/integration-tests/src/prepare.rs +++ b/integration-tests/src/prepare.rs @@ -1,15 +1,15 @@ use anyhow::Result; use async_trait::async_trait; -use integration_utils::misc::ToNear; use near_sdk::serde_json::json; use near_workspaces::{Account, Contract}; +use nitka::misc::ToNear; use sweat_model::{StorageManagementIntegration, SweatApiIntegration, SweatContract}; const CLAIM_CONTRACT: &str = "sweat_claim"; const HOLDING_STUB_CONTRACT: &str = "exploit_stub"; const FT_CONTRACT: &str = "sweat"; -pub type Context = integration_utils::context::Context; +pub type Context = nitka::context::Context; #[async_trait] pub trait IntegrationContext { diff --git a/integration-tests/src/transfer.rs b/integration-tests/src/transfer.rs index 87e9e78..4402760 100644 --- a/integration-tests/src/transfer.rs +++ b/integration-tests/src/transfer.rs @@ -1,5 +1,5 @@ -use integration_utils::misc::ToNear; use near_sdk::json_types::U128; +use nitka::misc::ToNear; use sweat_model::{FungibleTokenCoreIntegration, StorageManagementIntegration, SweatApiIntegration}; use crate::prepare::{prepare_contract, IntegrationContext}; diff --git a/model/Cargo.toml b/model/Cargo.toml index 8435611..b177bd5 100644 --- a/model/Cargo.toml +++ b/model/Cargo.toml @@ -5,15 +5,17 @@ edition = "2021" [features] default = [] -integration-test = ["dep:integration-utils", "dep:near-workspaces"] +integration-test = ["dep:nitka", "dep:near-workspaces"] +integration-api = ["dep:nitka", "dep:near-workspaces"] +release-api = [] [dependencies] anyhow = { workspace = true } async-trait = { workspace = true } -integration-trait = { workspace = true } +nitka-proc = { workspace = true } near-sdk = { workspace = true } near-contract-standards = { workspace = true } -integration-utils = { workspace = true, optional = true } +nitka = { workspace = true, optional = true } near-workspaces = { workspace = true, optional = true } diff --git a/model/src/lib.rs b/model/src/lib.rs index 24e2617..76520ce 100644 --- a/model/src/lib.rs +++ b/model/src/lib.rs @@ -1,13 +1,17 @@ #![allow(clippy::new_ret_no_self, clippy::wrong_self_convention)] -use integration_trait::make_integration_version; use near_contract_standards::storage_management::{StorageBalance, StorageBalanceBounds}; +#[cfg(feature = "release-api")] +use near_sdk::AccountId; use near_sdk::{ json_types::{U128, U64}, - AccountId, PromiseOrValue, + PromiseOrValue, }; +#[cfg(feature = "integration-api")] +use nitka::AccountId; +use nitka_proc::make_integration_version; -#[cfg(feature = "integration-test")] +#[cfg(feature = "integration-api")] pub struct SweatContract<'a> { pub contract: &'a near_workspaces::Contract, } diff --git a/res/sweat.wasm b/res/sweat.wasm index 81f4804..81d84a1 100755 Binary files a/res/sweat.wasm and b/res/sweat.wasm differ diff --git a/scripts/lint.sh b/scripts/lint.sh index d6e3e78..1691bdb 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -3,7 +3,7 @@ set -eox pipefail rustup component add clippy -cargo clippy --all \ +cargo clippy -p sweat \ -- \ \ -W clippy::all \ diff --git a/sweat/Cargo.toml b/sweat/Cargo.toml index 4adafd3..4a49781 100644 --- a/sweat/Cargo.toml +++ b/sweat/Cargo.toml @@ -9,8 +9,10 @@ publish = false crate-type = ["cdylib"] [features] -default = [] -integration-test = [] +default = ["release"] +release = ["sweat-model/release-api"] +integration-test = ["sweat-model/release-api"] +integration-api = ["sweat-model/integration-api"] [dependencies] sweat-model = { workspace = true }