Skip to content

Commit

Permalink
sdk: add contracts built from stellar expert release container
Browse files Browse the repository at this point in the history
  • Loading branch information
mootz12 committed Apr 30, 2024
1 parent 27ee315 commit dc45bd6
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion blend-contract-sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "blend-contract-sdk"
version = "0.2.0"
version = "0.3.0"
description = "Traits, clients, types, and WASMs for the Blend Protocol for use in Soroban contract development."
homepage = "https://github.com/blend-capital/blend-contracts"
repository = "https://github.com/blend-capital/blend-contracts"
Expand Down
21 changes: 6 additions & 15 deletions blend-contract-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,12 @@ pool_client.mock_all_auths().update_status(); // update status based on backstop

## WASM Verification

The WASM files included will align with the GitHub release the SDK was published with (the version numbers will match). The WASM files were generated with the Makefile.
The WASM files included will align with the GitHub release the SDK was published with (the version numbers will match).

Since WASM builds can vary based on factors like OS, here are the details of the machine that built the WASMs included in this package:

* Ubuntu 22.04.4 LTS
* stable-x86_64-unknown-linux-gnu (default)
* rustc 1.77.1 (7cf61ebde 2024-03-27)
* soroban 20.3.1 (ae5446f63ca8a275e61912019199254d598f3bd5)
* soroban-env 20.2.1 (18a10592853d9edf4e341b565b0b1638f95f0393)
* soroban-env interface version 85899345920
* stellar-xdr 20.1.0 (8b9d623ef40423a8462442b86997155f2c04d3a1)
* xdr curr (b96148cd4acc372cc9af17b909ffe4b12c43ecb6)
The WASMs are generated with the [Stellar Expert WASM Release Action](https://github.com/stellar-expert/soroban-build-workflow)

The SHA256 Checksums:
* backstop - `8dfbc6ba300cde6ebe747cf985cf9221bf3594981595b9c26bbd108ff19a5598`
* emitter - `b1555702a4cca7c44e02beb5aa82b0271c0367471c68f2ec9246c31b202e38ee`
* pool_factory - `8bc7894d8a4e46b085d0579e233e3c436bb34e18f9a2a83d4bde8526cde18cb6`
* pool - `76ebcea354d5959c5b0d38818ddf1524c5af16970231b532f5caa63121930861`
* backstop - `8ed2a58d4b71e3d8f15b74bae8287a825f7bb78ba72663a920141d9d1c1d8bb2`
* emitter - `ce85c955b135e08e055b157fc96c371c9107b4f3a16d920668f5529d7c616b9c`
* pool_factory - `0287f4ad7350935b83d94e046c0bcabc960b233dbce1531008c021b71d406a1d`
* pool - `baf978f10efdbcd85747868bef8832845ea6809f7643b67a4ac0cd669327fc2c`
23 changes: 5 additions & 18 deletions blend-contract-sdk/src/testutils.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
use soroban_sdk::{testutils::Address as _, token::StellarAssetClient, vec, Address, Env, Map};
use soroban_sdk::{token::StellarAssetClient, vec, Address, Env, Map};

use crate::{backstop, emitter, pool, pool_factory};

pub mod comet {
soroban_sdk::contractimport!(file = "./wasm/comet.wasm");
}

pub mod comet_factory {
soroban_sdk::contractimport!(file = "./wasm/comet_factory.wasm");
}

/// Create a "good enough" ReserveConfig for most testing usecases
///
/// Can be used when creating reserves for a pool.
Expand Down Expand Up @@ -70,22 +66,13 @@ impl<'a> BlendFixture<'a> {
.mint(deployer, &(25_0000000 * 2001));

let comet_client: comet::Client<'a> = comet::Client::new(env, &comet);
comet_client
.mock_all_auths()
.init(&Address::generate(env), deployer);

comet_client.mock_all_auths().bundle_bind(
comet_client.mock_all_auths().init(
&deployer,
&vec![env, blnd.clone(), usdc.clone()],
&vec![env, 0_8000000, 0_2000000],
&vec![env, 1_000_0000000, 25_0000000],
&vec![env, 8_0000000, 2_0000000],
&0_0030000,
);
comet_client
.mock_all_auths()
.set_swap_fee(&30000_i128, deployer);
comet_client
.mock_all_auths()
.set_public_swap(deployer, &true);
comet_client.mock_all_auths().finalize();

comet_client.mock_all_auths().join_pool(
&199_900_0000000, // finalize mints 100
Expand Down
Binary file modified blend-contract-sdk/wasm/backstop.wasm
100644 → 100755
Binary file not shown.
Binary file modified blend-contract-sdk/wasm/comet.wasm
100644 → 100755
Binary file not shown.
Binary file modified blend-contract-sdk/wasm/comet_factory.wasm
100644 → 100755
Binary file not shown.
Binary file modified blend-contract-sdk/wasm/emitter.wasm
100644 → 100755
Binary file not shown.
Binary file modified blend-contract-sdk/wasm/pool.wasm
100644 → 100755
Binary file not shown.
Binary file modified blend-contract-sdk/wasm/pool_factory.wasm
100644 → 100755
Binary file not shown.

0 comments on commit dc45bd6

Please sign in to comment.