Skip to content

Commit

Permalink
Merge pull request #148 from kommitters/v0.19
Browse files Browse the repository at this point in the history
Release v0.19.0
  • Loading branch information
miguelnietoa authored Jan 31, 2024
2 parents 5181043 + 061dc3c commit 07cef4e
Show file tree
Hide file tree
Showing 15 changed files with 135 additions and 65 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.19.0 (31.01.2024)

- Support `diagnostic_events_xdr` field in `SendTransactionResponse` struct. See [stellar_sdk#350](https://github.com/kommitters/stellar_sdk/issues/350).

## 0.18.0 (20.12.2023)

- [Stellar Protocol 20 support](https://github.com/kommitters/soroban.ex/issues/140).
Expand Down
41 changes: 27 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
```elixir
def deps do
[
{:soroban, "~> 0.18.0"}
{:soroban, "~> 0.19.0"}
]
end
```
Expand Down Expand Up @@ -270,7 +270,8 @@ Soroban.RPC.send_transaction(base64_envelope)
hash: "a4721e2a61e9a6b3f54030396e41c3e352101e6cd649b4453e89fb3e827744f4",
latest_ledger: 45075181,
latest_ledger_close_time: "1683150612",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}
```

Expand Down Expand Up @@ -517,7 +518,8 @@ Contract.invoke(contract_address, source_secret_key, function_name, function_arg
hash: "f62cb9e20c6d297316f49dca2041be4bf1af6b069c784764e51ac008b313d716",
latest_ledger: 45075181,
latest_ledger_close_time: "1683643419",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}
```

Expand Down Expand Up @@ -549,7 +551,8 @@ Contract.invoke(contract_address, source_secret_key, function_name, function_arg
hash: "e888193b4fed9b3ca6ad2beca3c1ed5bef3e0099e558756de85d03511cbaa00b",
latest_ledger: 45075181,
latest_ledger_close_time: "1683643728",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}
```

Expand Down Expand Up @@ -597,7 +600,8 @@ Contract.invoke(contract_address, source_secret_key, function_name, function_arg
hash: "da263f59a8f8b29f415e7e26758cad6e8d88caec875112641b88757ce8e01873",
latest_ledger: 45075181,
latest_ledger_close_time: "1683644240",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}
```

Expand Down Expand Up @@ -630,7 +634,8 @@ addl_resources = [cpu_instructions: 100]
hash: "65d...",
latest_ledger: 45075181,
latest_ledger_close_time: "16",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}

```
Expand Down Expand Up @@ -661,7 +666,8 @@ addl_resources = [cpu_instructions: 100]
hash: "f95...",
latest_ledger: 45075181,
latest_ledger_close_time: "16",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}

```
Expand Down Expand Up @@ -694,7 +700,8 @@ addl_resources = [cpu_instructions: 100]
hash: "b667...",
latest_ledger: 45075181,
latest_ledger_close_time: "16",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}

```
Expand Down Expand Up @@ -731,7 +738,8 @@ addl_resources = [cpu_instructions: 100]
hash: "2f6f...",
latest_ledger: 45075181,
latest_ledger_close_time: "1691441432",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}

```
Expand Down Expand Up @@ -766,7 +774,8 @@ addl_resources = [cpu_instructions: 100]
hash: "2f6f...",
latest_ledger: 45075181,
latest_ledger_close_time: "1691441432",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}

```
Expand Down Expand Up @@ -805,7 +814,8 @@ addl_resources = [cpu_instructions: 100]
hash: "2f6f...",
latest_ledger: 45075181,
latest_ledger_close_time: "1691441432",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}

```
Expand Down Expand Up @@ -840,7 +850,8 @@ addl_resources = [cpu_instructions: 100]
hash: "eedb...",
latest_ledger: 45075181,
latest_ledger_close_time: "1691523150",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}

```
Expand Down Expand Up @@ -874,7 +885,8 @@ addl_resources = [cpu_instructions: 100]
hash: "eedb...",
latest_ledger: 45075181,
latest_ledger_close_time: "1691523689",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}

```
Expand Down Expand Up @@ -913,7 +925,8 @@ addl_resources = [cpu_instructions: 100]
hash: "0521...",
latest_ledger: 45075181,
latest_ledger_close_time: "1691524532",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}}

```
Expand Down
15 changes: 12 additions & 3 deletions lib/rpc/responses/send_transaction_response.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,28 @@ defmodule Soroban.RPC.SendTransactionResponse do
@behaviour Soroban.RPC.Response.Spec

@type status :: String.t()
@type hash :: binary()
@type hash :: String.t()
@type latest_ledger :: non_neg_integer()
@type latest_ledger_close_time :: String.t()
@type error_result_xdr :: String.t() | nil
@type diagnostic_events_xdr :: list(String.t()) | nil
@type t :: %__MODULE__{
status: status(),
hash: hash(),
latest_ledger: latest_ledger(),
latest_ledger_close_time: latest_ledger_close_time(),
error_result_xdr: error_result_xdr()
error_result_xdr: error_result_xdr(),
diagnostic_events_xdr: diagnostic_events_xdr()
}

defstruct [:status, :hash, :latest_ledger, :latest_ledger_close_time, :error_result_xdr]
defstruct [
:status,
:hash,
:latest_ledger,
:latest_ledger_close_time,
:error_result_xdr,
:diagnostic_events_xdr
]

@impl true
def new(attrs), do: struct(%__MODULE__{}, attrs)
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Soroban.MixProject do
use Mix.Project

@version "0.18.0"
@version "0.19.0"
@github_url "https://github.com/kommitters/soroban.ex"

def project do
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"nimble_parsec": {:hex, :nimble_parsec, "1.3.1", "2c54013ecf170e249e9291ed0a62e5832f70a476c61da16f6aac6dca0189f2af", [:mix], [], "hexpm", "2682e3c0b2eb58d90c6375fc0cc30bc7be06f365bf72608804fb9cffa5e1b167"},
"parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"},
"stellar_base": {:git, "https://github.com/kommitters/stellar_base.git", "849841e65575201643d587014752326374494d76", [branch: "v0.15"]},
"stellar_sdk": {:git, "https://github.com/kommitters/stellar_sdk.git", "ba664bc526d3112ef7354685a9e6a9e6a0a0fe87", [branch: "v0.20"]},
"stellar_base": {:hex, :stellar_base, "0.15.0", "893b7ee194aa0c732fbc16be431418d8269dc0221b70ecdb6320705540ba395f", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:crc, "~> 0.10.0", [hex: :crc, repo: "hexpm", optional: false]}, {:elixir_xdr, "~> 0.3", [hex: :elixir_xdr, repo: "hexpm", optional: false]}], "hexpm", "411aba27c89c03ac237457c171740428aef6f958aeebb4811723436e9105dc60"},
"stellar_sdk": {:hex, :stellar_sdk, "0.20.0", "e4ff409c196414d2854702b78f656eca039a7ef98a440c60f6106e58040d9f0f", [:mix], [{:ed25519, "~> 1.3", [hex: :ed25519, repo: "hexpm", optional: false]}, {:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:stellar_base, "~> 0.15", [hex: :stellar_base, repo: "hexpm", optional: false]}], "hexpm", "66860556aa621d112676e0204a52e04b0a7eb1c6416065da24b95fe05aab2991"},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
}
6 changes: 4 additions & 2 deletions test/contract/deploy_asset_contract_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ defmodule Soroban.Contract.DeployAssetContractTest do
hash: "308f5f3c7b2c0a690e7e19b6d14c22af87763f5ae483d6d1af43b9639732d206",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683814245",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} = DeployAssetContract.deploy(asset_code, source_public, source_secret)
end

Expand All @@ -122,7 +123,8 @@ defmodule Soroban.Contract.DeployAssetContractTest do
hash: "308f5f3c7b2c0a690e7e19b6d14c22af87763f5ae483d6d1af43b9639732d206",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683814245",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} = DeployAssetContract.deploy(asset_code, asset_issuer, source_secret)
end

Expand Down
3 changes: 2 additions & 1 deletion test/contract/deploy_contract_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ defmodule Soroban.Contract.DeployContractTest do
hash: "308f5f3c7b2c0a690e7e19b6d14c22af87763f5ae483d6d1af43b9639732d206",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683814245",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} = DeployContract.deploy(wasm_id, source_secret)
end

Expand Down
9 changes: 6 additions & 3 deletions test/contract/extend_footprint_ttl_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ defmodule Soroban.Contract.ExtendFootprintTTLTest do
hash: "a4721e2a61e9a6b3f54030396e41c3e352101e6cd649b4453e89fb3e827744f4",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683150612",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} =
ExtendFootprintTTL.extend_contract(
contract_address,
Expand Down Expand Up @@ -192,7 +193,8 @@ defmodule Soroban.Contract.ExtendFootprintTTLTest do
hash: "a4721e2a61e9a6b3f54030396e41c3e352101e6cd649b4453e89fb3e827744f4",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683150612",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} =
ExtendFootprintTTL.extend_contract_wasm(
wasm_id,
Expand All @@ -213,7 +215,8 @@ defmodule Soroban.Contract.ExtendFootprintTTLTest do
hash: "a4721e2a61e9a6b3f54030396e41c3e352101e6cd649b4453e89fb3e827744f4",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683150612",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} =
ExtendFootprintTTL.extend_contract_keys(
contract_address,
Expand Down
9 changes: 6 additions & 3 deletions test/contract/invoke_contract_function_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ defmodule Soroban.Contract.InvokeContractFunctionTest do
hash: "a4721e2a61e9a6b3f54030396e41c3e352101e6cd649b4453e89fb3e827744f4",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683150612",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} =
InvokeContractFunction.invoke(
contract_address,
Expand All @@ -349,7 +350,8 @@ defmodule Soroban.Contract.InvokeContractFunctionTest do
hash: "a4721e2a61e9a6b3f54030396e41c3e352101e6cd649b4453e89fb3e827744f4",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683150612",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} =
InvokeContractFunction.invoke(
contract_address,
Expand All @@ -373,7 +375,8 @@ defmodule Soroban.Contract.InvokeContractFunctionTest do
hash: "a4721e2a61e9a6b3f54030396e41c3e352101e6cd649b4453e89fb3e827744f4",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683150612",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} =
InvokeContractFunction.invoke(
contract_address,
Expand Down
9 changes: 6 additions & 3 deletions test/contract/restore_footprint_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ defmodule Soroban.Contract.RestoreFootprintTest do
hash: "a4721e2a61e9a6b3f54030396e41c3e352101e6cd649b4453e89fb3e827744f4",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683150612",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} =
RestoreFootprint.restore_contract(
contract_address,
Expand All @@ -175,7 +176,8 @@ defmodule Soroban.Contract.RestoreFootprintTest do
hash: "a4721e2a61e9a6b3f54030396e41c3e352101e6cd649b4453e89fb3e827744f4",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683150612",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} =
RestoreFootprint.restore_contract_wasm(
wasm_id,
Expand All @@ -193,7 +195,8 @@ defmodule Soroban.Contract.RestoreFootprintTest do
hash: "a4721e2a61e9a6b3f54030396e41c3e352101e6cd649b4453e89fb3e827744f4",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683150612",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} =
RestoreFootprint.restore_contract_keys(
contract_address,
Expand Down
3 changes: 2 additions & 1 deletion test/contract/upload_contract_code_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ defmodule Soroban.Contract.UploadContractCodeTest do
hash: "308f5f3c7b2c0a690e7e19b6d14c22af87763f5ae483d6d1af43b9639732d206",
latest_ledger: 45_075_181,
latest_ledger_close_time: "1683814245",
error_result_xdr: nil
error_result_xdr: nil,
diagnostic_events_xdr: nil
}} = UploadContractCode.upload(wasm, source_secret)
end

Expand Down
Loading

0 comments on commit 07cef4e

Please sign in to comment.