Skip to content

Commit

Permalink
Merge pull request #133 from blend-capital/fix-interfaces
Browse files Browse the repository at this point in the history
Fix interfaces
  • Loading branch information
mootz12 authored Oct 19, 2023
2 parents 0382e45 + d67d10b commit 83d6267
Show file tree
Hide file tree
Showing 17 changed files with 77 additions and 42 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: pull_request

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:

complete:
if: always()
needs: [fmt, build-and-test]
runs-on: ubuntu-latest
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update
- run: cargo fmt --all --check

build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: stellar/actions/rust-cache@main
- run: rustup update
- run: rustup target add wasm32-unknown-unknown
- run: cargo install --locked --version 20.0.0-rc4 soroban-cli --features opt
- run: make test
12 changes: 4 additions & 8 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ This repository contains the smart contacts for an implementation of the Blend P

## Documentation

To learn more about the Blend Protocol, visit the whitepaper or the docs:
* [Whitepaper](https://github.com/blend-capital/blend-whitepaper)
To learn more about the Blend Protocol, visit the docs:
* [Blend Docs](https://docs.blend.capital/)

## Audits
Expand Down
2 changes: 1 addition & 1 deletion backstop/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "backstop"
version = "0.0.0"
version = "0.0.1"
authors = ["Blend Capital <[email protected]>"]
license = "AGPL-3.0"
edition = "2021"
Expand Down
8 changes: 2 additions & 6 deletions blend-interfaces/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ version = "0.0.1"
description = "Traits, clients, and types for the Blend Protocol"
homepage = "https://github.com/blend-capital/blend-contracts"
repository = "https://github.com/blend-capital/blend-contracts"
authors = ["Blend Capital <[email protected]>"]
license = "MIT"
edition = "2021"
readme = "README.md"
keywords = ["no_std", "wasm", "soroban"]

[lib]
crate-type = ["cdylib", "rlib"]
doctest = false

[dependencies]
soroban-sdk = { workspace = true }
pool = { path = "../pool" }
backstop = { path = "../backstop" }
pool-factory = { path = "../pool-factory" }
emitter = { path = "../emitter" }
soroban-sdk = { workspace = true }
8 changes: 8 additions & 0 deletions blend-interfaces/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Blend Interfaces

This repository contains interfaces, clients, and WASM blobs for the Blend Protocol as implemented in the [Blend Contracts](https://github.com/blend-capital/blend-contracts) repository.

## Documentation

To learn more about the Blend Protocol, visit the the docs:
* [Blend Docs](https://docs.blend.capital/)
10 changes: 6 additions & 4 deletions blend-interfaces/src/backstop.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pub use backstop::{Backstop, BackstopClient, BackstopError, PoolBackstopData, UserBalance, Q4W};

mod wasm {
soroban_sdk::contractimport!(file = "../target/wasm32-unknown-unknown/optimized/backstop.wasm");
soroban_sdk::contractimport!(file = "./wasm/backstop.wasm");
}
pub use wasm::WASM as BackstopWASM;
pub use wasm::{
BackstopDataKey, BackstopError, Client as BackstopClient, Contract as Backstop,
PoolBackstopData, PoolBalance, PoolUserKey, UserBalance, UserEmissionData, Q4W,
WASM as BackstopWASM,
};
8 changes: 4 additions & 4 deletions blend-interfaces/src/emitter.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub use emitter::{Emitter, EmitterClient, EmitterContract, EmitterError};

mod wasm {
soroban_sdk::contractimport!(file = "../target/wasm32-unknown-unknown/optimized/emitter.wasm");
soroban_sdk::contractimport!(file = "./wasm/emitter.wasm");
}
pub use wasm::WASM as EmitterWASM;
pub use wasm::{
Client as EmitterClient, Contract as Emitter, EmitterDataKey, EmitterError, WASM as EmitterWASM,
};
14 changes: 7 additions & 7 deletions blend-interfaces/src/pool.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pub use pool::{
Pool, PoolClient, PoolConfig, PoolDataKey, PoolError, Positions, Request, ReserveConfig,
ReserveData, ReserveEmissionMetadata, ReserveEmissionsConfig, ReserveEmissionsData,
};

mod wasm {
soroban_sdk::contractimport!(file = "../target/wasm32-unknown-unknown/optimized/pool.wasm");
soroban_sdk::contractimport!(file = "./wasm/pool.wasm");
}
pub use wasm::WASM as PoolWASM;
pub use wasm::{
AuctionData, AuctionKey, Client as PoolClient, Contract as Pool, PoolConfig, PoolDataKey,
PoolError, Positions, Request, ReserveConfig, ReserveData, ReserveEmissionMetadata,
ReserveEmissionsConfig, ReserveEmissionsData, UserEmissionData, UserReserveKey,
WASM as PoolWASM,
};
11 changes: 5 additions & 6 deletions blend-interfaces/src/pool_factory.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
pub use pool_factory::{PoolFactory, PoolFactoryClient, PoolFactoryError, PoolInitMeta};

mod wasm {
soroban_sdk::contractimport!(
file = "../target/wasm32-unknown-unknown/optimized/pool_factory.wasm"
);
soroban_sdk::contractimport!(file = "./wasm/pool_factory.wasm");
}
pub use wasm::WASM as PoolFactoryWASM;
pub use wasm::{
Client as PoolFactoryClient, Contract as PoolFactory, PoolFactoryDataKey, PoolFactoryError,
PoolInitMeta, WASM as PoolFactoryWASM,
};
Binary file added blend-interfaces/wasm/backstop.wasm
Binary file not shown.
Binary file added blend-interfaces/wasm/emitter.wasm
Binary file not shown.
Binary file added blend-interfaces/wasm/pool.wasm
Binary file not shown.
Binary file added blend-interfaces/wasm/pool_factory.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion emitter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "emitter"
version = "0.0.0"
version = "0.0.1"
authors = ["Blend Capital <[email protected]>"]
license = "AGPL-3.0"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion pool-factory/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pool-factory"
version = "0.0.0"
version = "0.0.1"
authors = ["Blend Capital <[email protected]>"]
license = "AGPL-3.0"
edition = "2021"
Expand Down
3 changes: 1 addition & 2 deletions pool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "pool"
version = "0.0.0"
authors = ["Blend Capital <[email protected]>"]
version = "0.0.1"
license = "AGPL-3.0"
edition = "2021"
publish = false
Expand Down

0 comments on commit 83d6267

Please sign in to comment.