Skip to content

Commit

Permalink
chore: Generate Foundry docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ferencdg authored and github-actions[bot] committed Jul 29, 2024
1 parent 899e151 commit fc56c76
Showing 1 changed file with 6 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function evaluateProofDifficulty(IRelay relay, uint256 txProofDifficultyFactor,

### processTxOutputs

Processes the Bitcoin transaction output vector.
Processes all outputs from the transaction.


```solidity
Expand All @@ -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
Expand Down Expand Up @@ -185,6 +165,7 @@ outputs processing.
struct TxOutputsInfo {
uint64 value;
address evmAddress;
bytes32 hash;
}
```

0 comments on commit fc56c76

Please sign in to comment.