Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export get committed functions #38

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
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
16 changes: 16 additions & 0 deletions contracts/blade/BridgeStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,22 @@ contract BridgeStorage is ValidatorSetStorage {
}
}

/**
* @notice Returns the committed batch based on provided id
* @param id batch id
*/
function getCommittedBatch(uint256 id) external view returns (SignedBridgeMessageBatch memory) {
return batches[id];
}

/**
* @notice Returns the committed validator set based on provided id
* @param id validator set id
*/
function getCommittedValidatorSet(uint256 id) external view returns (SignedValidatorSet memory) {
return commitedValidatorSets[id];
}

// slither-disable-next-line unused-state,naming-convention
uint256[50] private __gap;
}
44 changes: 44 additions & 0 deletions docs/blade/BridgeStorage.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,50 @@ function currentValidatorSetLength() external view returns (uint256)
|---|---|---|
| _0 | uint256 | undefined |

### getCommittedBatch

```solidity
function getCommittedBatch(uint256 id) external view returns (struct SignedBridgeMessageBatch)
```

Returns the committed batch based on provided id



#### Parameters

| Name | Type | Description |
|---|---|---|
| id | uint256 | batch id |

#### Returns

| Name | Type | Description |
|---|---|---|
| _0 | SignedBridgeMessageBatch | undefined |

### getCommittedValidatorSet

```solidity
function getCommittedValidatorSet(uint256 id) external view returns (struct SignedValidatorSet)
```

Returns the committed validator set based on provided id



#### Parameters

| Name | Type | Description |
|---|---|---|
| id | uint256 | validator set id |

#### Returns

| Name | Type | Description |
|---|---|---|
| _0 | SignedValidatorSet | undefined |

### initialize

```solidity
Expand Down
Loading