Skip to content

Commit

Permalink
Skip already consumed blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
hawyar committed Jul 3, 2023
1 parent 7e8eaa1 commit 7947efb
Show file tree
Hide file tree
Showing 7 changed files with 379 additions and 215 deletions.
368 changes: 184 additions & 184 deletions contracts/ethereum/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,152 @@ Fulfill the request for testing
| response | bytes | Aggregated response from the user code |
| err | bytes | Aggregated error from the user code or from the sweptStake pipeline Either response or error parameter will be set, but never both |

## CasimirViews

### constructor

```solidity
constructor(address managerAddress, address registryAddress) public
```

Constructor

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| managerAddress | address | The manager address |
| registryAddress | address | The registry address |

### getCompoundablePoolIds

```solidity
function getCompoundablePoolIds(uint256 startIndex, uint256 endIndex) external view returns (uint32[5] poolIds)
```

Get the next five compoundable pool IDs

_Should be called off-chain_

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| startIndex | uint256 | The start index |
| endIndex | uint256 | The end index |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| poolIds | uint32[5] | The next five compoundable pool IDs |

### getOperators

```solidity
function getOperators(uint256 startIndex, uint256 endIndex) external view returns (struct ICasimirRegistry.Operator[])
```

Get operators

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| startIndex | uint256 | The start index |
| endIndex | uint256 | The end index |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | struct ICasimirRegistry.Operator[] | operators The operators |

### getPendingValidatorPublicKeys

```solidity
function getPendingValidatorPublicKeys(uint256 startIndex, uint256 endIndex) external view returns (bytes[])
```

Get the pending validator public keys

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| startIndex | uint256 | The start index |
| endIndex | uint256 | The end index |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | bytes[] | validatorPublicKeys The pending validator public keys |

### getStakedValidatorPublicKeys

```solidity
function getStakedValidatorPublicKeys(uint256 startIndex, uint256 endIndex) external view returns (bytes[])
```

Get the staked validator public keys

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| startIndex | uint256 | The start index |
| endIndex | uint256 | The end index |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | bytes[] | validatorPublicKeys The staked validator public keys |

### getPoolDetails

```solidity
function getPoolDetails(uint32 poolId) external view returns (struct ICasimirPool.PoolDetails poolDetails)
```

Get a pool's details by ID

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| poolId | uint32 | The pool ID |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| poolDetails | struct ICasimirPool.PoolDetails | The pool details |

### getSweptBalance

```solidity
function getSweptBalance(uint256 startIndex, uint256 endIndex) public view returns (uint256 balance)
```

Get the swept balance

_Should be called off-chain_

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| startIndex | uint256 | The start index |
| endIndex | uint256 | The end index |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| balance | uint256 | The swept balance |

## ICasimirManager

### Token
Expand Down Expand Up @@ -1877,6 +2023,44 @@ method._
| upkeepNeeded | bool | boolean to indicate whether the keeper should call performUpkeep or not. |
| performData | bytes | bytes that the keeper should call performUpkeep with, if upkeep is needed. If you would like to encode data to decode later, try `abi.encode`. |

## ICasimirViews

### getCompoundablePoolIds

```solidity
function getCompoundablePoolIds(uint256 startIndex, uint256 endIndex) external view returns (uint32[5])
```

### getOperators

```solidity
function getOperators(uint256 startIndex, uint256 endIndex) external view returns (struct ICasimirRegistry.Operator[])
```

### getPoolDetails

```solidity
function getPoolDetails(uint32 poolId) external view returns (struct ICasimirPool.PoolDetails)
```

### getPendingValidatorPublicKeys

```solidity
function getPendingValidatorPublicKeys(uint256 startIndex, uint256 endIndex) external view returns (bytes[])
```

### getStakedValidatorPublicKeys

```solidity
function getStakedValidatorPublicKeys(uint256 startIndex, uint256 endIndex) external view returns (bytes[])
```

### getSweptBalance

```solidity
function getSweptBalance(uint256 startIndex, uint256 endIndex) external view returns (uint256)
```

## Types32Array

### remove
Expand Down Expand Up @@ -2041,190 +2225,6 @@ struct RegistrationParams {
function registerUpkeep(struct KeeperRegistrarInterface.RegistrationParams requestParams) external returns (uint256)
```

## CasimirViews

### constructor

```solidity
constructor(address managerAddress, address registryAddress) public
```

Constructor

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| managerAddress | address | The manager address |
| registryAddress | address | The registry address |

### getCompoundablePoolIds

```solidity
function getCompoundablePoolIds(uint256 startIndex, uint256 endIndex) external view returns (uint32[5] poolIds)
```

Get the next five compoundable pool IDs

_Should be called off-chain_

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| startIndex | uint256 | The start index |
| endIndex | uint256 | The end index |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| poolIds | uint32[5] | The next five compoundable pool IDs |

### getOperators

```solidity
function getOperators(uint256 startIndex, uint256 endIndex) external view returns (struct ICasimirRegistry.Operator[])
```

Get operators

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| startIndex | uint256 | The start index |
| endIndex | uint256 | The end index |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | struct ICasimirRegistry.Operator[] | operators The operators |

### getPendingValidatorPublicKeys

```solidity
function getPendingValidatorPublicKeys(uint256 startIndex, uint256 endIndex) external view returns (bytes[])
```

Get the pending validator public keys

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| startIndex | uint256 | The start index |
| endIndex | uint256 | The end index |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | bytes[] | validatorPublicKeys The pending validator public keys |

### getStakedValidatorPublicKeys

```solidity
function getStakedValidatorPublicKeys(uint256 startIndex, uint256 endIndex) external view returns (bytes[])
```

Get the staked validator public keys

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| startIndex | uint256 | The start index |
| endIndex | uint256 | The end index |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | bytes[] | validatorPublicKeys The staked validator public keys |

### getPoolDetails

```solidity
function getPoolDetails(uint32 poolId) external view returns (struct ICasimirPool.PoolDetails poolDetails)
```

Get a pool's details by ID

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| poolId | uint32 | The pool ID |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| poolDetails | struct ICasimirPool.PoolDetails | The pool details |

### getSweptBalance

```solidity
function getSweptBalance(uint256 startIndex, uint256 endIndex) public view returns (uint256 balance)
```

Get the swept balance

_Should be called off-chain_

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| startIndex | uint256 | The start index |
| endIndex | uint256 | The end index |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| balance | uint256 | The swept balance |

## ICasimirViews

### getCompoundablePoolIds

```solidity
function getCompoundablePoolIds(uint256 startIndex, uint256 endIndex) external view returns (uint32[5])
```

### getOperators

```solidity
function getOperators(uint256 startIndex, uint256 endIndex) external view returns (struct ICasimirRegistry.Operator[])
```

### getPoolDetails

```solidity
function getPoolDetails(uint32 poolId) external view returns (struct ICasimirPool.PoolDetails)
```

### getPendingValidatorPublicKeys

```solidity
function getPendingValidatorPublicKeys(uint256 startIndex, uint256 endIndex) external view returns (bytes[])
```

### getStakedValidatorPublicKeys

```solidity
function getStakedValidatorPublicKeys(uint256 startIndex, uint256 endIndex) external view returns (bytes[])
```

### getSweptBalance

```solidity
function getSweptBalance(uint256 startIndex, uint256 endIndex) external view returns (uint256)
```

## MockFunctionsOracle

### constructor
Expand Down
Loading

0 comments on commit 7947efb

Please sign in to comment.