Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

added script and mint handling #1358

Merged
merged 1 commit into from
Sep 19, 2023
Merged
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
18 changes: 17 additions & 1 deletion packages/fuel-indexer/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,23 @@ pub async fn retrieve_blocks_from_node(
salt: <[u8; 32]>::from(*tx.salt()).into(),
metadata: None,
}),
_ => Transaction::default(),
ClientTransaction::Script(tx) => Transaction::Script(Script {
gas_price: *tx.gas_price(),
gas_limit: *tx.gas_limit(),
maturity: *tx.maturity(),
script: (*tx.script().clone()).to_vec(),
script_data: (*tx.script_data().clone()).to_vec(),
inputs: tx.inputs().iter().map(|i| i.to_owned().into()).collect(),
outputs: tx.outputs().iter().map(|o| o.to_owned().into()).collect(),
witnesses: tx.witnesses().to_vec(),
receipts_root: <[u8; 32]>::from(*tx.receipts_root()).into(),
metadata: None,
}),
ClientTransaction::Mint(tx) => Transaction::Mint(Mint {
tx_pointer: tx.tx_pointer().to_owned().into(),
outputs: tx.outputs().iter().map(|o| o.to_owned().into()).collect(),
metadata: None,
}),
};

let tx_data = TransactionData {
Expand Down