Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove redundant escrow contract #26

Merged
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
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<div align="center">
<a href="https://github.com/keep-starknet-strange/broly/actions/workflows/contracts.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/keep-starknet-strange/broly/contracts.yml?style=for-the-badge" height=30></a>
Expand All @@ -34,7 +34,6 @@ flowchart TB

subgraph Starknet
OB[Orderbook Contract]
ES[Escrow Contract]
end

subgraph Bitcoin
Expand All @@ -51,10 +50,8 @@ flowchart TB
UI <--> SW
API --> DB
SW <--> OB
SW <--> ES
IS --> BTC
OM --> OB
OM --> ES
API --> IS
IS --> API
```
Expand All @@ -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
Expand Down Expand Up @@ -144,15 +141,14 @@ broly/
### Smart Contracts (onchain)

- Orderbook contract
- Escrow contract
- Payment handling

### Inscribor Service

- Order monitoring
- Bitcoin inscription creation
- Transaction verification
- Starknet interaction for escrow release
- Starknet interaction for reward release

## License

Expand Down
1 change: 0 additions & 1 deletion packages/onchain/src/escrow.cairo

This file was deleted.

17 changes: 0 additions & 17 deletions packages/onchain/src/escrow/escrow.cairo

This file was deleted.

1 change: 0 additions & 1 deletion packages/onchain/src/lib.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mod escrow;
mod orderbook;
mod utils;
mod relay;
1 change: 0 additions & 1 deletion packages/onchain/src/orderbook/mock.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions packages/onchain/src/orderbook/orderbook.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down
Loading