Skip to content

Commit

Permalink
prepare for release 1.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-rogobete committed Sep 5, 2024
1 parent 9184d7b commit 6ac9cb0
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.8.7] - 05.Sep.2024.
- Add Soroban Contract Parser
- contract spec xdr fixes

## [1.8.6] - 19.Aug.2024.
- SEP-06: allow extra fields in deposit and withdraw request
- SEP-06: add userActionRequired by field in transaction response
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Soneso open source Stellar SDK for Flutter is build with Dart and provides A
1. Add the dependency to your pubspec.yaml file:
```
dependencies:
stellar_flutter_sdk: ^1.8.6
stellar_flutter_sdk: ^1.8.7
```
2. Install it (command line or IDE):
```
Expand Down
2 changes: 1 addition & 1 deletion lib/src/stellar_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import 'requests/liquidity_pools_request_builder.dart';

/// Main class of the flutter stellar sdk.
class StellarSDK {
static const versionNumber = "1.8.6";
static const versionNumber = "1.8.7";

static final StellarSDK PUBLIC = StellarSDK("https://horizon.stellar.org");
static final StellarSDK TESTNET =
Expand Down
3 changes: 2 additions & 1 deletion lib/stellar_flutter_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,5 @@ export 'src/sep/0008/regulated_assets.dart';

/// Soroban
export 'src/soroban/soroban_server.dart';
export 'src/soroban/soroban_auth.dart';
export 'src/soroban/soroban_auth.dart';
export 'src/soroban/soroban_contract_parser.dart';
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: stellar_flutter_sdk
description: A stellar blockchain sdk that query's horizon, build, signs and submits transactions to the stellar network.
version: 1.8.6
version: 1.8.7
homepage: https://github.com/Soneso/stellar_flutter_sdk

environment:
Expand Down
32 changes: 32 additions & 0 deletions soroban.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,3 +418,35 @@ This will log the responses received from the Soroban-RPC server.

If you find any issues please report them [here](https://github.com/Soneso/stellar_flutter_sdk/issues). It will help us to improve the SDK.

### Soroban contract parser

The soroban contract parser allows you to access the contract info stored in the contract bytecode.
You can access the environment metadata, contract spec and contract meta.

The environment metadata holds the interface version that should match the version of the soroban environment host functions supported.

The contract spec contains a `XdrSCSpecEntry` for every function, struct, and union exported by the contract.

In the contract meta, contracts may store any metadata in the entries that can be used by applications and tooling off-network.

You can access the parser directly if you have the contract bytecode:

```dart
var byteCode = await Util.readFile("path to .wasm file");
var contractInfo = SorobanContractParser.parseContractByteCode(byteCode);
```

Or you can use `SorobanServer` methods to load the contract code form the network and parse it.

By contract id:
```dart
var contractInfo = await sorobanServer.loadContractInfoForContractId(contractId);
```

By wasm id:
```dart
var contractInfo = await sorobanServer.loadContractInfoForWasmId(wasmId);
```

The parser returns a `SorobanContractInfo` object containing the parsed data.
In [soroban_test_parser.dart](https://github.com/Soneso/stellar_flutter_sdk/blob/master/test/soroban_test_parser.dart#L192) you can find a detailed example of how you can access the parsed data.

0 comments on commit 6ac9cb0

Please sign in to comment.