Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/add_stellar_ledger
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Nov 19, 2024
2 parents 37f302d + 11cde0c commit 09eff2f
Show file tree
Hide file tree
Showing 24 changed files with 81 additions and 88 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,18 @@ jobs:
$Env:STELLAR_CLI_VERSION = "${{ env.VERSION }}"
ISCC.exe installer.iss
- name: Build provenance for attestation (release only)
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v1
with:
subject-path: ${{ env.STELLAR_CLI_INSTALLER }}

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.STELLAR_CLI_INSTALLER }}
path: Output/stellar-installer.exe

- name: Build provenance for attestation (release only)
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v1
with:
subject-path: ${{ env.STELLAR_CLI_INSTALLER }}

- name: Upload to Release (release only)
if: github.event_name == 'release'
uses: actions/github-script@v7
Expand Down
32 changes: 16 additions & 16 deletions Cargo.lock

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

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ exclude = [
]

[workspace.package]
version = "22.0.0-rc.1"
version = "22.0.0"
rust-version = "1.81.0"

# Dependencies located in this repo:
[workspace.dependencies.soroban-cli]
version = "=22.0.0-rc.1"
version = "=22.0.0"
path = "cmd/soroban-cli"

[workspace.dependencies.soroban-spec-json]
version = "=22.0.0-rc.1"
version = "=22.0.0"
path = "./cmd/crates/soroban-spec-json"

[workspace.dependencies.soroban-spec-typescript]
version = "22.0.0-rc.1"
version = "22.0.0"
path = "./cmd/crates/soroban-spec-typescript"

[workspace.dependencies.soroban-spec-tools]
version = "22.0.0-rc.1"
version = "22.0.0"
path = "./cmd/crates/soroban-spec-tools"

# Dependencies from the rs-stellar-xdr repo:
Expand Down Expand Up @@ -66,7 +66,7 @@ package = "stellar-rpc-client"
version = "=22.0.0-rc.1"

[workspace.dependencies.stellar-ledger]
version = "=22.0.0-rc.1"
version = "=22.0.0"
path = "cmd/crates/stellar-ledger"

# Dependencies from elsewhere shared by crates:
Expand Down
2 changes: 1 addition & 1 deletion cmd/crates/soroban-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository = "https://github.com/stellar/soroban-test"
authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
version = "22.0.0-rc.1"
version.workspace = true
edition = "2021"
rust-version.workspace = true
autobins = false
Expand Down
11 changes: 6 additions & 5 deletions cmd/crates/soroban-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ use soroban_cli::{
};

mod wasm;
use stellar_ledger::emulator_test_support::{
enable_hash_signing, get_container, speculos::Speculos, wait_for_emulator_start_text,
};
use testcontainers::ContainerAsync;

pub use wasm::Wasm;

pub const TEST_ACCOUNT: &str = "test";
Expand Down Expand Up @@ -313,7 +310,11 @@ impl TestEnv {
soroban_rpc::Client::new(&self.rpc_url).unwrap()
}

pub async fn speculos_container(ledger_device_model: &str) -> ContainerAsync<Speculos> {
#[cfg(feature = "emulator-tests")]
pub async fn speculos_container(ledger_device_model: &str) -> testcontainers::ContainerAsync<stellar_ledger::emulator_test_support::speculos::Speculos> {
use stellar_ledger::emulator_test_support::{
enable_hash_signing, get_container, wait_for_emulator_start_text,
};
let container = get_container(ledger_device_model).await;
let ui_host_port: u16 = container.get_host_port_ipv4(5000).await.unwrap();
wait_for_emulator_start_text(ui_host_port).await;
Expand Down
2 changes: 1 addition & 1 deletion cmd/crates/soroban-test/tests/fixtures/bye/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stellar-bye"
version = "22.0.0-rc.1"
version = "0.0.0"
edition = "2021"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion cmd/crates/soroban-test/tests/fixtures/hello/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "soroban-hello"
version = "22.0.0-rc.1"
version = "0.0.0"
edition = "2021"
publish = false

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[package]
name = "test_constructor"
version = "22.0.0-rc.1"
version = "0.0.0"
authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version.workspace = true

[lib]
crate-type = ["cdylib"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[package]
name = "test_custom_account"
version = "22.0.0-rc.1"
version = "0.0.0"
authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version.workspace = true

[lib]
crate-type = ["cdylib"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[package]
name = "test_custom_types"
version = "22.0.0-rc.1"
version = "0.0.0"
authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version.workspace = true

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[package]
name = "test_hello_world"
version = "22.0.0-rc.1"
version = "0.0.0"
authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version.workspace = true

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[package]
name = "test_swap"
version.workspace = true
version = "0.0.0"
authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version.workspace = true

[lib]
crate-type = ["cdylib"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[package]
name = "test_token"
version.workspace = true
version = "0.0.0"
description = "Soroban standard token contract"
authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version.workspace = true

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository = "https://github.com/stellar/stellar-cli"
authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
version = "22.0.0-rc.1"
version.workspace = true
edition = "2021"
rust-version.workspace = true
autobins = false
Expand Down
4 changes: 2 additions & 2 deletions cmd/soroban-cli/src/commands/contract/deploy/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ impl NetworkRunnable for Cmd {
source_account,
)?;
if self.fee.build_only {
return Ok(TxnResult::Txn(tx));
return Ok(TxnResult::Txn(Box::new(tx)));
}
let txn = simulate_and_assemble_transaction(&client, &tx).await?;
let txn = self.fee.apply_to_assembled_txn(txn).transaction().clone();
if self.fee.sim_only {
return Ok(TxnResult::Txn(txn));
return Ok(TxnResult::Txn(Box::new(txn)));
}
let get_txn_resp = client
.send_transaction_polling(&self.config.sign_with_local_key(txn).await?)
Expand Down
8 changes: 4 additions & 4 deletions cmd/soroban-cli/src/commands/contract/deploy/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,14 @@ impl NetworkRunnable for Cmd {
// Get the account sequence number
let account_details = client.get_account(&source_account.to_string()).await?;
let sequence: i64 = account_details.seq_num.into();
let txn = build_create_contract_tx(
let txn = Box::new(build_create_contract_tx(
wasm_hash,
sequence + 1,
self.fee.fee,
source_account,
contract_id_preimage,
constructor_params.as_ref(),
)?;
)?);

if self.fee.build_only {
print.checkln("Transaction built!");
Expand All @@ -281,7 +281,7 @@ impl NetworkRunnable for Cmd {
print.infoln("Simulating deploy transaction…");

let txn = simulate_and_assemble_transaction(&client, &txn).await?;
let txn = self.fee.apply_to_assembled_txn(txn).transaction().clone();
let txn = Box::new(self.fee.apply_to_assembled_txn(txn).transaction().clone());

if self.fee.sim_only {
print.checkln("Done!");
Expand All @@ -292,7 +292,7 @@ impl NetworkRunnable for Cmd {
print.log_transaction(&txn, &network, true)?;

let get_txn_resp = client
.send_transaction_polling(&config.sign_with_local_key(txn).await?)
.send_transaction_polling(&config.sign_with_local_key(*txn).await?)
.await?
.try_into()?;

Expand Down
Loading

0 comments on commit 09eff2f

Please sign in to comment.