Skip to content

Commit

Permalink
Revert publisy-dry-run changes and add back soroban-rpc crate
Browse files Browse the repository at this point in the history
  • Loading branch information
stellarsaur committed Feb 14, 2024
1 parent a88be94 commit 07f62e6
Show file tree
Hide file tree
Showing 9 changed files with 2,090 additions and 58 deletions.
62 changes: 6 additions & 56 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ jobs:
publish-dry-run:
# if: github.event_name == 'push' || startsWith(github.head_ref, 'release/')
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -119,56 +116,9 @@ jobs:
- os: windows-latest-8-cores
target: x86_64-pc-windows-msvc
cargo-hack-feature-options: --features opt --ignore-unknown-features
runs-on: ${{ matrix.os }}
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
steps:
- uses: actions/checkout@v3
- uses: stellar/actions/rust-cache@main
- run: rustup update
- run: rustup target add ${{ matrix.target }}
- if: matrix.target == 'aarch64-unknown-linux-gnu'
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- uses: stellar/binaries@v18
with:
name: cargo-hack
version: 0.5.28
# Vendor all the dependencies into the vendor/ folder.
- name: Vendor Dependencies
run: |
cargo vendor --versioned-dirs
# Package the crates that will be published. Verification is disabled
# because we aren't ready to verify yet. Add each crate that was packaged to
# the vendor/ directory.
- name: Package Crates soroban-spec-tools soroban-spec-json soroban-spec-typescript soroban-test soroban-cli
run: |
for name in soroban-spec-tools soroban-spec-json soroban-spec-typescript soroban-test soroban-cli
do
version=$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="'$name'") | .version' | head -n 1)
cargo package \
--no-verify \
--package $name \
--config "source.crates-io.replace-with = 'vendored-sources'" \
--config "source.vendored-sources.directory = 'vendor'"
path="target/package/${name}-${version}.crate"
tar xvfz "$path" -C vendor/
# Crates in the vendor directory require a checksum file, but it doesn't
# matter if it is empty.
echo '{"files":{}}' > vendor/$name-$version/.cargo-checksum.json
done
# Rerun the package command but with verification enabled this time. Tell
# cargo to use the local vendor/ directory as the source for all packages. Run
# the package command on the full feature powerset so that all features of
# each crate are verified to compile.
- name: Verify Crates with ${{ matrix.cargo-hack-feature-options }}
run: >
cargo-hack hack
${{ matrix.cargo-hack-feature-options }}
--ignore-private
--config "source.crates-io.replace-with = 'vendored-sources'"
--config "source.vendored-sources.directory = 'vendor'"
package
--target ${{ matrix.target }}
uses: stellar/actions/.github/workflows/rust-publish-dry-run-v2.yml@main
with:
crates: soroban-spec-tools soroban-spec-json soroban-spec-typescript soroban-test soroban-cli
runs-on: ${{ matrix.os }}
target: ${{ matrix.target }}
cargo-hack-feature-options: ${{ matrix.cargo-hack-feature-options }}
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ path = "cmd/soroban-cli"

[workspace.dependencies.soroban-rpc]
version = "20.3.0"
git = "https://github.com/stellar/soroban-rpc"
rev = "b4c2dec162b14b560ed86b9d76a936b7bafb0922"
path = "cmd/soroban-rpc"

[workspace.dependencies.stellar-xdr]
version = "=20.1.0"
Expand Down
51 changes: 51 additions & 0 deletions cmd/crates/soroban-rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[package]
name = "soroban-rpc"
description = "Soroban RPC client for rust"
homepage = "https://github.com/stellar/soroban-tools"
repository = "https://github.com/stellar/soroban-tools"
authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
version.workspace = true
edition = "2021"
rust-version.workspace = true
autobins = false


[lib]
crate-type = ["rlib"]


[dependencies]
soroban-sdk = { workspace = true }
soroban-spec-tools = { workspace = true }
soroban-env-host = { workspace = true }
stellar-strkey = "0.0.7"
stellar-xdr = { workspace = true, features = ["curr", "std", "serde"] }
soroban-spec = { workspace = true }

termcolor = "1.1.3"
termcolor_output = "1.0.1"
clap = { version = "4.1.8", features = ["derive", "env", "deprecated", "string"] }
serde_json = "1.0.82"
serde-aux = "4.1.2"
itertools = "0.10.0"
ethnum = "1.3.2"
hex = "0.4.3"
wasmparser = "0.90.0"
base64 = "0.21.2"
thiserror = "1.0.46"
serde = "1.0.82"
tokio = "1.28.1"
sha2 = "0.10.7"
ed25519-dalek = "2.0.0"
tracing = "0.1.40"

# networking
jsonrpsee-http-client = "0.20.1"
jsonrpsee-core = "0.20.1"
http = "1.0.0"


[dev-dependencies]
which = "4.4.0"
3 changes: 3 additions & 0 deletions cmd/crates/soroban-rpc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# soroban-rpc

Tools and utilities for soroban rpc.
39 changes: 39 additions & 0 deletions cmd/crates/soroban-rpc/src/fixtures/event_response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"events": [{
"eventType": "system",
"ledger": "43601283",
"ledgerClosedAt": "2022-11-16T16:10:41Z",
"contractId": "CDR6QKTWZQYW6YUJ7UP7XXZRLWQPFRV6SWBLQS4ZQOSAF4BOUD77OO5Z",
"id": "0164090849041387521-0000000003",
"pagingToken": "164090849041387521-3",
"topic": [
"AAAABQAAAAh0cmFuc2Zlcg==",
"AAAAAQB6Mcc="
],
"value": "AAAABQAAAApHaWJNb255UGxzAAA="
}, {
"eventType": "contract",
"ledger": "43601284",
"ledgerClosedAt": "2022-11-16T16:10:41Z",
"contractId": "CDR6QKTWZQYW6YUJ7UP7XXZRLWQPFRV6SWBLQS4ZQOSAF4BOUD77OO5Z",
"id": "0164090849041387521-0000000003",
"pagingToken": "164090849041387521-3",
"topic": [
"AAAABQAAAAh0cmFuc2Zlcg==",
"AAAAAQB6Mcc="
],
"value": "AAAABQAAAApHaWJNb255UGxzAAA="
}, {
"eventType": "system",
"ledger": "43601285",
"ledgerClosedAt": "2022-11-16T16:10:41Z",
"contractId": "CCR6QKTWZQYW6YUJ7UP7XXZRLWQPFRV6SWBLQS4ZQOSAF4BOUD77OTE2",
"id": "0164090849041387521-0000000003",
"pagingToken": "164090849041387521-3",
"topic": [
"AAAABQAAAAh0cmFuc2Zlcg==",
"AAAAAQB6Mcc="
],
"value": "AAAABQAAAApHaWJNb255UGxzAAA="
}]
}
Loading

0 comments on commit 07f62e6

Please sign in to comment.