-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eprod 1003 use batched mint order processing in btc bridge (#164)
- Loading branch information
Showing
5 changed files
with
245 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,23 @@ | ||
use candid::CandidType; | ||
use did::H160; | ||
use did::{H160, H256}; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use crate::events::{BurntEventData, MintedEventData}; | ||
use crate::order::SignedMintOrder; | ||
use crate::order::{MintOrder, SignedOrders}; | ||
|
||
#[derive(Debug, Serialize, Deserialize, CandidType, Clone)] | ||
pub enum BtcBridgeOp { | ||
// Deposit operations: | ||
UpdateCkBtcBalance { | ||
eth_address: H160, | ||
}, | ||
CollectCkBtcBalance { | ||
eth_address: H160, | ||
}, | ||
TransferCkBtc { | ||
eth_address: H160, | ||
amount: u64, | ||
}, | ||
CreateMintOrder { | ||
eth_address: H160, | ||
amount: u64, | ||
}, | ||
MintErc20 { | ||
eth_address: H160, | ||
order: SignedMintOrder, | ||
}, | ||
ConfirmErc20Mint { | ||
order: SignedMintOrder, | ||
eth_address: H160, | ||
}, | ||
UpdateCkBtcBalance { eth_address: H160 }, | ||
CollectCkBtcBalance { eth_address: H160 }, | ||
TransferCkBtc { eth_address: H160, amount: u64 }, | ||
CreateMintOrder { eth_address: H160, amount: u64 }, | ||
SignMintOrder { order: MintOrder }, | ||
MintErc20 { order: SignedOrders }, | ||
ConfirmErc20Mint { order: SignedOrders, tx_id: H256 }, | ||
Erc20MintConfirmed(MintedEventData), | ||
|
||
// Withdraw operations: | ||
WithdrawBtc(BurntEventData), | ||
BtcWithdrawConfirmed { | ||
eth_address: H160, | ||
}, | ||
BtcWithdrawConfirmed { eth_address: H160 }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.