diff --git a/Cargo.lock b/Cargo.lock index 8adf8a2b..50ea49db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" dependencies = [ "memchr", ] @@ -84,9 +84,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "arrayref" @@ -134,9 +134,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -162,6 +162,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "bitflags" version = "1.3.2" @@ -231,9 +237,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.81" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6b2562119bf28c3439f7f02db99faf0aa1a8cdfe5772a2ee155d32227239f0" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", "libc", @@ -284,6 +290,12 @@ dependencies = [ "vec_map", ] +[[package]] +name = "const-oid" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -384,9 +396,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.2.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", @@ -395,6 +407,44 @@ dependencies = [ "zeroize", ] +[[package]] +name = "curve25519-dalek" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", +] + [[package]] name = "difflib" version = "0.4.0" @@ -457,10 +507,11 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb04eee5d9d907f29e80ee6b0e78f7e2c82342c63e3580d8c4f69d9d5aad963" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ + "pkcs8", "signature 2.1.0", ] @@ -470,7 +521,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ - "curve25519-dalek", + "curve25519-dalek 3.2.0", "ed25519 1.5.3", "rand 0.7.3", "serde", @@ -478,6 +529,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +dependencies = [ + "curve25519-dalek 4.0.0", + "ed25519 2.2.2", + "rand_core 0.6.4", + "serde", + "sha2 0.10.7", + "zeroize", +] + [[package]] name = "either" version = "1.9.0" @@ -506,6 +571,12 @@ dependencies = [ "synstructure", ] +[[package]] +name = "fiat-crypto" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" + [[package]] name = "float-cmp" version = "0.9.0" @@ -549,9 +620,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "hermit-abi" @@ -658,9 +729,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" @@ -708,9 +779,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -719,9 +790,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] @@ -791,9 +862,9 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] @@ -816,12 +887,28 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30fceb411f9a12ff9222c5f824026be368ff15dc2f13468d850c7d3f502205d6" +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "platforms" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -870,9 +957,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -989,9 +1076,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" dependencies = [ "aho-corasick", "memchr", @@ -1001,9 +1088,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" dependencies = [ "aho-corasick", "memchr", @@ -1034,6 +1121,15 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + [[package]] name = "ryu" version = "1.0.15" @@ -1046,31 +1142,37 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" + [[package]] name = "serde" -version = "1.0.180" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" +checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.180" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" +checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -1139,6 +1241,16 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +[[package]] +name = "spki" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "strsim" version = "0.8.0" @@ -1164,9 +1276,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -1224,14 +1336,14 @@ dependencies = [ [[package]] name = "ton_abi" -version = "2.3.130" -source = "git+https://github.com/tonlabs/ever-abi.git?tag=2.3.130#1aa427ee0a5d4d61cc8f7acd169ae5c35621dc66" +version = "2.3.134" +source = "git+https://github.com/tonlabs/ever-abi.git?tag=2.3.134#98abddfdb55858aa6d2eea2153fc018e59a7b13d" dependencies = [ "base64 0.10.1", "byteorder", "chrono", "ed25519 1.5.3", - "ed25519-dalek", + "ed25519-dalek 1.0.1", "failure", "hex 0.3.2", "num-bigint", @@ -1246,13 +1358,13 @@ dependencies = [ [[package]] name = "ton_block" -version = "1.9.88" -source = "git+https://github.com/tonlabs/ever-block.git?tag=1.9.88#d38a615860e38e4a6ff3c56c6bf1c2a459e7c80a" +version = "1.9.92" +source = "git+https://github.com/tonlabs/ever-block.git?tag=1.9.92#5b4938f4d6676a2e553b4a248978c267eb9271f0" dependencies = [ "base64 0.13.1", "crc", "ed25519 1.5.3", - "ed25519-dalek", + "ed25519-dalek 1.0.1", "failure", "hex 0.4.3", "log", @@ -1264,8 +1376,8 @@ dependencies = [ [[package]] name = "ton_labs_assembler" -version = "1.2.130" -source = "git+https://github.com/tonlabs/ever-assembler.git?tag=1.2.130#625bd9075e27b4d3bee21481ccc504dc8d891a1e" +version = "1.2.132" +source = "git+https://github.com/tonlabs/ever-assembler.git?tag=1.2.132#5899f30ca74cec10b098070466460648ddc9ead1" dependencies = [ "failure", "hex 0.4.3", @@ -1279,15 +1391,15 @@ dependencies = [ [[package]] name = "ton_types" -version = "2.0.18" -source = "git+https://github.com/tonlabs/ever-types.git?tag=2.0.18#cc9e204f9122967b0f1d5af3208f8ccc36e706ef" +version = "2.0.20" +source = "git+https://github.com/tonlabs/ever-types.git?tag=2.0.20#dd7e3fd53c045ebad3d39ed368242a5bf94f20a2" dependencies = [ "aes-ctr", "base64 0.13.1", "crc", - "curve25519-dalek", - "ed25519 1.5.3", - "ed25519-dalek", + "curve25519-dalek 4.0.0", + "ed25519 2.2.2", + "ed25519-dalek 2.0.0", "failure", "hex 0.4.3", "lazy_static", @@ -1296,7 +1408,7 @@ dependencies = [ "num", "num-derive", "num-traits", - "rand 0.7.3", + "rand 0.8.5", "serde", "serde_json", "sha2 0.10.7", @@ -1306,12 +1418,12 @@ dependencies = [ [[package]] name = "ton_vm" -version = "1.8.190" -source = "git+https://github.com/tonlabs/ever-vm.git?tag=1.8.190#0bc10254a621ae10062acca70da353d3e405e8ae" +version = "1.8.195" +source = "git+https://github.com/tonlabs/ever-vm.git?tag=1.8.195#db79eb5eda23fa73fd73a02592eabe314fad6c2c" dependencies = [ "diffy", "ed25519 1.5.3", - "ed25519-dalek", + "ed25519-dalek 1.0.1", "failure", "hex 0.4.3", "lazy_static", @@ -1327,14 +1439,14 @@ dependencies = [ [[package]] name = "tvm_linker" -version = "0.20.5" +version = "0.20.6" dependencies = [ "assert_cmd", "base64 0.13.1", "clap", "crc", - "ed25519 2.2.1", - "ed25519-dalek", + "ed25519 2.2.2", + "ed25519-dalek 1.0.1", "failure", "hex 0.4.3", "lazy_static", @@ -1441,7 +1553,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -1463,7 +1575,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1507,9 +1619,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -1522,62 +1634,63 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "x25519-dalek" -version = "1.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2392b6b94a576b4e2bf3c5b2757d63f10ada8020a2e4d08ac849ebcf6ea8e077" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek", - "rand_core 0.5.1", + "curve25519-dalek 4.0.0", + "rand_core 0.6.4", + "serde", "zeroize", ] [[package]] name = "zeroize" -version = "1.3.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] @@ -1590,7 +1703,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 00766adf..514bf462 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ license-file = 'LICENSE.md' name = 'tvm_linker' readme = 'README.md' repository = 'https://github.com/tonlabs/TVM-linker' -version = '0.20.5' +version = '0.20.6' [[bin]] name = 'tvm_linker' @@ -33,11 +33,11 @@ serde_json = '1.0' sha2 = '0.10' simplelog = '0.6' serde = { features = [ 'derive' ], version = '1.0' } -ton_abi = { git = 'https://github.com/tonlabs/ever-abi.git', tag = '2.3.130' } -ton_block = { features = [ 'gosh' ], git = 'https://github.com/tonlabs/ever-block.git', tag = '1.9.88' } -ton_labs_assembler = { features = [ 'gosh' ], git = 'https://github.com/tonlabs/ever-assembler.git', tag = '1.2.130' } -ton_types = { git = 'https://github.com/tonlabs/ever-types.git', tag = '2.0.18' } -ton_vm = { features = [ 'gosh' ], git = 'https://github.com/tonlabs/ever-vm.git', tag = '1.8.190' } +ton_abi = { git = 'https://github.com/tonlabs/ever-abi.git', tag = '2.3.134' } +ton_block = { features = [ 'gosh' ], git = 'https://github.com/tonlabs/ever-block.git', tag = '1.9.92' } +ton_labs_assembler = { features = [ 'gosh' ], git = 'https://github.com/tonlabs/ever-assembler.git', tag = '1.2.132' } +ton_types = { git = 'https://github.com/tonlabs/ever-types.git', tag = '2.0.20' } +ton_vm = { features = [ 'gosh' ], git = 'https://github.com/tonlabs/ever-vm.git', tag = '1.8.195' } [dev-dependencies] assert_cmd = '2.0.5' diff --git a/build.rs b/build.rs index 5dff62fb..aba7bcfd 100644 --- a/build.rs +++ b/build.rs @@ -26,25 +26,25 @@ fn main() { let mut build_time = String::from("Unknown"); let branch = Command::new("git") - .args(&["rev-parse", "--abbrev-ref", "HEAD"]) + .args(["rev-parse", "--abbrev-ref", "HEAD"]) .output(); if let Ok(branch) = branch { git_branch = from_utf8(branch.stdout); } - let last = Command::new("git").args(&["rev-parse", "HEAD"]).output(); + let last = Command::new("git").args(["rev-parse", "HEAD"]).output(); if let Ok(last) = last { git_commit = from_utf8(last.stdout); } let time = Command::new("git") - .args(&["log", "-1", "--date=iso", "--pretty=format:%cd"]) + .args(["log", "-1", "--date=iso", "--pretty=format:%cd"]) .output(); if let Ok(time) = time { commit_date = from_utf8(time.stdout); } - let b_time = Command::new("date").args(&["+%Y-%m-%d %T %z"]).output(); + let b_time = Command::new("date").args(["+%Y-%m-%d %T %z"]).output(); if let Ok(b_time) = b_time { build_time = from_utf8(b_time.stdout); } diff --git a/src/disasm/codedict.rs b/src/disasm/codedict.rs index 7ecf3d13..1eb40366 100644 --- a/src/disasm/codedict.rs +++ b/src/disasm/codedict.rs @@ -46,9 +46,8 @@ impl Code { process(code); for insn in code.iter_mut() { for param in insn.params_mut() { - match param { - InstructionParameter::Code { code: ref mut inner, cell: _ } => stack.push(inner), - _ => () + if let InstructionParameter::Code { code: ref mut inner, cell: _ } = param { + stack.push(inner) } } } diff --git a/src/disasm/types.rs b/src/disasm/types.rs index df582a2c..bc4cb854 100644 --- a/src/disasm/types.rs +++ b/src/disasm/types.rs @@ -14,7 +14,7 @@ use std::{collections::HashMap, slice::ChunksMut}; use ton_types::{Cell, Result, /*Bitmask,*/ SliceData, fail}; -#[derive(Debug, Clone)] +#[derive(Debug, Default, Clone)] pub struct Code { storage: Vec } diff --git a/src/main.rs b/src/main.rs index efa63c0e..9f93fcb9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,7 +64,7 @@ use resolver::resolve_name; use testcall::{call_contract, MsgInfo, TestCallParams, TraceLevel}; use disasm::commands::disasm_command; - const DEFAULT_CAPABILITIES:u64 = 0x880116ae; // Default capabilities on the main network +const DEFAULT_CAPABILITIES: u64 = 0x880116ae; // Default capabilities on the main network fn main() -> std::result::Result<(), i32> { linker_main().map_err(|err_str| { @@ -257,7 +257,7 @@ fn linker_main() -> Status { let cell = compile_code_to_cell(code.as_str()) .map_err(|e| format_err!("failed to assemble: {}", e))?; let bytes = ton_types::write_boc(&cell)?; - let mut file = File::create(&output).unwrap(); + let mut file = File::create(output).unwrap(); file.write_all(&bytes)?; return Ok(()) } @@ -389,7 +389,7 @@ fn replace_command(matches: &ArgMatches) -> Status { } Err(_) => { let data = std::fs::read(path)?; - ton_types::read_boc(&data)?.withdraw_single_root()? + ton_types::read_boc(data)?.withdraw_single_root()? } }; @@ -587,7 +587,7 @@ fn run_test_subcmd(matches: &ArgMatches) -> Status { } else { format!("{}.tvc", input) }; - let addr = MsgAddressInt::from_str(&address)?; + let addr = MsgAddressInt::from_str(address)?; let state_init = load_from_file(&input)?; let config_cell_opt = matches.value_of("CONFIG").and_then(testcall::load_config); diff --git a/src/methdict.rs b/src/methdict.rs index 644b5a98..2f539767 100644 --- a/src/methdict.rs +++ b/src/methdict.rs @@ -60,7 +60,7 @@ impl Program { } let id = key.clone().get_next_i32() .map_err(|e| (pair.0.clone(), format!("Failed to decode data: {}", e)))?; - if adjust_entry_points || id < -2 || id > 0 { + if adjust_entry_points || !(-2..=0).contains(&id) { let before = val.0; let after = map.get(key) .map_err(|e| (pair.0.clone(), format!("Failed to find key: {}", e)))? diff --git a/src/parser.rs b/src/parser.rs index cfaeb7eb..164f93ab 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -683,7 +683,7 @@ impl ParseEngine { for (_, func) in self.internal_id_to_code.iter_mut() { Self::compat_rename_macro_calls(&mut func.body); } - for (_, lines) in &mut self.macro_name_to_lines { + for lines in &mut self.macro_name_to_lines.values_mut() { Self::compat_rename_macro_calls(lines); } Ok(()) @@ -985,7 +985,7 @@ impl ParseEngine { pers_dict.data().cloned() } - fn encode_computed_cell(&self, cell: &Cell, toplevel: bool) -> Lines { + fn encode_computed_cell(cell: &Cell, toplevel: bool) -> Lines { let slice = SliceData::load_cell(cell.clone()).unwrap(); let mut lines = vec!(); let opening = if toplevel { "{\n" } else { ".cell {\n" }; @@ -993,7 +993,7 @@ impl ParseEngine { lines.push(Line::new(format!(".blob x{}\n", slice.to_hex_string()).as_str(), "", 0)); for i in slice.get_references() { let child = cell.reference(i).unwrap(); - let mut child_lines = self.encode_computed_cell(&child, false); + let mut child_lines = Self::encode_computed_cell(&child, false); lines.append(&mut child_lines); } lines.push(Line::new("}\n", "", 0)); @@ -1036,7 +1036,7 @@ impl ParseEngine { }; let cell = engine.stack().get(0).as_cell().map_err(|e| format_err!("{}: {}", name, e))?; - let res = self.encode_computed_cell(cell, true); + let res = Self::encode_computed_cell(cell, true); self.computed.insert(String::from(name), res.clone()); Ok(res) } diff --git a/src/printer.rs b/src/printer.rs index c7e041ef..47b7d379 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -55,7 +55,7 @@ pub fn tree_of_cells_into_base64(root_cell: Option<&Cell>) -> String { match root_cell { Some(cell) => { match write_boc(cell) { - Ok(bytes) => base64::encode(&bytes), + Ok(bytes) => base64::encode(bytes), Err(_) => "None".to_string() } } @@ -84,7 +84,7 @@ pub fn msg_printer(msg: &Message) -> Result { .map(|slice| slice.into_cell()) .as_ref(), ), - base64::encode(&bytes), + base64::encode(bytes), )) } diff --git a/src/testcall.rs b/src/testcall.rs index 03fc1888..cd3b4f39 100644 --- a/src/testcall.rs +++ b/src/testcall.rs @@ -24,7 +24,7 @@ use ton_vm::{ stack::{StackItem, Stack, savelist::SaveList, integer::IntegerData}, SmartContractInfo, }; -use ton_types::{AccountId, BuilderData, Cell, SliceData, Result, Status}; +use ton_types::{AccountId, BuilderData, Cell, SliceData, Result, Status, HashmapE}; use ton_block::{ CurrencyCollection, Deserializable, ExternalInboundMessageHeader, Grams, InternalMessageHeader, Message, MsgAddressExt, MsgAddressInt, OutAction, @@ -410,11 +410,13 @@ pub fn call_contract( Gas::test() }; + let library_map = HashmapE::with_hashmap(256, state_init.library.root().cloned()); + println!("Engine capabilities: {}", params.capabilities); let mut engine = Engine::with_capabilities( params.capabilities ).setup_with_libraries( - code, Some(registers), Some(stack), Some(gas), vec![] + code, Some(registers), Some(stack), Some(gas), vec!(library_map) ); engine.set_trace(0); let debug_info = params.debug_info;