Skip to content

Commit

Permalink
Merge branch 'main' into feat/start-network-with-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Mar 4, 2024
2 parents ba67e52 + 0ccbab3 commit 270bce5
Show file tree
Hide file tree
Showing 40 changed files with 981 additions and 783 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/rpc-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

name: RPC Tests
on:
push:
branches: [main, release/**]
pull_request:

jobs:
test:
name: test RPC
runs-on: ubuntu-22.04
services:
rpc:
image: stellar/quickstart:testing@sha256:7f074dddaf081b21d273f7346325cc1017c38bbee7b839f8b633b280a663232d
ports:
- 8000:8000
env:
ENABLE_LOGS: true
NETWORK: local
ENABLE_SOROBAN_RPC: true
options: >-
--health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'"
--health-interval 10s
--health-timeout 5s
--health-retries 50
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup update
- run: cargo build
- run: rustup target add wasm32-unknown-unknown
- run: make build-test-wasms
- run: SOROBAN_PORT=8000 cargo test --features it --package soroban-test --test it -- integration

135 changes: 53 additions & 82 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ sha2 = "0.10.7"
ethnum = "1.3.2"
hex = "0.4.3"
itertools = "0.10.0"
async-trait = "0.1.76"

serde-aux = "4.1.2"
serde_json = "1.0.82"
Expand Down
8 changes: 3 additions & 5 deletions cmd/crates/soroban-spec-tools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1429,8 +1429,7 @@ mod tests {
0xc7, 0x79, 0xe4, 0xfe, 0x66, 0xe5, 0x6a, 0x24, 0x70, 0xdc, 0x98, 0xc0,
0xec, 0x9c, 0x07, 0x3d, 0x05, 0xc7, 0xb1, 0x03,
]
.try_into()
.unwrap()
.into()
))
),
Err(e) => panic!("Unexpected error: {e}"),
Expand All @@ -1441,7 +1440,7 @@ mod tests {
Ok(addr) => assert_eq!(
addr,
ScVal::Address(ScAddress::Account(AccountId(
PublicKey::PublicKeyTypeEd25519([0; 32].try_into().unwrap())
PublicKey::PublicKeyTypeEd25519([0; 32].into())
)))
),
Err(e) => panic!("Unexpected error: {e}"),
Expand All @@ -1458,8 +1457,7 @@ mod tests {
0xc7, 0x79, 0xe4, 0xfe, 0x66, 0xe5, 0x6a, 0x24, 0x70, 0xdc, 0x98, 0xc0,
0xec, 0x9c, 0x07, 0x3d, 0x05, 0xc7, 0xb1, 0x03,
]
.try_into()
.unwrap()
.into()
)
)))
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"version": "0.0.0",
"name": "INSERT_CONTRACT_NAME_HERE",
"dependencies": {
"@stellar/freighter-api": "1.7.1",
"@stellar/freighter-api": "2.0.0",
"buffer": "6.0.3",
"@stellar/stellar-sdk": "11.2.0"
"@stellar/stellar-sdk": "11.2.2"
},
"scripts": {
"build": "node ./scripts/build.mjs"
Expand Down
6 changes: 5 additions & 1 deletion cmd/crates/soroban-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,22 @@ stellar-strkey = { workspace = true }
soroban-sdk = { workspace = true }
sep5 = { workspace = true }
soroban-cli = { workspace = true }
soroban-rpc = { workspace = true }

thiserror = "1.0.31"
sha2 = "0.10.6"
assert_cmd = "2.0.4"
assert_fs = "1.0.7"
predicates = "2.1.5"
fs_extra = "1.3.0"
toml = "0.8.10"


[dev-dependencies]
serde_json = "1.0.93"
which = { workspace = true }
tokio = "1.28.1"
walkdir = "2.4.0"

[features]
integration = []
it = []
Loading

0 comments on commit 270bce5

Please sign in to comment.