mirror of
https://github.com/alexgo-io/stacks-subnets.git
synced 2026-01-12 22:43:44 +08:00
refactor: remove unused opcode from StacksSubnetOp
This commit is contained in:
@@ -264,7 +264,6 @@ impl StacksSubnetOp {
|
||||
txid,
|
||||
event_index,
|
||||
in_block: in_block.clone(),
|
||||
opcode: 0,
|
||||
event: StacksSubnetOpType::BlockCommit {
|
||||
subnet_block_hash: BlockHeaderHash(block_commit),
|
||||
withdrawal_merkle_root: Sha512Trunc256Sum(withdrawal_merkle_root),
|
||||
@@ -309,7 +308,6 @@ impl StacksSubnetOp {
|
||||
txid,
|
||||
event_index,
|
||||
in_block: in_block.clone(),
|
||||
opcode: 6,
|
||||
event: StacksSubnetOpType::RegisterAsset {
|
||||
asset_type,
|
||||
l1_contract_id,
|
||||
@@ -334,7 +332,6 @@ impl StacksSubnetOp {
|
||||
txid,
|
||||
event_index,
|
||||
in_block: in_block.clone(),
|
||||
opcode: 1,
|
||||
event: StacksSubnetOpType::DepositStx { amount, sender },
|
||||
})
|
||||
}
|
||||
@@ -380,7 +377,6 @@ impl StacksSubnetOp {
|
||||
txid,
|
||||
event_index,
|
||||
in_block: in_block.clone(),
|
||||
opcode: 2,
|
||||
event: StacksSubnetOpType::DepositFt {
|
||||
l1_contract_id,
|
||||
subnet_contract_id,
|
||||
@@ -428,7 +424,6 @@ impl StacksSubnetOp {
|
||||
txid,
|
||||
event_index,
|
||||
in_block: in_block.clone(),
|
||||
opcode: 3,
|
||||
event: StacksSubnetOpType::DepositNft {
|
||||
l1_contract_id,
|
||||
subnet_contract_id,
|
||||
@@ -454,7 +449,6 @@ impl StacksSubnetOp {
|
||||
txid,
|
||||
event_index,
|
||||
in_block: in_block.clone(),
|
||||
opcode: 1,
|
||||
event: StacksSubnetOpType::WithdrawStx { amount, recipient },
|
||||
})
|
||||
}
|
||||
@@ -489,7 +483,6 @@ impl StacksSubnetOp {
|
||||
txid,
|
||||
event_index,
|
||||
in_block: in_block.clone(),
|
||||
opcode: 4,
|
||||
event: StacksSubnetOpType::WithdrawFt {
|
||||
l1_contract_id,
|
||||
name,
|
||||
@@ -526,7 +519,6 @@ impl StacksSubnetOp {
|
||||
txid,
|
||||
event_index,
|
||||
in_block: in_block.clone(),
|
||||
opcode: 5,
|
||||
event: StacksSubnetOpType::WithdrawNft {
|
||||
l1_contract_id,
|
||||
id,
|
||||
|
||||
@@ -282,7 +282,6 @@ pub enum StacksSubnetOpType {
|
||||
pub struct StacksSubnetOp {
|
||||
pub txid: Txid,
|
||||
pub in_block: StacksBlockId,
|
||||
pub opcode: u8,
|
||||
pub event_index: u32,
|
||||
pub event: StacksSubnetOpType,
|
||||
}
|
||||
@@ -306,12 +305,6 @@ impl BurnchainTransaction {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn opcode(&self) -> u8 {
|
||||
match *self {
|
||||
BurnchainTransaction::StacksBase(ref tx) => tx.opcode,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_burn_amount(&self) -> u64 {
|
||||
0
|
||||
}
|
||||
|
||||
@@ -3195,7 +3195,7 @@ impl<'a> SortitionHandleTx<'a> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Insert a deposit ft op
|
||||
/// Insert a register asset op
|
||||
fn insert_register_asset(
|
||||
&mut self,
|
||||
op: &RegisterAssetOp,
|
||||
|
||||
Reference in New Issue
Block a user