Skip to content
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
7 changes: 7 additions & 0 deletions 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 Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["soroban", "transfer_state_machine"]
members = ["soroban", "transfer_state_machine", "escrow_contract"]
resolver = "2"

[profile.release]
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ locking/escrow, operator rotation, and transfer state tracking.

## Workspace layout

This is a Cargo workspace with two members:
This is a Cargo workspace with the following members:

| Crate | Description |
| --- | --- |
| `soroban/` | Core Soroban contracts (access control, trusted sources, escrow, thresholds) |
| `soroban/` | Core Soroban contracts (access control, trusted sources, thresholds) |
| `escrow_contract/` | Time-locked escrow contract for bridge transfers |
| `transfer_state_machine/` | Transfer state-machine contract logic |
| `harness/` | Test harness and integration helpers |

Expand Down
19 changes: 19 additions & 0 deletions escrow_contract/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "escrow-contract"
version = "0.1.0"
edition = "2021"
description = "Soroban time-locked escrow contract for Swipely bridge transfers"
license = "MIT"

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

[dependencies]
soroban-sdk = { version = "22.0.10" }

[dev-dependencies]
soroban-sdk = { version = "22.0.10", features = ["testutils"] }

[[test]]
name = "escrow_contract_test"
path = "tests/escrow_contract.test.rs"
2 changes: 2 additions & 0 deletions soroban/src/escrow_contract.rs → escrow_contract/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![no_std]

use soroban_sdk::{
contract, contracterror, contractimpl, contracttype, symbol_short, Address, Env, String, Symbol,
Vec,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg(test)]

use soroban_sdk::{testutils::{Address as _, Ledger}, Address, Env, String, contract, contractimpl, symbol_short, Vec};
use bridge_watch_contracts::escrow_contract::{TimeLockedEscrowContract, TimeLockedEscrowContractClient};
use escrow_contract::{TimeLockedEscrowContract, TimeLockedEscrowContractClient};

#[contract]
pub struct MockBridgeVerifier;
Expand Down
4 changes: 0 additions & 4 deletions soroban/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ path = "tests/asset_locking.test.rs"
name = "source_trust_test"
path = "tests/source_trust.test.rs"

[[test]]
name = "escrow_contract_test"
path = "tests/escrow_contract.test.rs"

[[test]]
name = "operator_rotation_test"
path = "tests/operator_rotation.test.rs"
Expand Down
1 change: 0 additions & 1 deletion soroban/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub mod batch_query;
#[cfg(test)]
pub mod circuit_breaker;
pub mod emergency_fund_recovery;
pub mod escrow_contract;
#[cfg(test)]
pub mod governance;
#[cfg(test)]
Expand Down
Loading