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

Commit

Permalink
added script and mint handling (#1358)
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksey Filippov <[email protected]>
  • Loading branch information
ra0x3 and a-filippo authored Sep 19, 2023
1 parent 145570b commit d31fd1a
Showing 1 changed file with 17 additions and 1 deletion.
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

0 comments on commit d31fd1a

Please sign in to comment.