Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating xdr for soroban-rpc #279

Merged
merged 12 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/soroban-rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
env:
SOROBAN_RPC_INTEGRATION_TESTS_ENABLED: true
SOROBAN_RPC_INTEGRATION_TESTS_CAPTIVE_CORE_BIN: /usr/bin/stellar-core
PROTOCOL_19_CORE_DEBIAN_PKG_VERSION: 19.5.1-1111.eba1d3de9.focal~soroban
PROTOCOL_19_CORE_DEBIAN_PKG_VERSION: 19.5.1-1131.f55f88376.focal~soroban
steps:
- uses: actions/checkout@v3
with:
Expand Down
114 changes: 63 additions & 51 deletions Cargo.lock

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

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,24 @@ members = [
default-members = ["cmd/soroban-cli"]

[workspace.dependencies.soroban-env-host]
version = "0.0.9"
version = "0.0.10"
git = "https://github.com/stellar/rs-soroban-env"
rev = "eda2ab7"
rev = "c148051"

[workspace.dependencies.soroban-spec]
version = "0.2.1"
version = "0.3.0"
git = "https://github.com/stellar/rs-soroban-sdk"
rev = "27a24b8"
rev = "501379d"

[workspace.dependencies.soroban-token-spec]
version = "0.2.1"
version = "0.3.0"
git = "https://github.com/stellar/rs-soroban-sdk"
rev = "27a24b8"
rev = "501379d"

[workspace.dependencies.soroban-sdk]
version = "0.2.1"
version = "0.3.0"
git = "https://github.com/stellar/rs-soroban-sdk"
rev = "27a24b8"
rev = "501379d"

[workspace.dependencies.stellar-strkey]
version = "0.0.6"
Expand Down
8 changes: 3 additions & 5 deletions cmd/soroban-cli/src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ impl Cmd {
sequence + 1,
fee,
self.network_passphrase.as_ref().unwrap(),
salt,
&key,
)?;
client.send_transaction(&tx).await?;
Expand All @@ -210,7 +209,6 @@ fn build_install_contract_code_tx(
sequence: i64,
fee: u32,
network_passphrase: &str,
salt: [u8; 32],
key: &ed25519_dalek::Keypair,
) -> Result<(TransactionEnvelope, Hash), Error> {
let hash = utils::contract_hash(&contract)?;
Expand All @@ -223,7 +221,8 @@ fn build_install_contract_code_tx(
}),
footprint: LedgerFootprint {
read_only: VecM::default(),
read_write: vec![ContractCode(LedgerKeyContractCode { hash })].try_into()?,
read_write: vec![ContractCode(LedgerKeyContractCode { hash: hash.clone() })]
.try_into()?,
},
}),
};
Expand Down Expand Up @@ -268,7 +267,7 @@ fn build_create_contract_tx(
body: OperationBody::InvokeHostFunction(InvokeHostFunctionOp {
function: HostFunction::CreateContract(CreateContractArgs {
contract_id: ContractId::SourceAccount(Uint256(salt)),
source: ScContractCode::WasmRef(hash),
source: ScContractCode::WasmRef(hash.clone()),
}),
footprint: LedgerFootprint {
read_only: vec![ContractCode(LedgerKeyContractCode { hash })].try_into()?,
Expand Down Expand Up @@ -306,7 +305,6 @@ mod tests {
300,
1,
"Public Global Stellar Network ; September 2015",
[0u8; 32],
&utils::parse_secret_key("SBFGFF27Y64ZUGFAIG5AMJGQODZZKV2YQKAVUUN4HNE24XZXD2OEUVUP")
.unwrap(),
);
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/invoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ async fn get_remote_contract_spec_entries(
// Get the contract from the network
let contract_ref = client
.get_ledger_entry(LedgerKey::ContractData(LedgerKeyContractData {
contract_id: xdr::Hash(contract_id.clone()),
contract_id: xdr::Hash(*contract_id),
key: ScVal::Static(ScStatic::LedgerKeyContractCode),
}))
.await?;
Expand Down
Loading