From fc56c7639b204bea541d2082e92c285b5cd852f2 Mon Sep 17 00:00:00 2001 From: ferencdg Date: Mon, 29 Jul 2024 09:12:22 +0000 Subject: [PATCH] chore: Generate Foundry docs --- .../utils/BitcoinTx.sol/library.BitcoinTx.md | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/docs/docs/contracts/src/src/utils/BitcoinTx.sol/library.BitcoinTx.md b/docs/docs/contracts/src/src/utils/BitcoinTx.sol/library.BitcoinTx.md index d0bf5149..ffb574ab 100644 --- a/docs/docs/contracts/src/src/utils/BitcoinTx.sol/library.BitcoinTx.md +++ b/docs/docs/contracts/src/src/utils/BitcoinTx.sol/library.BitcoinTx.md @@ -58,7 +58,7 @@ function evaluateProofDifficulty(IRelay relay, uint256 txProofDifficultyFactor, ### processTxOutputs -Processes the Bitcoin transaction output vector. +Processes all outputs from the transaction. ```solidity @@ -74,39 +74,19 @@ function processTxOutputs(bytes memory txOutputVector, bytes32 scriptPubKeyHash) |`txOutputVector`|`bytes`|Bitcoin transaction output vector. This function assumes vector's structure is valid so it must be validated using e.g. `BTCUtils.validateVout` function before it is passed here.| |`scriptPubKeyHash`|`bytes32`|Expected Bitcoin scriptPubKey keccak256 hash.| -**Returns** - -|Name|Type|Description| -|----|----|-----------| -|`resultInfo`|`TxOutputsInfo`|Outcomes of the processing.| - - -### processTxOutputs -Processes all outputs from the transaction. +### extractEvmAddressFromOutput ```solidity -function processTxOutputs( - bytes memory txOutputVector, - bytes32 scriptPubKeyHash, - TxOutputsProcessingInfo memory processInfo -) internal pure returns (TxOutputsInfo memory resultInfo); +function extractEvmAddressFromOutput(bytes memory _output, uint256 _at) internal pure returns (address evmAddress); ``` -**Parameters** - -|Name|Type|Description| -|----|----|-----------| -|`txOutputVector`|`bytes`|Bitcoin transaction output vector. This function assumes vector's structure is valid so it must be validated using e.g. `BTCUtils.validateVout` function before it is passed here.| -|`scriptPubKeyHash`|`bytes32`|Expected Bitcoin scriptPubKey keccak256 hash.| -|`processInfo`|`TxOutputsProcessingInfo`|TxOutputsProcessingInfo identifying output starting index and the number of outputs.| - -### extractEvmAddressFromOutput +### extractHashFromOutput ```solidity -function extractEvmAddressFromOutput(bytes memory _output, uint256 _at) internal pure returns (address evmAddress); +function extractHashFromOutput(bytes memory _output, uint256 _at) internal pure returns (bytes32 outputHash); ``` ### reverseEndianness @@ -185,6 +165,7 @@ outputs processing. struct TxOutputsInfo { uint64 value; address evmAddress; + bytes32 hash; } ```