From 0ecaca9d57d0799e60e172c4819dd02d41048e7a Mon Sep 17 00:00:00 2001 From: Lana Ivina Date: Wed, 18 Dec 2024 18:31:45 +0100 Subject: [PATCH] remove redundant escrow contract --- README.md | 12 ++++-------- packages/onchain/src/escrow.cairo | 1 - packages/onchain/src/escrow/escrow.cairo | 17 ----------------- packages/onchain/src/lib.cairo | 1 - packages/onchain/src/orderbook/mock.cairo | 1 - packages/onchain/src/orderbook/orderbook.cairo | 2 -- 6 files changed, 4 insertions(+), 30 deletions(-) delete mode 100644 packages/onchain/src/escrow.cairo delete mode 100644 packages/onchain/src/escrow/escrow.cairo diff --git a/README.md b/README.md index c38a592..2991ed0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ > Order on Starknet, write on Bitcoin, get money trustlessly, repeat -Broly is a decentralized Bitcoin inscription service that uses Starknet for orderbook management and escrow. It enables trustless Bitcoin inscriptions with guaranteed payments through smart contracts. +Broly is a decentralized Bitcoin inscription service that uses Starknet for orderbook management. It enables trustless Bitcoin inscriptions with guaranteed payments through smart contracts.
GitHub Workflow Status @@ -34,7 +34,6 @@ flowchart TB subgraph Starknet OB[Orderbook Contract] - ES[Escrow Contract] end subgraph Bitcoin @@ -51,10 +50,8 @@ flowchart TB UI <--> SW API --> DB SW <--> OB - SW <--> ES IS --> BTC OM --> OB - OM --> ES API --> IS IS --> API ``` @@ -65,11 +62,11 @@ flowchart TB 2. User creates an inscription order: - Specifies inscription content and reward amount - Order is created on Starknet orderbook - - Funds are locked in escrow contract + - Funds are locked in the contract 3. Inscribor service: - Monitors pending orders - Creates Bitcoin inscriptions - - Triggers escrow release on successful inscription + - Triggers reward release on successful inscription 4. User receives inscription, inscribor receives reward ## Getting Started @@ -144,7 +141,6 @@ broly/ ### Smart Contracts (onchain) - Orderbook contract -- Escrow contract - Payment handling ### Inscribor Service @@ -152,7 +148,7 @@ broly/ - Order monitoring - Bitcoin inscription creation - Transaction verification -- Starknet interaction for escrow release +- Starknet interaction for reward release ## License diff --git a/packages/onchain/src/escrow.cairo b/packages/onchain/src/escrow.cairo deleted file mode 100644 index 2af7051..0000000 --- a/packages/onchain/src/escrow.cairo +++ /dev/null @@ -1 +0,0 @@ -mod escrow; diff --git a/packages/onchain/src/escrow/escrow.cairo b/packages/onchain/src/escrow/escrow.cairo deleted file mode 100644 index b69d849..0000000 --- a/packages/onchain/src/escrow/escrow.cairo +++ /dev/null @@ -1,17 +0,0 @@ -#[starknet::interface] -trait IEscrow { - fn greet(ref self: TContractState) -> felt252; -} - -#[starknet::contract] -mod Escrow { - #[storage] - struct Storage {} - - #[abi(embed_v0)] - impl EscrowImpl of super::IEscrow { - fn greet(ref self: ContractState) -> felt252 { - 'Kakarotto' - } - } -} diff --git a/packages/onchain/src/lib.cairo b/packages/onchain/src/lib.cairo index d8b5e2a..51b511c 100644 --- a/packages/onchain/src/lib.cairo +++ b/packages/onchain/src/lib.cairo @@ -1,4 +1,3 @@ -mod escrow; mod orderbook; mod utils; mod relay; diff --git a/packages/onchain/src/orderbook/mock.cairo b/packages/onchain/src/orderbook/mock.cairo index 99e5c4b..6f58bf8 100644 --- a/packages/onchain/src/orderbook/mock.cairo +++ b/packages/onchain/src/orderbook/mock.cairo @@ -133,7 +133,6 @@ mod OrderbookMock { assert(status != Status::Canceled, 'The inscription is canceled'); assert(status != Status::Closed, 'The inscription has been closed'); - // TODO: change the address to the actual escrow contract once it's implemented. let escrow_address = get_contract_address(); if (currency_fee == 'STRK'.into()) { let strk_token = self.strk_token.read(); diff --git a/packages/onchain/src/orderbook/orderbook.cairo b/packages/onchain/src/orderbook/orderbook.cairo index cbabc68..7cfb441 100644 --- a/packages/onchain/src/orderbook/orderbook.cairo +++ b/packages/onchain/src/orderbook/orderbook.cairo @@ -107,7 +107,6 @@ mod Orderbook { let escrow_address = get_contract_address(); if (currency_fee == 'STRK'.into()) { let strk_token = self.strk_token.read(); - // TODO: change the transfer to the escrow contract once it's implemented. strk_token .transfer_from( sender: caller, recipient: escrow_address, amount: submitter_fee, @@ -158,7 +157,6 @@ mod Orderbook { assert(status != Status::Canceled, 'The inscription is canceled'); assert(status != Status::Closed, 'The inscription has been closed'); - // TODO: change the address to the actual escrow contract once it's implemented. let escrow_address = get_contract_address(); if (currency_fee == 'STRK'.into()) { let strk_token = self.strk_token.read();