From 3a79515c2c182a8544ba5b776a048a5e7a24b29c Mon Sep 17 00:00:00 2001 From: Sam Ulrich <40002776+sam-ulrich1@users.noreply.github.com> Date: Thu, 4 Apr 2019 11:53:17 -0500 Subject: [PATCH 01/12] Added Script --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..52ebae3 --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +echo "Buidling Hedera-Python SDK..." +docker build . --tag hedera/pyo3-pack +docker run --rm -v $(pwd):/io hedera/pyo3-pack build --release From 64aeaa8d3b16e6ed25e452f7a331615de9c22d64 Mon Sep 17 00:00:00 2001 From: Sam Ulrich <40002776+sam-ulrich1@users.noreply.github.com> Date: Thu, 4 Apr 2019 11:53:46 -0500 Subject: [PATCH 02/12] Added pyo3 Dockerfile --- Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d462a31 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM rustlang/rust:nightly + +ENV PYTHONUNBUFFERED=1 \ + DEBIAN_FRONTEND=noninteractive \ + PROTOC_ZIP=protoc-3.3.0-linux-x86_64.zip + +RUN apt-get update \ + && apt-get install -yq --no-install-recommends \ + python-setuptools + +# install pyo3-pack +RUN easy_install pip && pip install pyo3-pack + +# install protoc required for library +RUN wget -q https://github.com/google/protobuf/releases/download/v3.3.0/$PROTOC_ZIP && \ + unzip -o $PROTOC_ZIP -d /protoc && \ + ln -s /protoc/bin/protoc /usr/local/bin/protoc && \ + rm -f $PROTOC_ZIP + +# pyo3-pack requires newer version of rust +RUN rustup toolchain add nightly-2019-02-07 && rustup default nightly-2019-02-07 + +ADD . /io/ + +WORKDIR /io + +ENTRYPOINT ["pyo3-pack"] From b70e600752a5a1889ba7d4cfbbf247f60976db94 Mon Sep 17 00:00:00 2001 From: Sam Ulrich <40002776+sam-ulrich1@users.noreply.github.com> Date: Thu, 4 Apr 2019 11:56:03 -0500 Subject: [PATCH 03/12] Changed Name Of Build File --- build.sh => build | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename build.sh => build (100%) diff --git a/build.sh b/build similarity index 100% rename from build.sh rename to build From 8b585c39d414b9c3fb7ac98e9769896c9485d39f Mon Sep 17 00:00:00 2001 From: Sam Ulrich Date: Thu, 29 Aug 2019 16:11:15 -0500 Subject: [PATCH 04/12] Added CallParams, SolidityUtils, and FunctionSelector --- Cargo.lock | 101 +++++++------- Cargo.toml | 6 +- build | 41 +++++- src/account_info.rs | 5 - src/call_params.rs | 155 ++++++++++++++++++++++ src/contract_function_result.rs | 3 +- src/contract_log_info.rs | 2 +- src/lib.rs | 26 ++-- src/macros.rs | 10 +- src/query_contract_call.rs | 6 + src/solidity_util.rs | 58 ++++++++ src/transaction_admin_contract_delete.rs | 3 - src/transaction_admin_contract_recover.rs | 3 - src/transaction_admin_file_delete.rs | 3 - src/transaction_admin_file_recover.rs | 3 - src/transaction_contract_create.rs | 2 - src/transaction_contract_delete.rs | 7 + src/transaction_crypto_create.rs | 2 - src/transaction_crypto_update.rs | 1 - 19 files changed, 335 insertions(+), 102 deletions(-) mode change 100644 => 100755 build create mode 100644 src/call_params.rs create mode 100644 src/query_contract_call.rs create mode 100644 src/solidity_util.rs delete mode 100644 src/transaction_admin_contract_delete.rs delete mode 100644 src/transaction_admin_contract_recover.rs delete mode 100644 src/transaction_admin_file_delete.rs delete mode 100644 src/transaction_admin_file_recover.rs create mode 100644 src/transaction_contract_delete.rs diff --git a/Cargo.lock b/Cargo.lock index 3c4004a..55f11a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -73,7 +73,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "block-buffer" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -166,7 +166,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -460,7 +460,7 @@ dependencies = [ "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "httpbis 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "tls-api 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tls-api-stub 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -473,8 +473,8 @@ name = "grpc-compiler" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf-codegen 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf-codegen 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -488,22 +488,22 @@ dependencies = [ [[package]] name = "hedera" -version = "0.0.0" +version = "0.1.0-alpha.0" dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "hedera 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hedera 0.5.0-alpha.0", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "pyo3 0.6.0-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hedera" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.5.0-alpha.0" dependencies = [ "bip39 0.6.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -521,12 +521,13 @@ dependencies = [ "num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "protoc-rust-grpc 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "query_interface 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "simple_asn1 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-async-await 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -585,6 +586,11 @@ dependencies = [ "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -836,7 +842,7 @@ dependencies = [ "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -893,7 +899,7 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.3.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -901,10 +907,10 @@ dependencies = [ [[package]] name = "protobuf-codegen" -version = "2.3.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -917,13 +923,13 @@ dependencies = [ [[package]] name = "protoc-rust" -version = "2.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf-codegen 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf-codegen 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "protoc 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -932,9 +938,9 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "grpc-compiler 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "protoc 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protoc-rust 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protoc-rust 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1215,12 +1221,24 @@ name = "sha2" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "block-buffer 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sha3" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "simple_asn1" version = "0.3.0" @@ -1243,11 +1261,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.8" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "spin" @@ -1299,19 +1314,6 @@ dependencies = [ "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "tempfile" -version = "3.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "thread_local" version = "0.3.6" @@ -1611,14 +1613,6 @@ dependencies = [ "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "utf8-ranges" version = "1.0.2" @@ -1681,7 +1675,7 @@ dependencies = [ "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bip39 0.6.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7059804e226b3ac116519a252d7f5fb985a5ccc0e93255e036a5f7e7283323f4" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" -"checksum block-buffer 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "509de513cca6d92b6aacf9c61acfe7eaa160837323a81068d690cc1f8e5740da" +"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-padding 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d75255892aeb580d3c566f213a2b6fdc1c66667839f45719ee1d30ebf2aea591" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" @@ -1726,12 +1720,12 @@ dependencies = [ "checksum grpc 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8e530ef7894a104a1c8525ce68787b3491efa2098ce5e5454e8324ea78893548" "checksum grpc-compiler 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b07f140d998d8940880e464f3fd291052618199432e91e59ae5c5075c0c8a40c" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" -"checksum hedera 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4645bcf4a1f883e209b2868eb75e662716d4b8071d55980d0247315767fda883" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum httpbis 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7689cfa896b2a71da4f16206af167542b75d242b6906313e53857972a92d5614" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" +"checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" @@ -1769,10 +1763,10 @@ dependencies = [ "checksum proc-macro-hack-impl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b753ad9ed99dd8efeaa7d2fb8453c8f6bc3e54b97966d35f1bc77ca6865254a" "checksum proc-macro-nested 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9968e025d6368d1273a93bc23051e30dbf5482475e716d7385d8ec8fbd5b5b6" "checksum proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "38fddd23d98b2144d197c0eca5705632d4fe2667d14a6be5df8934f8d74f1978" -"checksum protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d82d117bc7565ce6be0150159251c9b1eeec7b129f5a2aa86e10acb5970de1cb" -"checksum protobuf-codegen 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f25bf531a031dd128d4e7285401caed1038d4f732b56bb1d99f02bdad4ad125" +"checksum protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8aefcec9f142b524d98fc81d07827743be89dd6586a1ba6ab21fa66a500b3fa5" +"checksum protobuf-codegen 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "31539be8028d6b9e8e1b3b7c74e2fa3555302e27b2cc20dbaee6ffba648f75e2" "checksum protoc 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6762f5a05f41eb6252606fc6553262a025e72c51a0227717990998fd9c2ac81" -"checksum protoc-rust 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dad6667dc189ae21a1f650ba07ce512dda5f6ba78e494decf40455c9644c170f" +"checksum protoc-rust 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "451bac6bc50c1f0a5f5298a369a1d7b3c243a6ae15cbb299a6b0ad9a88b35e96" "checksum protoc-rust-grpc 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89b0b611e3a7fda302581288521d0b1f4662b4fdf285c5ef5f8deb38f99f96ff" "checksum pyo3 0.6.0-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e4d85e8a8805971cc68a0c0b570c7fe636611fd0383d10a497fd7e9569abfa93" "checksum pyo3-derive-backend 0.6.0-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89df76a9f4763fec4f3fadce4f098037bfccb4fa78bf1a39f0c9fb445a56dd1f" @@ -1806,10 +1800,11 @@ dependencies = [ "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" +"checksum sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" "checksum simple_asn1 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f60217f160fe63c26378d77474a4fdaa6f6cd22fb596e1fd94ba6a17c3973956" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum smallvec 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "88aea073965ab29f6edb5493faf96ad662fb18aa9eeb186a3b7057951605ed15" +"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" "checksum spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ceac490aa12c567115b40b7b7fceca03a6c9d53d5defea066123debc83c5dc1f" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" @@ -1817,7 +1812,6 @@ dependencies = [ "checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tls-api 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e452fe2fdf40a10715adb3a5f244c7411cdf2ecc887b07160310939785db9182" @@ -1845,7 +1839,6 @@ dependencies = [ "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unix_socket 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aa2700417c405c38f5e6902d699345241c28c0b7ade4abaad71e35a87eb1564" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" diff --git a/Cargo.toml b/Cargo.toml index 7992bd9..92a25ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "hedera" publish = false -version = "0.0.0" +version = "0.1.0-alpha.0" edition = "2018" authors = [ "LaunchBadge " @@ -11,7 +11,8 @@ authors = [ crate-type = ["cdylib"] [dependencies] -hedera = "0.4.1" +#hedera = "0.4.1" +hedera = { path = "/home/user/Development/Dependencies/hedera-sdk-rust" } pyo3 = { version = "0.6.0-alpha.1", features = [ "extension-module" ] } chrono = "0.4.6" itertools = "0.8.0" @@ -19,6 +20,7 @@ derive_more = "0.13.0" mashup = "0.1.9" try_from = "0.3.2" failure = "0.1.5" +sha3 = "0.8.2" [profile.release] lto = true diff --git a/build b/build old mode 100644 new mode 100755 index 52ebae3..0add429 --- a/build +++ b/build @@ -1,5 +1,38 @@ -#!/bin/sh +#!/bin/bash -echo "Buidling Hedera-Python SDK..." -docker build . --tag hedera/pyo3-pack -docker run --rm -v $(pwd):/io hedera/pyo3-pack build --release +pck=$(command -v pyo3-pack) + +if [[ "${pck}" == "" ]]; then + read -p "PY03-Pack not found. Install PY03-Pack? [Y/n] " pyo + if [[ "${pyo}" == "Y" ]]; then + pip install pyo3-pack + fi +fi + +pyo3-pack build + +echo -e "\n" +read -p "Hedera SDK Built Successfully. Install Hedera SDK? [Y/n] " install + +if [[ "${install}" != "Y" ]]; then + exit +fi + +declare -a build_files + +count=0 +echo -e "\nBuild Files\n" +for entry in ./target/wheels/* +do + echo "[${count}] $entry" + build_files[count]=$entry + count=$((count+1)) +done + +read -p "Select Build File To Install: " index +echo -e "\n" + +echo "Selected: ${build_files[$index]}" + +echo "Installing..." +pip install --force-reinstall ${build_files[$index]} diff --git a/src/account_info.rs b/src/account_info.rs index 9b9e3f1..8534bfa 100644 --- a/src/account_info.rs +++ b/src/account_info.rs @@ -33,11 +33,6 @@ impl PyAccountInfo { Ok(self.inner.proxy_account_id.map(Into::into)) } - #[getter] - pub fn proxy_fraction(&self) -> PyResult { - Ok(self.inner.proxy_fraction as i32) - } - #[getter] pub fn proxy_received(&self) -> PyResult { Ok(self.inner.proxy_received as i64) diff --git a/src/call_params.rs b/src/call_params.rs new file mode 100644 index 0000000..f19102d --- /dev/null +++ b/src/call_params.rs @@ -0,0 +1,155 @@ +use hedera::call_params::CallParams; +use derive_more::From; +use pyo3::prelude::*; + +#[pyclass(name = CallParams)] +#[derive(From)] +pub struct PyCallParams { + pub(crate) inner: CallParams, +} + +#[pymethods] +impl PyCallParams { + #[new] + pub fn __new__(obj: &PyRawObject, func: Option) -> PyResult<()> { + let cp = match func { + Some(name) => { + CallParams::new(Some(name)) + }, + None => CallParams::new(None) + }; + obj.init(move || Self { + inner: cp + }) + } + + pub fn add_string(&mut self, param: String) -> PyResult<()> { + self.inner.add_string(param); + Ok(()) + } + + pub fn add_string_array(&mut self, param: Vec) -> PyResult<()> { + self.inner.add_string_array(param); + Ok(()) + } + + pub fn add_fixed_string_array(&mut self, param: Vec, fixed_len: usize) -> PyResult<()> { + self.inner.add_fixed_string_array(param, fixed_len); + Ok(()) + } + + pub fn add_bytes(&mut self, param: Vec) -> PyResult<()> { + self.inner.add_bytes(param); + Ok(()) + } + + pub fn add_fixed_bytes(&mut self, param: Vec, fixed_len: usize) -> PyResult<()> { + self.inner.add_fixed_bytes(param, fixed_len); + Ok(()) + } + + pub fn add_byte_array(&mut self, param: Vec>) -> PyResult<()> { + self.inner.add_byte_array(param); + Ok(()) + } + + pub fn add_fixed_byte_array(&mut self, param: Vec>, byte_len: usize) -> PyResult<()> { + self.inner.add_fixed_byte_array(param, byte_len); + Ok(()) + } + + pub fn add_byte_fixed_array(&mut self, param: Vec>, fixed_len: usize) -> PyResult<()> { + self.inner.add_byte_fixed_array(param, fixed_len); + Ok(()) + } + + pub fn add_fixed_byte_fixed_array(&mut self, param: Vec>, fixed_byte_len: usize, + fixed_len: usize) -> PyResult<()> { + self.inner.add_fixed_byte_fixed_array(param, fixed_byte_len, fixed_len); + Ok(()) + } + + pub fn add_bool(&mut self, param: bool) -> PyResult<()> { + self.inner.add_bool(param); + Ok(()) + } + + pub fn add_int(&mut self, param: i64, width: usize) -> PyResult<()> { + self.inner.add_int(param, width); + Ok(()) + } + + pub fn add_int_array(&mut self, param: Vec, width: usize) -> PyResult<()> { + self.inner.add_int_array(param, width); + Ok(()) + } + + pub fn add_fixed_int_array(&mut self, param: Vec, width: usize, + fixed_len: usize) -> PyResult<()> { + self.inner.add_fixed_int_array(param, width, fixed_len); + Ok(()) + } + + pub fn add_uint(&mut self, param: u64, width: usize) -> PyResult<()> { + self.inner.add_uint(param, width); + Ok(()) + } + + pub fn add_uint_array(&mut self, param: Vec, width: usize) -> PyResult<()> { + self.inner.add_uint_array(param, width); + Ok(()) + } + + pub fn add_fixed_uint_array(&mut self, param: Vec, width: usize, + fixed_len: usize) -> PyResult<()> { + self.inner.add_fixed_uint_array(param, width, fixed_len); + Ok(()) + } + + pub fn add_address(&mut self, param: Vec) -> PyResult<()> { + self.inner.add_address(param); + Ok(()) + } + + pub fn add_address_string(&mut self, param: String) -> PyResult<()> { + self.inner.add_address_string(param); + Ok(()) + } + + pub fn add_address_array(&mut self, param: Vec>) -> PyResult<()> { + self.inner.add_address_array(param); + Ok(()) + } + + pub fn add_fixed_address_array(&mut self, param: Vec>, + fixed_len: usize) -> PyResult<()> { + self.inner.add_fixed_address_array(param, fixed_len); + Ok(()) + } + + pub fn add_address_string_array(&mut self, param: Vec) -> PyResult<()> { + self.inner.add_address_string_array(param); + Ok(()) + } + + pub fn add_fixed_address_string_array(&mut self, param: Vec, + fixed_len: usize) -> PyResult<()> { + self.inner.add_fixed_address_string_array(param, fixed_len); + Ok(()) + } + + pub fn add_function(&mut self, addr: Vec, selector: Vec) -> PyResult<()> { + self.inner.add_function(addr, selector); + Ok(()) + } + + pub fn add_function_string(&mut self, addr: String, selector: String) -> PyResult<()> { + self.inner.add_function_string(addr, selector); + Ok(()) + } + + pub fn assemble(&self) -> PyResult> { + let out = self.inner.assemble(); + Ok(out) + } +} \ No newline at end of file diff --git a/src/contract_function_result.rs b/src/contract_function_result.rs index 06b4a62..d71781a 100644 --- a/src/contract_function_result.rs +++ b/src/contract_function_result.rs @@ -1,7 +1,6 @@ use derive_more::From; -// fixme: use hedera::ContractFunctionResult; use crate::{PyContractId, PyContractLogInfo}; -use hedera::query::ContractFunctionResult; +use hedera::function_result::ContractFunctionResult; use itertools::Itertools; use pyo3::prelude::*; diff --git a/src/contract_log_info.rs b/src/contract_log_info.rs index 0b8968c..ddffd77 100644 --- a/src/contract_log_info.rs +++ b/src/contract_log_info.rs @@ -1,6 +1,6 @@ use derive_more::From; // fixme: use hedera::ContractLogInfo; -use hedera::query::ContractLogInfo; +use hedera::function_result::ContractLogInfo; use pyo3::prelude::*; #[pyclass(name = ContractLogInfo)] diff --git a/src/lib.rs b/src/lib.rs index c86ae67..e2e0ab8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,7 @@ extern crate mashup; mod macros; mod account_info; +mod call_params; mod claim; mod client; mod contract_function_result; @@ -35,14 +36,12 @@ mod query_file_get_info; mod query_get_by_key; mod query_transaction_get_receipt; mod query_transaction_get_record; +mod solidity_util; mod timestamp; -mod transaction_admin_contract_delete; -mod transaction_admin_contract_recover; -mod transaction_admin_file_delete; -mod transaction_admin_file_recover; mod transaction_contract_call; mod transaction_contract_create; mod transaction_contract_update; +mod transaction_contract_delete; mod transaction_crypto_add_claim; mod transaction_crypto_create; mod transaction_crypto_delete; @@ -61,6 +60,7 @@ use self::{ account_info::PyAccountInfo, claim::PyClaim, client::*, + call_params::PyCallParams, contract_function_result::PyContractFunctionResult, contract_info::PyContractInfo, contract_log_info::PyContractLogInfo, @@ -81,13 +81,10 @@ use self::{ query_transaction_get_receipt::PyQueryTransactionGetReceipt, query_transaction_get_record::PyQueryTransactionGetRecord, timestamp::PyDateTime, - transaction_admin_contract_delete::PyTransactionAdminContractDelete, - transaction_admin_contract_recover::PyTransactionAdminContractRecover, - transaction_admin_file_delete::PyTransactionAdminFileDelete, - transaction_admin_file_recover::PyTransactionAdminFileRecover, transaction_contract_call::PyTransactionContractCall, transaction_contract_create::PyTransactionContractCreate, transaction_contract_update::PyTransactionContractUpdate, + transaction_contract_delete::PyTransactionContractDelete, transaction_crypto_add_claim::PyTransactionCryptoAddClaim, transaction_crypto_create::PyTransactionCryptoCreate, transaction_crypto_delete::PyTransactionCryptoDelete, @@ -104,6 +101,8 @@ use self::{ }; use pyo3::prelude::*; +use pyo3::wrap_module; +use crate::solidity_util::PyInit_solidity_utils; #[pymodule] fn hedera(_py: Python, m: &PyModule) -> PyResult<()> { @@ -143,13 +142,10 @@ fn hedera(_py: Python, m: &PyModule) -> PyResult<()> { m.add_class::()?; // Transaction types - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; m.add_class::()?; m.add_class::()?; m.add_class::()?; + m.add_class::()?; m.add_class::()?; m.add_class::()?; m.add_class::()?; @@ -161,5 +157,11 @@ fn hedera(_py: Python, m: &PyModule) -> PyResult<()> { m.add_class::()?; m.add_class::()?; + // Param types + m.add_class::()?; + + // Sub Modules + m.add_wrapped(wrap_module!(solidity_utils))?; + Ok(()) } diff --git a/src/macros.rs b/src/macros.rs index 61a524d..4082d46 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -143,7 +143,7 @@ macro_rules! def_transaction { .map_err(crate::errors::PyException) } - #[setter] + //#[setter] pub fn operator(&mut self, id: &pyo3::types::PyObjectRef) -> pyo3::PyResult<()> { self.inner.operator(match pyo3::FromPyObject::extract(id)?: crate::either::Either<&str, &crate::PyAccountId> { crate::either::Either::Left(s) => s.parse().map_err(crate::errors::PyValueError)?, @@ -153,7 +153,7 @@ macro_rules! def_transaction { Ok(()) } - #[setter] + //#[setter] pub fn node(&mut self, id: &pyo3::types::PyObjectRef) -> pyo3::PyResult<()> { self.inner.node(match pyo3::FromPyObject::extract(id)?: crate::either::Either<&str, &crate::PyAccountId> { crate::either::Either::Left(s) => s.parse().map_err(crate::errors::PyValueError)?, @@ -163,19 +163,19 @@ macro_rules! def_transaction { Ok(()) } - #[setter] + //#[setter] pub fn memo(&mut self, memo: &str) -> pyo3::PyResult<()> { self.inner.memo(memo); Ok(()) } - #[setter] + //#[setter] pub fn transaction_fee(&mut self, fee: u64) -> pyo3::PyResult<()> { self.inner.fee(fee); Ok(()) } - #[setter] + //#[setter] pub fn generate_record(&mut self, generate: bool) -> pyo3::PyResult<()> { self.inner.generate_record(generate); Ok(()) diff --git a/src/query_contract_call.rs b/src/query_contract_call.rs new file mode 100644 index 0000000..2560968 --- /dev/null +++ b/src/query_contract_call.rs @@ -0,0 +1,6 @@ +use hedera::{query::QueryContractCall, ContractId}; +use hedera::function_result::ContractFunctionResult; + +def_query_new!(QueryContractCall: contract_call(ContractId, i64, array_of(u8), i64) -> QueryContractCall); + +def_query_exec!(QueryContractCall: contract_call() -> ContractFunctionResult); diff --git a/src/solidity_util.rs b/src/solidity_util.rs new file mode 100644 index 0000000..d905105 --- /dev/null +++ b/src/solidity_util.rs @@ -0,0 +1,58 @@ +use hedera::solidity_util::*; +use pyo3::{prelude::*, types::PyObjectRef, wrap_function}; +use try_from::TryInto; +use crate::id::{PyAccountId, PyContractId, PyFileId}; +use crate::either::Either; + +#[pyfunction] +pub fn address_from_account(acct_id: &PyObjectRef) -> PyResult { + let acct = (FromPyObject::extract(acct_id)?: Either<&str, &PyAccountId>).try_into()?; + let addr = address_for_account(acct); + Ok(addr) +} + +#[pyfunction] +pub fn address_from_contract(contract_id: &PyObjectRef) -> PyResult { + let contract = (FromPyObject::extract(contract_id)?: Either<&str, &PyContractId>).try_into()?; + let addr = address_for_contract(contract); + Ok(addr) +} + +#[pyfunction] +pub fn address_from_file(file_id: &PyObjectRef) -> PyResult { + let f = (FromPyObject::extract(file_id)?: Either<&str, &PyFileId>).try_into()?; + let addr = address_for_file(f); + Ok(addr) +} + +#[pyfunction] +pub fn account_from_address(addr: String) -> PyResult { + let acct = account_for_address(addr); + let py_acct = PyAccountId{inner: acct}; + Ok(py_acct) +} + +#[pyfunction] +pub fn contract_from_address(addr: String) -> PyResult { + let contract = account_for_contract(addr); + let py_contract = PyContractId{inner: contract}; + Ok(py_contract) +} + +#[pyfunction] +pub fn file_from_address(addr: String) -> PyResult { + let file = account_for_file(addr); + let py_file = PyFileId{inner: file}; + Ok(py_file) +} + +#[pymodule] +pub fn solidity_utils(_py: Python, module: &PyModule) -> PyResult<()> { + module.add_wrapped(wrap_function!(address_from_account))?; + module.add_wrapped(wrap_function!(address_from_contract))?; + module.add_wrapped(wrap_function!(address_from_file))?; + module.add_wrapped(wrap_function!(account_from_address))?; + module.add_wrapped(wrap_function!(contract_from_address))?; + module.add_wrapped(wrap_function!(file_from_address))?; + Ok(()) +} diff --git a/src/transaction_admin_contract_delete.rs b/src/transaction_admin_contract_delete.rs deleted file mode 100644 index a9a4fe0..0000000 --- a/src/transaction_admin_contract_delete.rs +++ /dev/null @@ -1,3 +0,0 @@ -use hedera::{transaction::TransactionAdminContractDelete, ContractId}; - -def_transaction!(TransactionAdminContractDelete(ContractId) {}); diff --git a/src/transaction_admin_contract_recover.rs b/src/transaction_admin_contract_recover.rs deleted file mode 100644 index dafb1d8..0000000 --- a/src/transaction_admin_contract_recover.rs +++ /dev/null @@ -1,3 +0,0 @@ -use hedera::{transaction::TransactionAdminContractRecover, ContractId}; - -def_transaction!(TransactionAdminContractRecover(ContractId) {}); diff --git a/src/transaction_admin_file_delete.rs b/src/transaction_admin_file_delete.rs deleted file mode 100644 index c1f19d9..0000000 --- a/src/transaction_admin_file_delete.rs +++ /dev/null @@ -1,3 +0,0 @@ -use hedera::{transaction::TransactionAdminFileDelete, FileId}; - -def_transaction!(TransactionAdminFileDelete(FileId) {}); diff --git a/src/transaction_admin_file_recover.rs b/src/transaction_admin_file_recover.rs deleted file mode 100644 index c73b17a..0000000 --- a/src/transaction_admin_file_recover.rs +++ /dev/null @@ -1,3 +0,0 @@ -use hedera::{transaction::TransactionAdminFileRecover, FileId}; - -def_transaction!(TransactionAdminFileRecover(FileId) {}); diff --git a/src/transaction_contract_create.rs b/src/transaction_contract_create.rs index 6defb12..7dd9300 100644 --- a/src/transaction_contract_create.rs +++ b/src/transaction_contract_create.rs @@ -12,8 +12,6 @@ def_transaction!(TransactionContractCreate() { fn proxy_account(&PyAccountId); - fn proxy_fraction(i32); - // TODO: fn auto_renew_period(&PyDuration); fn constructor_parameters(Vec); diff --git a/src/transaction_contract_delete.rs b/src/transaction_contract_delete.rs new file mode 100644 index 0000000..d452859 --- /dev/null +++ b/src/transaction_contract_delete.rs @@ -0,0 +1,7 @@ +use crate::{PyAccountId}; +use hedera::transaction::TransactionContractDelete; +use hedera::ContractId; + +def_transaction!(TransactionContractDelete(ContractId) { + fn obtainer_account(&PyAccountId); +}); diff --git a/src/transaction_crypto_create.rs b/src/transaction_crypto_create.rs index 8ec8eb3..081e3ec 100644 --- a/src/transaction_crypto_create.rs +++ b/src/transaction_crypto_create.rs @@ -5,8 +5,6 @@ def_transaction!(TransactionCryptoCreate() { fn key(&PyPublicKey); fn initial_balance(u64); fn proxy_account(&PyAccountId); - fn proxy_fraction(i32); - fn max_receive_proxy_fraction(i32); // TODO: fn auto_renew_period(Duration); fn send_record_threshold(i64); fn receive_record_threshold(i64); diff --git a/src/transaction_crypto_update.rs b/src/transaction_crypto_update.rs index 8f66490..d1f9687 100644 --- a/src/transaction_crypto_update.rs +++ b/src/transaction_crypto_update.rs @@ -4,7 +4,6 @@ use hedera::{transaction::TransactionCryptoUpdate, AccountId}; def_transaction!(TransactionCryptoUpdate(AccountId) { fn key(&PyPublicKey); fn proxy_account(&PyAccountId); - fn proxy_fraction(i32); fn send_record_threshold(u64); fn receive_record_threshold(u64); // fn auto_renew_period(&PyDuration); From f537121420c4b0aa54d90dc236243bd90644443d Mon Sep 17 00:00:00 2001 From: Sam Ulrich Date: Sun, 1 Sep 2019 18:57:34 -0500 Subject: [PATCH 05/12] Fixed Timestamp --- src/account_info.rs | 4 +- src/call_params.rs | 31 +++++++-- src/client.rs | 37 ++++++++-- src/contract_info.rs | 4 +- src/file_info.rs | 4 +- src/lib.rs | 6 +- src/macros.rs | 16 ++++- src/query_contract_call.rs | 8 ++- src/timestamp.rs | 100 ++++++++++++++++++++++------ src/transaction_contract_call.rs | 6 +- src/transaction_contract_create.rs | 14 ++-- src/transaction_contract_delete.rs | 2 +- src/transaction_contract_update.rs | 10 +-- src/transaction_crypto_add_claim.rs | 2 +- src/transaction_crypto_create.rs | 14 ++-- src/transaction_crypto_delete.rs | 2 +- src/transaction_crypto_transfer.rs | 2 +- src/transaction_crypto_update.rs | 12 ++-- src/transaction_file_create.rs | 9 +-- src/transaction_file_update.rs | 6 +- src/transaction_id.rs | 4 +- src/transaction_receipt.rs | 10 +-- src/transaction_record.rs | 4 +- 23 files changed, 216 insertions(+), 91 deletions(-) diff --git a/src/account_info.rs b/src/account_info.rs index 8534bfa..eda2786 100644 --- a/src/account_info.rs +++ b/src/account_info.rs @@ -1,4 +1,4 @@ -use crate::{PyAccountId, PyClaim, PyDateTime, PyDuration, PyPublicKey}; +use crate::{PyAccountId, PyClaim, PyTimestamp, PyDuration, PyPublicKey}; use derive_more::From; use hedera::AccountInfo; use itertools::Itertools; @@ -64,7 +64,7 @@ impl PyAccountInfo { } #[getter] - pub fn expiration_time(&self) -> PyResult { + pub fn expiration_time(&self) -> PyResult { self.inner.expiration_time.try_into() } diff --git a/src/call_params.rs b/src/call_params.rs index f19102d..aa7a695 100644 --- a/src/call_params.rs +++ b/src/call_params.rs @@ -1,6 +1,6 @@ use hedera::call_params::CallParams; use derive_more::From; -use pyo3::prelude::*; +use pyo3::{prelude::*, exceptions}; #[pyclass(name = CallParams)] #[derive(From)] @@ -23,6 +23,20 @@ impl PyCallParams { }) } + fn prep_fixed_bytes(&self, mut param: Vec, fixed_len: usize) -> PyResult> { + if fixed_len < param.len() { + return Err(exceptions::ValueError::py_err("ILLEGAL ARGUMENT ERROR: Fixed byte len is \ + less than byte length. Fixed byte length must be greater than the byte length and less \ + than or equal to 32.")) + } else if fixed_len > 32 { + return Err(exceptions::ValueError::py_err("ILLEGAL ARGUMENT ERROR: Fixed byte length \ + cannot be greater than 32.")) + } else if param.len() < fixed_len { + for _ in 0..(fixed_len - param.len()) { param.push(0); } + } + Ok(param) + } + pub fn add_string(&mut self, param: String) -> PyResult<()> { self.inner.add_string(param); Ok(()) @@ -43,7 +57,8 @@ impl PyCallParams { Ok(()) } - pub fn add_fixed_bytes(&mut self, param: Vec, fixed_len: usize) -> PyResult<()> { + pub fn add_fixed_bytes(&mut self, mut param: Vec, fixed_len: usize) -> PyResult<()> { + param = self.prep_fixed_bytes(param, fixed_len)?; self.inner.add_fixed_bytes(param, fixed_len); Ok(()) } @@ -53,8 +68,11 @@ impl PyCallParams { Ok(()) } - pub fn add_fixed_byte_array(&mut self, param: Vec>, byte_len: usize) -> PyResult<()> { - self.inner.add_fixed_byte_array(param, byte_len); + pub fn add_fixed_byte_array(&mut self, mut param: Vec>, fixed_byte_len: usize) -> PyResult<()> { + for i in 0..param.len() { + param[i] = self.prep_fixed_bytes(param[i].clone(), fixed_byte_len)?; + } + self.inner.add_fixed_byte_array(param, fixed_byte_len); Ok(()) } @@ -63,8 +81,11 @@ impl PyCallParams { Ok(()) } - pub fn add_fixed_byte_fixed_array(&mut self, param: Vec>, fixed_byte_len: usize, + pub fn add_fixed_byte_fixed_array(&mut self, mut param: Vec>, fixed_byte_len: usize, fixed_len: usize) -> PyResult<()> { + for i in 0..param.len() { + param[i] = self.prep_fixed_bytes(param[i].clone(), fixed_byte_len)?; + } self.inner.add_fixed_byte_fixed_array(param, fixed_byte_len, fixed_len); Ok(()) } diff --git a/src/client.rs b/src/client.rs index 80091ca..0a0b0bb 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,16 +1,16 @@ use super::{ errors::PyValueError, query_crypto_get_account_balance::*, query_crypto_get_info::*, - query_file_get_contents::*, query_transaction_get_receipt::*, + query_file_get_contents::*, query_transaction_get_receipt::* }; use crate::{ either::Either, id::{PyAccountId, PyContractId, PyFileId}, - transaction_id::PyTransactionId, + transaction_id::PyTransactionId, PyQueryContractCall, PyQueryCryptoGetClaim, PyQueryFileGetInfo, PyQueryTransactionGetRecord, PyTransactionContractCall, PyTransactionContractCreate, PyTransactionContractUpdate, PyTransactionCryptoCreate, PyTransactionCryptoDelete, PyTransactionCryptoDeleteClaim, PyTransactionCryptoTransfer, PyTransactionCryptoUpdate, PyTransactionFileAppend, - PyTransactionFileCreate, PyTransactionFileDelete, + PyTransactionFileCreate, PyTransactionFileDelete, PySecretKey }; use hedera::{AccountId, Client, ContractId, FileId, TransactionId}; use pyo3::{prelude::*, types::PyObjectRef}; @@ -19,7 +19,7 @@ use try_from::TryInto; #[pyclass(name = Client)] pub struct PyClient { - inner: Rc, + pub inner: Rc, } #[pymethods] @@ -32,6 +32,31 @@ impl PyClient { }) } + pub fn set_node(&mut self, node: &PyObjectRef) -> PyResult<()> { + let n = (FromPyObject::extract(node)?: Either<&str, &PyAccountId>).try_into()?; + match Rc::get_mut(&mut self.inner) { + Some(c) => c.set_node(n), + None => () + }; + Ok(()) + } + + pub fn set_operator(&mut self, operator: &PyObjectRef, + secret: &'static PyObjectRef) -> PyResult<()> { + let op = (FromPyObject::extract(operator)?: Either<&str, &PyAccountId>).try_into()?; + let sk = FromPyObject::extract(secret)?: &PySecretKey; + + let s = move || { + return sk.inner.clone() + }; + + match Rc::get_mut(&mut self.inner) { + Some(c) => c.set_operator(op, s), + None => () + } + Ok(()) + } + /// transfer_crypto(self) TransactionCryptoTransfer /// -- /// @@ -292,6 +317,10 @@ impl PyPartialContractMessage { Ok(PyTransactionContractCall::new(&self.client, self.contract)) } + pub fn query(&self, gas: i64, params: Vec, max_result_size: i64) -> PyResult { + Ok(PyQueryContractCall::new(&self.client, self.contract, gas, params, max_result_size)) + } + /// update(self) -> TransactionContractUpdate /// -- /// diff --git a/src/contract_info.rs b/src/contract_info.rs index c8da401..250df90 100644 --- a/src/contract_info.rs +++ b/src/contract_info.rs @@ -1,4 +1,4 @@ -use crate::{PyAccountId, PyDateTime, PyDuration, PyPublicKey}; +use crate::{PyAccountId, PyTimestamp, PyDuration, PyPublicKey}; use derive_more::From; use hedera::ContractInfo; use pyo3::prelude::*; @@ -34,7 +34,7 @@ impl PyContractInfo { } #[getter] - fn get_expiration_time(&self) -> PyResult { + fn get_expiration_time(&self) -> PyResult { self.inner.expiration_time.try_into() } diff --git a/src/file_info.rs b/src/file_info.rs index a8d9433..89208ce 100644 --- a/src/file_info.rs +++ b/src/file_info.rs @@ -1,4 +1,4 @@ -use crate::PyDateTime; +use crate::PyTimestamp; use derive_more::From; use hedera::FileInfo; use pyo3::prelude::*; @@ -33,7 +33,7 @@ impl PyFileInfo { } #[getter] - pub fn expiration_time(&self) -> PyResult { + pub fn expiration_time(&self) -> PyResult { self.inner.expiration_time.try_into() } } diff --git a/src/lib.rs b/src/lib.rs index e2e0ab8..6918ff5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,6 +25,7 @@ mod errors; mod file_info; mod id; mod query_contract_get_bytecode; +mod query_contract_call; mod query_contract_get_info; mod query_contract_get_records; mod query_crypto_get_account_balance; @@ -69,6 +70,7 @@ use self::{ file_info::PyFileInfo, id::{PyAccountId, PyContractId, PyFileId}, query_contract_get_bytecode::PyQueryContractGetBytecode, + query_contract_call::PyQueryContractCall, query_contract_get_info::PyQueryContractGetInfo, query_contract_get_records::PyQueryContractGetRecords, query_crypto_get_account_balance::PyQueryCryptoGetAccountBalance, @@ -80,7 +82,7 @@ use self::{ query_get_by_key::PyQueryGetByKey, query_transaction_get_receipt::PyQueryTransactionGetReceipt, query_transaction_get_record::PyQueryTransactionGetRecord, - timestamp::PyDateTime, + timestamp::PyTimestamp, transaction_contract_call::PyTransactionContractCall, transaction_contract_create::PyTransactionContractCreate, transaction_contract_update::PyTransactionContractUpdate, @@ -126,9 +128,11 @@ fn hedera(_py: Python, m: &PyModule) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?; + m.add_class::()?; // Query types m.add_class::()?; + m.add_class::()?; m.add_class::()?; m.add_class::()?; m.add_class::()?; diff --git a/src/macros.rs b/src/macros.rs index 4082d46..4300712 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -63,6 +63,15 @@ macro_rules! def_query { } }; + // Declare a 4-parameter query + (@new $query:tt($param1:ty, $param2:ty, $param3:ty, $param4:ty)) => { + pub fn new(client: &hedera::Client, _1: $param1, _2: $param2, _3: $param3, _4: $param4) -> Self { + Self { + inner: $query::new(client, _1, _2, _3, _4), + } + } + }; + ($query:tt ( $($param:tt)* ) -> $($ty:tt)+) => { mashup! { m["py"] = Py $query; @@ -81,6 +90,7 @@ macro_rules! def_query { #[pyo3::prelude::pymethods] impl "py" { pub fn get(&mut self) -> pyo3::PyResult { + println!("[SDK-MACRO] Query Get Called"); self.inner .get() .map(def_query!(@into $($ty)+)) @@ -119,7 +129,7 @@ macro_rules! def_transaction { } }; - ($tx:tt ( $($param:tt)* ) { $( fn $builder_name:ident($builder_param:ty); )* } $({ $($extra:tt)* })?) => { + ($tx:tt ( $($param:tt)* ) { $( pub fn $builder_name:ident($builder_param:ty); )* } $({ $($extra:tt)* })?) => { mashup! { m["py"] = Py $tx; } @@ -187,8 +197,8 @@ macro_rules! def_transaction { } $( - #[setter] - fn $builder_name(&mut self, _1: $builder_param) -> pyo3::PyResult<()> { + //#[setter] + pub fn $builder_name(&mut self, _1: $builder_param) -> pyo3::PyResult<()> { self.inner.$builder_name(_1.clone().into()); // fixme: RETURN SELF Ok(()) diff --git a/src/query_contract_call.rs b/src/query_contract_call.rs index 2560968..2893a0e 100644 --- a/src/query_contract_call.rs +++ b/src/query_contract_call.rs @@ -1,6 +1,8 @@ use hedera::{query::QueryContractCall, ContractId}; -use hedera::function_result::ContractFunctionResult; +use crate::contract_function_result::PyContractFunctionResult; -def_query_new!(QueryContractCall: contract_call(ContractId, i64, array_of(u8), i64) -> QueryContractCall); +//def_query_new!(QueryContractCall: contract_call(ContractId, i64, array_of(u8), i64) -> QueryContractCall); +// +//def_query_exec!(QueryContractCall: contract_call() -> ContractFunctionResult); -def_query_exec!(QueryContractCall: contract_call() -> ContractFunctionResult); +def_query!(QueryContractCall(ContractId, i64, Vec, i64) -> PyContractFunctionResult); diff --git a/src/timestamp.rs b/src/timestamp.rs index 7c02a5c..c7d64dd 100644 --- a/src/timestamp.rs +++ b/src/timestamp.rs @@ -1,21 +1,50 @@ -use chrono::{prelude::*, DateTime, Utc}; -use derive_more::From; -use pyo3::{prelude::*, types}; -use try_from::TryFrom; +use chrono::{prelude::*, DateTime, Utc, NaiveDateTime, NaiveDate, NaiveTime}; +use derive_more::{From, Into}; +use pyo3::{prelude::*, types::{PyDateTime, PyTimeAccess, PyDateAccess}}; +use try_from::{TryFrom}; +use pyo3::types::PyTzInfo; -#[derive(From)] -pub struct PyDateTime(Py); +#[pyclass(name = Timestamp)] +#[derive(From, Into)] +pub struct PyTimestamp { + pub(crate) inner: Py +} + +#[pymethods] +impl PyTimestamp { + #[new] + pub fn __new__(obj: &PyRawObject, ts: f64) -> PyResult<()> { + let py = unsafe { Python::assume_gil_acquired() }; + let datetime = py.import("datetime").map_err(|e| e.print(py)).unwrap(); + let timezone = datetime.get("timezone").unwrap(); + let utc = FromPyObject::extract(timezone.getattr("utc").unwrap())?: &PyTzInfo; + let dt = PyDateTime::from_timestamp(py, ts, Some(utc))?; + obj.init(move || Self { + inner: dt + }) + } +} + +impl TryFrom for PyTimestamp { + type Err = PyErr; + + fn try_from(ts: f64) -> PyResult { + // note: GIL should be acquired by this point and we don't know a safer way to get a py + // instance from inside a `#[getter]` + let py = unsafe { Python::assume_gil_acquired() }; -impl IntoPyObject for PyDateTime { - fn into_object(self, py: Python) -> PyObject { - self.0.into_object(py) + Ok( + PyTimestamp{ + inner: PyDateTime::from_timestamp(py, ts, None)? + } + ) } } -impl TryFrom> for PyDateTime { +impl TryFrom> for PyTimestamp { type Err = PyErr; - fn try_from(dt: DateTime) -> PyResult { + fn try_from(dt: DateTime) -> PyResult { // note: GIL should be acquired by this point and we don't know a safer way to get a py // instance from inside a `#[getter]` let py = unsafe { Python::assume_gil_acquired() }; @@ -28,16 +57,43 @@ impl TryFrom> for PyDateTime { let second = dt.second() as u8; // 0..=59 let microsecond = (dt.nanosecond() % 1_000_000_000) / 1_000; - Ok(PyDateTime(types::PyDateTime::new( - py, - year, - month, - day, - hour, - minute, - second, - microsecond, - None, - )?)) + Ok( + PyTimestamp{ + inner: PyDateTime::new( + py, + year, + month, + day, + hour, + minute, + second, + microsecond, + None, )? + } + ) + } +} + +impl Into> for &PyTimestamp { + fn into(self) -> DateTime { + let py = unsafe { Python::assume_gil_acquired() }; + + let date = NaiveDate::from_ymd( + self.inner.as_ref(py).get_year(), + self.inner.as_ref(py).get_month() as u32, + self.inner.as_ref(py).get_day() as u32 + ); + + let time = NaiveTime::from_hms_micro( + self.inner.as_ref(py).get_hour() as u32, + self.inner.as_ref(py).get_minute() as u32, + self.inner.as_ref(py).get_second() as u32, + self.inner.as_ref(py).get_microsecond() + ); + + DateTime::::from_utc( + NaiveDateTime::new(date, time), + Utc + ) } } diff --git a/src/transaction_contract_call.rs b/src/transaction_contract_call.rs index 2fe6649..b6533fd 100644 --- a/src/transaction_contract_call.rs +++ b/src/transaction_contract_call.rs @@ -1,7 +1,7 @@ use hedera::{transaction::TransactionContractCall, ContractId}; def_transaction!(TransactionContractCall(ContractId) { - fn gas(i64); - fn amount(i64); - fn function_parameters(Vec); + pub fn gas(i64); + pub fn amount(i64); + pub fn function_parameters(Vec); }); diff --git a/src/transaction_contract_create.rs b/src/transaction_contract_create.rs index 7dd9300..22944fc 100644 --- a/src/transaction_contract_create.rs +++ b/src/transaction_contract_create.rs @@ -2,17 +2,17 @@ use crate::{PyAccountId, PyFileId, PyPublicKey}; use hedera::transaction::TransactionContractCreate; def_transaction!(TransactionContractCreate() { - fn file(&PyFileId); + pub fn file(&PyFileId); - fn gas(i64); + pub fn gas(i64); - fn admin_key(&PyPublicKey); + pub fn admin_key(&PyPublicKey); - fn initial_balance(i64); + pub fn initial_balance(i64); - fn proxy_account(&PyAccountId); + pub fn proxy_account(&PyAccountId); - // TODO: fn auto_renew_period(&PyDuration); + // TODO: pub fn auto_renew_period(&PyDuration); - fn constructor_parameters(Vec); + pub fn constructor_parameters(Vec); }); diff --git a/src/transaction_contract_delete.rs b/src/transaction_contract_delete.rs index d452859..4cc4a57 100644 --- a/src/transaction_contract_delete.rs +++ b/src/transaction_contract_delete.rs @@ -3,5 +3,5 @@ use hedera::transaction::TransactionContractDelete; use hedera::ContractId; def_transaction!(TransactionContractDelete(ContractId) { - fn obtainer_account(&PyAccountId); + pub fn obtainer_account(&PyAccountId); }); diff --git a/src/transaction_contract_update.rs b/src/transaction_contract_update.rs index d0a8b91..7186703 100644 --- a/src/transaction_contract_update.rs +++ b/src/transaction_contract_update.rs @@ -2,9 +2,9 @@ use crate::{PyAccountId, PyFileId, PyPublicKey}; use hedera::{transaction::TransactionContractUpdate, ContractId}; def_transaction!(TransactionContractUpdate(ContractId){ - // TODO: fn expiration_time(DateTime); - fn admin_key(&PyPublicKey); - fn proxy_account(&PyAccountId); - // TODO: fn auto_renew_period(Duration); - fn file(&PyFileId); + // TODO: pub fn expiration_time(DateTime); + pub fn admin_key(&PyPublicKey); + pub fn proxy_account(&PyAccountId); + // TODO: pub fn auto_renew_period(Duration); + pub fn file(&PyFileId); }); diff --git a/src/transaction_crypto_add_claim.rs b/src/transaction_crypto_add_claim.rs index 793961a..47676db 100644 --- a/src/transaction_crypto_add_claim.rs +++ b/src/transaction_crypto_add_claim.rs @@ -3,7 +3,7 @@ use pyo3::PyResult; use crate::PyPublicKey; def_transaction!(TransactionCryptoAddClaim(AccountId, Vec){}{ - fn add_key(&mut self, key: &PyPublicKey) -> PyResult<()> { + pub fn add_key(&mut self, key: &PyPublicKey) -> PyResult<()> { self.inner.key(key.clone().into()); Ok(()) } diff --git a/src/transaction_crypto_create.rs b/src/transaction_crypto_create.rs index 081e3ec..14c37a4 100644 --- a/src/transaction_crypto_create.rs +++ b/src/transaction_crypto_create.rs @@ -2,11 +2,11 @@ use crate::{PyAccountId, PyPublicKey}; use hedera::transaction::TransactionCryptoCreate; def_transaction!(TransactionCryptoCreate() { - fn key(&PyPublicKey); - fn initial_balance(u64); - fn proxy_account(&PyAccountId); - // TODO: fn auto_renew_period(Duration); - fn send_record_threshold(i64); - fn receive_record_threshold(i64); - fn receiver_signature_required(bool); + pub fn key(&PyPublicKey); + pub fn initial_balance(u64); + pub fn proxy_account(&PyAccountId); + // TODO: pub fn auto_renew_period(Duration); + pub fn send_record_threshold(i64); + pub fn receive_record_threshold(i64); + pub fn receiver_signature_required(bool); }); diff --git a/src/transaction_crypto_delete.rs b/src/transaction_crypto_delete.rs index 9252061..11852d3 100644 --- a/src/transaction_crypto_delete.rs +++ b/src/transaction_crypto_delete.rs @@ -2,5 +2,5 @@ use crate::PyAccountId; use hedera::{transaction::TransactionCryptoDelete, AccountId}; def_transaction!(TransactionCryptoDelete(AccountId) { - fn transfer_to(&PyAccountId); + pub fn transfer_to(&PyAccountId); }); diff --git a/src/transaction_crypto_transfer.rs b/src/transaction_crypto_transfer.rs index 20eb2d7..d307ef4 100644 --- a/src/transaction_crypto_transfer.rs +++ b/src/transaction_crypto_transfer.rs @@ -3,7 +3,7 @@ use hedera::transaction::TransactionCryptoTransfer; use pyo3::PyResult; def_transaction!(TransactionCryptoTransfer() {} { - fn add_transfer(&mut self, id: &PyAccountId, amount: i64) -> PyResult<()> { + pub fn add_transfer(&mut self, id: &PyAccountId, amount: i64) -> PyResult<()> { self.inner.transfer(id.clone().into(), amount); Ok(()) } diff --git a/src/transaction_crypto_update.rs b/src/transaction_crypto_update.rs index d1f9687..85f0117 100644 --- a/src/transaction_crypto_update.rs +++ b/src/transaction_crypto_update.rs @@ -2,10 +2,10 @@ use crate::{PyAccountId, PyPublicKey}; use hedera::{transaction::TransactionCryptoUpdate, AccountId}; def_transaction!(TransactionCryptoUpdate(AccountId) { - fn key(&PyPublicKey); - fn proxy_account(&PyAccountId); - fn send_record_threshold(u64); - fn receive_record_threshold(u64); -// fn auto_renew_period(&PyDuration); -// fn expiration_time(&PyDateTime); + pub fn key(&PyPublicKey); + pub fn proxy_account(&PyAccountId); + pub fn send_record_threshold(u64); + pub fn receive_record_threshold(u64); +// pub fn auto_renew_period(&PyDuration); +// pub fn expiration_time(&PyTimestamp); }); diff --git a/src/transaction_file_create.rs b/src/transaction_file_create.rs index 6b94a8b..622259c 100644 --- a/src/transaction_file_create.rs +++ b/src/transaction_file_create.rs @@ -1,9 +1,10 @@ -use crate::PyPublicKey; +use crate::{timestamp::PyTimestamp, PyPublicKey}; use hedera::transaction::TransactionFileCreate; // TODO: once DateTime shenanigans are working -// `fn expires_at(&PyDateTime);` +// `pub fn expires_at(&PyTimestamp);` def_transaction!(TransactionFileCreate() { - fn key(&PyPublicKey); - fn contents(Vec); + pub fn key(&PyPublicKey); + pub fn contents(Vec); + pub fn expires_at(&PyTimestamp); }); diff --git a/src/transaction_file_update.rs b/src/transaction_file_update.rs index d72032f..0cddc7b 100644 --- a/src/transaction_file_update.rs +++ b/src/transaction_file_update.rs @@ -2,7 +2,7 @@ use crate::PyPublicKey; use hedera::{transaction::TransactionFileUpdate, FileId}; def_transaction!(TransactionFileUpdate(FileId) { -// fn expires_at(PyDateTime); - fn key(&PyPublicKey); - fn contents(Vec); +// pub fn expires_at(PyTimestamp); + pub fn key(&PyPublicKey); + pub fn contents(Vec); }); diff --git a/src/transaction_id.rs b/src/transaction_id.rs index d18eccf..55c9457 100644 --- a/src/transaction_id.rs +++ b/src/transaction_id.rs @@ -1,4 +1,4 @@ -use crate::{errors::PyValueError, PyAccountId, PyDateTime}; +use crate::{errors::PyValueError, PyAccountId, PyTimestamp}; use derive_more::From; use hedera::TransactionId; use pyo3::prelude::*; @@ -25,7 +25,7 @@ impl PyTransactionId { } #[getter] - pub fn transaction_valid_start(&self) -> PyResult { + pub fn transaction_valid_start(&self) -> PyResult { self.inner.transaction_valid_start.try_into() } } diff --git a/src/transaction_receipt.rs b/src/transaction_receipt.rs index abb77af..81ee46e 100644 --- a/src/transaction_receipt.rs +++ b/src/transaction_receipt.rs @@ -10,23 +10,25 @@ pub struct PyTransactionReceipt { #[pymethods] impl PyTransactionReceipt { - #[getter] + pub fn status(&self) -> PyResult { Ok(self.inner.status as u8) } - #[getter] + pub fn account_id(&self) -> PyResult> { Ok(self.inner.account_id.as_ref().map(|id| id.to_string())) } - #[getter] + pub fn contract_id(&self) -> PyResult> { Ok(self.inner.contract_id.as_ref().map(|id| id.to_string())) } - #[getter] + pub fn file_id(&self) -> PyResult> { Ok(self.inner.file_id.as_ref().map(|id| id.to_string())) } } + +def_str!(PyTransactionReceipt); diff --git a/src/transaction_record.rs b/src/transaction_record.rs index 4415ccb..9834cda 100644 --- a/src/transaction_record.rs +++ b/src/transaction_record.rs @@ -1,4 +1,4 @@ -use crate::{id::PyAccountId, PyContractFunctionResult, PyDateTime, PyTransactionReceipt}; +use crate::{id::PyAccountId, PyContractFunctionResult, PyTimestamp, PyTransactionReceipt}; use derive_more::From; use hedera::{TransactionRecord, TransactionRecordBody}; use pyo3::prelude::*; @@ -25,7 +25,7 @@ impl PyTransactionRecord { } #[getter] - pub fn consensus_timestamp(&self) -> PyResult> { + pub fn consensus_timestamp(&self) -> PyResult> { self.inner .consensus_timestamp .map(|ts| ts.try_into()) From 03774e4e37b09502b4dc087b48172992b1db4d3a Mon Sep 17 00:00:00 2001 From: Sam Ulrich Date: Mon, 2 Sep 2019 08:38:30 -0500 Subject: [PATCH 06/12] Fixed PyDuration, Added Function Result Decoding --- src/contract_function_result.rs | 37 +++++++++++++++++++- src/duration.rs | 55 ++++++++++++++++++++++++------ src/lib.rs | 1 + src/macros.rs | 6 ---- src/query_contract_call.rs | 4 --- src/transaction_contract_create.rs | 4 +-- src/transaction_contract_update.rs | 6 ++-- src/transaction_crypto_create.rs | 4 +-- src/transaction_crypto_update.rs | 6 ++-- src/transaction_file_create.rs | 2 -- src/transaction_file_update.rs | 4 +-- src/transaction_receipt.rs | 7 ++-- 12 files changed, 97 insertions(+), 39 deletions(-) diff --git a/src/contract_function_result.rs b/src/contract_function_result.rs index d71781a..206d399 100644 --- a/src/contract_function_result.rs +++ b/src/contract_function_result.rs @@ -2,7 +2,7 @@ use derive_more::From; use crate::{PyContractId, PyContractLogInfo}; use hedera::function_result::ContractFunctionResult; use itertools::Itertools; -use pyo3::prelude::*; +use pyo3::{prelude::*, exceptions}; #[pyclass(name = ContractFunctionResult)] #[derive(From)] @@ -41,4 +41,39 @@ impl PyContractFunctionResult { pub fn log_info(&self) -> PyResult> { Ok(self.inner.log_info.clone().into_iter().map_into().collect()) } + + pub fn get_int(&self, val_index: usize) -> PyResult { + Ok(self.inner.get_int(val_index)) + } + + pub fn get_long(&self, val_index: usize) -> PyResult { + Ok(self.inner.get_long(val_index)) + } + + pub fn get_bytes(&self, val_index: usize) -> PyResult> { + Ok(self.inner.get_bytes(val_index)) + } + + pub fn get_byte_array(&self, val_index: usize) -> PyResult>> { + Ok(self.inner.get_byte_array(val_index)) + } + + pub fn get_string(&self, val_index: usize) -> PyResult { + match self.inner.get_string(val_index){ + Ok(s) => Ok(s), + Err(e) => Err(exceptions::Exception::py_err(format!("{:#?}", e))) + } + } + + pub fn get_bool(&self, val_index: usize) -> PyResult { + Ok(self.inner.get_bool(val_index)) + } + + pub fn get_address(&self, val_index: usize) -> PyResult> { + Ok(self.inner.get_address(val_index)) + } + + pub fn get_address_array(&self, val_index: usize) -> PyResult> { + Ok(self.inner.get_address_array(val_index)) + } } diff --git a/src/duration.rs b/src/duration.rs index 1cccc88..d6693e6 100644 --- a/src/duration.rs +++ b/src/duration.rs @@ -1,12 +1,30 @@ use pyo3::{prelude::*, types::PyDelta}; use std::time::Duration; use try_from::TryFrom; +use derive_more::{From, Into}; +use pyo3::types::PyDeltaAccess; -pub struct PyDuration(Py); +#[pyclass(name = Duration)] +#[derive(From, Into)] +pub struct PyDuration{ + pub(crate) inner: Py +} + +//impl IntoPyObject for PyDuration { +// fn into_object(self, py: Python) -> PyObject { +// self.0.into_object(py) +// } +//} -impl IntoPyObject for PyDuration { - fn into_object(self, py: Python) -> PyObject { - self.0.into_object(py) +#[pymethods] +impl PyDuration { + #[new] + pub fn __new__(obj: &PyRawObject, days: i32, seconds: i32, micos: i32) -> PyResult<()> { + let py = unsafe { Python::assume_gil_acquired() }; + let d = PyDelta::new(py, days, seconds, micos, false)?; + obj.init(move || Self { + inner: d + }) } } @@ -21,12 +39,27 @@ impl TryFrom for PyDuration { let seconds = duration.as_secs() as i32; let microseconds = duration.subsec_micros() as i32; - Ok(PyDuration(PyDelta::new( - py, - 0, - seconds, - microseconds, - false, - )?)) + Ok( + PyDuration{ + inner: PyDelta::new( + py, + 0, + seconds, + microseconds, + false,)? + } + ) + } +} + +impl Into for &PyDuration { + fn into(self) -> Duration { + let py = unsafe { Python::assume_gil_acquired() }; + + let days_seconds = self.inner.as_ref(py).get_days() * 86400; + let seconds = self.inner.as_ref(py).get_seconds(); + let micros = self.inner.as_ref(py).get_microseconds(); + + Duration::new((seconds + days_seconds) as u64, (micros * 1000) as u32) } } diff --git a/src/lib.rs b/src/lib.rs index 6918ff5..1cb26f5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -129,6 +129,7 @@ fn hedera(_py: Python, m: &PyModule) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?; + m.add_class::()?; // Query types m.add_class::()?; diff --git a/src/macros.rs b/src/macros.rs index 4300712..dd4b622 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -153,7 +153,6 @@ macro_rules! def_transaction { .map_err(crate::errors::PyException) } - //#[setter] pub fn operator(&mut self, id: &pyo3::types::PyObjectRef) -> pyo3::PyResult<()> { self.inner.operator(match pyo3::FromPyObject::extract(id)?: crate::either::Either<&str, &crate::PyAccountId> { crate::either::Either::Left(s) => s.parse().map_err(crate::errors::PyValueError)?, @@ -163,7 +162,6 @@ macro_rules! def_transaction { Ok(()) } - //#[setter] pub fn node(&mut self, id: &pyo3::types::PyObjectRef) -> pyo3::PyResult<()> { self.inner.node(match pyo3::FromPyObject::extract(id)?: crate::either::Either<&str, &crate::PyAccountId> { crate::either::Either::Left(s) => s.parse().map_err(crate::errors::PyValueError)?, @@ -173,19 +171,16 @@ macro_rules! def_transaction { Ok(()) } - //#[setter] pub fn memo(&mut self, memo: &str) -> pyo3::PyResult<()> { self.inner.memo(memo); Ok(()) } - //#[setter] pub fn transaction_fee(&mut self, fee: u64) -> pyo3::PyResult<()> { self.inner.fee(fee); Ok(()) } - //#[setter] pub fn generate_record(&mut self, generate: bool) -> pyo3::PyResult<()> { self.inner.generate_record(generate); Ok(()) @@ -197,7 +192,6 @@ macro_rules! def_transaction { } $( - //#[setter] pub fn $builder_name(&mut self, _1: $builder_param) -> pyo3::PyResult<()> { self.inner.$builder_name(_1.clone().into()); // fixme: RETURN SELF diff --git a/src/query_contract_call.rs b/src/query_contract_call.rs index 2893a0e..1449922 100644 --- a/src/query_contract_call.rs +++ b/src/query_contract_call.rs @@ -1,8 +1,4 @@ use hedera::{query::QueryContractCall, ContractId}; use crate::contract_function_result::PyContractFunctionResult; -//def_query_new!(QueryContractCall: contract_call(ContractId, i64, array_of(u8), i64) -> QueryContractCall); -// -//def_query_exec!(QueryContractCall: contract_call() -> ContractFunctionResult); - def_query!(QueryContractCall(ContractId, i64, Vec, i64) -> PyContractFunctionResult); diff --git a/src/transaction_contract_create.rs b/src/transaction_contract_create.rs index 22944fc..0871b27 100644 --- a/src/transaction_contract_create.rs +++ b/src/transaction_contract_create.rs @@ -1,4 +1,4 @@ -use crate::{PyAccountId, PyFileId, PyPublicKey}; +use crate::{PyAccountId, PyFileId, PyPublicKey, PyDuration}; use hedera::transaction::TransactionContractCreate; def_transaction!(TransactionContractCreate() { @@ -12,7 +12,7 @@ def_transaction!(TransactionContractCreate() { pub fn proxy_account(&PyAccountId); - // TODO: pub fn auto_renew_period(&PyDuration); + pub fn auto_renew_period(&PyDuration); pub fn constructor_parameters(Vec); }); diff --git a/src/transaction_contract_update.rs b/src/transaction_contract_update.rs index 7186703..62437e1 100644 --- a/src/transaction_contract_update.rs +++ b/src/transaction_contract_update.rs @@ -1,10 +1,10 @@ -use crate::{PyAccountId, PyFileId, PyPublicKey}; +use crate::{PyAccountId, PyFileId, PyPublicKey, PyDuration, PyTimestamp}; use hedera::{transaction::TransactionContractUpdate, ContractId}; def_transaction!(TransactionContractUpdate(ContractId){ - // TODO: pub fn expiration_time(DateTime); + pub fn expires_at(&PyTimestamp); pub fn admin_key(&PyPublicKey); pub fn proxy_account(&PyAccountId); - // TODO: pub fn auto_renew_period(Duration); + pub fn auto_renew_period(&PyDuration); pub fn file(&PyFileId); }); diff --git a/src/transaction_crypto_create.rs b/src/transaction_crypto_create.rs index 14c37a4..c069081 100644 --- a/src/transaction_crypto_create.rs +++ b/src/transaction_crypto_create.rs @@ -1,11 +1,11 @@ -use crate::{PyAccountId, PyPublicKey}; +use crate::{PyAccountId, PyPublicKey, PyDuration}; use hedera::transaction::TransactionCryptoCreate; def_transaction!(TransactionCryptoCreate() { pub fn key(&PyPublicKey); pub fn initial_balance(u64); pub fn proxy_account(&PyAccountId); - // TODO: pub fn auto_renew_period(Duration); + pub fn auto_renew_period(&PyDuration); pub fn send_record_threshold(i64); pub fn receive_record_threshold(i64); pub fn receiver_signature_required(bool); diff --git a/src/transaction_crypto_update.rs b/src/transaction_crypto_update.rs index 85f0117..74f9aa5 100644 --- a/src/transaction_crypto_update.rs +++ b/src/transaction_crypto_update.rs @@ -1,4 +1,4 @@ -use crate::{PyAccountId, PyPublicKey}; +use crate::{PyAccountId, PyPublicKey, PyDuration, PyTimestamp}; use hedera::{transaction::TransactionCryptoUpdate, AccountId}; def_transaction!(TransactionCryptoUpdate(AccountId) { @@ -6,6 +6,6 @@ def_transaction!(TransactionCryptoUpdate(AccountId) { pub fn proxy_account(&PyAccountId); pub fn send_record_threshold(u64); pub fn receive_record_threshold(u64); -// pub fn auto_renew_period(&PyDuration); -// pub fn expiration_time(&PyTimestamp); + pub fn auto_renew_period(&PyDuration); + pub fn expires_at(&PyTimestamp); }); diff --git a/src/transaction_file_create.rs b/src/transaction_file_create.rs index 622259c..c8386a1 100644 --- a/src/transaction_file_create.rs +++ b/src/transaction_file_create.rs @@ -1,8 +1,6 @@ use crate::{timestamp::PyTimestamp, PyPublicKey}; use hedera::transaction::TransactionFileCreate; -// TODO: once DateTime shenanigans are working -// `pub fn expires_at(&PyTimestamp);` def_transaction!(TransactionFileCreate() { pub fn key(&PyPublicKey); pub fn contents(Vec); diff --git a/src/transaction_file_update.rs b/src/transaction_file_update.rs index 0cddc7b..8f17352 100644 --- a/src/transaction_file_update.rs +++ b/src/transaction_file_update.rs @@ -1,8 +1,8 @@ -use crate::PyPublicKey; +use crate::{PyPublicKey, PyTimestamp}; use hedera::{transaction::TransactionFileUpdate, FileId}; def_transaction!(TransactionFileUpdate(FileId) { -// pub fn expires_at(PyTimestamp); + pub fn expires_at(&PyTimestamp); pub fn key(&PyPublicKey); pub fn contents(Vec); }); diff --git a/src/transaction_receipt.rs b/src/transaction_receipt.rs index 81ee46e..9544b16 100644 --- a/src/transaction_receipt.rs +++ b/src/transaction_receipt.rs @@ -11,21 +11,22 @@ pub struct PyTransactionReceipt { #[pymethods] impl PyTransactionReceipt { + #[getter] pub fn status(&self) -> PyResult { Ok(self.inner.status as u8) } - + #[getter] pub fn account_id(&self) -> PyResult> { Ok(self.inner.account_id.as_ref().map(|id| id.to_string())) } - + #[getter] pub fn contract_id(&self) -> PyResult> { Ok(self.inner.contract_id.as_ref().map(|id| id.to_string())) } - + #[getter] pub fn file_id(&self) -> PyResult> { Ok(self.inner.file_id.as_ref().map(|id| id.to_string())) } From 8d5f4880a213b5bbb5c46b137993f983c2fd7f33 Mon Sep 17 00:00:00 2001 From: Sam Ulrich Date: Mon, 2 Sep 2019 19:45:00 -0500 Subject: [PATCH 07/12] Added Native Status Support --- src/lib.rs | 3 +++ src/macros.rs | 1 - src/status.rs | 33 +++++++++++++++++++++++++++++++++ src/transaction_receipt.rs | 5 +++-- 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 src/status.rs diff --git a/src/lib.rs b/src/lib.rs index 1cb26f5..be95c2f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,6 +38,7 @@ mod query_get_by_key; mod query_transaction_get_receipt; mod query_transaction_get_record; mod solidity_util; +mod status; mod timestamp; mod transaction_contract_call; mod transaction_contract_create; @@ -82,6 +83,7 @@ use self::{ query_get_by_key::PyQueryGetByKey, query_transaction_get_receipt::PyQueryTransactionGetReceipt, query_transaction_get_record::PyQueryTransactionGetRecord, + status::PyStatus, timestamp::PyTimestamp, transaction_contract_call::PyTransactionContractCall, transaction_contract_create::PyTransactionContractCreate, @@ -130,6 +132,7 @@ fn hedera(_py: Python, m: &PyModule) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?; + m.add_class::()?; // Query types m.add_class::()?; diff --git a/src/macros.rs b/src/macros.rs index dd4b622..034e93c 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -90,7 +90,6 @@ macro_rules! def_query { #[pyo3::prelude::pymethods] impl "py" { pub fn get(&mut self) -> pyo3::PyResult { - println!("[SDK-MACRO] Query Get Called"); self.inner .get() .map(def_query!(@into $($ty)+)) diff --git a/src/status.rs b/src/status.rs new file mode 100644 index 0000000..0e59d6d --- /dev/null +++ b/src/status.rs @@ -0,0 +1,33 @@ +use hedera::Status; +use std::mem::transmute; +use derive_more::From; +use pyo3::{prelude::*}; + +#[pyclass(name = Status)] +#[derive(From)] +pub struct PyStatus { + pub(crate) inner: Status, +} + +#[pymethods] +impl PyStatus { + #[new] + pub fn __new__(obj: &PyRawObject, int: u8) -> PyResult<()> { + let status: Status = unsafe { transmute(int) }; + obj.init(move || Self { + inner: status + }) + } + + pub fn get_int(&self) -> PyResult { + Ok(self.inner as u8) + } + + pub fn success(&self) -> PyResult { + Ok(self.inner == Status::Success) + } + + pub fn to_string(&self) -> PyResult { + Ok(format!("{:#?}", self.inner)) + } +} diff --git a/src/transaction_receipt.rs b/src/transaction_receipt.rs index 9544b16..0937025 100644 --- a/src/transaction_receipt.rs +++ b/src/transaction_receipt.rs @@ -1,6 +1,7 @@ use derive_more::From; use hedera::TransactionReceipt; use pyo3::prelude::*; +use crate::PyStatus; #[pyclass(name = TransactionReceipt)] #[derive(From)] @@ -12,8 +13,8 @@ pub struct PyTransactionReceipt { impl PyTransactionReceipt { #[getter] - pub fn status(&self) -> PyResult { - Ok(self.inner.status as u8) + pub fn status(&self) -> PyResult { + Ok(PyStatus{inner: self.inner.status}) } #[getter] From 51e36b5682fcefa10b957c3f323f075b74f05d50 Mon Sep 17 00:00:00 2001 From: Sam Ulrich Date: Tue, 3 Sep 2019 15:07:48 -0500 Subject: [PATCH 08/12] Added Author, Corrected Hedera Dependency --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 92a25ac..5d7af87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,14 +4,14 @@ publish = false version = "0.1.0-alpha.0" edition = "2018" authors = [ - "LaunchBadge " + "LaunchBadge (PRIMARY)", + "Lonestar Data Technologies " ] [lib] crate-type = ["cdylib"] [dependencies] -#hedera = "0.4.1" hedera = { path = "/home/user/Development/Dependencies/hedera-sdk-rust" } pyo3 = { version = "0.6.0-alpha.1", features = [ "extension-module" ] } chrono = "0.4.6" From ff68ed74c11f7dbaecb1e8ca9f57faf5f7cebfe8 Mon Sep 17 00:00:00 2001 From: Sam Ulrich Date: Sun, 8 Sep 2019 15:46:48 -0500 Subject: [PATCH 09/12] Updated For Rust Type Changes --- Cargo.lock | 4 ++-- Cargo.toml | 1 + src/call_params.rs | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 55f11a4..7c88aae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -493,7 +493,7 @@ dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "hedera 0.5.0-alpha.0", + "hedera 0.4.2-alpha.0", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "pyo3 0.6.0-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -503,7 +503,7 @@ dependencies = [ [[package]] name = "hedera" -version = "0.5.0-alpha.0" +version = "0.4.2-alpha.0" dependencies = [ "bip39 0.6.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 5d7af87..62d939a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ authors = [ crate-type = ["cdylib"] [dependencies] +#hedera = { path = "/home/user/Development/Dependencies/hedera-sdk-rust" } hedera = { path = "/home/user/Development/Dependencies/hedera-sdk-rust" } pyo3 = { version = "0.6.0-alpha.1", features = [ "extension-module" ] } chrono = "0.4.6" diff --git a/src/call_params.rs b/src/call_params.rs index aa7a695..d25406b 100644 --- a/src/call_params.rs +++ b/src/call_params.rs @@ -95,33 +95,33 @@ impl PyCallParams { Ok(()) } - pub fn add_int(&mut self, param: i64, width: usize) -> PyResult<()> { + pub fn add_int(&mut self, param: isize, width: usize) -> PyResult<()> { self.inner.add_int(param, width); Ok(()) } - pub fn add_int_array(&mut self, param: Vec, width: usize) -> PyResult<()> { + pub fn add_int_array(&mut self, param: Vec, width: usize) -> PyResult<()> { self.inner.add_int_array(param, width); Ok(()) } - pub fn add_fixed_int_array(&mut self, param: Vec, width: usize, + pub fn add_fixed_int_array(&mut self, param: Vec, width: usize, fixed_len: usize) -> PyResult<()> { self.inner.add_fixed_int_array(param, width, fixed_len); Ok(()) } - pub fn add_uint(&mut self, param: u64, width: usize) -> PyResult<()> { + pub fn add_uint(&mut self, param: usize, width: usize) -> PyResult<()> { self.inner.add_uint(param, width); Ok(()) } - pub fn add_uint_array(&mut self, param: Vec, width: usize) -> PyResult<()> { + pub fn add_uint_array(&mut self, param: Vec, width: usize) -> PyResult<()> { self.inner.add_uint_array(param, width); Ok(()) } - pub fn add_fixed_uint_array(&mut self, param: Vec, width: usize, + pub fn add_fixed_uint_array(&mut self, param: Vec, width: usize, fixed_len: usize) -> PyResult<()> { self.inner.add_fixed_uint_array(param, width, fixed_len); Ok(()) From 84267ea2c6ab50c6a7a484323a9fd9d027855265 Mon Sep 17 00:00:00 2001 From: Sam Ulrich Date: Sun, 8 Sep 2019 19:08:54 -0500 Subject: [PATCH 10/12] Updated Toolchain --- Cargo.lock | 591 ++++++++++++++++++++++++++++++++++--------------- rust-toolchain | 2 +- 2 files changed, 408 insertions(+), 185 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7c88aae..2b151c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,7 +5,7 @@ name = "aho-corasick" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -28,8 +28,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -40,7 +40,7 @@ version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -116,14 +116,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "chrono" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -150,12 +151,12 @@ name = "crossbeam" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -187,15 +188,24 @@ dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-deque" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-epoch" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -207,19 +217,27 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-queue" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-utils" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -227,8 +245,8 @@ name = "crossbeam-utils" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -313,6 +331,11 @@ name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "fnv" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "fuchsia-cprng" version = "0.1.0" @@ -339,19 +362,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures-channel-preview" -version = "0.3.0-alpha.12" +version = "0.3.0-alpha.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures-core-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "futures-core-preview" -version = "0.3.0-alpha.12" +version = "0.3.0-alpha.18" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "futures-cpupool" @@ -364,75 +385,52 @@ dependencies = [ [[package]] name = "futures-executor-preview" -version = "0.3.0-alpha.12" +version = "0.3.0-alpha.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures-channel-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "futures-io-preview" -version = "0.3.0-alpha.12" +version = "0.3.0-alpha.18" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures-core-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "futures-preview" -version = "0.3.0-alpha.12" +version = "0.3.0-alpha.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures-channel-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-executor-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "futures-select-macro-preview" -version = "0.3.0-alpha.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-executor-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "futures-sink-preview" -version = "0.3.0-alpha.12" +version = "0.3.0-alpha.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "futures-util-preview" -version = "0.3.0-alpha.12" +version = "0.3.0-alpha.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-select-macro-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-nested 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -446,7 +444,7 @@ dependencies = [ [[package]] name = "glob" -version = "0.2.11" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -459,8 +457,8 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "httpbis 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "tls-api 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tls-api-stub 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -473,8 +471,8 @@ name = "grpc-compiler" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf-codegen 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf-codegen 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -490,7 +488,7 @@ dependencies = [ name = "hedera" version = "0.1.0-alpha.0" dependencies = [ - "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "hedera 0.4.2-alpha.0", @@ -506,31 +504,29 @@ name = "hedera" version = "0.4.2-alpha.0" dependencies = [ "bip39 0.6.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "grpc 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "httpbis 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "protoc-rust-grpc 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "query_interface 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "simple_asn1 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-async-await 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "simple_asn1 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -556,7 +552,7 @@ dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "tls-api 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tls-api-stub 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", @@ -574,7 +570,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -602,8 +598,11 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "lazycell" @@ -612,7 +611,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.48" +version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -624,20 +623,28 @@ dependencies = [ "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "lock_api" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "log" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -660,12 +667,8 @@ dependencies = [ [[package]] name = "memchr" -version = "2.1.3" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "memoffset" @@ -682,8 +685,8 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -696,7 +699,7 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -716,8 +719,8 @@ name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -793,7 +796,7 @@ name = "num_cpus" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -804,6 +807,14 @@ dependencies = [ "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "once_cell" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "opaque-debug" version = "0.2.2" @@ -822,7 +833,7 @@ name = "packed_simd" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -834,18 +845,42 @@ dependencies = [ "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parking_lot_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot_core" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pbkdf2" version = "0.3.0" @@ -869,37 +904,30 @@ dependencies = [ "proc-macro-hack-impl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "proc-macro-hack-impl" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "proc-macro-nested" -version = "0.1.2" +name = "proc-macro2" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "proc-macro2" -version = "0.4.26" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "protobuf" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -907,10 +935,10 @@ dependencies = [ [[package]] name = "protobuf-codegen" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -918,7 +946,7 @@ name = "protoc" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -926,8 +954,8 @@ name = "protoc-rust" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf-codegen 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf-codegen 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "protoc 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -938,7 +966,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "grpc-compiler 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "protoc 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "protoc-rust 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -949,7 +977,7 @@ name = "pyo3" version = "0.6.0-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "pyo3cls 0.6.0-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -993,26 +1021,22 @@ dependencies = [ ] [[package]] -name = "rand" -version = "0.4.6" +name = "quote" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "fuchsia-cprng 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" -version = "0.5.6" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1022,7 +1046,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "packed_simd 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1078,7 +1102,7 @@ name = "rand_jitter" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1090,7 +1114,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1129,8 +1153,8 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1153,7 +1177,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1203,6 +1227,11 @@ name = "scopeguard" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "scopeguard" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "semver" version = "0.9.0" @@ -1241,10 +1270,10 @@ dependencies = [ [[package]] name = "simple_asn1" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1269,6 +1298,11 @@ name = "spin" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "stable_deref_trait" version = "1.1.1" @@ -1294,6 +1328,16 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "syn" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "synstructure" version = "0.10.1" @@ -1319,7 +1363,7 @@ name = "thread_local" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1327,7 +1371,7 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1337,7 +1381,7 @@ name = "tls-api" version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1358,7 +1402,6 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-async-await 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1374,12 +1417,24 @@ dependencies = [ ] [[package]] -name = "tokio-async-await" -version = "0.1.5" +name = "tokio" +version = "0.2.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-fs 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-macros 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-net 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.3.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1392,6 +1447,18 @@ dependencies = [ "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-codec" +version = "0.2.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tokio-core" version = "0.1.17" @@ -1400,7 +1467,7 @@ dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1428,6 +1495,24 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-executor" +version = "0.2.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tokio-fs" version = "0.1.5" @@ -1438,6 +1523,19 @@ dependencies = [ "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-fs" +version = "0.2.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tokio-io" version = "0.1.11" @@ -1445,7 +1543,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-io" +version = "0.2.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-macros" +version = "0.2.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-net" +version = "0.2.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1455,8 +1599,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1473,6 +1617,17 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-sync" +version = "0.2.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tokio-tcp" version = "0.1.3" @@ -1496,7 +1651,7 @@ dependencies = [ "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1523,6 +1678,19 @@ dependencies = [ "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-timer" +version = "0.3.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tokio-tls-api" version = "0.1.20" @@ -1541,7 +1709,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1556,7 +1724,7 @@ dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1572,8 +1740,8 @@ dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1581,12 +1749,42 @@ dependencies = [ "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tracing" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-attributes 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-core" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "try_from" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1604,13 +1802,18 @@ name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unicode-xid" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unix_socket" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1681,16 +1884,18 @@ dependencies = [ "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" "checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" "checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749" -"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" -"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" +"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" +"checksum chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e8493056968583b0193c1bb04d6f7684586f3726992d6c573261941a895dbd68" "checksum clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "97276801e127ffb46b66ce23f35cc96bd454fa311294bced4bbace7baa8b1d17" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum crossbeam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad4c7ea749d9fb09e23c5cb17e3b70650860553a0e2744e38446b1803bf7db94" "checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" +"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" "checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" +"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" "checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" "checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" @@ -1702,21 +1907,21 @@ dependencies = [ "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum fuchsia-cprng 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81f7f8eb465745ea9b02e2704612a9946a59fa40572086c6fd49d6ddcf30bf31" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" -"checksum futures-channel-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)" = "19a90ba09f9743470dac8daf6b9b1dd918edac032e3d384e0da56525c7c50ff1" -"checksum futures-core-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)" = "20c083b896a44aa7acfc911133cdb98dd31b7febc692b9a51c5f4e9e70feed36" +"checksum futures-channel-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)" = "f477fd0292c4a4ae77044454e7f2b413207942ad405f759bb0b4698b7ace5b12" +"checksum futures-core-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)" = "4a2f26f774b81b3847dcda0c81bd4b6313acfb4f69e5a0390c7cb12c058953e9" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -"checksum futures-executor-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5bf8777754faecb43584ea1927a0776c94d5d88a8fc68fc5c0f351f750c58922" -"checksum futures-io-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9b70e79314b3d448c142f13719ad4dba60b445f894b1656aa877dbcb28815795" -"checksum futures-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)" = "f75490e3af40ae04948a939b044c7f6bc0ca2599cc83e4db5de68e43cf9451f3" -"checksum futures-select-macro-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b5e90a1190c77bd279401cd247f1849ce9f4c74b37998088c11b1b038c5e4e3f" -"checksum futures-sink-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)" = "955b7c0666e2fb468443007f2c0a1779e398f23a6bf8b0398033904cf6a1bc3f" -"checksum futures-util-preview 0.3.0-alpha.12 (registry+https://github.com/rust-lang/crates.io-index)" = "d7d3d7a6f5a58d2aa9a26f76fdd581f73505f573bc63269e478daef28a0b23f8" +"checksum futures-executor-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)" = "80705612926df8a1bc05f0057e77460e29318801f988bf7d803a734cf54e7528" +"checksum futures-io-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)" = "ee7de0c1c9ed23f9457b0437fec7663ce64d9cc3c906597e714e529377b5ddd1" +"checksum futures-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)" = "efa8f90c4fb2328e381f8adfd4255b4a2b696f77d1c63a3dee6700b564c4e4b5" +"checksum futures-sink-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)" = "e9b65a2481863d1b78e094a07e9c0eed458cc7dc6e72b22b7138b8a67d924859" +"checksum futures-util-preview 0.3.0-alpha.18 (registry+https://github.com/rust-lang/crates.io-index)" = "7df53daff1e98cc024bf2720f3ceb0414d96fbb0a94f3cad3a5c3bf3be1d261c" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" -"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" +"checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" "checksum grpc 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8e530ef7894a104a1c8525ce68787b3491efa2098ce5e5454e8324ea78893548" "checksum grpc-compiler 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b07f140d998d8940880e464f3fd291052618199432e91e59ae5c5075c0c8a40c" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" @@ -1727,15 +1932,16 @@ dependencies = [ "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" "checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" +"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.48 (registry+https://github.com/rust-lang/crates.io-index)" = "e962c7641008ac010fa60a7dfdc1712449f29c44ef2d4702394aea943ee75047" +"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" +"checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" +"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f2d82b34c7fb11bb41719465c060589e291d505ca4735ea30016a91f6fc79c3b" "checksum mashup-impl 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "aa607bfb674b4efb310512527d64266b065de3f894fc52f84efcbf7eaa5965fb" -"checksum memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1dd4eaac298c32ce07eb6ed9242eda7d82955b9170b7d6db59b2e02cc63fcb8" +"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" @@ -1751,20 +1957,22 @@ dependencies = [ "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238" "checksum once_cell 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "53075ac5dbd2798cfbcf9f710f2737de031d8076c192d8fe66fb23f639ccbdf4" +"checksum once_cell 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a04cb71e910d0034815600180f62a95bf6e67942d7ab52a166a68c7d7e9cd0" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum packed_simd 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "25d36de864f7218ec5633572a800109bbe5a1cc8d9d95a967f3daf93ea7e6ddc" "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" +"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" +"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" "checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" "checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" "checksum proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2c725b36c99df7af7bf9324e9c999b9e37d92c8f8caf106d82e1d7953218d2d8" -"checksum proc-macro-hack 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3e90aa19cd73dedc2d0e1e8407473f073d735fef0ab521438de6da8ee449ab66" "checksum proc-macro-hack-impl 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b753ad9ed99dd8efeaa7d2fb8453c8f6bc3e54b97966d35f1bc77ca6865254a" -"checksum proc-macro-nested 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9968e025d6368d1273a93bc23051e30dbf5482475e716d7385d8ec8fbd5b5b6" "checksum proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "38fddd23d98b2144d197c0eca5705632d4fe2667d14a6be5df8934f8d74f1978" -"checksum protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8aefcec9f142b524d98fc81d07827743be89dd6586a1ba6ab21fa66a500b3fa5" -"checksum protobuf-codegen 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "31539be8028d6b9e8e1b3b7c74e2fa3555302e27b2cc20dbaee6ffba648f75e2" +"checksum proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e98a83a9f9b331f54b924e68a66acb1bb35cb01fb0a23645139967abefb697e8" +"checksum protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40361836defdd5871ff7e84096c6f6444af7fc157f8ef1789f54f147687caa20" +"checksum protobuf-codegen 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "12c6abd78435445fc86898ebbd0521a68438063d4a73e23527b7134e6bf58b4a" "checksum protoc 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6762f5a05f41eb6252606fc6553262a025e72c51a0227717990998fd9c2ac81" "checksum protoc-rust 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "451bac6bc50c1f0a5f5298a369a1d7b3c243a6ae15cbb299a6b0ad9a88b35e96" "checksum protoc-rust-grpc 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89b0b611e3a7fda302581288521d0b1f4662b4fdf285c5ef5f8deb38f99f96ff" @@ -1773,8 +1981,8 @@ dependencies = [ "checksum pyo3cls 0.6.0-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "190e36065e84bea3ffd993932d5e2abd094a8521f5f4543ae8f145a21097c3b7" "checksum query_interface 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "78c0f0046284eebb86b68f93f9677d499034f88e15ca01021ceea32c4d3c3693" "checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -"checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" @@ -1797,19 +2005,22 @@ dependencies = [ "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" "checksum sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" -"checksum simple_asn1 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f60217f160fe63c26378d77474a4fdaa6f6cd22fb596e1fd94ba6a17c3973956" +"checksum simple_asn1 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2b25ecba7165254f0c97d6c22a64b1122a03634b18d20a34daf21e18f892e618" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" "checksum spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ceac490aa12c567115b40b7b7fceca03a6c9d53d5defea066123debc83c5dc1f" +"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" "checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9" +"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" @@ -1817,27 +2028,39 @@ dependencies = [ "checksum tls-api 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e452fe2fdf40a10715adb3a5f244c7411cdf2ecc887b07160310939785db9182" "checksum tls-api-stub 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "25a2dcddd0fd52bdbedf9b4f0fd1cb884abfa0984e6a54121d4cefdf3d234e4c" "checksum tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "e0500b88064f08bebddd0c0bed39e19f5c567a5f30975bee52b0c0d3e2eeb38c" -"checksum tokio-async-await 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "417f9fe772648c6c49a579040d0ed0008e557ef4803f6f4eb12920c093ddd88f" +"checksum tokio 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "be69f7efc3a6e335fbd598f486036f9ef9145b854456d2b2503ac91f0bc95258" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" +"checksum tokio-codec 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b4ccd972ca855244b2e71ccba44a56b5cdcebe21c4b977ef5a2f23e898a31b97" "checksum tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71" "checksum tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "331c8acc267855ec06eb0c94618dcbbfea45bed2d20b77252940095273fb58f6" "checksum tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30c6dbf2d1ad1de300b393910e8a3aa272b724a400b6531da03eed99e329fbf0" +"checksum tokio-executor 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "345c88d08e60054624ac16be7feef0596a9151b63e20de75ee771effe67c3639" "checksum tokio-fs 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9cbbc8a3698b7ab652340f46633364f9eaa928ddaaee79d8b8f356dd79a09d" +"checksum tokio-fs 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a1468a7f71c1fcb0abfbe8467eb892cd566f7fd664307d5f54e0336a6aa381ef" "checksum tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b53aeb9d3f5ccf2ebb29e19788f96987fa1355f8fe45ea193928eaaaf3ae820f" +"checksum tokio-io 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9031c46146fb6bfb5be43d3e33b23d119ba175ec85c44850fbf9beff83aa125d" +"checksum tokio-macros 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7c9074903dba9ac096b1f4eb49611d306ad44fecd4227ec95c40de914c3ff505" +"checksum tokio-net 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2a11912ff0a3f594c4cfe6b0a94b8d0fc395cd38db2c1feebcec1bdbec027597" "checksum tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afbcdb0f0d2a1e4c440af82d7bbf0bf91a8a8c0575bcd20c05d15be7e9d3a02f" "checksum tokio-sync 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0d65a58e2215c13179e6eeb2cf00511e0aee455cad40a9bfaef15a2fd8aab1c7" +"checksum tokio-sync 0.2.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3c63865749332d5ce8e21ebeb5992a2b65636b2fa4d6e5f9322bbbbb3a811225" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" "checksum tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c3fd86cb15547d02daa2b21aadaf4e37dee3368df38a526178a5afa3c034d2fb" "checksum tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6131e780037787ff1b3f8aad9da83bca02438b72277850dd6ad0d455e0e20efc" "checksum tokio-timer 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "21c04a314a1f69f73c0227beba6250e06cdc1e9a62e7eff912bf54a59b6d1b94" +"checksum tokio-timer 0.3.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "799925fa2682e7b23510f081c3cc99f30be640d5be617f837dc730e20f916f0e" "checksum tokio-tls-api 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "c7ac6ebb2f40e7e068cb43e1f3b09b40d7869bcc7e49e7f50610d4e0e75a18d7" "checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" "checksum tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "65ae5d255ce739e8537221ed2942e0445f4b3b813daebac1c0050ddaaa3587f9" "checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" +"checksum tracing 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "701f355a504d1b7ae24eed42a19346701a8a3ac139058967895b6b1b56b13e64" +"checksum tracing-attributes 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5b43a1835d0cb99f4a36fcdd0f777f72e4d4ff2eb6e78a0e105ac25e41309efa" +"checksum tracing-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e94af5e2a5f1700cc58127f93d4b7e46c2b925856592066b9880aabce633b6d8" "checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum unix_socket 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aa2700417c405c38f5e6902d699345241c28c0b7ade4abaad71e35a87eb1564" "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" diff --git a/rust-toolchain b/rust-toolchain index 0d75ae6..8506edd 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2019-01-29 +nightly-2019-09-06 From 771da9d21c68e5a911e28c2c45f46abf9dacb0f8 Mon Sep 17 00:00:00 2001 From: Sam Ulrich Date: Thu, 10 Oct 2019 17:10:40 -0500 Subject: [PATCH 11/12] Added Rust/Cargo Install --- Cargo.lock | 4 +++- Cargo.toml | 3 +-- build | 7 +++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2b151c3..5097ae9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -491,7 +491,7 @@ dependencies = [ "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "hedera 0.4.2-alpha.0", + "hedera 0.4.2-alpha.0 (git+https://github.com/sam-ulrich1/hedera-sdk-rust)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "pyo3 0.6.0-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -502,6 +502,7 @@ dependencies = [ [[package]] name = "hedera" version = "0.4.2-alpha.0" +source = "git+https://github.com/sam-ulrich1/hedera-sdk-rust#6fd012ad20e942fe140a5edc41f94ecf5b40300a" dependencies = [ "bip39 0.6.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1925,6 +1926,7 @@ dependencies = [ "checksum grpc 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8e530ef7894a104a1c8525ce68787b3491efa2098ce5e5454e8324ea78893548" "checksum grpc-compiler 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b07f140d998d8940880e464f3fd291052618199432e91e59ae5c5075c0c8a40c" "checksum hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" +"checksum hedera 0.4.2-alpha.0 (git+https://github.com/sam-ulrich1/hedera-sdk-rust)" = "" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum httpbis 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7689cfa896b2a71da4f16206af167542b75d242b6906313e53857972a92d5614" diff --git a/Cargo.toml b/Cargo.toml index 62d939a..ef66dd7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,8 +12,7 @@ authors = [ crate-type = ["cdylib"] [dependencies] -#hedera = { path = "/home/user/Development/Dependencies/hedera-sdk-rust" } -hedera = { path = "/home/user/Development/Dependencies/hedera-sdk-rust" } +hedera = { git = "https://github.com/sam-ulrich1/hedera-sdk-rust" } pyo3 = { version = "0.6.0-alpha.1", features = [ "extension-module" ] } chrono = "0.4.6" itertools = "0.8.0" diff --git a/build b/build index 0add429..444932c 100755 --- a/build +++ b/build @@ -1,5 +1,12 @@ #!/bin/bash +if ! type cargo > /dev/null; then + read -p "Cargo/Rust is not found on this system. Would you like to install? [Y/n] " install_rust + if [[ "${install_rust}" == "Y" ]]; then + curl https://sh.rustup.rs -sSf | sh + fi +fi + pck=$(command -v pyo3-pack) if [[ "${pck}" == "" ]]; then From 761790444ed9fd59ede0cacf627f1b9eca2ed485 Mon Sep 17 00:00:00 2001 From: Sam Ulrich Date: Thu, 10 Oct 2019 18:51:10 -0500 Subject: [PATCH 12/12] Updates To Build Process --- Cargo.toml | 2 +- build | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ef66dd7..4a191fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ authors = [ crate-type = ["cdylib"] [dependencies] -hedera = { git = "https://github.com/sam-ulrich1/hedera-sdk-rust" } +hedera = { git = "https://github.com/launchbadge/hedera-sdk-rust" } pyo3 = { version = "0.6.0-alpha.1", features = [ "extension-module" ] } chrono = "0.4.6" itertools = "0.8.0" diff --git a/build b/build index 444932c..c5c7c8f 100755 --- a/build +++ b/build @@ -4,6 +4,7 @@ if ! type cargo > /dev/null; then read -p "Cargo/Rust is not found on this system. Would you like to install? [Y/n] " install_rust if [[ "${install_rust}" == "Y" ]]; then curl https://sh.rustup.rs -sSf | sh + source $HOME/.cargo/env fi fi