Skip to content
Closed
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
1 change: 1 addition & 0 deletions .simplicity-dex.example/.simplicity-dex.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ relays = [
"wss://relay.damus.io",
"wss://nostr.wine/",
]
seed_hex = "your_hex_value"
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ simplicity-lang = { version = "0.6.0" }
simplicityhl = { version = "0.2.0" }
simplicityhl-core = { git = "https://github.com/BlockstreamResearch/simplicity-contracts.git", rev = "baa8ab7", package = "simplicityhl-core", features = ["encoding"] }
sled = { version = "0.34.7" }
tempfile = { version = "3.23.0" }
thiserror = { version = "2.0.17" }
tokio = { version = "1.48.0", features = ["macros", "test-util", "rt", "rt-multi-thread", "tracing" ] }
toml = { version = "0.9.8" }
tracing = { version = "0.1.41" }
tracing-appender = { version = "0.2.3" }
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
14 changes: 7 additions & 7 deletions Guide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Simplicity DEX — Developer Guide

This short guide helps contributors understand, build, test and extend the project. It focuses on practical commands and
the patterns used across crates (not exhaustive; follow Rust and crate docs for deeper dives).
# Simplicity DEX - Guide

## Project layout

Expand All @@ -24,6 +21,7 @@ the patterns used across crates (not exhaustive; follow Rust and crate docs for
- `mv ./target/release/simplicity-dex ./demo/simplicity-dex`
- `cp ./.simplicity-dex.example/.simplicity-dex.config.toml ./demo/.simplicity-dex.config.toml`
- `echo SEED_HEX=ffff0123456789abcdef0123456789abcdef0123456789abcdef0123456789ab > ./demo/.env`
- `cd /demo`
3. Insert your valid nostr keypair into `.simplicity-dex.config.toml`

## Commands example execution
Expand All @@ -42,6 +40,8 @@ Maker and Taker responsible for taking such steps:
* Early termination
6) After `settlement-height` both maker and taker can use settlement exit to receive their tokens (collateral or settlement) depending on the settlement token price, which is signed with oracle.

### Example

1. Create your own contract with your values. For example can be taken

* `taker-funding-start-time` 1764328373 (timestamp can be taken from https://www.epochconverter.com/)
Expand Down Expand Up @@ -79,9 +79,9 @@ Actual command in cli:
```bash
./simplicity-dex maker fund
--filler-utxo <FILLER_TOKEN_UTXO>
--grant-coll-utxo <GRANTOR_COLLATERAL_TOKEN_UTXO>
--grant-settl-utxo <GRANTOR_SETTLEMENT_TOKEN_UTXO>
--settl-asset-utxo <SETTLEMENT_ASSET_UTXO>
--grantor-collateral-utxo <GRANTOR_COLLATERAL_TOKEN_UTXO>
--grantor-settlement-utxo <GRANTOR_SETTLEMENT_TOKEN_UTXO>
--settlement-asset-utxo <SETTLEMENT_ASSET_UTXO>
--fee-utxo <FEE_UTXO>
--taproot-pubkey-gen <DCD_TAPROOT_PUBKEY_GEN>
```
Expand Down
3 changes: 3 additions & 0 deletions crates/dex-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ thiserror = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
tempfile = { workspace = true}
toml = { workspace = true }
6 changes: 3 additions & 3 deletions crates/dex-cli/src/cli/maker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ pub enum MakerCommands {
#[arg(long = "filler-utxo")]
filler_token_utxo: OutPoint,
/// UTXO containing Maker grantor collateral tokens to be locked or burned
#[arg(long = "grant-coll-utxo")]
#[arg(long = "grantor-collateral-utxo")]
grantor_collateral_token_utxo: OutPoint,
/// UTXO containing Maker grantor settlement tokens to be locked or burned
#[arg(long = "grant-settl-utxo")]
#[arg(long = "grantor-settlement-utxo")]
grantor_settlement_token_utxo: OutPoint,
/// UTXO providing the settlement asset (e.g. LBTC) for the DCD contract
#[arg(long = "settl-asset-utxo")]
#[arg(long = "settlement-asset-utxo")]
settlement_asset_utxo: OutPoint,
/// UTXO used to pay miner fees for the Maker funding transaction
#[arg(long = "fee-utxo")]
Expand Down
Loading