diff --git a/.github/actions/deps-install/action.yml b/.github/actions/deps-install/action.yml
index 25ed15bf50..02b0ffbec4 100644
--- a/.github/actions/deps-install/action.yml
+++ b/.github/actions/deps-install/action.yml
@@ -12,33 +12,54 @@ inputs:
runs:
using: 'composite'
steps:
+ - name: Download protoc (Linux)
+ if: runner.os == 'Linux' && contains(inputs.deps, 'protoc')
+ uses: ./.github/actions/download-and-verify
+ with:
+ url: "https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-linux-x86_64.zip"
+ output_file: "protoc-25.3-linux-x86_64.zip"
+ checksum: "f853e691868d0557425ea290bf7ba6384eef2fa9b04c323afab49a770ba9da80"
+
- name: Install protoc (Linux)
env:
TMP: ${{ inputs.temp || runner.temp }}
if: runner.os == 'Linux' && contains(inputs.deps, 'protoc')
shell: bash
run: |
- wget https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-linux-x86_64.zip
- unzip protoc-25.3-linux-x86_64 -d "$TMP/protobuf"
+ unzip protoc-25.3-linux-x86_64.zip -d "$TMP/protobuf"
echo "$TMP/protobuf/bin" >> $GITHUB_PATH
+ - name: Download protoc (MacOS)
+ if: runner.os == 'macOS' && contains(inputs.deps, 'protoc')
+ uses: ./.github/actions/download-and-verify
+ with:
+ url: "https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-osx-x86_64.zip"
+ output_file: "protoc-25.3-osx-x86_64.zip"
+ checksum: "247e003b8e115405172eacc50bd19825209d85940728e766f0848eee7c80e2a1"
+
- name: Install protoc (MacOS)
env:
TMP: ${{ inputs.temp || runner.temp }}
if: runner.os == 'macOS' && contains(inputs.deps, 'protoc')
shell: bash
run: |
- wget https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-osx-x86_64.zip
unzip protoc-25.3-osx-x86_64.zip -d "$TMP/protobuf"
echo "$TMP/protobuf/bin" >> $GITHUB_PATH
+
+ - name: Download protoc (Windows)
+ uses: ./.github/actions/download-and-verify
+ with:
+ url: "https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-win64.zip"
+ output_file: "protoc-25.3-win64.zip"
+ checksum: "d6b336b852726364313330631656b7f395dde5b1141b169f5c4b8d43cdf01482"
+
- name: Install protoc (Windows)
env:
TMP: ${{ inputs.temp || runner.temp }}
if: runner.os == 'Windows' && contains(inputs.deps, 'protoc')
shell: powershell
run: |
- Invoke-WebRequest -Uri https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-win64.zip -OutFile protoc-25.3-win64.zip
7z x protoc-25.3-win64.zip -o"$TMP\protobuf"
echo "$TMP\protobuf\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
diff --git a/.github/actions/download-and-verify/action.yml b/.github/actions/download-and-verify/action.yml
new file mode 100644
index 0000000000..198601f486
--- /dev/null
+++ b/.github/actions/download-and-verify/action.yml
@@ -0,0 +1,46 @@
+name: "Download and verify remote files"
+
+runs:
+ using: "composite"
+ steps:
+ - name: Download (Unix)
+ if: runner.os != 'Windows'
+ shell: bash
+ run: curl -L -o ${{ inputs.output_file }} ${{ inputs.url }}
+
+ - name: Download (Windows)
+ if: runner.os == 'Windows'
+ shell: powershell
+ run: Invoke-WebRequest -Uri ${{ inputs.url }} -OutFile ${{ inputs.output_file }}
+
+ - name: Verify (Unix)
+ if: runner.os != 'Windows'
+ shell: bash
+ run: |
+ if [[ "$RUNNER_OS" == "macOS" ]]; then
+ echo "${{ inputs.checksum }} *${{ inputs.output_file }}" | shasum -a 256 -c
+ else
+ echo "${{ inputs.checksum }} ${{ inputs.output_file }}" | sha256sum -c
+ fi
+
+ - name: Verify (Windows)
+ if: runner.os == 'Windows'
+ shell: powershell
+ run: |
+ $expectedChecksum = "${{ inputs.checksum }}"
+ $actualChecksum = (Get-FileHash -Path "${{ inputs.output_file }}" -Algorithm SHA256).Hash
+ if ($expectedChecksum -ne $actualChecksum) {
+ Write-Output "Checksum did not match! Expected: $expectedChecksum, Found: $actualChecksum"
+ exit 1
+ }
+
+inputs:
+ url:
+ description: "URL of the remote file."
+ required: true
+ output_file:
+ description: "Output path."
+ required: true
+ checksum:
+ description: "Expected checksum of the downloaded file."
+ required: true
diff --git a/.github/workflows/adex-cli.yml b/.github/workflows/adex-cli.yml
deleted file mode 100644
index 32b62f04ed..0000000000
--- a/.github/workflows/adex-cli.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-name: Adex CLI
-on: [push]
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-env:
- BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
-
-jobs:
- code-check:
- name: Code Checks
- timeout-minutes: 60
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
- steps:
- - uses: actions/checkout@v3
-
- - name: Cargo cache
- uses: ./.github/actions/cargo-cache
-
- - name: Start checking code format and lint
- continue-on-error: true
- run: |
- cargo fmt --manifest-path ./mm2src/adex_cli/Cargo.toml --all -- --check
- cargo clippy --manifest-path ./mm2src/adex_cli/Cargo.toml --all-targets --all-features -- --D warnings
-
- - name: Start building
- run: |
- cargo build --manifest-path ./mm2src/adex_cli/Cargo.toml
-
- - name: Start testing
- run: |
- cargo test --manifest-path ./mm2src/adex_cli/Cargo.toml --no-fail-fast
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a9790f9b13..12a60bbc3c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -122,7 +122,7 @@ jobs:
- name: Test
run: |
- wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.sh | bash
+ wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/0adeeabdd484ef40539d1275c6a765f5c530ea79/zcutil/fetch-params-alt.sh | bash
cargo test --test 'mm2_tests_main' --no-fail-fast
mac-x86-64-kdf-integration:
@@ -154,7 +154,7 @@ jobs:
- name: Test
run: |
- wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.sh | bash
+ wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/0adeeabdd484ef40539d1275c6a765f5c530ea79/zcutil/fetch-params-alt.sh | bash
cargo test --test 'mm2_tests_main' --no-fail-fast
win-x86-64-kdf-integration:
@@ -181,10 +181,16 @@ jobs:
- name: Cargo cache
uses: ./.github/actions/cargo-cache
+ - name: Download wget64
+ uses: ./.github/actions/download-and-verify
+ with:
+ url: "https://github.com/KomodoPlatform/komodo/raw/d456be35acd1f8584e1e4f971aea27bd0644d5c5/zcutil/wget64.exe"
+ output_file: "/wget64.exe"
+ checksum: "d80719431dc22b0e4a070f61fab982b113a4ed9a6d4cf25e64b5be390dcadb94"
+
- name: Test
run: |
- Invoke-WebRequest -Uri https://github.com/KomodoPlatform/komodo/raw/d456be35acd1f8584e1e4f971aea27bd0644d5c5/zcutil/wget64.exe -OutFile \wget64.exe
- Invoke-WebRequest -Uri https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.bat -OutFile \cmd.bat && \cmd.bat
+ Invoke-WebRequest -Uri https://raw.githubusercontent.com/KomodoPlatform/komodo/0adeeabdd484ef40539d1275c6a765f5c530ea79/zcutil/fetch-params-alt.bat -OutFile \cmd.bat && \cmd.bat
cargo test --test 'mm2_tests_main' --no-fail-fast
docker-tests:
@@ -213,7 +219,7 @@ jobs:
- name: Test
run: |
- wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/v0.8.1/zcutil/fetch-params-alt.sh | bash
+ wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/v0.8.1//zcutil/fetch-params-alt.sh | bash
cargo test --test 'docker_tests_main' --features run-docker-tests --no-fail-fast
wasm:
@@ -241,11 +247,17 @@ jobs:
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
+ - name: Download geckodriver
+ uses: ./.github/actions/download-and-verify
+ with:
+ url: "https://github.com/mozilla/geckodriver/releases/download/v0.32.2/geckodriver-v0.32.2-linux64.tar.gz"
+ output_file: "geckodriver-v0.32.2-linux64.tar.gz"
+ checksum: "1eab226bf009599f5aa1d77d9ed4c374e10a03fd848b500be1b32cefd2cbec64"
+
- name: Install firefox and geckodriver
run: |
sudo apt-get update -y
sudo apt-get install -y firefox
- wget https://github.com/mozilla/geckodriver/releases/download/v0.32.2/geckodriver-v0.32.2-linux64.tar.gz
sudo tar -xzvf geckodriver-v0.32.2-linux64.tar.gz -C /bin
sudo chmod +x /bin/geckodriver
diff --git a/Cargo.lock b/Cargo.lock
index 429dc8cf7c..fd6f1b4518 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -119,12 +119,6 @@ dependencies = [
"memchr",
]
-[[package]]
-name = "aliasable"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd"
-
[[package]]
name = "android_system_properties"
version = "0.1.5"
@@ -134,15 +128,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "ansi_term"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
-dependencies = [
- "winapi",
-]
-
[[package]]
name = "anyhow"
version = "1.0.42"
@@ -186,12 +171,6 @@ version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247"
-[[package]]
-name = "assert_matches"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
-
[[package]]
name = "async-io"
version = "1.13.0"
@@ -261,7 +240,7 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -278,7 +257,7 @@ version = "0.1.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "531b97fb4cd3dfdce92c35dedbfdc1f0b9d8091c8ca943d6dae340ef5012d514"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 2.0.38",
]
@@ -391,12 +370,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
-[[package]]
-name = "base32"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa"
-
[[package]]
name = "base58"
version = "0.2.0"
@@ -409,12 +382,6 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
-[[package]]
-name = "base64"
-version = "0.12.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
-
[[package]]
name = "base64"
version = "0.13.0"
@@ -471,15 +438,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "bincode"
-version = "1.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
-dependencies = [
- "serde",
-]
-
[[package]]
name = "bip32"
version = "0.2.2"
@@ -610,20 +568,6 @@ dependencies = [
"constant_time_eq",
]
-[[package]]
-name = "blake3"
-version = "1.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f"
-dependencies = [
- "arrayref",
- "arrayvec 0.7.1",
- "cc",
- "cfg-if 1.0.0",
- "constant_time_eq",
- "digest 0.10.7",
-]
-
[[package]]
name = "block-buffer"
version = "0.9.0"
@@ -695,51 +639,6 @@ dependencies = [
"serde_with",
]
-[[package]]
-name = "borsh"
-version = "0.9.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa"
-dependencies = [
- "borsh-derive",
- "hashbrown 0.11.2",
-]
-
-[[package]]
-name = "borsh-derive"
-version = "0.9.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775"
-dependencies = [
- "borsh-derive-internal",
- "borsh-schema-derive-internal",
- "proc-macro-crate 0.1.5",
- "proc-macro2 1.0.69",
- "syn 1.0.95",
-]
-
-[[package]]
-name = "borsh-derive-internal"
-version = "0.9.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065"
-dependencies = [
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "syn 1.0.95",
-]
-
-[[package]]
-name = "borsh-schema-derive-internal"
-version = "0.9.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0"
-dependencies = [
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "syn 1.0.95",
-]
-
[[package]]
name = "bs58"
version = "0.4.0"
@@ -764,42 +663,12 @@ version = "3.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"
-[[package]]
-name = "bv"
-version = "0.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340"
-dependencies = [
- "feature-probe",
- "serde",
-]
-
[[package]]
name = "byte-slice-cast"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65c1bf4a04a88c54f589125563643d773f3254b5c38571395e2b591c693bbc81"
-[[package]]
-name = "bytemuck"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e851ca7c24871e7336801608a4797d7376545b6928a10d32d75685687141ead"
-dependencies = [
- "bytemuck_derive",
-]
-
-[[package]]
-name = "bytemuck_derive"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e215f8c2f9f79cb53c8335e687ffd07d5bfcb6fe5fc80723762d0be46e7cc54"
-dependencies = [
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "syn 1.0.95",
-]
-
[[package]]
name = "byteorder"
version = "1.4.3"
@@ -825,44 +694,12 @@ dependencies = [
"serde",
]
-[[package]]
-name = "bzip2"
-version = "0.4.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
-dependencies = [
- "bzip2-sys",
- "libc",
-]
-
-[[package]]
-name = "bzip2-sys"
-version = "0.1.11+1.0.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
-dependencies = [
- "cc",
- "libc",
- "pkg-config",
-]
-
[[package]]
name = "cache-padded"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24508e28c677875c380c20f4d28124fab6f8ed4ef929a1397d7b1a31e92f1005"
-[[package]]
-name = "caps"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61bf7211aad104ce2769ec05efcdfabf85ee84ac92461d142f22cf8badd0e54c"
-dependencies = [
- "errno 0.2.8",
- "libc",
- "thiserror",
-]
-
[[package]]
name = "cbc"
version = "0.1.2"
@@ -877,9 +714,6 @@ name = "cc"
version = "1.0.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574"
-dependencies = [
- "jobserver",
-]
[[package]]
name = "cfg-if"
@@ -965,21 +799,6 @@ dependencies = [
"inout",
]
-[[package]]
-name = "clap"
-version = "2.33.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
-dependencies = [
- "ansi_term",
- "atty",
- "bitflags",
- "strsim 0.8.0",
- "textwrap",
- "unicode-width",
- "vec_map",
-]
-
[[package]]
name = "cloudabi"
version = "0.0.3"
@@ -989,15 +808,6 @@ dependencies = [
"bitflags",
]
-[[package]]
-name = "cloudabi"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467"
-dependencies = [
- "bitflags",
-]
-
[[package]]
name = "codespan-reporting"
version = "0.11.1"
@@ -1016,7 +826,6 @@ dependencies = [
"async-trait",
"base58",
"base64 0.21.7",
- "bincode",
"bip32",
"bitcoin",
"bitcoin_hashes",
@@ -1035,7 +844,6 @@ dependencies = [
"derive_more",
"dirs",
"ed25519-dalek",
- "ed25519-dalek-bip32 0.2.0",
"enum_derives",
"ethabi",
"ethcore-transaction",
@@ -1080,7 +888,7 @@ dependencies = [
"mocktopus",
"nom",
"num-traits",
- "parking_lot 0.12.0",
+ "parking_lot",
"primitives",
"prost",
"prost-build",
@@ -1095,7 +903,6 @@ dependencies = [
"rpc_task",
"rust-ini",
"rustls 0.21.10",
- "satomic-swap",
"script",
"secp256k1 0.20.3",
"secp256k1 0.24.3",
@@ -1110,11 +917,6 @@ dependencies = [
"sha2 0.10.7",
"sha3 0.9.1",
"sia-rust",
- "solana-client",
- "solana-sdk",
- "solana-transaction-status",
- "spl-associated-token-account",
- "spl-token",
"spv_validation",
"tendermint-rpc",
"time 0.3.20",
@@ -1126,7 +928,7 @@ dependencies = [
"tower-service",
"url",
"utxo_signer",
- "uuid 1.2.2",
+ "uuid",
"wagyu-zcash-parameters",
"wasm-bindgen",
"wasm-bindgen-futures",
@@ -1164,7 +966,7 @@ dependencies = [
"mm2_metamask",
"mm2_metrics",
"mm2_number",
- "parking_lot 0.12.0",
+ "parking_lot",
"rpc",
"rpc_task",
"ser_error",
@@ -1208,7 +1010,7 @@ dependencies = [
"libc",
"lightning",
"log",
- "parking_lot 0.12.0",
+ "parking_lot",
"parking_lot_core 0.6.2",
"paste",
"primitive-types",
@@ -1225,7 +1027,7 @@ dependencies = [
"sha2 0.10.7",
"shared_ref_counter",
"tokio",
- "uuid 1.2.2",
+ "uuid",
"wasm-bindgen",
"wasm-bindgen-futures",
"wasm-bindgen-test",
@@ -1251,21 +1053,6 @@ dependencies = [
"crossbeam-utils 0.8.16",
]
-[[package]]
-name = "console"
-version = "0.15.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31"
-dependencies = [
- "encode_unicode",
- "libc",
- "once_cell",
- "regex",
- "terminal_size",
- "unicode-width",
- "winapi",
-]
-
[[package]]
name = "console_error_panic_hook"
version = "0.1.7"
@@ -1276,16 +1063,6 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "console_log"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "501a375961cef1a0d44767200e66e4a559283097e91d0730b1d75dfb2f8a1494"
-dependencies = [
- "log",
- "web-sys",
-]
-
[[package]]
name = "const-oid"
version = "0.9.6"
@@ -1325,9 +1102,9 @@ dependencies = [
[[package]]
name = "cosmos-sdk-proto"
-version = "0.19.0"
+version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73c9d2043a9e617b0d602fbc0a0ecd621568edbf3a9774890a6d562389bd8e1c"
+checksum = "32560304ab4c365791fd307282f76637213d8083c1a98490c35159cd67852237"
dependencies = [
"prost",
"prost-types",
@@ -1336,18 +1113,18 @@ dependencies = [
[[package]]
name = "cosmrs"
-version = "0.14.0"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af13955d6f356272e6def9ff5e2450a7650df536d8934f47052a20c76513d2f6"
+checksum = "47126f5364df9387b9d8559dcef62e99010e1d4098f39eb3f7ee4b5c254e40ea"
dependencies = [
"cosmos-sdk-proto",
"ecdsa",
"eyre",
- "getrandom 0.2.9",
"k256",
"rand_core 0.6.4",
"serde",
"serde_json",
+ "signature 2.2.0",
"subtle-encoding",
"tendermint",
"thiserror",
@@ -1557,7 +1334,7 @@ dependencies = [
"mm2_eth",
"mm2_metamask",
"num-traits",
- "parking_lot 0.12.0",
+ "parking_lot",
"primitives",
"rpc",
"rpc_task",
@@ -1608,16 +1385,6 @@ dependencies = [
"subtle",
]
-[[package]]
-name = "crypto-mac"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58bcd97a54c7ca5ce2f6eb16f6bede5b0ab5f0055fedc17d2f0b4466e21671ca"
-dependencies = [
- "generic-array",
- "subtle",
-]
-
[[package]]
name = "crypto-mac"
version = "0.11.1"
@@ -1724,7 +1491,7 @@ dependencies = [
"cc",
"codespan-reporting",
"lazy_static",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"scratch",
"syn 1.0.95",
@@ -1742,7 +1509,7 @@ version = "1.0.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b846f081361125bfc8dc9d3940c84e1fd83ba54bbca7b17cd29483c828be0704"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -1765,9 +1532,9 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"
dependencies = [
"fnv",
"ident_case",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
- "strsim 0.10.0",
+ "strsim",
"syn 1.0.95",
]
@@ -1782,17 +1549,6 @@ dependencies = [
"syn 1.0.95",
]
-[[package]]
-name = "dashmap"
-version = "4.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c"
-dependencies = [
- "cfg-if 1.0.0",
- "num_cpus",
- "rayon",
-]
-
[[package]]
name = "data-encoding"
version = "2.4.0"
@@ -1831,7 +1587,7 @@ dependencies = [
"rusqlite",
"sql-builder",
"tokio",
- "uuid 1.2.2",
+ "uuid",
]
[[package]]
@@ -1844,55 +1600,17 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "derivation-path"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "193388a8c8c75a490b604ff61775e236541b8975e98e5ca1f6ea97d122b7e2db"
-dependencies = [
- "failure",
-]
-
-[[package]]
-name = "derivation-path"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0"
-
-[[package]]
-name = "derivative"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
-dependencies = [
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "syn 1.0.95",
-]
-
[[package]]
name = "derive_more"
version = "0.99.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
-[[package]]
-name = "dialoguer"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61579ada4ec0c6031cfac3f86fdba0d195a7ebeb5e36693bd53cb5999a25beeb"
-dependencies = [
- "console",
- "lazy_static",
- "tempfile",
- "zeroize",
-]
-
[[package]]
name = "digest"
version = "0.9.0"
@@ -1914,15 +1632,6 @@ dependencies = [
"subtle",
]
-[[package]]
-name = "dir-diff"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2860407d7d7e2e004bb2128510ad9e8d669e76fa005ccf567977b5d71b8b4a0b"
-dependencies = [
- "walkdir",
-]
-
[[package]]
name = "directories"
version = "3.0.2"
@@ -1943,16 +1652,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "dirs-next"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
-dependencies = [
- "cfg-if 1.0.0",
- "dirs-sys-next",
-]
-
[[package]]
name = "dirs-sys"
version = "0.3.6"
@@ -1964,40 +1663,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "dirs-sys-next"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
-dependencies = [
- "libc",
- "redox_users 0.4.0",
- "winapi",
-]
-
-[[package]]
-name = "dlopen"
-version = "0.1.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937"
-dependencies = [
- "dlopen_derive",
- "lazy_static",
- "libc",
- "winapi",
-]
-
-[[package]]
-name = "dlopen_derive"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581"
-dependencies = [
- "libc",
- "quote 0.6.13",
- "syn 0.15.44",
-]
-
[[package]]
name = "dtoa"
version = "1.0.2"
@@ -2066,31 +1731,6 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "ed25519-dalek-bip32"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "057f328f31294b5ab432e6c39642f54afd1531677d6d4ba2905932844cc242f3"
-dependencies = [
- "derivation-path 0.1.3",
- "ed25519-dalek",
- "failure",
- "hmac 0.9.0",
- "sha2 0.9.9",
-]
-
-[[package]]
-name = "ed25519-dalek-bip32"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908"
-dependencies = [
- "derivation-path 0.2.0",
- "ed25519-dalek",
- "hmac 0.12.1",
- "sha2 0.10.7",
-]
-
[[package]]
name = "edit-distance"
version = "2.1.0"
@@ -2122,12 +1762,6 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "encode_unicode"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
-
[[package]]
name = "encoding_rs"
version = "0.8.28"
@@ -2150,7 +1784,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116"
dependencies = [
"heck",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -2171,7 +1805,7 @@ name = "enum_derives"
version = "0.1.0"
dependencies = [
"itertools",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -2327,28 +1961,6 @@ dependencies = [
"once_cell",
]
-[[package]]
-name = "failure"
-version = "0.1.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86"
-dependencies = [
- "backtrace",
- "failure_derive",
-]
-
-[[package]]
-name = "failure_derive"
-version = "0.1.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
-dependencies = [
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "syn 1.0.95",
- "synstructure",
-]
-
[[package]]
name = "fallible-iterator"
version = "0.2.0"
@@ -2370,12 +1982,6 @@ dependencies = [
"instant",
]
-[[package]]
-name = "feature-probe"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da"
-
[[package]]
name = "ff"
version = "0.8.0"
@@ -2403,18 +2009,6 @@ version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77"
-[[package]]
-name = "filetime"
-version = "0.2.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98"
-dependencies = [
- "cfg-if 1.0.0",
- "libc",
- "redox_syscall 0.2.10",
- "winapi",
-]
-
[[package]]
name = "findshlibs"
version = "0.5.0"
@@ -2473,11 +2067,10 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "form_urlencoded"
-version = "1.0.1"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
+checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
dependencies = [
- "matches",
"percent-encoding",
]
@@ -2605,7 +2198,7 @@ version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 2.0.38",
]
@@ -2689,22 +2282,11 @@ version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
- "serde",
"typenum",
"version_check",
"zeroize",
]
-[[package]]
-name = "gethostname"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e692e296bfac1d2533ef168d0b60ff5897b8b70a4009276834014dd8924cc028"
-dependencies = [
- "libc",
- "winapi",
-]
-
[[package]]
name = "getrandom"
version = "0.1.14"
@@ -2930,17 +2512,6 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f"
-[[package]]
-name = "hidapi"
-version = "1.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38b1717343691998deb81766bfcd1dce6df0d5d6c37070b5a3de2bb6d39f7822"
-dependencies = [
- "cc",
- "libc",
- "pkg-config",
-]
-
[[package]]
name = "hkd32"
version = "0.6.0"
@@ -2963,16 +2534,6 @@ dependencies = [
"digest 0.9.0",
]
-[[package]]
-name = "hmac"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "deae6d9dbb35ec2c502d62b8f7b1c000a0822c3b0794ba36b3149c0a1c840dff"
-dependencies = [
- "crypto-mac 0.9.1",
- "digest 0.9.0",
-]
-
[[package]]
name = "hmac"
version = "0.11.0"
@@ -3203,6 +2764,16 @@ dependencies = [
"unicode-normalization",
]
+[[package]]
+name = "idna"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
+dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
[[package]]
name = "if-addrs"
version = "0.7.0"
@@ -3265,7 +2836,7 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -3276,12 +2847,6 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
-[[package]]
-name = "index_list"
-version = "0.2.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a9d968042a4902e08810946fc7cd5851eb75e80301342305af755ca06cb82ce"
-
[[package]]
name = "indexmap"
version = "1.9.3"
@@ -3302,18 +2867,6 @@ dependencies = [
"hashbrown 0.14.3",
]
-[[package]]
-name = "indicatif"
-version = "0.16.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b"
-dependencies = [
- "console",
- "lazy_static",
- "number_prefix",
- "regex",
-]
-
[[package]]
name = "inout"
version = "0.1.3"
@@ -3415,15 +2968,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "jobserver"
-version = "0.1.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa"
-dependencies = [
- "libc",
-]
-
[[package]]
name = "js-sys"
version = "0.3.64"
@@ -3471,9 +3015,7 @@ dependencies = [
"cfg-if 1.0.0",
"ecdsa",
"elliptic-curve",
- "once_cell",
"sha2 0.10.7",
- "signature 2.2.0",
]
[[package]]
@@ -3543,16 +3085,6 @@ version = "0.2.150"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
-[[package]]
-name = "libloading"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd"
-dependencies = [
- "cfg-if 1.0.0",
- "winapi",
-]
-
[[package]]
name = "libm"
version = "0.1.4"
@@ -3635,7 +3167,7 @@ dependencies = [
"multihash",
"multistream-select",
"once_cell",
- "parking_lot 0.12.0",
+ "parking_lot",
"pin-project",
"quick-protobuf",
"rand 0.8.4",
@@ -3655,7 +3187,7 @@ dependencies = [
"libp2p-core",
"libp2p-identity",
"log",
- "parking_lot 0.12.0",
+ "parking_lot",
"smallvec 1.6.1",
"trust-dns-resolver",
]
@@ -3741,7 +3273,7 @@ dependencies = [
"asn1_der",
"bs58 0.5.0",
"ed25519-dalek",
- "libsecp256k1 0.7.0",
+ "libsecp256k1",
"log",
"multihash",
"quick-protobuf",
@@ -3874,7 +3406,7 @@ source = "git+https://github.com/KomodoPlatform/rust-libp2p.git?tag=k-0.52.4#6fc
dependencies = [
"heck",
"proc-macro-warning",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 2.0.38",
]
@@ -3919,7 +3451,7 @@ dependencies = [
"libp2p-core",
"libp2p-identity",
"log",
- "parking_lot 0.12.0",
+ "parking_lot",
"quicksink",
"rw-stream-sink",
"soketto",
@@ -3941,25 +3473,6 @@ dependencies = [
"yamux 0.13.1",
]
-[[package]]
-name = "libsecp256k1"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73"
-dependencies = [
- "arrayref",
- "base64 0.12.3",
- "digest 0.9.0",
- "hmac-drbg",
- "libsecp256k1-core 0.2.2",
- "libsecp256k1-gen-ecmult 0.2.1",
- "libsecp256k1-gen-genmult 0.2.1",
- "rand 0.7.3",
- "serde",
- "sha2 0.9.9",
- "typenum",
-]
-
[[package]]
name = "libsecp256k1"
version = "0.7.0"
@@ -3970,26 +3483,15 @@ dependencies = [
"base64 0.13.0",
"digest 0.9.0",
"hmac-drbg",
- "libsecp256k1-core 0.3.0",
- "libsecp256k1-gen-ecmult 0.3.0",
- "libsecp256k1-gen-genmult 0.3.0",
+ "libsecp256k1-core",
+ "libsecp256k1-gen-ecmult",
+ "libsecp256k1-gen-genmult",
"rand 0.8.4",
"serde",
"sha2 0.9.9",
"typenum",
]
-[[package]]
-name = "libsecp256k1-core"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80"
-dependencies = [
- "crunchy",
- "digest 0.9.0",
- "subtle",
-]
-
[[package]]
name = "libsecp256k1-core"
version = "0.3.0"
@@ -4001,31 +3503,13 @@ dependencies = [
"subtle",
]
-[[package]]
-name = "libsecp256k1-gen-ecmult"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3"
-dependencies = [
- "libsecp256k1-core 0.2.2",
-]
-
[[package]]
name = "libsecp256k1-gen-ecmult"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809"
dependencies = [
- "libsecp256k1-core 0.3.0",
-]
-
-[[package]]
-name = "libsecp256k1-gen-genmult"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d"
-dependencies = [
- "libsecp256k1-core 0.2.2",
+ "libsecp256k1-core",
]
[[package]]
@@ -4034,7 +3518,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c"
dependencies = [
- "libsecp256k1-core 0.3.0",
+ "libsecp256k1-core",
]
[[package]]
@@ -4231,15 +3715,6 @@ version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
-[[package]]
-name = "memmap2"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "057a3db23999c867821a7a59feb06a578fcb03685e983dff90daf9e7d24ac08f"
-dependencies = [
- "libc",
-]
-
[[package]]
name = "memoffset"
version = "0.5.6"
@@ -4304,7 +3779,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddece26afd34c31585c74a4db0630c376df271c285d682d1e55012197830b6df"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 2.0.38",
]
@@ -4405,6 +3880,7 @@ dependencies = [
"mm2_err_handle",
"mm2_event_stream",
"mm2_metrics",
+ "mm2_p2p",
"mm2_rpc",
"primitives",
"rand 0.7.3",
@@ -4415,7 +3891,7 @@ dependencies = [
"serde_json",
"shared_ref_counter",
"tokio",
- "uuid 1.2.2",
+ "uuid",
"wasm-bindgen-test",
]
@@ -4485,7 +3961,7 @@ dependencies = [
"cfg-if 1.0.0",
"common",
"futures 0.3.28",
- "parking_lot 0.12.0",
+ "parking_lot",
"serde",
"tokio",
"wasm-bindgen-test",
@@ -4600,7 +4076,7 @@ dependencies = [
"mocktopus",
"num-traits",
"parity-util-mem",
- "parking_lot 0.12.0",
+ "parking_lot",
"primitive-types",
"primitives",
"prost",
@@ -4635,7 +4111,7 @@ dependencies = [
"trie-db",
"trie-root 0.16.0",
"url",
- "uuid 1.2.2",
+ "uuid",
"wasm-bindgen",
"wasm-bindgen-futures",
"wasm-bindgen-test",
@@ -4658,7 +4134,7 @@ dependencies = [
"lazy_static",
"mm2_err_handle",
"mm2_eth",
- "parking_lot 0.12.0",
+ "parking_lot",
"serde",
"serde_derive",
"serde_json",
@@ -4713,7 +4189,7 @@ dependencies = [
"mm2_event_stream",
"mm2_p2p",
"mm2_state_machine",
- "parking_lot 0.12.0",
+ "parking_lot",
"pin-project",
"prost",
"rand 0.7.3",
@@ -4791,7 +4267,7 @@ dependencies = [
"ser_error_derive",
"serde",
"serde_json",
- "uuid 1.2.2",
+ "uuid",
]
[[package]]
@@ -4829,7 +4305,7 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
- "uuid 1.2.2",
+ "uuid",
]
[[package]]
@@ -4847,7 +4323,7 @@ version = "0.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3048ef3680533a27f9f8e7d6a0bce44dc61e4895ea0f42709337fa1c8616fefe"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -4986,19 +4462,6 @@ dependencies = [
"smallvec 1.6.1",
]
-[[package]]
-name = "nix"
-version = "0.23.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6"
-dependencies = [
- "bitflags",
- "cc",
- "cfg-if 1.0.0",
- "libc",
- "memoffset 0.6.4",
-]
-
[[package]]
name = "nix"
version = "0.24.3"
@@ -5047,7 +4510,7 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -5094,34 +4557,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "num_enum"
-version = "0.5.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f9bd055fb730c4f8f4f57d45d35cd6b3f0980535b056dc7ff119cee6a66ed6f"
-dependencies = [
- "derivative",
- "num_enum_derive",
-]
-
-[[package]]
-name = "num_enum_derive"
-version = "0.5.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "486ea01961c4a818096de679a8b740b26d9033146ac5291b1c98557658f8cdd9"
-dependencies = [
- "proc-macro-crate 1.1.3",
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "syn 1.0.95",
-]
-
-[[package]]
-name = "number_prefix"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
-
[[package]]
name = "object"
version = "0.29.0"
@@ -5158,30 +4593,6 @@ dependencies = [
"num-traits",
]
-[[package]]
-name = "ouroboros"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f357ef82d1b4db66fbed0b8d542cbd3c22d0bf5b393b3c257b9ba4568e70c9c3"
-dependencies = [
- "aliasable",
- "ouroboros_macro",
- "stable_deref_trait",
-]
-
-[[package]]
-name = "ouroboros_macro"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44a0b52c2cbaef7dffa5fec1a43274afe8bd2a644fa9fc50a9ef4ff0269b1257"
-dependencies = [
- "Inflector",
- "proc-macro-error",
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "syn 1.0.95",
-]
-
[[package]]
name = "packed_simd_2"
version = "0.3.8"
@@ -5222,8 +4633,8 @@ version = "3.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c45ed1f39709f5a89338fab50e59816b2e8815f5bb58276e7ddf9afd495f73f8"
dependencies = [
- "proc-macro-crate 1.1.3",
- "proc-macro2 1.0.69",
+ "proc-macro-crate",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -5240,7 +4651,7 @@ dependencies = [
"impl-trait-for-tuples",
"lru 0.7.5",
"parity-util-mem-derive",
- "parking_lot 0.12.0",
+ "parking_lot",
"primitive-types",
"smallvec 1.6.1",
"winapi",
@@ -5252,7 +4663,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"syn 1.0.95",
"synstructure",
]
@@ -5269,17 +4680,6 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e"
-[[package]]
-name = "parking_lot"
-version = "0.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb"
-dependencies = [
- "instant",
- "lock_api",
- "parking_lot_core 0.8.0",
-]
-
[[package]]
name = "parking_lot"
version = "0.12.0"
@@ -5297,7 +4697,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"
dependencies = [
"cfg-if 0.1.10",
- "cloudabi 0.0.3",
+ "cloudabi",
"libc",
"redox_syscall 0.1.56",
"rustc_version 0.2.3",
@@ -5305,21 +4705,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "parking_lot_core"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b"
-dependencies = [
- "cfg-if 0.1.10",
- "cloudabi 0.1.0",
- "instant",
- "libc",
- "redox_syscall 0.1.56",
- "smallvec 1.6.1",
- "winapi",
-]
-
[[package]]
name = "parking_lot_core"
version = "0.9.1"
@@ -5350,29 +4735,11 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc"
-[[package]]
-name = "pbkdf2"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd"
-dependencies = [
- "crypto-mac 0.8.0",
-]
-
-[[package]]
-name = "pbkdf2"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739"
-dependencies = [
- "crypto-mac 0.11.1",
-]
-
[[package]]
name = "peg"
-version = "0.7.0"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07c0b841ea54f523f7aa556956fbd293bcbe06f2e67d2eb732b7278aaf1d166a"
+checksum = "295283b02df346d1ef66052a757869b2876ac29a6bb0ac3f5f7cd44aebe40e8f"
dependencies = [
"peg-macros",
"peg-runtime",
@@ -5380,20 +4747,20 @@ dependencies = [
[[package]]
name = "peg-macros"
-version = "0.7.0"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c"
+checksum = "bdad6a1d9cf116a059582ce415d5f5566aabcd4008646779dab7fdc2a9a9d426"
dependencies = [
"peg-runtime",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
]
[[package]]
name = "peg-runtime"
-version = "0.7.0"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088"
+checksum = "e3aeb8f54c078314c2065ee649a7241f46b9d8e418e1a9581ba0546657d7aa3a"
[[package]]
name = "pem"
@@ -5406,9 +4773,9 @@ dependencies = [
[[package]]
name = "percent-encoding"
-version = "2.1.0"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
name = "petgraph"
@@ -5435,7 +4802,7 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 2.0.38",
]
@@ -5533,12 +4900,12 @@ checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea"
[[package]]
name = "prettyplease"
-version = "0.1.11"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f28f53e8b192565862cf99343194579a022eb9c7dd3a8d03134734803c7b3125"
+checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d"
dependencies = [
- "proc-macro2 1.0.69",
- "syn 1.0.95",
+ "proc-macro2",
+ "syn 2.0.38",
]
[[package]]
@@ -5565,15 +4932,6 @@ dependencies = [
"uint",
]
-[[package]]
-name = "proc-macro-crate"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785"
-dependencies = [
- "toml",
-]
-
[[package]]
name = "proc-macro-crate"
version = "1.1.3"
@@ -5585,56 +4943,23 @@ dependencies = [
]
[[package]]
-name = "proc-macro-error"
-version = "1.0.4"
+name = "proc-macro-warning"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+checksum = "70550716265d1ec349c41f70dd4f964b4fd88394efe4405f0c1da679c4799a07"
dependencies = [
- "proc-macro-error-attr",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
- "syn 1.0.95",
- "version_check",
+ "syn 2.0.38",
]
[[package]]
-name = "proc-macro-error-attr"
-version = "1.0.4"
+name = "proc-macro2"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
dependencies = [
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "version_check",
-]
-
-[[package]]
-name = "proc-macro-warning"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70550716265d1ec349c41f70dd4f964b4fd88394efe4405f0c1da679c4799a07"
-dependencies = [
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "syn 2.0.38",
-]
-
-[[package]]
-name = "proc-macro2"
-version = "0.4.30"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
-dependencies = [
- "unicode-xid 0.1.0",
-]
-
-[[package]]
-name = "proc-macro2"
-version = "1.0.69"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
-dependencies = [
- "unicode-ident",
+ "unicode-ident",
]
[[package]]
@@ -5645,7 +4970,7 @@ checksum = "78c2f43e8969d51935d2a7284878ae053ba30034cd563f673cde37ba5205685e"
dependencies = [
"dtoa",
"itoa 1.0.10",
- "parking_lot 0.12.0",
+ "parking_lot",
"prometheus-client-derive-encode",
]
@@ -5655,16 +4980,16 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b6a5217beb0ad503ee7fa752d451c905113d70721b937126158f3106a48cc1"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
[[package]]
name = "prost"
-version = "0.11.9"
+version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd"
+checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29"
dependencies = [
"bytes 1.4.0",
"prost-derive",
@@ -5672,44 +4997,43 @@ dependencies = [
[[package]]
name = "prost-build"
-version = "0.11.9"
+version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270"
+checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4"
dependencies = [
"bytes 1.4.0",
"heck",
"itertools",
- "lazy_static",
"log",
"multimap",
+ "once_cell",
"petgraph",
"prettyplease",
"prost",
"prost-types",
"regex",
- "syn 1.0.95",
+ "syn 2.0.38",
"tempfile",
- "which",
]
[[package]]
name = "prost-derive"
-version = "0.11.9"
+version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4"
+checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1"
dependencies = [
"anyhow",
"itertools",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
- "syn 1.0.95",
+ "syn 2.0.38",
]
[[package]]
name = "prost-types"
-version = "0.11.9"
+version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13"
+checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0"
dependencies = [
"prost",
]
@@ -5751,15 +5075,6 @@ dependencies = [
"serde_json",
]
-[[package]]
-name = "qstring"
-version = "0.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e"
-dependencies = [
- "percent-encoding",
-]
-
[[package]]
name = "quanta"
version = "0.11.1"
@@ -5820,22 +5135,13 @@ version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
-[[package]]
-name = "quote"
-version = "0.6.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
-dependencies = [
- "proc-macro2 0.4.30",
-]
-
[[package]]
name = "quote"
version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
]
[[package]]
@@ -6027,7 +5333,7 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
dependencies = [
- "cloudabi 0.0.3",
+ "cloudabi",
"fuchsia-cprng",
"libc",
"rand_core 0.4.2",
@@ -6073,31 +5379,6 @@ dependencies = [
"bitflags",
]
-[[package]]
-name = "rayon"
-version = "1.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90"
-dependencies = [
- "autocfg 1.1.0",
- "crossbeam-deque 0.8.1",
- "either",
- "rayon-core",
-]
-
-[[package]]
-name = "rayon-core"
-version = "1.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e"
-dependencies = [
- "crossbeam-channel 0.5.1",
- "crossbeam-deque 0.8.1",
- "crossbeam-utils 0.8.16",
- "lazy_static",
- "num_cpus",
-]
-
[[package]]
name = "rcgen"
version = "0.10.0"
@@ -6170,7 +5451,7 @@ version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c523ccaed8ac4b0288948849a350b37d3035827413c458b6a40ddb614bb4f72"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -6331,16 +5612,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "rpassword"
-version = "5.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb"
-dependencies = [
- "libc",
- "winapi",
-]
-
[[package]]
name = "rpc"
version = "0.1.0"
@@ -6383,7 +5654,7 @@ dependencies = [
"log",
"netlink-packet-route",
"netlink-proto",
- "nix 0.24.3",
+ "nix",
"thiserror",
"tokio",
]
@@ -6600,14 +5871,6 @@ dependencies = [
"winapi-util",
]
-[[package]]
-name = "satomic-swap"
-version = "0.1.0"
-source = "git+https://github.com/KomodoPlatform/satomic-swap.git?rev=413e472#413e4725a97f2c4d5d34101b3d2c49009c95cb28"
-dependencies = [
- "solana-program",
-]
-
[[package]]
name = "scale-info"
version = "2.1.2"
@@ -6626,8 +5889,8 @@ version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50e334bb10a245e28e5fd755cabcafd96cfcd167c99ae63a46924ca8d8703a3c"
dependencies = [
- "proc-macro-crate 1.1.3",
- "proc-macro2 1.0.69",
+ "proc-macro-crate",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -6811,7 +6074,7 @@ dependencies = [
name = "ser_error_derive"
version = "0.1.0"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"ser_error",
"syn 1.0.95",
@@ -6852,7 +6115,7 @@ version = "1.0.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 2.0.38",
]
@@ -6875,7 +6138,7 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -6909,23 +6172,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082"
dependencies = [
"darling",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
-[[package]]
-name = "serde_yaml"
-version = "0.8.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4a521f2940385c165a24ee286aa8599633d162077a54bdcae2a6fd5a7bfa7a0"
-dependencies = [
- "indexmap 1.9.3",
- "ryu",
- "serde",
- "yaml-rust",
-]
-
[[package]]
name = "serialization"
version = "0.1.0"
@@ -7087,717 +6338,104 @@ checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
dependencies = [
"autocfg 1.1.0",
]
-
-[[package]]
-name = "smallvec"
-version = "0.6.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0"
-dependencies = [
- "maybe-uninit",
-]
-
-[[package]]
-name = "smallvec"
-version = "1.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
-
-[[package]]
-name = "smol"
-version = "0.1.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "620cbb3c6e34da57d3a248cda0cd01cd5848164dc062e764e65d06fe3ea7aed5"
-dependencies = [
- "async-task",
- "blocking",
- "concurrent-queue 1.1.1",
- "fastrand",
- "futures-io",
- "futures-util",
- "libc",
- "once_cell",
- "scoped-tls",
- "slab",
- "socket2 0.3.19",
- "wepoll-sys-stjepang",
- "winapi",
-]
-
-[[package]]
-name = "snow"
-version = "0.9.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733"
-dependencies = [
- "aes-gcm",
- "blake2",
- "chacha20poly1305",
- "curve25519-dalek 4.0.0-rc.1",
- "rand_core 0.6.4",
- "ring 0.16.20",
- "rustc_version 0.4.0",
- "sha2 0.10.7",
- "subtle",
-]
-
-[[package]]
-name = "socket2"
-version = "0.3.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
-dependencies = [
- "cfg-if 1.0.0",
- "libc",
- "winapi",
-]
-
-[[package]]
-name = "socket2"
-version = "0.4.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
-dependencies = [
- "libc",
- "winapi",
-]
-
-[[package]]
-name = "socket2"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877"
-dependencies = [
- "libc",
- "windows-sys 0.48.0",
-]
-
-[[package]]
-name = "soketto"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "083624472e8817d44d02c0e55df043737ff11f279af924abdf93845717c2b75c"
-dependencies = [
- "base64 0.13.0",
- "bytes 1.4.0",
- "futures 0.3.28",
- "httparse",
- "log",
- "rand 0.8.4",
- "sha-1",
-]
-
-[[package]]
-name = "solana-account-decoder"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ea8c1862fc46c6ab40d83d15ced24a7afb1f3422da5824f1e9260f5ac10141f"
-dependencies = [
- "Inflector",
- "base64 0.12.3",
- "bincode",
- "bs58 0.4.0",
- "bv",
- "lazy_static",
- "serde",
- "serde_derive",
- "serde_json",
- "solana-config-program",
- "solana-sdk",
- "solana-vote-program",
- "spl-token",
- "thiserror",
- "zstd",
-]
-
-[[package]]
-name = "solana-address-lookup-table-program"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c60728aec35d772e6614319558cdccbe3f845102699b65ba5ac7497da0b626a"
-dependencies = [
- "bincode",
- "bytemuck",
- "log",
- "num-derive",
- "num-traits",
- "rustc_version 0.4.0",
- "serde",
- "solana-frozen-abi",
- "solana-frozen-abi-macro",
- "solana-program-runtime",
- "solana-sdk",
- "thiserror",
-]
-
-[[package]]
-name = "solana-bloom"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ddcd7c6adb802bc812a5a80c8de06ba0f0e8df0cca296a8b4e67cd04c16218f"
-dependencies = [
- "bv",
- "fnv",
- "log",
- "rand 0.7.3",
- "rayon",
- "rustc_version 0.4.0",
- "serde",
- "serde_derive",
- "solana-frozen-abi",
- "solana-frozen-abi-macro",
- "solana-sdk",
-]
-
-[[package]]
-name = "solana-bucket-map"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72b3435b145894971a58a08a7b6be997ec782239fdecd5edd9846cd1d6aa5986"
-dependencies = [
- "fs_extra",
- "log",
- "memmap2",
- "rand 0.7.3",
- "rayon",
- "solana-logger",
- "solana-measure",
- "solana-sdk",
- "tempfile",
-]
-
-[[package]]
-name = "solana-clap-utils"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8417a89c377728dbfbf1966b6493544f6e5e168ebc5bb444f3526481fae94e31"
-dependencies = [
- "chrono",
- "clap",
- "rpassword",
- "solana-perf",
- "solana-remote-wallet",
- "solana-sdk",
- "thiserror",
- "tiny-bip39",
- "uriparse",
- "url",
-]
-
-[[package]]
-name = "solana-cli-config"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e8b011d36369ef2bc3dff63fee078bf2916a4fd21f3aa702ee731c7ddf83d28"
-dependencies = [
- "dirs-next",
- "lazy_static",
- "serde",
- "serde_derive",
- "serde_yaml",
- "url",
-]
-
-[[package]]
-name = "solana-client"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e20f4df8cee4a1819f1c5b0d3d85d50c30f27133b2ae68c2fd92655e4aede34a"
-dependencies = [
- "base64 0.13.0",
- "bincode",
- "bs58 0.4.0",
- "clap",
- "indicatif",
- "jsonrpc-core",
- "log",
- "rayon",
- "reqwest",
- "semver 1.0.6",
- "serde",
- "serde_derive",
- "serde_json",
- "solana-account-decoder",
- "solana-clap-utils",
- "solana-faucet",
- "solana-measure",
- "solana-net-utils",
- "solana-sdk",
- "solana-transaction-status",
- "solana-version",
- "solana-vote-program",
- "thiserror",
- "tokio",
- "tungstenite",
- "url",
-]
-
-[[package]]
-name = "solana-compute-budget-program"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "685567c221f6bb5b64387f7b45d03036ad112b2ecbcd0f94b11204efab9f891e"
-dependencies = [
- "solana-program-runtime",
- "solana-sdk",
-]
-
-[[package]]
-name = "solana-config-program"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f4b04403ff77f09eba5cf94078c1178161e26d346245b06180866ab5286fe6b"
-dependencies = [
- "bincode",
- "chrono",
- "serde",
- "serde_derive",
- "solana-program-runtime",
- "solana-sdk",
-]
-
-[[package]]
-name = "solana-faucet"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a11e1b6d5ce435bb3df95f2a970cd80500a8abf94ea87558c35fe0cce8456ab"
-dependencies = [
- "bincode",
- "byteorder",
- "clap",
- "log",
- "serde",
- "serde_derive",
- "solana-clap-utils",
- "solana-cli-config",
- "solana-logger",
- "solana-metrics",
- "solana-sdk",
- "solana-version",
- "spl-memo",
- "thiserror",
- "tokio",
-]
-
-[[package]]
-name = "solana-frozen-abi"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5f69a79200f5ba439eb8b790c5e00beab4d1fae4da69ce023c69c6ac1b55bf1"
-dependencies = [
- "bs58 0.4.0",
- "bv",
- "generic-array",
- "log",
- "memmap2",
- "rustc_version 0.4.0",
- "serde",
- "serde_derive",
- "sha2 0.9.9",
- "solana-frozen-abi-macro",
- "solana-logger",
- "thiserror",
-]
-
-[[package]]
-name = "solana-frozen-abi-macro"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "402fffb54bf5d335e6df26fc1719feecfbd7a22fafdf6649fe78380de3c47384"
-dependencies = [
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "rustc_version 0.4.0",
- "syn 1.0.95",
-]
-
-[[package]]
-name = "solana-logger"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "942dc59fc9da66d178362051b658646b65dc11cea0bc804e4ecd2528d3c1279f"
-dependencies = [
- "env_logger",
- "lazy_static",
- "log",
-]
-
-[[package]]
-name = "solana-measure"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ccd5b1278b115249d6ca5a203fd852f7d856e048488c24442222ee86e682bd9"
-dependencies = [
- "log",
- "solana-sdk",
-]
-
-[[package]]
-name = "solana-metrics"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9774cd8309f599797b1612731fbc56df6c612879ab4923a3dc7234400eea419"
-dependencies = [
- "env_logger",
- "gethostname",
- "lazy_static",
- "log",
- "reqwest",
- "solana-sdk",
-]
-
-[[package]]
-name = "solana-net-utils"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4cb530af085d8aab563530ed39703096aa526249d350082823882fdd59cdf839"
-dependencies = [
- "bincode",
- "clap",
- "log",
- "nix 0.23.1",
- "rand 0.7.3",
- "serde",
- "serde_derive",
- "socket2 0.4.9",
- "solana-logger",
- "solana-sdk",
- "solana-version",
- "tokio",
- "url",
-]
-
-[[package]]
-name = "solana-perf"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4117c0cf7753bc18f3a09f4973175c3f2c7c5d8e3c9bc15cab09060b06f3434f"
-dependencies = [
- "ahash 0.7.6",
- "bincode",
- "bv",
- "caps",
- "curve25519-dalek 3.2.0",
- "dlopen",
- "dlopen_derive",
- "fnv",
- "lazy_static",
- "libc",
- "log",
- "nix 0.23.1",
- "rand 0.7.3",
- "rayon",
- "serde",
- "solana-bloom",
- "solana-logger",
- "solana-metrics",
- "solana-rayon-threadlimit",
- "solana-sdk",
- "solana-vote-program",
-]
-
-[[package]]
-name = "solana-program"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a463f546a2f5842d35974bd4691ae5ceded6785ec24db440f773723f6ce4e11"
-dependencies = [
- "base64 0.13.0",
- "bincode",
- "bitflags",
- "blake3",
- "borsh",
- "borsh-derive",
- "bs58 0.4.0",
- "bv",
- "bytemuck",
- "console_error_panic_hook",
- "console_log",
- "curve25519-dalek 3.2.0",
- "getrandom 0.1.14",
- "itertools",
- "js-sys",
- "lazy_static",
- "libsecp256k1 0.6.0",
- "log",
- "num-derive",
- "num-traits",
- "parking_lot 0.11.1",
- "rand 0.7.3",
- "rustc_version 0.4.0",
- "rustversion",
- "serde",
- "serde_bytes",
- "serde_derive",
- "sha2 0.9.9",
- "sha3 0.9.1",
- "solana-frozen-abi",
- "solana-frozen-abi-macro",
- "solana-logger",
- "solana-sdk-macro",
- "thiserror",
- "wasm-bindgen",
-]
-
-[[package]]
-name = "solana-program-runtime"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09841673334eab958d5bedab9c9d75ed2ff7a7ef70e7dfd6b239c6838a3d79ec"
-dependencies = [
- "base64 0.13.0",
- "bincode",
- "itertools",
- "libc",
- "libloading",
- "log",
- "num-derive",
- "num-traits",
- "rustc_version 0.4.0",
- "serde",
- "solana-frozen-abi",
- "solana-frozen-abi-macro",
- "solana-logger",
- "solana-measure",
- "solana-sdk",
- "thiserror",
-]
-
-[[package]]
-name = "solana-rayon-threadlimit"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f92893e3129dfabb703cd045e1367f3ced91202a2d0b6179a3dcd62ad6bead3b"
-dependencies = [
- "lazy_static",
- "num_cpus",
-]
-
-[[package]]
-name = "solana-remote-wallet"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "315534baecaae3f804548ccc4738d73ae01bf6523219787ebe55ee66d8db9a85"
-dependencies = [
- "base32",
- "console",
- "dialoguer",
- "hidapi",
- "log",
- "num-derive",
- "num-traits",
- "parking_lot 0.11.1",
- "qstring",
- "semver 1.0.6",
- "solana-sdk",
- "thiserror",
- "uriparse",
-]
-
-[[package]]
-name = "solana-runtime"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bd06e905260433f7e8d18bccb2e2eb2aa5cc53379d104d331ddeb12e13230a0"
-dependencies = [
- "arrayref",
- "bincode",
- "blake3",
- "bv",
- "bytemuck",
- "byteorder",
- "bzip2",
- "crossbeam-channel 0.5.1",
- "dashmap",
- "dir-diff",
- "flate2",
- "fnv",
- "index_list",
- "itertools",
- "lazy_static",
- "log",
- "memmap2",
- "num-derive",
- "num-traits",
- "num_cpus",
- "ouroboros",
- "rand 0.7.3",
- "rayon",
- "regex",
- "rustc_version 0.4.0",
- "serde",
- "serde_derive",
- "solana-address-lookup-table-program",
- "solana-bloom",
- "solana-bucket-map",
- "solana-compute-budget-program",
- "solana-config-program",
- "solana-frozen-abi",
- "solana-frozen-abi-macro",
- "solana-logger",
- "solana-measure",
- "solana-metrics",
- "solana-program-runtime",
- "solana-rayon-threadlimit",
- "solana-sdk",
- "solana-stake-program",
- "solana-vote-program",
- "symlink",
- "tar",
- "tempfile",
- "thiserror",
- "zstd",
-]
-
-[[package]]
-name = "solana-sdk"
-version = "1.9.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6560e605c68fa1e3e66a9d3c8529d097d402e1183f80dd06a2c870d0ecb795c2"
-dependencies = [
- "assert_matches",
- "base64 0.13.0",
- "bincode",
- "bitflags",
- "borsh",
- "bs58 0.4.0",
- "bytemuck",
- "byteorder",
- "chrono",
- "derivation-path 0.1.3",
- "digest 0.9.0",
- "ed25519-dalek",
- "ed25519-dalek-bip32 0.1.1",
- "generic-array",
- "hmac 0.11.0",
- "itertools",
- "js-sys",
- "lazy_static",
- "libsecp256k1 0.6.0",
- "log",
- "memmap2",
- "num-derive",
- "num-traits",
- "pbkdf2 0.9.0",
- "qstring",
- "rand 0.7.3",
- "rand_chacha 0.2.2",
- "rustc_version 0.4.0",
- "rustversion",
- "serde",
- "serde_bytes",
- "serde_derive",
- "serde_json",
- "sha2 0.9.9",
- "sha3 0.9.1",
- "solana-frozen-abi",
- "solana-frozen-abi-macro",
- "solana-logger",
- "solana-program",
- "solana-sdk-macro",
- "thiserror",
- "uriparse",
- "wasm-bindgen",
+
+[[package]]
+name = "smallvec"
+version = "0.6.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0"
+dependencies = [
+ "maybe-uninit",
]
[[package]]
-name = "solana-sdk-macro"
-version = "1.9.20"
+name = "smallvec"
+version = "1.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
+
+[[package]]
+name = "smol"
+version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c834b4e02ac911b13c13aed08b3f847e722f6be79d31b1c660c1dbd2dee83cdb"
+checksum = "620cbb3c6e34da57d3a248cda0cd01cd5848164dc062e764e65d06fe3ea7aed5"
dependencies = [
- "bs58 0.4.0",
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "rustversion",
- "syn 1.0.95",
+ "async-task",
+ "blocking",
+ "concurrent-queue 1.1.1",
+ "fastrand",
+ "futures-io",
+ "futures-util",
+ "libc",
+ "once_cell",
+ "scoped-tls",
+ "slab",
+ "socket2 0.3.19",
+ "wepoll-sys-stjepang",
+ "winapi",
]
[[package]]
-name = "solana-stake-program"
-version = "1.9.20"
+name = "snow"
+version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f92597c0ed16d167d5ee48e5b13e92dfaed9c55b23a13ec261440136cd418649"
+checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733"
dependencies = [
- "bincode",
- "log",
- "num-derive",
- "num-traits",
+ "aes-gcm",
+ "blake2",
+ "chacha20poly1305",
+ "curve25519-dalek 4.0.0-rc.1",
+ "rand_core 0.6.4",
+ "ring 0.16.20",
"rustc_version 0.4.0",
- "serde",
- "serde_derive",
- "solana-config-program",
- "solana-frozen-abi",
- "solana-frozen-abi-macro",
- "solana-metrics",
- "solana-program-runtime",
- "solana-sdk",
- "solana-vote-program",
- "thiserror",
+ "sha2 0.10.7",
+ "subtle",
]
[[package]]
-name = "solana-transaction-status"
-version = "1.9.20"
+name = "socket2"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "612a51efa19380992e81fc64a2fb55d42aed32c67d795848d980cbe1f9693250"
+checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
dependencies = [
- "Inflector",
- "base64 0.12.3",
- "bincode",
- "bs58 0.4.0",
- "lazy_static",
- "log",
- "serde",
- "serde_derive",
- "serde_json",
- "solana-account-decoder",
- "solana-measure",
- "solana-metrics",
- "solana-runtime",
- "solana-sdk",
- "solana-vote-program",
- "spl-associated-token-account",
- "spl-memo",
- "spl-token",
- "thiserror",
+ "cfg-if 1.0.0",
+ "libc",
+ "winapi",
]
[[package]]
-name = "solana-version"
-version = "1.9.20"
+name = "socket2"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "222e2c91640d45cd9617dfc07121555a9bdac10e6e105f6931b758f46db6faaa"
+checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
dependencies = [
- "log",
- "rustc_version 0.4.0",
- "serde",
- "serde_derive",
- "solana-frozen-abi",
- "solana-frozen-abi-macro",
- "solana-sdk",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "socket2"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877"
+dependencies = [
+ "libc",
+ "windows-sys 0.48.0",
]
[[package]]
-name = "solana-vote-program"
-version = "1.9.20"
+name = "soketto"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4cc64945010e9e76d368493ad091aa5cf43ee16f69296290ebb5c815e433232"
+checksum = "083624472e8817d44d02c0e55df043737ff11f279af924abdf93845717c2b75c"
dependencies = [
- "bincode",
+ "base64 0.13.0",
+ "bytes 1.4.0",
+ "futures 0.3.28",
+ "httparse",
"log",
- "num-derive",
- "num-traits",
- "rustc_version 0.4.0",
- "serde",
- "serde_derive",
- "solana-frozen-abi",
- "solana-frozen-abi-macro",
- "solana-logger",
- "solana-metrics",
- "solana-program-runtime",
- "solana-sdk",
- "thiserror",
+ "rand 0.8.4",
+ "sha-1",
]
[[package]]
@@ -7831,7 +6469,7 @@ version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d676664972e22a0796176e81e7bec41df461d1edf52090955cdab55f2c956ff2"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -7860,8 +6498,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22ecb916b9664ed9f90abef0ff5a3e61454c1efea5861b2997e03f39b59b955f"
dependencies = [
"Inflector",
- "proc-macro-crate 1.1.3",
- "proc-macro2 1.0.69",
+ "proc-macro-crate",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
]
@@ -7945,39 +6583,6 @@ dependencies = [
"der",
]
-[[package]]
-name = "spl-associated-token-account"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "393e2240d521c3dd770806bff25c2c00d761ac962be106e14e22dd912007f428"
-dependencies = [
- "solana-program",
- "spl-token",
-]
-
-[[package]]
-name = "spl-memo"
-version = "3.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325"
-dependencies = [
- "solana-program",
-]
-
-[[package]]
-name = "spl-token"
-version = "3.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93bfdd5bd7c869cb565c7d7635c4fafe189b988a0bdef81063cd9585c6b8dc01"
-dependencies = [
- "arrayref",
- "num-derive",
- "num-traits",
- "num_enum",
- "solana-program",
- "thiserror",
-]
-
[[package]]
name = "spv_validation"
version = "0.1.0"
@@ -8015,31 +6620,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f9799e6d412271cb2414597581128b03f3285f260ea49f5363d07df6a332b3e"
dependencies = [
"Inflector",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"serde",
"serde_json",
"unicode-xid 0.2.0",
]
-[[package]]
-name = "stable_deref_trait"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
-
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
-[[package]]
-name = "strsim"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
-
[[package]]
name = "strsim"
version = "0.10.0"
@@ -8067,12 +6660,6 @@ version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142"
-[[package]]
-name = "symlink"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a"
-
[[package]]
name = "syn"
version = "0.11.11"
@@ -8084,24 +6671,13 @@ dependencies = [
"unicode-xid 0.0.4",
]
-[[package]]
-name = "syn"
-version = "0.15.44"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
-dependencies = [
- "proc-macro2 0.4.30",
- "quote 0.6.13",
- "unicode-xid 0.1.0",
-]
-
[[package]]
name = "syn"
version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"unicode-ident",
]
@@ -8112,7 +6688,7 @@ version = "2.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"unicode-ident",
]
@@ -8138,7 +6714,7 @@ version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
"unicode-xid 0.2.0",
@@ -8171,17 +6747,6 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
-[[package]]
-name = "tar"
-version = "0.4.38"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6"
-dependencies = [
- "filetime",
- "libc",
- "xattr",
-]
-
[[package]]
name = "tempfile"
version = "3.4.0"
@@ -8197,9 +6762,9 @@ dependencies = [
[[package]]
name = "tendermint"
-version = "0.32.2"
+version = "0.34.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f0a7d05cf78524782337f8edd55cbc578d159a16ad4affe2135c92f7dbac7f0"
+checksum = "15ab8f0a25d0d2ad49ac615da054d6a76aa6603ff95f7d18bafdd34450a1a04b"
dependencies = [
"bytes 1.4.0",
"digest 0.10.7",
@@ -8228,9 +6793,9 @@ dependencies = [
[[package]]
name = "tendermint-config"
-version = "0.32.2"
+version = "0.34.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "71a72dbbea6dde12045d261f2c70c0de039125675e8a026c8d5ad34522756372"
+checksum = "e1a02da769166e2052cd537b1a97c78017632c2d9e19266367b27e73910434fc"
dependencies = [
"flex-error",
"serde",
@@ -8242,9 +6807,9 @@ dependencies = [
[[package]]
name = "tendermint-proto"
-version = "0.32.2"
+version = "0.34.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0cec054567d16d85e8c3f6a3139963d1a66d9d3051ed545d31562550e9bcc3d"
+checksum = "b797dd3d2beaaee91d2f065e7bdf239dc8d80bba4a183a288bc1279dd5a69a1e"
dependencies = [
"bytes 1.4.0",
"flex-error",
@@ -8260,9 +6825,9 @@ dependencies = [
[[package]]
name = "tendermint-rpc"
-version = "0.32.2"
+version = "0.34.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d119d83a130537fc4a98c3c9eb6899ebe857fea4860400a61675bfb5f0b35129"
+checksum = "71afae8bb5f6b14ed48d4e1316a643b6c2c3cbad114f510be77b4ed20b7b3e42"
dependencies = [
"async-trait",
"bytes 1.4.0",
@@ -8270,6 +6835,7 @@ dependencies = [
"getrandom 0.2.9",
"peg",
"pin-project",
+ "rand 0.8.4",
"semver 1.0.6",
"serde",
"serde_bytes",
@@ -8282,7 +6848,7 @@ dependencies = [
"thiserror",
"time 0.3.20",
"url",
- "uuid 0.8.2",
+ "uuid",
"walkdir",
]
@@ -8295,16 +6861,6 @@ dependencies = [
"winapi-util",
]
-[[package]]
-name = "terminal_size"
-version = "0.1.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df"
-dependencies = [
- "libc",
- "winapi",
-]
-
[[package]]
name = "test_helpers"
version = "0.1.0"
@@ -8329,15 +6885,6 @@ dependencies = [
"sha2 0.10.7",
]
-[[package]]
-name = "textwrap"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
-dependencies = [
- "unicode-width",
-]
-
[[package]]
name = "thiserror"
version = "1.0.40"
@@ -8353,7 +6900,7 @@ version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 2.0.38",
]
@@ -8396,25 +6943,6 @@ dependencies = [
"time-core",
]
-[[package]]
-name = "tiny-bip39"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d"
-dependencies = [
- "anyhow",
- "hmac 0.8.1",
- "once_cell",
- "pbkdf2 0.4.0",
- "rand 0.7.3",
- "rustc-hash",
- "sha2 0.9.9",
- "thiserror",
- "unicode-normalization",
- "wasm-bindgen",
- "zeroize",
-]
-
[[package]]
name = "tiny-keccak"
version = "1.4.4"
@@ -8459,7 +6987,6 @@ dependencies = [
"libc",
"mio",
"num_cpus",
- "parking_lot 0.12.0",
"pin-project-lite 0.2.9",
"signal-hook-registry",
"socket2 0.4.9",
@@ -8493,7 +7020,7 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 2.0.38",
]
@@ -8588,9 +7115,9 @@ dependencies = [
[[package]]
name = "tonic"
-version = "0.9.2"
+version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a"
+checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e"
dependencies = [
"async-stream",
"async-trait",
@@ -8598,8 +7125,6 @@ dependencies = [
"base64 0.21.7",
"bytes 1.4.0",
"flate2",
- "futures-core",
- "futures-util",
"h2",
"http 0.2.12",
"http-body 0.4.5",
@@ -8608,6 +7133,7 @@ dependencies = [
"percent-encoding",
"pin-project",
"prost",
+ "rustls 0.21.10",
"rustls-pemfile 1.0.2",
"tokio",
"tokio-rustls 0.24.1",
@@ -8616,20 +7142,20 @@ dependencies = [
"tower-layer",
"tower-service",
"tracing",
- "webpki-roots 0.23.1",
+ "webpki-roots 0.25.4",
]
[[package]]
name = "tonic-build"
-version = "0.9.2"
+version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6fdaae4c2c638bb70fe42803a26fbd6fc6ac8c72f5c59f67ecc2a2dcabf4b07"
+checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889"
dependencies = [
"prettyplease",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"prost-build",
"quote 1.0.33",
- "syn 1.0.95",
+ "syn 2.0.38",
]
[[package]]
@@ -8682,7 +7208,7 @@ version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 2.0.38",
]
@@ -8786,7 +7312,7 @@ dependencies = [
"futures-channel",
"futures-io",
"futures-util",
- "idna",
+ "idna 0.2.3",
"ipnet",
"lazy_static",
"rand 0.8.4",
@@ -8810,7 +7336,7 @@ dependencies = [
"ipconfig",
"lazy_static",
"lru-cache",
- "parking_lot 0.12.0",
+ "parking_lot",
"resolv-conf",
"smallvec 1.6.1",
"thiserror",
@@ -8844,7 +7370,6 @@ dependencies = [
"url",
"utf-8",
"webpki",
- "webpki-roots 0.22.3",
]
[[package]]
@@ -8872,12 +7397,9 @@ source = "git+https://github.com/KomodoPlatform/mm2-parity-ethereum.git?rev=mm2-
[[package]]
name = "unicode-bidi"
-version = "0.3.4"
+version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
-dependencies = [
- "matches",
-]
+checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893"
[[package]]
name = "unicode-ident"
@@ -8887,9 +7409,9 @@ checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee"
[[package]]
name = "unicode-normalization"
-version = "0.1.19"
+version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
+checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956"
dependencies = [
"tinyvec",
]
@@ -8906,12 +7428,6 @@ version = "0.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
-[[package]]
-name = "unicode-xid"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
-
[[package]]
name = "unicode-xid"
version = "0.2.0"
@@ -8950,25 +7466,14 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
-[[package]]
-name = "uriparse"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e515b1ada404168e145ac55afba3c42f04cf972201a8552d42e2abb17c1b7221"
-dependencies = [
- "fnv",
- "lazy_static",
-]
-
[[package]]
name = "url"
-version = "2.2.2"
+version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
+checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
dependencies = [
"form_urlencoded",
- "idna",
- "matches",
+ "idna 0.5.0",
"percent-encoding",
"serde",
]
@@ -8999,15 +7504,9 @@ dependencies = [
[[package]]
name = "uuid"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
-
-[[package]]
-name = "uuid"
-version = "1.2.2"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c"
+checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314"
dependencies = [
"getrandom 0.2.9",
"rand 0.8.4",
@@ -9026,12 +7525,6 @@ version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c"
-[[package]]
-name = "vec_map"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
-
[[package]]
name = "version_check"
version = "0.9.4"
@@ -9152,7 +7645,7 @@ dependencies = [
"bumpalo",
"log",
"once_cell",
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 2.0.38",
"wasm-bindgen-shared",
@@ -9186,7 +7679,7 @@ version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 2.0.38",
"wasm-bindgen-backend",
@@ -9219,7 +7712,7 @@ version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c2e18093f11c19ca4e188c177fecc7c372304c311189f12c2f9bea5b7324ac7"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
]
@@ -9249,11 +7742,11 @@ dependencies = [
"getrandom 0.2.9",
"headers",
"hex",
- "idna",
+ "idna 0.2.3",
"js-sys",
"jsonrpc-core",
"log",
- "parking_lot 0.12.0",
+ "parking_lot",
"pin-project",
"rand 0.8.4",
"reqwest",
@@ -9310,16 +7803,6 @@ dependencies = [
"cc",
]
-[[package]]
-name = "which"
-version = "4.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b55551e42cbdf2ce2bedd2203d0cc08dba002c27510f86dab6d0ce304cba3dfe"
-dependencies = [
- "either",
- "libc",
-]
-
[[package]]
name = "widestring"
version = "0.5.1"
@@ -9625,24 +8108,6 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "xattr"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c"
-dependencies = [
- "libc",
-]
-
-[[package]]
-name = "yaml-rust"
-version = "0.4.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
-dependencies = [
- "linked-hash-map",
-]
-
[[package]]
name = "yamux"
version = "0.12.1"
@@ -9652,7 +8117,7 @@ dependencies = [
"futures 0.3.28",
"log",
"nohash-hasher",
- "parking_lot 0.12.0",
+ "parking_lot",
"pin-project",
"rand 0.8.4",
"static_assertions",
@@ -9668,7 +8133,7 @@ dependencies = [
"instant",
"log",
"nohash-hasher",
- "parking_lot 0.12.0",
+ "parking_lot",
"pin-project",
"rand 0.8.4",
"static_assertions",
@@ -9829,37 +8294,8 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17"
dependencies = [
- "proc-macro2 1.0.69",
+ "proc-macro2",
"quote 1.0.33",
"syn 1.0.95",
"synstructure",
]
-
-[[package]]
-name = "zstd"
-version = "0.9.2+zstd.1.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2390ea1bf6c038c39674f22d95f0564725fc06034a47129179810b2fc58caa54"
-dependencies = [
- "zstd-safe",
-]
-
-[[package]]
-name = "zstd-safe"
-version = "4.1.3+zstd.1.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e99d81b99fb3c2c2c794e3fe56c305c63d5173a16a46b5850b07c935ffc7db79"
-dependencies = [
- "libc",
- "zstd-sys",
-]
-
-[[package]]
-name = "zstd-sys"
-version = "1.6.2+zstd.1.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2daf2f248d9ea44454bfcb2516534e8b8ad2fc91bf818a1885495fc42bc8ac9f"
-dependencies = [
- "cc",
- "libc",
-]
diff --git a/Cargo.toml b/Cargo.toml
index 32d349dcb0..e11491ec32 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -60,7 +60,7 @@ opt-level = 3
strip = true
codegen-units = 1
# lto = true
-panic = "abort"
+panic = 'unwind'
[profile.dev]
opt-level = 0
diff --git a/README.md b/README.md
index 0d91d3cded..441c23ba8c 100755
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@
## What is the Komodo DeFi Framework?
-The Komodo DeFi Framework is open-source [atomic-swap](https://komodoplatform.com/en/academy/atomic-swaps/) software for seamless, decentralised, peer to peer trading between almost every blockchain asset in existence. This software works with propagation of orderbooks and swap states through the [libp2p](https://libp2p.io/) protocol and uses [Hash Time Lock Contracts (HTLCs)](https://en.bitcoinwiki.org/wiki/Hashed_Timelock_Contracts) for ensuring that the two parties in a swap either mutually complete a trade, or funds return to thier original owner.
+The Komodo DeFi Framework is open-source [atomic-swap](https://komodoplatform.com/en/academy/atomic-swaps/) software for seamless, decentralized, peer to peer trading between almost every blockchain asset in existence. This software works with propagation of orderbooks and swap states through the [libp2p](https://libp2p.io/) protocol and uses [Hash Time Lock Contracts (HTLCs)](https://en.bitcoinwiki.org/wiki/Hashed_Timelock_Contracts) for ensuring that the two parties in a swap either mutually complete a trade, or funds return to thier original owner.
There is no 3rd party intermediary, no proxy tokens, and at all times users remain in sole possession of their private keys.
@@ -172,7 +172,7 @@ Refer to the [Komodo Developer Docs](https://developers.komodoplatform.com/basic
## Project structure
-[mm2src](mm2src) - Rust code, contains some parts ported from C `as is` (e.g. `lp_ordermatch`) to reach the most essential/error prone code. Some other modules/crates are reimplemented from scratch.
+[mm2src](mm2src) - Rust code, contains some parts ported from C `as is` (e.g. `lp_ordermatch`) to reach the most essential/error-prone code. Some other modules/crates are reimplemented from scratch.
## Additional docs for developers
@@ -185,12 +185,13 @@ Refer to the [Komodo Developer Docs](https://developers.komodoplatform.com/basic
## Disclaimer
-This repository contains the `work in progress` code of the brand new Komodo DeFi Framework (kdf) built mainly on Rust.
-The current state can be considered as a alpha version.
+This repository contains the `work in progress` code of the brand-new Komodo DeFi Framework (kdf) built mainly on Rust.
+The current state can be considered as an alpha version.
**WARNING: Use with test coins only or with assets which value does not exceed an amount you are willing to lose. This is alpha stage software! **
## Help and troubleshooting
-If you have any question/want to report a bug/suggest an improvement feel free to [open an issue](https://github.com/artemii235/SuperNET/issues/new) or join the [Komodo Platform Discord](https://discord.gg/PGxVm2y) `dev-marketmaker` channel.
+If you have any question/want to report a bug/suggest an improvement feel free to [open an issue](https://github.com/KomodoPlatform/komodo-defi-framework/issues/new/choose) or join the [Komodo Platform Discord](https://discord.gg/PGxVm2y) `dev-marketmaker` channel.
+
diff --git a/clippy.toml b/clippy.toml
new file mode 100644
index 0000000000..068d7e886b
--- /dev/null
+++ b/clippy.toml
@@ -0,0 +1,4 @@
+[[disallowed-methods]]
+path = "futures::future::Future::wait"
+replacement = "common::block_on_f01"
+reason = "Use the default KDF async executor."
\ No newline at end of file
diff --git a/mm2src/adex_cli/README.md b/mm2src/adex_cli/README.md
new file mode 100644
index 0000000000..6066b2c0bc
--- /dev/null
+++ b/mm2src/adex_cli/README.md
@@ -0,0 +1,3 @@
+## ⚠️ Deprecated
+
+**The `adex-cli` tool is no longer maintained and has been deprecated.**
\ No newline at end of file
diff --git a/mm2src/coins/Cargo.toml b/mm2src/coins/Cargo.toml
index c870e9baf0..8fa02034c1 100644
--- a/mm2src/coins/Cargo.toml
+++ b/mm2src/coins/Cargo.toml
@@ -5,17 +5,6 @@ edition = "2018"
[features]
zhtlc-native-tests = []
-# TODO
-enable-solana = [
- "dep:bincode",
- "dep:ed25519-dalek-bip32",
- "dep:solana-client",
- "dep:solana-sdk",
- "dep:solana-transaction-status",
- "dep:spl-token",
- "dep:spl-associated-token-account",
- "dep:satomic-swap"
-]
enable-sia = [
"dep:reqwest",
"dep:blake2b_simd",
@@ -44,7 +33,7 @@ cfg-if = "1.0"
chain = { path = "../mm2_bitcoin/chain" }
chrono = { version = "0.4.23", "features" = ["serde"] }
common = { path = "../common" }
-cosmrs = { version = "0.14.0", default-features = false }
+cosmrs = { version = "0.15", default-features = false }
crossbeam = "0.8"
crypto = { path = "../crypto" }
db_common = { path = "../db_common" }
@@ -86,7 +75,7 @@ mocktopus = "0.8.0"
num-traits = "0.2"
parking_lot = { version = "0.12.0", features = ["nightly"] }
primitives = { path = "../mm2_bitcoin/primitives" }
-prost = "0.11"
+prost = "0.12"
protobuf = "2.20"
proxy_signature = { path = "../proxy_signature" }
rand = { version = "0.7", features = ["std", "small_rng"] }
@@ -96,7 +85,6 @@ rlp = { version = "0.5" }
rmp-serde = "0.14.3"
rpc = { path = "../mm2_bitcoin/rpc" }
rpc_task = { path = "../rpc_task" }
-satomic-swap = { git = "https://github.com/KomodoPlatform/satomic-swap.git", rev = "413e472", optional = true }
script = { path = "../mm2_bitcoin/script" }
secp256k1 = { version = "0.20" }
ser_error = { path = "../derives/ser_error" }
@@ -113,7 +101,7 @@ sha2 = "0.10"
sha3 = "0.9"
utxo_signer = { path = "utxo_signer" }
# using the same version as cosmrs
-tendermint-rpc = { version = "0.32.0", default-features = false }
+tendermint-rpc = { version = "0.34", default-features = false }
tokio-tungstenite-wasm = { git = "https://github.com/KomodoPlatform/tokio-tungstenite-wasm", rev = "d20abdb", features = ["rustls-tls-native-roots"]}
url = { version = "2.2.2", features = ["serde"] }
uuid = { version = "1.2.2", features = ["fast-rng", "serde", "v4"] }
@@ -125,15 +113,6 @@ zcash_client_backend = { git = "https://github.com/KomodoPlatform/librustzcash.g
zcash_extras = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.1" }
zcash_primitives = {features = ["transparent-inputs"], git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.1" }
-[target.'cfg(all(not(target_os = "ios"), not(target_os = "android"), not(target_arch = "wasm32")))'.dependencies]
-bincode = { version = "1.3.3", default-features = false, optional = true }
-ed25519-dalek-bip32 = { version = "0.2.0", default-features = false, optional = true }
-solana-client = { version = "1", default-features = false, optional = true }
-solana-sdk = { version = "1", default-features = false, optional = true }
-solana-transaction-status = { version = "1", optional = true }
-spl-token = { version = "3", optional = true }
-spl-associated-token-account = { version = "1", optional = true }
-
[target.'cfg(target_arch = "wasm32")'.dependencies]
blake2b_simd = "0.5"
ff = "0.8"
@@ -145,7 +124,7 @@ mm2_db = { path = "../mm2_db" }
mm2_metamask = { path = "../mm2_metamask" }
mm2_test_helpers = { path = "../mm2_test_helpers" }
time = { version = "0.3.20", features = ["wasm-bindgen"] }
-tonic = { version = "0.9", default-features = false, features = ["prost", "codegen", "gzip"] }
+tonic = { version = "0.10", default-features = false, features = ["prost", "codegen", "gzip"] }
tower-service = "0.3"
wasm-bindgen = "0.2.86"
wasm-bindgen-futures = { version = "0.4.1" }
@@ -170,7 +149,7 @@ rustls = { version = "0.21", features = ["dangerous_configuration"] }
secp256k1v24 = { version = "0.24", package = "secp256k1" }
tokio = { version = "1.20" }
tokio-rustls = { version = "0.24" }
-tonic = { version = "0.9", features = ["tls", "tls-webpki-roots", "gzip"] }
+tonic = { version = "0.10", features = ["tls", "tls-webpki-roots", "gzip"] }
webpki-roots = { version = "0.25" }
zcash_client_sqlite = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.1" }
zcash_proofs = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.1", default-features = false, features = ["local-prover", "multicore"] }
@@ -185,5 +164,5 @@ mm2_test_helpers = { path = "../mm2_test_helpers" }
wagyu-zcash-parameters = { version = "0.2" }
[build-dependencies]
-prost-build = { version = "0.11", default-features = false }
-tonic-build = { version = "0.9", default-features = false, features = ["prost"] }
+prost-build = { version = "0.12", default-features = false }
+tonic-build = { version = "0.10", default-features = false, features = ["prost"] }
diff --git a/mm2src/coins/eth/eth_tests.rs b/mm2src/coins/eth/eth_tests.rs
index 9332594931..03705ff4ca 100644
--- a/mm2src/coins/eth/eth_tests.rs
+++ b/mm2src/coins/eth/eth_tests.rs
@@ -1,27 +1,31 @@
use super::*;
-use crate::eth::for_tests::{eth_coin_for_test, eth_coin_from_keypair};
-use crate::{DexFee, IguanaPrivKey};
-use common::{block_on, now_sec};
-#[cfg(not(target_arch = "wasm32"))]
-use ethkey::{Generator, Random};
+use crate::IguanaPrivKey;
+use common::{block_on, block_on_f01};
use mm2_core::mm_ctx::MmCtxBuilder;
-use mm2_test_helpers::for_tests::{ETH_MAINNET_CHAIN_ID, ETH_MAINNET_NODE, ETH_SEPOLIA_CHAIN_ID, ETH_SEPOLIA_NODES,
+
+cfg_native!(
+ use crate::eth::for_tests::{eth_coin_for_test, eth_coin_from_keypair};
+ use crate::DexFee;
+
+ use common::now_sec;
+ use ethkey::{Generator, Random};
+ use mm2_test_helpers::for_tests::{ETH_MAINNET_CHAIN_ID, ETH_MAINNET_NODE, ETH_SEPOLIA_CHAIN_ID, ETH_SEPOLIA_NODES,
ETH_SEPOLIA_TOKEN_CONTRACT};
-use mocktopus::mocking::*;
-
-/// The gas price for the tests
-const GAS_PRICE: u64 = 50_000_000_000;
-// `GAS_PRICE` increased by 3%
-const GAS_PRICE_APPROXIMATION_ON_START_SWAP: u64 = 51_500_000_000;
-// `GAS_PRICE` increased by 5%
-const GAS_PRICE_APPROXIMATION_ON_ORDER_ISSUE: u64 = 52_500_000_000;
-// `GAS_PRICE` increased by 7%
-const GAS_PRICE_APPROXIMATION_ON_TRADE_PREIMAGE: u64 = 53_500_000_000;
+ use mocktopus::mocking::*;
+
+ /// The gas price for the tests
+ const GAS_PRICE: u64 = 50_000_000_000;
+ /// `GAS_PRICE` increased by 3%
+ const GAS_PRICE_APPROXIMATION_ON_START_SWAP: u64 = 51_500_000_000;
+ /// `GAS_PRICE` increased by 5%
+ const GAS_PRICE_APPROXIMATION_ON_ORDER_ISSUE: u64 = 52_500_000_000;
+ /// `GAS_PRICE` increased by 7%
+ const GAS_PRICE_APPROXIMATION_ON_TRADE_PREIMAGE: u64 = 53_500_000_000;
+);
+
// old way to add some extra gas to the returned value from gas station (non-existent now), still used in tests
const GAS_PRICE_PERCENT: u64 = 10;
-const TAKER_PAYMENT_SPEND_SEARCH_INTERVAL: f64 = 1.;
-
fn check_sum(addr: &str, expected: &str) {
let actual = checksum_address(addr);
assert_eq!(expected, actual);
@@ -154,8 +158,11 @@ fn test_wei_from_big_decimal() {
assert_eq!(expected_wei, wei);
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn test_wait_for_payment_spend_timeout() {
+ const TAKER_PAYMENT_SPEND_SEARCH_INTERVAL: f64 = 1.;
+
EthCoin::spend_events.mock_safe(|_, _, _, _| MockResult::Return(Box::new(futures01::future::ok(vec![]))));
EthCoin::current_block.mock_safe(|_| MockResult::Return(Box::new(futures01::future::ok(900))));
@@ -184,18 +191,16 @@ fn test_wait_for_payment_spend_timeout() {
184, 42, 106,
];
- assert!(coin
- .wait_for_htlc_tx_spend(WaitForHTLCTxSpendArgs {
- tx_bytes: &tx_bytes,
- secret_hash: &[],
- wait_until,
- from_block,
- swap_contract_address: &coin.swap_contract_address(),
- check_every: TAKER_PAYMENT_SPEND_SEARCH_INTERVAL,
- watcher_reward: false
- })
- .wait()
- .is_err());
+ assert!(block_on_f01(coin.wait_for_htlc_tx_spend(WaitForHTLCTxSpendArgs {
+ tx_bytes: &tx_bytes,
+ secret_hash: &[],
+ wait_until,
+ from_block,
+ swap_contract_address: &coin.swap_contract_address(),
+ check_every: TAKER_PAYMENT_SPEND_SEARCH_INTERVAL,
+ watcher_reward: false
+ }))
+ .is_err());
}
#[cfg(not(target_arch = "wasm32"))]
@@ -222,7 +227,7 @@ fn test_withdraw_impl_manual_fee() {
memo: None,
ibc_source_channel: None,
};
- coin.get_balance().wait().unwrap();
+ block_on_f01(coin.get_balance()).unwrap();
let tx_details = block_on(withdraw_impl(coin, withdraw_req)).unwrap();
let expected = Some(
@@ -271,7 +276,7 @@ fn test_withdraw_impl_fee_details() {
memo: None,
ibc_source_channel: None,
};
- coin.get_balance().wait().unwrap();
+ block_on_f01(coin.get_balance()).unwrap();
let tx_details = block_on(withdraw_impl(coin, withdraw_req)).unwrap();
let expected = Some(
@@ -306,6 +311,7 @@ fn test_add_ten_pct_one_gwei() {
assert_eq!(expected, actual);
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn get_sender_trade_preimage() {
/// Trade fee for the ETH coin is `2 * 150_000 * gas_price` always.
@@ -361,6 +367,7 @@ fn get_sender_trade_preimage() {
assert_eq!(actual, expected);
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn get_erc20_sender_trade_preimage() {
const APPROVE_GAS_LIMIT: u64 = 60_000;
@@ -463,6 +470,7 @@ fn get_erc20_sender_trade_preimage() {
);
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn get_receiver_trade_preimage() {
EthCoin::get_gas_price.mock_safe(|_| MockResult::Return(Box::pin(futures::future::ok(GAS_PRICE.into()))));
@@ -476,13 +484,12 @@ fn get_receiver_trade_preimage() {
paid_from_trading_vol: false,
};
- let actual = coin
- .get_receiver_trade_fee(FeeApproxStage::WithoutApprox)
- .wait()
- .expect("!get_sender_trade_fee");
+ let actual =
+ block_on_f01(coin.get_receiver_trade_fee(FeeApproxStage::WithoutApprox)).expect("!get_sender_trade_fee");
assert_eq!(actual, expected_fee);
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn test_get_fee_to_send_taker_fee() {
const DEX_FEE_AMOUNT: u64 = 100_000;
@@ -533,6 +540,7 @@ fn test_get_fee_to_send_taker_fee() {
///
/// Please note this test doesn't work correctly now,
/// because as of now [`EthCoin::get_fee_to_send_taker_fee`] doesn't process the `Exception` web3 error correctly.
+#[cfg(not(target_arch = "wasm32"))]
#[test]
#[ignore]
fn test_get_fee_to_send_taker_fee_insufficient_balance() {
@@ -562,6 +570,7 @@ fn test_get_fee_to_send_taker_fee_insufficient_balance() {
);
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn validate_dex_fee_invalid_sender_eth() {
let (_ctx, coin) = eth_coin_for_test(EthCoinType::Eth, &[ETH_MAINNET_NODE], None, ETH_MAINNET_CHAIN_ID);
@@ -582,13 +591,16 @@ fn validate_dex_fee_invalid_sender_eth() {
min_block_number: 0,
uuid: &[],
};
- let error = coin.validate_fee(validate_fee_args).wait().unwrap_err().into_inner();
+ let error = block_on_f01(coin.validate_fee(validate_fee_args))
+ .unwrap_err()
+ .into_inner();
match error {
ValidatePaymentError::WrongPaymentTx(err) => assert!(err.contains("was sent from wrong address")),
_ => panic!("Expected `WrongPaymentTx` wrong sender address, found {:?}", error),
}
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn validate_dex_fee_invalid_sender_erc() {
let (_ctx, coin) = eth_coin_for_test(
@@ -617,13 +629,16 @@ fn validate_dex_fee_invalid_sender_erc() {
min_block_number: 0,
uuid: &[],
};
- let error = coin.validate_fee(validate_fee_args).wait().unwrap_err().into_inner();
+ let error = block_on_f01(coin.validate_fee(validate_fee_args))
+ .unwrap_err()
+ .into_inner();
match error {
ValidatePaymentError::WrongPaymentTx(err) => assert!(err.contains("was sent from wrong address")),
_ => panic!("Expected `WrongPaymentTx` wrong sender address, found {:?}", error),
}
}
+#[cfg(not(target_arch = "wasm32"))]
fn sender_compressed_pub(tx: &SignedEthTx) -> [u8; 33] {
let tx_pubkey = tx.public.unwrap();
let mut raw_pubkey = [0; 65];
@@ -633,6 +648,7 @@ fn sender_compressed_pub(tx: &SignedEthTx) -> [u8; 33] {
secp_public.serialize()
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn validate_dex_fee_eth_confirmed_before_min_block() {
let (_ctx, coin) = eth_coin_for_test(EthCoinType::Eth, &[ETH_MAINNET_NODE], None, ETH_MAINNET_CHAIN_ID);
@@ -655,13 +671,16 @@ fn validate_dex_fee_eth_confirmed_before_min_block() {
min_block_number: 11784793,
uuid: &[],
};
- let error = coin.validate_fee(validate_fee_args).wait().unwrap_err().into_inner();
+ let error = block_on_f01(coin.validate_fee(validate_fee_args))
+ .unwrap_err()
+ .into_inner();
match error {
ValidatePaymentError::WrongPaymentTx(err) => assert!(err.contains("confirmed before min_block")),
_ => panic!("Expected `WrongPaymentTx` early confirmation, found {:?}", error),
}
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn validate_dex_fee_erc_confirmed_before_min_block() {
let (_ctx, coin) = eth_coin_for_test(
@@ -693,13 +712,16 @@ fn validate_dex_fee_erc_confirmed_before_min_block() {
min_block_number: 11823975,
uuid: &[],
};
- let error = coin.validate_fee(validate_fee_args).wait().unwrap_err().into_inner();
+ let error = block_on_f01(coin.validate_fee(validate_fee_args))
+ .unwrap_err()
+ .into_inner();
match error {
ValidatePaymentError::WrongPaymentTx(err) => assert!(err.contains("confirmed before min_block")),
_ => panic!("Expected `WrongPaymentTx` early confirmation, found {:?}", error),
}
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn test_negotiate_swap_contract_addr_no_fallback() {
let (_, coin) = eth_coin_for_test(EthCoinType::Eth, &[ETH_MAINNET_NODE], None, ETH_MAINNET_CHAIN_ID);
@@ -727,6 +749,7 @@ fn test_negotiate_swap_contract_addr_no_fallback() {
assert_eq!(Some(slice.to_vec().into()), result);
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn test_negotiate_swap_contract_addr_has_fallback() {
let fallback = Address::from_str("0x8500AFc0bc5214728082163326C2FF0C73f4a871").unwrap();
@@ -815,15 +838,14 @@ fn polygon_check_if_my_payment_sent() {
amount: &BigDecimal::default(),
payment_instructions: &None,
};
- let my_payment = coin
- .check_if_my_payment_sent(if_my_payment_sent_args)
- .wait()
+ let my_payment = block_on_f01(coin.check_if_my_payment_sent(if_my_payment_sent_args))
.unwrap()
.unwrap();
let expected_hash = BytesJson::from("69a20008cea0c15ee483b5bbdff942752634aa072dfd2ff715fe87eec302de11");
assert_eq!(expected_hash, my_payment.tx_hash_as_bytes());
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn test_message_hash() {
let key_pair = Random.generate().unwrap();
@@ -842,6 +864,7 @@ fn test_message_hash() {
);
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn test_sign_verify_message() {
let key_pair = KeyPair::from_secret_slice(
@@ -866,6 +889,7 @@ fn test_sign_verify_message() {
assert!(is_valid);
}
+#[cfg(not(target_arch = "wasm32"))]
#[test]
fn test_eth_extract_secret() {
let key_pair = Random.generate().unwrap();
diff --git a/mm2src/coins/eth/web3_transport/websocket_transport.rs b/mm2src/coins/eth/web3_transport/websocket_transport.rs
index d17ef99d7e..fd1220e92e 100644
--- a/mm2src/coins/eth/web3_transport/websocket_transport.rs
+++ b/mm2src/coins/eth/web3_transport/websocket_transport.rs
@@ -97,12 +97,7 @@ impl WebsocketTransport {
}
}
- async fn handle_keepalive(
- &self,
- wsocket: &mut WebSocketStream,
- response_notifiers: &mut ExpirableMap>>,
- expires_at: Option,
- ) -> OuterAction {
+ async fn handle_keepalive(&self, wsocket: &mut WebSocketStream, expires_at: Option) -> OuterAction {
const SIMPLE_REQUEST: &str = r#"{"jsonrpc":"2.0","method":"net_version","params":[],"id": 0 }"#;
if let Some(expires_at) = expires_at {
@@ -112,10 +107,7 @@ impl WebsocketTransport {
}
}
- // Drop expired response notifier channels
- response_notifiers.clear_expired_entries();
-
- let mut should_continue = Default::default();
+ let mut should_continue = false;
for _ in 0..MAX_ATTEMPTS {
match wsocket
.send(tokio_tungstenite_wasm::Message::Text(SIMPLE_REQUEST.to_string()))
@@ -206,9 +198,6 @@ impl WebsocketTransport {
}
if let Some(id) = inc_event.get("id") {
- // just to ensure we don't have outdated entries
- response_notifiers.clear_expired_entries();
-
let request_id = id.as_u64().unwrap_or_default() as usize;
if let Some(notifier) = response_notifiers.remove(&request_id) {
@@ -279,7 +268,7 @@ impl WebsocketTransport {
loop {
futures_util::select! {
_ = keepalive_interval.next().fuse() => {
- match self.handle_keepalive(&mut wsocket, &mut response_notifiers, expires_at).await {
+ match self.handle_keepalive(&mut wsocket, expires_at).await {
OuterAction::None => {},
OuterAction::Continue => continue,
OuterAction::Break => break,
diff --git a/mm2src/coins/lightning/ln_platform.rs b/mm2src/coins/lightning/ln_platform.rs
index 4d0573af95..0a5fae0a4f 100644
--- a/mm2src/coins/lightning/ln_platform.rs
+++ b/mm2src/coins/lightning/ln_platform.rs
@@ -15,7 +15,7 @@ use bitcoin::hash_types::{BlockHash, TxMerkleNode, Txid};
use bitcoin_hashes::{sha256d, Hash};
use common::executor::{abortable_queue::AbortableQueue, AbortableSystem, SpawnFuture, Timer};
use common::log::{debug, error, info};
-use common::wait_until_sec;
+use common::{block_on_f01, wait_until_sec};
use futures::compat::Future01CompatExt;
use futures::future::join_all;
use keys::hash::H256;
@@ -570,17 +570,15 @@ impl FeeEstimator for Platform {
ConfirmationTarget::HighPriority => self.confirmations_targets.high_priority,
};
let fee_per_kb = tokio::task::block_in_place(move || {
- self.rpc_client()
- .estimate_fee_sat(
- platform_coin.decimals(),
- // Todo: when implementing Native client detect_fee_method should be used for Native and
- // EstimateFeeMethod::Standard for Electrum
- &EstimateFeeMethod::Standard,
- &conf.estimate_fee_mode,
- n_blocks,
- )
- .wait()
- .unwrap_or(latest_fees)
+ block_on_f01(self.rpc_client().estimate_fee_sat(
+ platform_coin.decimals(),
+ // Todo: when implementing Native client detect_fee_method should be used for Native and
+ // EstimateFeeMethod::Standard for Electrum
+ &EstimateFeeMethod::Standard,
+ &conf.estimate_fee_mode,
+ n_blocks,
+ ))
+ .unwrap_or(latest_fees)
});
// Set default fee to last known fee for the corresponding confirmation target
diff --git a/mm2src/coins/lp_coins.rs b/mm2src/coins/lp_coins.rs
index ac8426b73f..ef1f7d0f53 100644
--- a/mm2src/coins/lp_coins.rs
+++ b/mm2src/coins/lp_coins.rs
@@ -125,29 +125,6 @@ macro_rules! try_f {
};
}
-#[cfg(feature = "enable-solana")]
-macro_rules! try_tx_fus_err {
- ($err: expr) => {
- return Box::new(futures01::future::err(crate::TransactionErr::Plain(ERRL!(
- "{:?}", $err
- ))))
- };
-}
-
-#[cfg(feature = "enable-solana")]
-macro_rules! try_tx_fus_opt {
- ($e: expr, $err: expr) => {
- match $e {
- Some(ok) => ok,
- None => {
- return Box::new(futures01::future::err(crate::TransactionErr::Plain(ERRL!(
- "{:?}", $err
- ))))
- },
- }
- };
-}
-
/// `TransactionErr` compatible `try_fus` macro.
macro_rules! try_tx_fus {
($e: expr) => {
@@ -280,30 +257,6 @@ pub mod tx_history_storage;
#[cfg(feature = "enable-sia")] pub mod siacoin;
#[cfg(feature = "enable-sia")] use siacoin::SiaCoin;
-#[doc(hidden)]
-#[allow(unused_variables)]
-#[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
-))]
-pub mod solana;
-#[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
-))]
-pub use solana::spl::SplToken;
-#[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
-))]
-pub use solana::{SolTransaction, SolanaActivationParams, SolanaCoin, SolanaFeeDetails};
-
pub mod utxo;
use utxo::bch::{bch_coin_with_policy, BchActivationRequest, BchCoin};
use utxo::qtum::{self, qtum_coin_with_policy, Qrc20AddressError, QtumCoin, QtumDelegationOps, QtumDelegationRequest,
@@ -631,8 +584,6 @@ pub trait Transaction: fmt::Debug + 'static {
pub enum TransactionEnum {
UtxoTx(UtxoTx),
SignedEthTx(SignedEthTx),
- #[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
- SolTransaction(SolTransaction),
ZTransaction(ZTransaction),
CosmosTransaction(CosmosTransaction),
#[cfg(not(target_arch = "wasm32"))]
@@ -641,8 +592,6 @@ pub enum TransactionEnum {
ifrom!(TransactionEnum, UtxoTx);
ifrom!(TransactionEnum, SignedEthTx);
-#[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
-ifrom!(TransactionEnum, SolTransaction);
ifrom!(TransactionEnum, ZTransaction);
#[cfg(not(target_arch = "wasm32"))]
ifrom!(TransactionEnum, LightningPayment);
@@ -666,8 +615,6 @@ impl Deref for TransactionEnum {
TransactionEnum::CosmosTransaction(ref t) => t,
#[cfg(not(target_arch = "wasm32"))]
TransactionEnum::LightningPayment(ref p) => p,
- #[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
- TransactionEnum::SolTransaction(ref s) => s,
}
}
}
@@ -2275,13 +2222,6 @@ pub enum TxFeeDetails {
Qrc20(Qrc20FeeDetails),
Slp(SlpFeeDetails),
Tendermint(TendermintFeeDetails),
- #[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
- ))]
- Solana(SolanaFeeDetails),
}
/// Deserialize the TxFeeDetails as an untagged enum.
@@ -2296,13 +2236,6 @@ impl<'de> Deserialize<'de> for TxFeeDetails {
Utxo(UtxoFeeDetails),
Eth(EthTxFeeDetails),
Qrc20(Qrc20FeeDetails),
- #[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
- ))]
- Solana(SolanaFeeDetails),
Tendermint(TendermintFeeDetails),
}
@@ -2310,13 +2243,6 @@ impl<'de> Deserialize<'de> for TxFeeDetails {
TxFeeDetailsUnTagged::Utxo(f) => Ok(TxFeeDetails::Utxo(f)),
TxFeeDetailsUnTagged::Eth(f) => Ok(TxFeeDetails::Eth(f)),
TxFeeDetailsUnTagged::Qrc20(f) => Ok(TxFeeDetails::Qrc20(f)),
- #[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
- ))]
- TxFeeDetailsUnTagged::Solana(f) => Ok(TxFeeDetails::Solana(f)),
TxFeeDetailsUnTagged::Tendermint(f) => Ok(TxFeeDetails::Tendermint(f)),
}
}
@@ -2334,16 +2260,6 @@ impl From for TxFeeDetails {
fn from(qrc20_details: Qrc20FeeDetails) -> Self { TxFeeDetails::Qrc20(qrc20_details) }
}
-#[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
-))]
-impl From for TxFeeDetails {
- fn from(solana_details: SolanaFeeDetails) -> Self { TxFeeDetails::Solana(solana_details) }
-}
-
impl From for TxFeeDetails {
fn from(tendermint_details: TendermintFeeDetails) -> Self { TxFeeDetails::Tendermint(tendermint_details) }
}
@@ -3548,20 +3464,6 @@ pub enum MmCoinEnum {
SlpToken(SlpToken),
Tendermint(TendermintCoin),
TendermintToken(TendermintToken),
- #[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
- ))]
- SolanaCoin(SolanaCoin),
- #[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
- ))]
- SplToken(SplToken),
#[cfg(not(target_arch = "wasm32"))]
LightningCoin(LightningCoin),
#[cfg(feature = "enable-sia")]
@@ -3581,26 +3483,6 @@ impl From for MmCoinEnum {
fn from(c: TestCoin) -> MmCoinEnum { MmCoinEnum::Test(c) }
}
-#[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
-))]
-impl From for MmCoinEnum {
- fn from(c: SolanaCoin) -> MmCoinEnum { MmCoinEnum::SolanaCoin(c) }
-}
-
-#[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
-))]
-impl From for MmCoinEnum {
- fn from(c: SplToken) -> MmCoinEnum { MmCoinEnum::SplToken(c) }
-}
-
impl From for MmCoinEnum {
fn from(coin: QtumCoin) -> Self { MmCoinEnum::QtumCoin(coin) }
}
@@ -3658,20 +3540,6 @@ impl Deref for MmCoinEnum {
#[cfg(feature = "enable-sia")]
MmCoinEnum::SiaCoin(ref c) => c,
MmCoinEnum::Test(ref c) => c,
- #[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
- ))]
- MmCoinEnum::SolanaCoin(ref c) => c,
- #[cfg(all(
- feature = "enable-solana",
- not(target_os = "ios"),
- not(target_os = "android"),
- not(target_arch = "wasm32")
- ))]
- MmCoinEnum::SplToken(ref c) => c,
}
}
}
@@ -4381,14 +4249,6 @@ pub enum CoinProtocol {
network: BlockchainNetwork,
confirmation_targets: PlatformCoinConfirmationTargets,
},
- #[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
- SOLANA,
- #[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
- SPLTOKEN {
- platform: String,
- token_contract_address: String,
- decimals: u8,
- },
ZHTLC(ZcoinProtocolInfo),
#[cfg(feature = "enable-sia")]
SIA,
@@ -4650,14 +4510,6 @@ pub async fn lp_coininit(ctx: &MmArc, ticker: &str, req: &Json) -> Result return ERR!("NFT protocol is not supported by lp_coininit"),
#[cfg(not(target_arch = "wasm32"))]
CoinProtocol::LIGHTNING { .. } => return ERR!("Lightning protocol is not supported by lp_coininit"),
- #[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
- CoinProtocol::SOLANA => {
- return ERR!("Solana protocol is not supported by lp_coininit - use enable_solana_with_tokens instead")
- },
- #[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
- CoinProtocol::SPLTOKEN { .. } => {
- return ERR!("SplToken protocol is not supported by lp_coininit - use enable_spl instead")
- },
#[cfg(feature = "enable-sia")]
CoinProtocol::SIA { .. } => {
return ERR!("SIA protocol is not supported by lp_coininit. Use task::enable_sia::init");
@@ -5242,10 +5094,6 @@ pub fn address_by_coin_conf_and_pubkey_str(
CoinProtocol::LIGHTNING { .. } => {
ERR!("address_by_coin_conf_and_pubkey_str is not implemented for lightning protocol yet!")
},
- #[cfg(all(feature = "enable-solana", not(target_arch = "wasm32")))]
- CoinProtocol::SOLANA | CoinProtocol::SPLTOKEN { .. } => {
- ERR!("Solana pubkey is the public address - you do not need to use this rpc call.")
- },
CoinProtocol::ZHTLC { .. } => ERR!("address_by_coin_conf_and_pubkey_str is not supported for ZHTLC protocol!"),
#[cfg(feature = "enable-sia")]
CoinProtocol::SIA { .. } => ERR!("address_by_coin_conf_and_pubkey_str is not supported for SIA protocol!"), // TODO Alright
diff --git a/mm2src/coins/qrc20/qrc20_tests.rs b/mm2src/coins/qrc20/qrc20_tests.rs
index 2caf87c3bf..d77afa2f9b 100644
--- a/mm2src/coins/qrc20/qrc20_tests.rs
+++ b/mm2src/coins/qrc20/qrc20_tests.rs
@@ -1,6 +1,6 @@
use super::*;
use crate::{DexFee, TxFeeDetails, WaitForHTLCTxSpendArgs};
-use common::{block_on, wait_until_sec, DEX_FEE_ADDR_RAW_PUBKEY};
+use common::{block_on, block_on_f01, wait_until_sec, DEX_FEE_ADDR_RAW_PUBKEY};
use crypto::Secp256k1Secret;
use itertools::Itertools;
use keys::Address;
@@ -96,7 +96,7 @@ fn test_withdraw_to_p2sh_address_should_fail() {
memo: None,
ibc_source_channel: None,
};
- let err = coin.withdraw(req).wait().unwrap_err().into_inner();
+ let err = block_on_f01(coin.withdraw(req)).unwrap_err().into_inner();
let expect = WithdrawError::InvalidAddress("QRC20 can be sent to P2PKH addresses only".to_owned());
assert_eq!(err, expect);
}
@@ -112,19 +112,22 @@ fn test_withdraw_impl_fee_details() {
let (_ctx, coin) = qrc20_coin_for_test(priv_key, None);
Qrc20Coin::get_unspent_ordered_list.mock_safe(|coin, _| {
- let cache = block_on(coin.as_ref().recently_spent_outpoints.lock());
- let unspents = vec![UnspentInfo {
- outpoint: OutPoint {
- hash: 1.into(),
- index: 0,
- },
- value: 1000000000,
- height: Default::default(),
- script: coin
- .script_for_address(&block_on(coin.as_ref().derivation_method.unwrap_single_addr()))
- .unwrap(),
- }];
- MockResult::Return(Box::pin(futures::future::ok((unspents, cache))))
+ let fut = async move {
+ let cache = coin.as_ref().recently_spent_outpoints.lock().await;
+ let unspents = vec![UnspentInfo {
+ outpoint: OutPoint {
+ hash: 1.into(),
+ index: 0,
+ },
+ value: 1000000000,
+ height: Default::default(),
+ script: coin
+ .script_for_address(&coin.as_ref().derivation_method.unwrap_single_addr().await)
+ .unwrap(),
+ }];
+ Ok((unspents, cache))
+ };
+ MockResult::Return(fut.boxed())
});
let withdraw_req = WithdrawRequest {
@@ -140,7 +143,7 @@ fn test_withdraw_impl_fee_details() {
memo: None,
ibc_source_channel: None,
};
- let tx_details = coin.withdraw(withdraw_req).wait().unwrap();
+ let tx_details = block_on_f01(coin.withdraw(withdraw_req)).unwrap();
let expected: Qrc20FeeDetails = json::from_value(json!({
"coin": "QTUM",
@@ -287,7 +290,7 @@ fn test_wait_for_confirmations_excepted() {
wait_until,
check_every,
};
- coin.wait_for_confirmations(confirm_payment_input).wait().unwrap();
+ block_on_f01(coin.wait_for_confirmations(confirm_payment_input)).unwrap();
// tx_hash: ed53b97deb2ad76974c972cb084f6ba63bd9f16c91c4a39106a20c6d14599b2a
// `erc20Payment` contract call excepted
@@ -299,7 +302,7 @@ fn test_wait_for_confirmations_excepted() {
wait_until,
check_every,
};
- let error = coin.wait_for_confirmations(confirm_payment_input).wait().unwrap_err();
+ let error = block_on_f01(coin.wait_for_confirmations(confirm_payment_input)).unwrap_err();
log!("error: {:?}", error);
assert!(error.contains("Contract call failed with an error: Revert"));
@@ -313,7 +316,7 @@ fn test_wait_for_confirmations_excepted() {
wait_until,
check_every,
};
- let error = coin.wait_for_confirmations(confirm_payment_input).wait().unwrap_err();
+ let error = block_on_f01(coin.wait_for_confirmations(confirm_payment_input)).unwrap_err();
log!("error: {:?}", error);
assert!(error.contains("Contract call failed with an error: Revert"));
}
@@ -333,67 +336,59 @@ fn test_validate_fee() {
let amount = BigDecimal::from_str("0.01").unwrap();
- let result = coin
- .validate_fee(ValidateFeeArgs {
- fee_tx: &tx,
- expected_sender: &sender_pub,
- fee_addr: &DEX_FEE_ADDR_RAW_PUBKEY,
- dex_fee: &DexFee::Standard(amount.clone().into()),
- min_block_number: 0,
- uuid: &[],
- })
- .wait();
+ let result = block_on_f01(coin.validate_fee(ValidateFeeArgs {
+ fee_tx: &tx,
+ expected_sender: &sender_pub,
+ fee_addr: &DEX_FEE_ADDR_RAW_PUBKEY,
+ dex_fee: &DexFee::Standard(amount.clone().into()),
+ min_block_number: 0,
+ uuid: &[],
+ }));
assert!(result.is_ok());
let fee_addr_dif = hex::decode("03bc2c7ba671bae4a6fc835244c9762b41647b9827d4780a89a949b984a8ddcc05").unwrap();
- let err = coin
- .validate_fee(ValidateFeeArgs {
- fee_tx: &tx,
- expected_sender: &sender_pub,
- fee_addr: &fee_addr_dif,
- dex_fee: &DexFee::Standard(amount.clone().into()),
- min_block_number: 0,
- uuid: &[],
- })
- .wait()
- .expect_err("Expected an error")
- .into_inner();
+ let err = block_on_f01(coin.validate_fee(ValidateFeeArgs {
+ fee_tx: &tx,
+ expected_sender: &sender_pub,
+ fee_addr: &fee_addr_dif,
+ dex_fee: &DexFee::Standard(amount.clone().into()),
+ min_block_number: 0,
+ uuid: &[],
+ }))
+ .expect_err("Expected an error")
+ .into_inner();
log!("error: {:?}", err);
match err {
ValidatePaymentError::WrongPaymentTx(err) => assert!(err.contains("QRC20 Fee tx was sent to wrong address")),
_ => panic!("Expected `WrongPaymentTx` wrong receiver address, found {:?}", err),
}
- let err = coin
- .validate_fee(ValidateFeeArgs {
- fee_tx: &tx,
- expected_sender: &DEX_FEE_ADDR_RAW_PUBKEY,
- fee_addr: &DEX_FEE_ADDR_RAW_PUBKEY,
- dex_fee: &DexFee::Standard(amount.clone().into()),
- min_block_number: 0,
- uuid: &[],
- })
- .wait()
- .expect_err("Expected an error")
- .into_inner();
+ let err = block_on_f01(coin.validate_fee(ValidateFeeArgs {
+ fee_tx: &tx,
+ expected_sender: &DEX_FEE_ADDR_RAW_PUBKEY,
+ fee_addr: &DEX_FEE_ADDR_RAW_PUBKEY,
+ dex_fee: &DexFee::Standard(amount.clone().into()),
+ min_block_number: 0,
+ uuid: &[],
+ }))
+ .expect_err("Expected an error")
+ .into_inner();
log!("error: {:?}", err);
match err {
ValidatePaymentError::WrongPaymentTx(err) => assert!(err.contains("was sent from wrong address")),
_ => panic!("Expected `WrongPaymentTx` wrong sender address, found {:?}", err),
}
- let err = coin
- .validate_fee(ValidateFeeArgs {
- fee_tx: &tx,
- expected_sender: &sender_pub,
- fee_addr: &DEX_FEE_ADDR_RAW_PUBKEY,
- dex_fee: &DexFee::Standard(amount.clone().into()),
- min_block_number: 2000000,
- uuid: &[],
- })
- .wait()
- .expect_err("Expected an error")
- .into_inner();
+ let err = block_on_f01(coin.validate_fee(ValidateFeeArgs {
+ fee_tx: &tx,
+ expected_sender: &sender_pub,
+ fee_addr: &DEX_FEE_ADDR_RAW_PUBKEY,
+ dex_fee: &DexFee::Standard(amount.clone().into()),
+ min_block_number: 2000000,
+ uuid: &[],
+ }))
+ .expect_err("Expected an error")
+ .into_inner();
log!("error: {:?}", err);
match err {
ValidatePaymentError::WrongPaymentTx(err) => assert!(err.contains("confirmed before min_block")),
@@ -401,18 +396,16 @@ fn test_validate_fee() {
}
let amount_dif = BigDecimal::from_str("0.02").unwrap();
- let err = coin
- .validate_fee(ValidateFeeArgs {
- fee_tx: &tx,
- expected_sender: &sender_pub,
- fee_addr: &DEX_FEE_ADDR_RAW_PUBKEY,
- dex_fee: &DexFee::Standard(amount_dif.into()),
- min_block_number: 0,
- uuid: &[],
- })
- .wait()
- .expect_err("Expected an error")
- .into_inner();
+ let err = block_on_f01(coin.validate_fee(ValidateFeeArgs {
+ fee_tx: &tx,
+ expected_sender: &sender_pub,
+ fee_addr: &DEX_FEE_ADDR_RAW_PUBKEY,
+ dex_fee: &DexFee::Standard(amount_dif.into()),
+ min_block_number: 0,
+ uuid: &[],
+ }))
+ .expect_err("Expected an error")
+ .into_inner();
log!("error: {:?}", err);
match err {
ValidatePaymentError::WrongPaymentTx(err) => {
@@ -424,18 +417,16 @@ fn test_validate_fee() {
// QTUM tx "8a51f0ffd45f34974de50f07c5bf2f0949da4e88433f8f75191953a442cf9310"
let tx = TransactionEnum::UtxoTx("020000000113640281c9332caeddd02a8dd0d784809e1ad87bda3c972d89d5ae41f5494b85010000006a47304402207c5c904a93310b8672f4ecdbab356b65dd869a426e92f1064a567be7ccfc61ff02203e4173b9467127f7de4682513a21efb5980e66dbed4da91dff46534b8e77c7ef012102baefe72b3591de2070c0da3853226b00f082d72daa417688b61cb18c1d543d1afeffffff020001b2c4000000001976a9149e032d4b0090a11dc40fe6c47601499a35d55fbb88acbc4dd20c2f0000001976a9144208fa7be80dcf972f767194ad365950495064a488ac76e70800".into());
let sender_pub = hex::decode("02baefe72b3591de2070c0da3853226b00f082d72daa417688b61cb18c1d543d1a").unwrap();
- let err = coin
- .validate_fee(ValidateFeeArgs {
- fee_tx: &tx,
- expected_sender: &sender_pub,
- fee_addr: &DEX_FEE_ADDR_RAW_PUBKEY,
- dex_fee: &DexFee::Standard(amount.into()),
- min_block_number: 0,
- uuid: &[],
- })
- .wait()
- .expect_err("Expected an error")
- .into_inner();
+ let err = block_on_f01(coin.validate_fee(ValidateFeeArgs {
+ fee_tx: &tx,
+ expected_sender: &sender_pub,
+ fee_addr: &DEX_FEE_ADDR_RAW_PUBKEY,
+ dex_fee: &DexFee::Standard(amount.into()),
+ min_block_number: 0,
+ uuid: &[],
+ }))
+ .expect_err("Expected an error")
+ .into_inner();
log!("error: {:?}", err);
match err {
ValidatePaymentError::WrongPaymentTx(err) => assert!(err.contains("Expected 'transfer' contract call")),
@@ -462,18 +453,16 @@ fn test_wait_for_tx_spend_malicious() {
let payment_tx = hex::decode("01000000016601daa208531d20532c460d0c86b74a275f4a126bbffcf4eafdf33835af2859010000006a47304402205825657548bc1b5acf3f4bb2f89635a02b04f3228cd08126e63c5834888e7ac402207ca05fa0a629a31908a97a508e15076e925f8e621b155312b7526a6666b06a76012103693bff1b39e8b5a306810023c29b95397eb395530b106b1820ea235fd81d9ce9ffffffff020000000000000000e35403a0860101284cc49b415b2a8620ad3b72361a5aeba5dffd333fb64750089d935a1ec974d6a91ef4f24ff6ba0000000000000000000000000000000000000000000000000000000001312d00000000000000000000000000d362e096e873eb7907e205fadc6175c6fec7bc44000000000000000000000000783cf0be521101942da509846ea476e683aad8324b6b2e5444c2639cc0fb7bcea5afba3f3cdce239000000000000000000000000000000000000000000000000000000000000000000000000000000005f855c7614ba8b71f3544b93e2f681f996da519a98ace0107ac2203de400000000001976a9149e032d4b0090a11dc40fe6c47601499a35d55fbb88ac415d855f").unwrap();
let wait_until = now_sec() + 1;
let from_block = 696245;
- let found = coin
- .wait_for_htlc_tx_spend(WaitForHTLCTxSpendArgs {
- tx_bytes: &payment_tx,
- secret_hash: &[],
- wait_until,
- from_block,
- swap_contract_address: &coin.swap_contract_address(),
- check_every: TAKER_PAYMENT_SPEND_SEARCH_INTERVAL,
- watcher_reward: false,
- })
- .wait()
- .unwrap();
+ let found = block_on_f01(coin.wait_for_htlc_tx_spend(WaitForHTLCTxSpendArgs {
+ tx_bytes: &payment_tx,
+ secret_hash: &[],
+ wait_until,
+ from_block,
+ swap_contract_address: &coin.swap_contract_address(),
+ check_every: TAKER_PAYMENT_SPEND_SEARCH_INTERVAL,
+ watcher_reward: false,
+ }))
+ .unwrap();
let spend_tx = match found {
TransactionEnum::UtxoTx(tx) => tx,
@@ -731,7 +720,7 @@ fn test_get_trade_fee() {
// check if the coin's tx fee is expected
check_tx_fee(&coin, ActualTxFee::FixedPerKb(EXPECTED_TX_FEE as u64));
- let actual_trade_fee = coin.get_trade_fee().wait().unwrap();
+ let actual_trade_fee = block_on_f01(coin.get_trade_fee()).unwrap();
let expected_trade_fee_amount = big_decimal_from_sat(
2 * CONTRACT_CALL_GAS_FEE + SWAP_PAYMENT_GAS_FEE + EXPECTED_TX_FEE,
coin.utxo.decimals,
@@ -905,10 +894,8 @@ fn test_receiver_trade_preimage() {
// check if the coin's tx fee is expected
check_tx_fee(&coin, ActualTxFee::FixedPerKb(EXPECTED_TX_FEE as u64));
- let actual = coin
- .get_receiver_trade_fee(FeeApproxStage::WithoutApprox)
- .wait()
- .expect("!get_receiver_trade_fee");
+ let actual =
+ block_on_f01(coin.get_receiver_trade_fee(FeeApproxStage::WithoutApprox)).expect("!get_receiver_trade_fee");
// only one contract call should be included into the expected trade fee
let expected_receiver_fee = big_decimal_from_sat(CONTRACT_CALL_GAS_FEE + EXPECTED_TX_FEE, coin.utxo.decimals);
let expected = TradeFee {
@@ -935,7 +922,7 @@ fn test_taker_fee_tx_fee() {
spendable: BigDecimal::from(5u32),
unspendable: BigDecimal::from(0u32),
};
- assert_eq!(coin.my_balance().wait().expect("!my_balance"), expected_balance);
+ assert_eq!(block_on_f01(coin.my_balance()).expect("!my_balance"), expected_balance);
let dex_fee_amount = BigDecimal::from(5u32);
let actual = block_on(coin.get_fee_to_send_taker_fee(
diff --git a/mm2src/coins/solana.rs b/mm2src/coins/solana.rs
deleted file mode 100644
index 2b9abef1ca..0000000000
--- a/mm2src/coins/solana.rs
+++ /dev/null
@@ -1,1098 +0,0 @@
-use std::{collections::HashMap,
- convert::{TryFrom, TryInto},
- fmt::Debug,
- ops::Deref,
- str::FromStr,
- sync::{Arc, Mutex}};
-
-use async_trait::async_trait;
-use base58::ToBase58;
-use bincode::{deserialize, serialize};
-use bitcrypto::sha256;
-use common::{async_blocking,
- executor::{abortable_queue::AbortableQueue, AbortableSystem, AbortedError},
- log::error,
- now_sec};
-use crypto::HDPathToCoin;
-use derive_more::Display;
-use futures::{compat::Future01CompatExt,
- {FutureExt, TryFutureExt}};
-use futures01::Future;
-use keys::KeyPair;
-use mm2_core::mm_ctx::MmArc;
-use mm2_err_handle::prelude::*;
-use mm2_number::{BigDecimal, MmNumber};
-use num_traits::ToPrimitive;
-use rpc::v1::types::Bytes as BytesJson;
-pub use satomic_swap::{instruction::AtomicSwapInstruction, STORAGE_SPACE_ALLOCATED};
-use serde_json::{self as json, Value as Json};
-use solana_client::{client_error::{ClientError, ClientErrorKind},
- rpc_client::RpcClient,
- rpc_request::TokenAccountsFilter};
-pub use solana_sdk::transaction::Transaction as SolTransaction;
-use solana_sdk::{commitment_config::{CommitmentConfig, CommitmentLevel},
- instruction::{AccountMeta, Instruction},
- native_token::sol_to_lamports,
- program_error::ProgramError,
- pubkey::{ParsePubkeyError, Pubkey},
- signature::{Keypair as SolKeypair, Signer}};
-use spl_token::solana_program;
-
-use super::{CoinBalance, HistorySyncState, MarketCoinOps, MmCoin, SwapOps, TradeFee, Transaction, TransactionEnum,
- TransactionErr, WatcherOps};
-use crate::coin_errors::{MyAddressError, ValidatePaymentResult};
-use crate::hd_wallet::HDPathAccountToAddressId;
-use crate::solana::{solana_common::{lamports_to_sol, PrepareTransferData, SufficientBalanceError},
- spl::SplTokenInfo};
-use crate::{BalanceError, BalanceFut, CheckIfMyPaymentSentArgs, CoinFutSpawner, ConfirmPaymentInput, DexFee,
- FeeApproxStage, FoundSwapTxSpend, MakerSwapTakerCoin, MmCoinEnum, NegotiateSwapContractAddrErr,
- PaymentInstructionArgs, PaymentInstructions, PaymentInstructionsErr, PrivKeyBuildPolicy,
- PrivKeyPolicyNotAllowed, RawTransactionError, RawTransactionFut, RawTransactionRequest,
- RawTransactionResult, RefundError, RefundPaymentArgs, RefundResult, SearchForSwapTxSpendInput,
- SendMakerPaymentSpendPreimageInput, SendPaymentArgs, SignRawTransactionRequest, SignatureResult,
- SpendPaymentArgs, TakerSwapMakerCoin, TradePreimageFut, TradePreimageResult, TradePreimageValue,
- TransactionData, TransactionDetails, TransactionFut, TransactionResult, TransactionType, TxMarshalingErr,
- UnexpectedDerivationMethod, ValidateAddressResult, ValidateFeeArgs, ValidateInstructionsErr,
- ValidateOtherPubKeyErr, ValidatePaymentError, ValidatePaymentFut, ValidatePaymentInput,
- ValidateWatcherSpendInput, VerificationResult, WaitForHTLCTxSpendArgs, WatcherReward, WatcherRewardError,
- WatcherSearchForSwapTxSpendInput, WatcherValidatePaymentInput, WatcherValidateTakerFeeInput,
- WithdrawError, WithdrawFut, WithdrawRequest, WithdrawResult};
-
-pub mod solana_common;
-mod solana_decode_tx_helpers;
-pub mod spl;
-
-#[cfg(test)] mod solana_common_tests;
-#[cfg(test)] mod solana_tests;
-#[cfg(test)] mod spl_tests;
-
-pub const SOLANA_DEFAULT_DECIMALS: u64 = 9;
-pub const LAMPORTS_DUMMY_AMOUNT: u64 = 10;
-
-#[async_trait]
-pub trait SolanaCommonOps {
- fn rpc(&self) -> &RpcClient;
-
- fn is_token(&self) -> bool;
-
- async fn check_balance_and_prepare_transfer(
- &self,
- max: bool,
- amount: BigDecimal,
- fees: u64,
- ) -> Result>;
-}
-
-impl From for BalanceError {
- fn from(e: ClientError) -> Self {
- match e.kind {
- ClientErrorKind::Io(e) => BalanceError::Transport(e.to_string()),
- ClientErrorKind::Reqwest(e) => BalanceError::Transport(e.to_string()),
- ClientErrorKind::RpcError(e) => BalanceError::Transport(format!("{:?}", e)),
- ClientErrorKind::SerdeJson(e) => BalanceError::InvalidResponse(e.to_string()),
- ClientErrorKind::Custom(e) => BalanceError::Internal(e),
- ClientErrorKind::SigningError(_)
- | ClientErrorKind::TransactionError(_)
- | ClientErrorKind::FaucetError(_) => BalanceError::Internal("not_reacheable".to_string()),
- }
- }
-}
-
-impl From for BalanceError {
- fn from(e: ParsePubkeyError) -> Self { BalanceError::Internal(format!("{:?}", e)) }
-}
-
-impl From for WithdrawError {
- fn from(e: ClientError) -> Self {
- match e.kind {
- ClientErrorKind::Io(e) => WithdrawError::Transport(e.to_string()),
- ClientErrorKind::Reqwest(e) => WithdrawError::Transport(e.to_string()),
- ClientErrorKind::RpcError(e) => WithdrawError::Transport(format!("{:?}", e)),
- ClientErrorKind::SerdeJson(e) => WithdrawError::InternalError(e.to_string()),
- ClientErrorKind::Custom(e) => WithdrawError::InternalError(e),
- ClientErrorKind::SigningError(_)
- | ClientErrorKind::TransactionError(_)
- | ClientErrorKind::FaucetError(_) => WithdrawError::InternalError("not_reacheable".to_string()),
- }
- }
-}
-
-impl From for WithdrawError {
- fn from(e: ParsePubkeyError) -> Self { WithdrawError::InvalidAddress(format!("{:?}", e)) }
-}
-
-impl From for WithdrawError {
- fn from(e: ProgramError) -> Self { WithdrawError::InternalError(format!("{:?}", e)) }
-}
-
-#[derive(Debug)]
-pub enum AccountError {
- NotFundedError(String),
- ParsePubKeyError(String),
- ClientError(ClientErrorKind),
-}
-
-impl From for AccountError {
- fn from(e: ClientError) -> Self { AccountError::ClientError(e.kind) }
-}
-
-impl From for AccountError {
- fn from(e: ParsePubkeyError) -> Self { AccountError::ParsePubKeyError(format!("{:?}", e)) }
-}
-
-impl From for WithdrawError {
- fn from(e: AccountError) -> Self {
- match e {
- AccountError::NotFundedError(_) => WithdrawError::ZeroBalanceToWithdrawMax,
- AccountError::ParsePubKeyError(err) => WithdrawError::InternalError(err),
- AccountError::ClientError(e) => WithdrawError::Transport(format!("{:?}", e)),
- }
- }
-}
-
-#[derive(Clone, Debug, Deserialize, Serialize)]
-pub struct SolanaActivationParams {
- confirmation_commitment: CommitmentLevel,
- client_url: String,
- #[serde(default)]
- path_to_address: HDPathAccountToAddressId,
-}
-
-#[derive(Debug, Display)]
-pub enum SolanaFromLegacyReqErr {
- InvalidCommitmentLevel(String),
- InvalidClientParsing(json::Error),
- ClientNoAvailableNodes(String),
-}
-
-#[derive(Debug, Display)]
-pub enum KeyPairCreationError {
- #[display(fmt = "Signature error: {}", _0)]
- SignatureError(ed25519_dalek::SignatureError),
- #[display(fmt = "KeyPairFromSeed error: {}", _0)]
- KeyPairFromSeed(String),
-}
-
-impl From for KeyPairCreationError {
- fn from(e: ed25519_dalek::SignatureError) -> Self { KeyPairCreationError::SignatureError(e) }
-}
-
-fn generate_keypair_from_slice(priv_key: &[u8]) -> Result> {
- let secret_key = ed25519_dalek::SecretKey::from_bytes(priv_key)?;
- let public_key = ed25519_dalek::PublicKey::from(&secret_key);
- let key_pair = ed25519_dalek::Keypair {
- secret: secret_key,
- public: public_key,
- };
- solana_sdk::signature::keypair_from_seed(key_pair.to_bytes().as_ref())
- .map_to_mm(|e| KeyPairCreationError::KeyPairFromSeed(e.to_string()))
-}
-
-pub async fn solana_coin_with_policy(
- ctx: &MmArc,
- ticker: &str,
- conf: &Json,
- params: SolanaActivationParams,
- priv_key_policy: PrivKeyBuildPolicy,
-) -> Result {
- let client = RpcClient::new_with_commitment(params.client_url.clone(), CommitmentConfig {
- commitment: params.confirmation_commitment,
- });
- let decimals = conf["decimals"].as_u64().unwrap_or(SOLANA_DEFAULT_DECIMALS) as u8;
-
- let priv_key = match priv_key_policy {
- PrivKeyBuildPolicy::IguanaPrivKey(priv_key) => priv_key,
- PrivKeyBuildPolicy::GlobalHDAccount(global_hd) => {
- let path_to_coin: HDPathToCoin = try_s!(json::from_value(conf["derivation_path"].clone()));
- let derivation_path = try_s!(params.path_to_address.to_derivation_path(&path_to_coin));
- try_s!(global_hd.derive_secp256k1_secret(&derivation_path))
- },
- PrivKeyBuildPolicy::Trezor => return ERR!("{}", PrivKeyPolicyNotAllowed::HardwareWalletNotSupported),
- };
-
- let key_pair = try_s!(generate_keypair_from_slice(priv_key.as_slice()));
- let my_address = key_pair.pubkey().to_string();
- let spl_tokens_infos = Arc::new(Mutex::new(HashMap::new()));
-
- // Create an abortable system linked to the `MmCtx` so if the context is stopped via `MmArc::stop`,
- // all spawned futures related to `SolanaCoin` will be aborted as well.
- let abortable_system: AbortableQueue = try_s!(ctx.abortable_system.create_subsystem());
-
- let solana_coin = SolanaCoin(Arc::new(SolanaCoinImpl {
- my_address,
- key_pair,
- ticker: ticker.to_string(),
- client,
- decimals,
- spl_tokens_infos,
- abortable_system,
- }));
- Ok(solana_coin)
-}
-
-/// pImpl idiom.
-pub struct SolanaCoinImpl {
- ticker: String,
- key_pair: SolKeypair,
- client: RpcClient,
- decimals: u8,
- my_address: String,
- spl_tokens_infos: Arc>>,
- /// This spawner is used to spawn coin's related futures that should be aborted on coin deactivation
- /// and on [`MmArc::stop`].
- pub abortable_system: AbortableQueue,
-}
-
-#[derive(Clone)]
-pub struct SolanaCoin(Arc);
-impl Deref for SolanaCoin {
- type Target = SolanaCoinImpl;
- fn deref(&self) -> &SolanaCoinImpl { &self.0 }
-}
-
-#[async_trait]
-impl SolanaCommonOps for SolanaCoin {
- fn rpc(&self) -> &RpcClient { &self.client }
-
- fn is_token(&self) -> bool { false }
-
- async fn check_balance_and_prepare_transfer(
- &self,
- max: bool,
- amount: BigDecimal,
- fees: u64,
- ) -> Result> {
- solana_common::check_balance_and_prepare_transfer(self, max, amount, fees).await
- }
-}
-
-#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
-pub struct SolanaFeeDetails {
- pub amount: BigDecimal,
-}
-
-async fn withdraw_base_coin_impl(coin: SolanaCoin, req: WithdrawRequest) -> WithdrawResult {
- let (hash, fees) = coin.estimate_withdraw_fees().await?;
- let res = coin
- .check_balance_and_prepare_transfer(req.max, req.amount.clone(), fees)
- .await?;
- let to = solana_sdk::pubkey::Pubkey::try_from(&*req.to)?;
- let tx = solana_sdk::system_transaction::transfer(&coin.key_pair, &to, res.lamports_to_send, hash);
- let serialized_tx = serialize(&tx).map_to_mm(|e| WithdrawError::InternalError(e.to_string()))?;
- let total_amount = lamports_to_sol(res.lamports_to_send);
- let received_by_me = if req.to == coin.my_address {
- total_amount.clone()
- } else {
- 0.into()
- };
- let spent_by_me = &total_amount + &res.sol_required;
- Ok(TransactionDetails {
- tx: TransactionData::new_signed(serialized_tx.into(), tx.signatures[0].to_string()),
- from: vec![coin.my_address.clone()],
- to: vec![req.to],
- total_amount: spent_by_me.clone(),
- my_balance_change: &received_by_me - &spent_by_me,
- spent_by_me,
- received_by_me,
- block_height: 0,
- timestamp: now_sec(),
- fee_details: Some(
- SolanaFeeDetails {
- amount: res.sol_required,
- }
- .into(),
- ),
- coin: coin.ticker.clone(),
- internal_id: vec![].into(),
- kmd_rewards: None,
- transaction_type: TransactionType::StandardTransfer,
- memo: None,
- })
-}
-
-async fn withdraw_impl(coin: SolanaCoin, req: WithdrawRequest) -> WithdrawResult {
- let validate_address_result = coin.validate_address(&req.to);
- if !validate_address_result.is_valid {
- return MmError::err(WithdrawError::InvalidAddress(
- validate_address_result.reason.unwrap_or_else(|| "Unknown".to_string()),
- ));
- }
- withdraw_base_coin_impl(coin, req).await
-}
-
-type SolTxFut = Box + Send + 'static>;
-
-impl Transaction for SolTransaction {
- fn tx_hex(&self) -> Vec {
- serialize(self).unwrap_or_else(|e| {
- error!("Error serializing SolTransaction: {}", e);
- vec![]
- })
- }
-
- fn tx_hash_as_bytes(&self) -> BytesJson {
- let hash = match self.signatures.get(0) {
- Some(signature) => signature,
- None => {
- error!("No signature found in SolTransaction");
- return BytesJson(Vec::new());
- },
- };
- BytesJson(Vec::from(hash.as_ref()))
- }
-}
-
-impl SolanaCoin {
- pub async fn estimate_withdraw_fees(&self) -> Result<(solana_sdk::hash::Hash, u64), MmError> {
- let hash = async_blocking({
- let coin = self.clone();
- move || coin.rpc().get_latest_blockhash()
- })
- .await?;
- let to = self.key_pair.pubkey();
-
- let tx = solana_sdk::system_transaction::transfer(&self.key_pair, &to, LAMPORTS_DUMMY_AMOUNT, hash);
- let fees = async_blocking({
- let coin = self.clone();
- move || coin.rpc().get_fee_for_message(tx.message())
- })
- .await?;
- Ok((hash, fees))
- }
-
- pub async fn my_balance_spl(&self, infos: SplTokenInfo) -> Result> {
- let token_accounts = async_blocking({
- let coin = self.clone();
- move || {
- coin.rpc().get_token_accounts_by_owner(
- &coin.key_pair.pubkey(),
- TokenAccountsFilter::Mint(infos.token_contract_address),
- )
- }
- })
- .await?;
- if token_accounts.is_empty() {
- return Ok(CoinBalance {
- spendable: Default::default(),
- unspendable: Default::default(),
- });
- }
- let actual_token_pubkey =
- Pubkey::from_str(&token_accounts[0].pubkey).map_err(|e| BalanceError::Internal(format!("{:?}", e)))?;
- let amount = async_blocking({
- let coin = self.clone();
- move || coin.rpc().get_token_account_balance(&actual_token_pubkey)
- })
- .await?;
- let balance =
- BigDecimal::from_str(&amount.ui_amount_string).map_to_mm(|e| BalanceError::Internal(e.to_string()))?;
- Ok(CoinBalance {
- spendable: balance,
- unspendable: Default::default(),
- })
- }
-
- fn my_balance_impl(&self) -> BalanceFut {
- let coin = self.clone();
- let fut = async_blocking(move || {
- // this is blocking IO
- let res = coin.rpc().get_balance(&coin.key_pair.pubkey())?;
- Ok(lamports_to_sol(res))
- });
- Box::new(fut.boxed().compat())
- }
-
- pub fn add_spl_token_info(&self, ticker: String, info: SplTokenInfo) {
- self.spl_tokens_infos.lock().unwrap().insert(ticker, info);
- }
-
- /// WARNING
- /// Be very careful using this function since it returns dereferenced clone
- /// of value behind the MutexGuard and makes it non-thread-safe.
- pub fn get_spl_tokens_infos(&self) -> HashMap {
- let guard = self.spl_tokens_infos.lock().unwrap();
- (*guard).clone()
- }
-
- fn send_hash_time_locked_payment(&self, args: SendPaymentArgs<'_>) -> SolTxFut {
- let receiver = Pubkey::new(args.other_pubkey);
- let swap_program_id = Pubkey::new(try_tx_fus_opt!(
- args.swap_contract_address,
- format!(
- "Unable to extract Bytes from args.swap_contract_address ( {:?} )",
- args.swap_contract_address
- )
- ));
- let amount = sol_to_lamports(try_tx_fus_opt!(
- args.amount.to_f64(),
- format!("Unable to extract value from args.amount ( {:?} )", args.amount)
- ));
- let secret_hash: [u8; 32] = try_tx_fus!(<[u8; 32]>::try_from(args.secret_hash));
- let (vault_pda, vault_pda_data, vault_bump_seed, vault_bump_seed_data, rent_exemption_lamports) =
- try_tx_fus!(self.create_vaults(args.time_lock, secret_hash, swap_program_id, STORAGE_SPACE_ALLOCATED));
- let swap_instruction = AtomicSwapInstruction::LamportsPayment {
- secret_hash,
- lock_time: args.time_lock,
- amount,
- receiver,
- rent_exemption_lamports,
- vault_bump_seed,
- vault_bump_seed_data,
- };
-
- let accounts = vec![
- AccountMeta::new(self.key_pair.pubkey(), true),
- AccountMeta::new(vault_pda_data, false),
- AccountMeta::new(vault_pda, false),
- AccountMeta::new(solana_program::system_program::id(), false),
- ];
- self.sign_and_send_swap_transaction_fut(swap_program_id, accounts, swap_instruction.pack())
- }
-
- fn spend_hash_time_locked_payment(&self, args: SpendPaymentArgs) -> SolTxFut {
- let sender = Pubkey::new(args.other_pubkey);
- let swap_program_id = Pubkey::new(try_tx_fus_opt!(
- args.swap_contract_address.as_ref(),
- format!(
- "Unable to extract Bytes from args.swap_contract_address ( {:?} )",
- args.swap_contract_address
- )
- ));
- let secret: [u8; 32] = try_tx_fus!(<[u8; 32]>::try_from(args.secret));
- let secret_hash = sha256(secret.as_slice()).take();
- let (lock_time, tx_secret_hash, amount, token_program) =
- try_tx_fus!(self.get_swap_transaction_details(args.other_payment_tx));
- if secret_hash != tx_secret_hash {
- try_tx_fus_err!(format!(
- "Provided secret_hash {:?} does not match transaction secret_hash {:?}",
- secret_hash, tx_secret_hash
- ));
- }
- let (vault_pda, vault_pda_data, vault_bump_seed, vault_bump_seed_data, _rent_exemption_lamports) =
- try_tx_fus!(self.create_vaults(lock_time, secret_hash, swap_program_id, STORAGE_SPACE_ALLOCATED));
- let swap_instruction = AtomicSwapInstruction::ReceiverSpend {
- secret,
- lock_time,
- amount,
- sender,
- token_program,
- vault_bump_seed,
- vault_bump_seed_data,
- };
- let accounts = vec![
- AccountMeta::new(self.key_pair.pubkey(), true),
- AccountMeta::new(vault_pda_data, false),
- AccountMeta::new(vault_pda, false),
- AccountMeta::new(solana_program::system_program::id(), false),
- ];
- self.sign_and_send_swap_transaction_fut(swap_program_id, accounts, swap_instruction.pack())
- }
-
- fn refund_hash_time_locked_payment(&self, args: RefundPaymentArgs) -> SolTxFut {
- let receiver = Pubkey::new(args.other_pubkey);
- let swap_program_id = Pubkey::new(try_tx_fus_opt!(
- args.swap_contract_address.as_ref(),
- format!(
- "Unable to extract Bytes from args.swap_contract_address ( {:?} )",
- args.swap_contract_address
- )
- ));
- let (lock_time, secret_hash, amount, token_program) =
- try_tx_fus!(self.get_swap_transaction_details(args.payment_tx));
- let (vault_pda, vault_pda_data, vault_bump_seed, vault_bump_seed_data, _rent_exemption_lamports) =
- try_tx_fus!(self.create_vaults(lock_time, secret_hash, swap_program_id, STORAGE_SPACE_ALLOCATED));
- let swap_instruction = AtomicSwapInstruction::SenderRefund {
- secret_hash,
- lock_time,
- amount,
- receiver,
- token_program,
- vault_bump_seed,
- vault_bump_seed_data,
- };
- let accounts = vec![
- AccountMeta::new(self.key_pair.pubkey(), true), // Marked as signer
- AccountMeta::new(vault_pda_data, false), // Not a signer
- AccountMeta::new(vault_pda, false), // Not a signer
- AccountMeta::new(solana_program::system_program::id(), false), //system_program must be included
- ];
- self.sign_and_send_swap_transaction_fut(swap_program_id, accounts, swap_instruction.pack())
- }
-
- fn get_swap_transaction_details(&self, tx_hex: &[u8]) -> Result<(u64, [u8; 32], u64, Pubkey), Box> {
- let transaction: SolTransaction = deserialize(tx_hex)
- .map_err(|e| Box::new(TransactionErr::Plain(ERRL!("error deserializing tx_hex: {:?}", e))))?;
-
- let instruction = transaction
- .message
- .instructions
- .get(0)
- .ok_or_else(|| Box::new(TransactionErr::Plain(ERRL!("Instruction not found in message"))))?;
-
- let instruction_data = &instruction.data[..];
- let instruction = AtomicSwapInstruction::unpack(instruction_data[0], instruction_data)
- .map_err(|e| Box::new(TransactionErr::Plain(ERRL!("error unpacking tx data: {:?}", e))))?;
-
- match instruction {
- AtomicSwapInstruction::LamportsPayment {
- secret_hash,
- lock_time,
- amount,
- ..
- } => Ok((lock_time, secret_hash, amount, Pubkey::new_from_array([0; 32]))),
- AtomicSwapInstruction::SPLTokenPayment {
- secret_hash,
- lock_time,
- amount,
- token_program,
- ..
- } => Ok((lock_time, secret_hash, amount, token_program)),
- AtomicSwapInstruction::ReceiverSpend {
- secret,
- lock_time,
- amount,
- token_program,
- ..
- } => Ok((lock_time, sha256(&secret).take(), amount, token_program)),
- AtomicSwapInstruction::SenderRefund {
- secret_hash,
- lock_time,
- amount,
- token_program,
- ..
- } => Ok((lock_time, secret_hash, amount, token_program)),
- }
- }
-
- fn sign_and_send_swap_transaction_fut(
- &self,
- program_id: Pubkey,
- accounts: Vec,
- data: Vec,
- ) -> SolTxFut {
- let coin = self.clone();
- Box::new(
- async move { coin.sign_and_send_swap_transaction(program_id, accounts, data).await }
- .boxed()
- .compat(),
- )
- }
-
- pub async fn sign_and_send_swap_transaction(
- &self,
- program_id: Pubkey,
- accounts: Vec,
- data: Vec,
- ) -> Result {
- // Construct the instruction to send to the program
- // The parameters here depend on your specific program's requirements
- let instruction = Instruction {
- program_id,
- accounts, // Specify account metas here
- data, // Pass data to the program here
- };
-
- // Create a transaction
- let recent_blockhash = self
- .client
- .get_latest_blockhash()
- .map_err(|e| TransactionErr::Plain(format!("Failed to get recent blockhash: {:?}", e)))?;
-
- let transaction: SolTransaction = SolTransaction::new_signed_with_payer(
- &[instruction],
- Some(&self.key_pair.pubkey()), //payer pubkey
- &[&self.key_pair], //payer
- recent_blockhash,
- );
-
- // Send the transaction
- let tx = self
- .client
- .send_and_confirm_transaction(&transaction)
- .map(|_signature| transaction)
- .map_err(|e| TransactionErr::Plain(ERRL!("Solana ClientError: {:?}", e)))?;
-
- Ok(tx)
- }
-
- fn create_vaults(
- &self,
- lock_time: u64,
- secret_hash: [u8; 32],
- program_id: Pubkey,
- space: u64,
- ) -> Result<(Pubkey, Pubkey, u8, u8, u64), Box> {
- let seeds: &[&[u8]] = &[b"swap", &lock_time.to_le_bytes()[..], &secret_hash[..]];
- let (vault_pda, bump_seed) = Pubkey::find_program_address(seeds, &program_id);
-
- let seeds_data: &[&[u8]] = &[b"swap_data", &lock_time.to_le_bytes()[..], &secret_hash[..]];
- let (vault_pda_data, bump_seed_data) = Pubkey::find_program_address(seeds_data, &program_id);
-
- let rent_exemption_lamports = self
- .client
- .get_minimum_balance_for_rent_exemption(
- space
- .try_into()
- .map_err(|e| Box::new(TransactionErr::Plain(ERRL!("unable to convert space: {:?}", e))))?,
- )
- .map_err(|e| {
- Box::new(TransactionErr::Plain(ERRL!(
- "error get_minimum_balance_for_rent_exemption: {:?}",
- e
- )))
- })?;
-
- Ok((
- vault_pda,
- vault_pda_data,
- bump_seed,
- bump_seed_data,
- rent_exemption_lamports,
- ))
- }
-}
-
-#[async_trait]
-impl MarketCoinOps for SolanaCoin {
- fn ticker(&self) -> &str { &self.ticker }
-
- fn my_address(&self) -> MmResult { Ok(self.my_address.clone()) }
-
- async fn get_public_key(&self) -> Result> {
- Ok(self.key_pair.pubkey().to_string())
- }
-
- fn sign_message_hash(&self, _message: &str) -> Option<[u8; 32]> { unimplemented!() }
-
- fn sign_message(&self, message: &str) -> SignatureResult { solana_common::sign_message(self, message) }
-
- fn verify_message(&self, signature: &str, message: &str, pubkey_bs58: &str) -> VerificationResult {
- solana_common::verify_message(self, signature, message, pubkey_bs58)
- }
-
- fn my_balance(&self) -> BalanceFut {
- let decimals = self.decimals as u64;
- let fut = self.my_balance_impl().and_then(move |result| {
- Ok(CoinBalance {
- spendable: result.with_prec(decimals),
- unspendable: 0.into(),
- })
- });
- Box::new(fut)
- }
-
- fn base_coin_balance(&self) -> BalanceFut {
- let decimals = self.decimals as u64;
- let fut = self
- .my_balance_impl()
- .and_then(move |result| Ok(result.with_prec(decimals)));
- Box::new(fut)
- }
-
- fn platform_ticker(&self) -> &str { self.ticker() }
-
- fn send_raw_tx(&self, tx: &str) -> Box + Send> {
- let coin = self.clone();
- let tx = tx.to_owned();
- let fut = async_blocking(move || {
- let bytes = hex::decode(tx).map_to_mm(|e| e).map_err(|e| format!("{:?}", e))?;
- let tx: SolTransaction = deserialize(bytes.as_slice())
- .map_to_mm(|e| e)
- .map_err(|e| format!("{:?}", e))?;
- // this is blocking IO
- let signature = coin.rpc().send_transaction(&tx).map_err(|e| format!("{:?}", e))?;
- Ok(signature.to_string())
- });
- Box::new(fut.boxed().compat())
- }
-
- fn send_raw_tx_bytes(&self, tx: &[u8]) -> Box + Send> {
- let coin = self.clone();
- let tx = tx.to_owned();
- let fut = async_blocking(move || {
- let tx = try_s!(deserialize(tx.as_slice()));
- // this is blocking IO
- let signature = coin.rpc().send_transaction(&tx).map_err(|e| format!("{:?}", e))?;
- Ok(signature.to_string())
- });
- Box::new(fut.boxed().compat())
- }
-
- #[inline(always)]
- async fn sign_raw_tx(&self, _args: &SignRawTransactionRequest) -> RawTransactionResult {
- MmError::err(RawTransactionError::NotImplemented {
- coin: self.ticker().to_string(),
- })
- }
-
- fn wait_for_confirmations(&self, _input: ConfirmPaymentInput) -> Box + Send> {
- unimplemented!()
- }
-
- fn wait_for_htlc_tx_spend(&self, args: WaitForHTLCTxSpendArgs<'_>) -> TransactionFut { unimplemented!() }
-
- fn tx_enum_from_bytes(&self, _bytes: &[u8]) -> Result> {
- MmError::err(TxMarshalingErr::NotSupported(
- "tx_enum_from_bytes is not supported for Solana yet.".to_string(),
- ))
- }
-
- fn current_block(&self) -> Box + Send> {
- let coin = self.clone();
- let fut = async_blocking(move || coin.rpc().get_block_height().map_err(|e| format!("{:?}", e)));
- Box::new(fut.boxed().compat())
- }
-
- fn display_priv_key(&self) -> Result { Ok(self.key_pair.secret().to_bytes()[..].to_base58()) }
-
- fn min_tx_amount(&self) -> BigDecimal { BigDecimal::from(0) }
-
- fn min_trading_vol(&self) -> MmNumber { MmNumber::from("0.00777") }
-
- fn is_trezor(&self) -> bool { unimplemented!() }
-}
-
-#[async_trait]
-impl SwapOps for SolanaCoin {
- fn send_taker_fee(&self, _fee_addr: &[u8], dex_fee: DexFee, _uuid: &[u8], _expire_at: u64) -> TransactionFut {
- unimplemented!()
- }
-
- fn send_maker_payment(&self, maker_payment: SendPaymentArgs) -> TransactionFut {
- Box::new(
- self.send_hash_time_locked_payment(maker_payment)
- .map(TransactionEnum::from),
- )
- }
-
- fn send_taker_payment(&self, taker_payment: SendPaymentArgs) -> TransactionFut {
- Box::new(
- self.send_hash_time_locked_payment(taker_payment)
- .map(TransactionEnum::from),
- )
- }
-
- async fn send_maker_spends_taker_payment(
- &self,
- maker_spends_payment_args: SpendPaymentArgs<'_>,
- ) -> TransactionResult {
- self.spend_hash_time_locked_payment(maker_spends_payment_args)
- .compat()
- .await
- .map(TransactionEnum::from)
- }
-
- async fn send_taker_spends_maker_payment(
- &self,
- taker_spends_payment_args: SpendPaymentArgs<'_>,
- ) -> TransactionResult {
- self.spend_hash_time_locked_payment(taker_spends_payment_args)
- .compat()
- .await
- .map(TransactionEnum::from)
- }
-
- async fn send_taker_refunds_payment(&self, taker_refunds_payment_args: RefundPaymentArgs<'_>) -> TransactionResult {
- self.refund_hash_time_locked_payment(taker_refunds_payment_args)
- .map(TransactionEnum::from)
- .compat()
- .await
- }
-
- async fn send_maker_refunds_payment(&self, maker_refunds_payment_args: RefundPaymentArgs<'_>) -> TransactionResult {
- self.refund_hash_time_locked_payment(maker_refunds_payment_args)
- .map(TransactionEnum::from)
- .compat()
- .await
- }
-
- fn validate_fee(&self, _validate_fee_args: ValidateFeeArgs) -> ValidatePaymentFut<()> { unimplemented!() }
-
- async fn validate_maker_payment(&self, input: ValidatePaymentInput) -> ValidatePaymentResult<()> {
- unimplemented!()
- }
-
- async fn validate_taker_payment(&self, input: ValidatePaymentInput) -> ValidatePaymentResult<()> {
- unimplemented!()
- }
-
- fn check_if_my_payment_sent(
- &self,
- _if_my_payment_sent_args: CheckIfMyPaymentSentArgs,
- ) -> Box, Error = String> + Send> {
- unimplemented!()
- }
-
- async fn search_for_swap_tx_spend_my(
- &self,
- _: SearchForSwapTxSpendInput<'_>,
- ) -> Result