OP_CAT
enabled Bitcoin <> Starknet Bridge POC
These POC builds of previous Bridge Covenant POC. It explores "easy" parts of the potentatial bridge implementation, ignoring more difficult parts of the design like dual finality, reorgs etc.
- only happy path is tested/implemented, problems with sending transactions are ignored
- there is a bridge instance constraint missing in the deposit covenant, right now there is no way to specify which bridge instance deposit is meant to be added to after aggregation
- deposit/withdrawal amount is limited to int32.max, this applies also to a deposit/withdrawal batch total
- there might be only 16 'open' deposit batches
- deposit batch size should be a power of 2
- withdrawal amount should be bigger than what l1 considers dust (330)
-
Go to operator dir:
cd operator
-
Copy config file and set private keys:
cp .env-example .env
-
Install deps:
yarn install
-
Run devnet:
yarn run devnet
-
Deploy L2 contracts:
yarn run command deploy
-
Start operator (in another terminal):
yarn run poc
-
Go to dashboard dir:
cd dashboard
-
Install deps:
yarn install
-
Run dashboard server:
yarn dev
-
Make sure Alice account is well funded
-
Initiate several deposits:
yarn command deposit 1000
yarn command deposit 1000
yarn command deposit 1000
yarn command deposit 1000
-
Execute Deposit flow first
-
Initiate several withdrawals:
yarn command withdraw 500
yarn command withdraw 500
yarn command withdraw 500
yarn command withdraw 500
-
Optinally close the batch:
yarn run command closeBatch