extract code to variable
Create _targetOutpoint variable to reduce line size
and increase readability
@@ -200,9 +200,9 @@ library DepositLiquidation {
_txId = abi.encodePacked(_txVersion, _txInputVector, _txOutputVector, _txLocktime).hash256();
_d.checkProofFromTxId(_txId, _merkleProof, _txIndexInBlock, _bitcoinHeaders);
-
+ bytes memory _targetOutpoint = _txInputVector.extractInputAtIndex(_targetInputIndex).extractOutpoint();
require(
- keccak256(_txInputVector.extractInputAtIndex(_targetInputIndex).extractOutpoint()) == keccak256(_d.utxoOutpoint),
+ keccak256(_targetOutpoint) == keccak256(_d.utxoOutpoint),
"No input spending custodied UTXO found at given index"
);
require(validateRedeemerNotPaid(_d, _txOutputVector), "Found an output paying the redeemer as requested");
