Skip to content

Commit

Permalink
fix: return blocksperwindow for the storage upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed Oct 30, 2024
1 parent 0a9b6dd commit 950bf27
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 3 deletions.
13 changes: 13 additions & 0 deletions contracts-abi/abi/BidderRegistry.abi
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,19 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "blocksPerWindow",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "depositForWindow",
Expand Down
13 changes: 13 additions & 0 deletions contracts-abi/abi/BlockTracker.abi
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "blocksPerWindow",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "currentWindow",
Expand Down
13 changes: 13 additions & 0 deletions contracts-abi/abi/PreconfManager.abi
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "blocksPerWindow",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "commitmentDispatchWindow",
Expand Down
33 changes: 32 additions & 1 deletion contracts-abi/clients/BidderRegistry/BidderRegistry.go

Large diffs are not rendered by default.

33 changes: 32 additions & 1 deletion contracts-abi/clients/BlockTracker/BlockTracker.go

Large diffs are not rendered by default.

33 changes: 32 additions & 1 deletion contracts-abi/clients/PreconfManager/PreconfManager.go

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions contracts/contracts/core/BidderRegistryStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ abstract contract BidderRegistryStorage {
/// @dev Amount assigned to bidders
mapping(address => uint256) public providerAmount;

/// @dev Amount assigned to bidders
/// Not used anymore, still here bcs of upgradeability
uint256 public blocksPerWindow;

/// @dev See https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#storage-gaps
uint256[48] private __gap;
}
3 changes: 3 additions & 0 deletions contracts/contracts/core/BlockTrackerStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ abstract contract BlockTrackerStorage {

uint256 public currentWindow;

/// @dev not used anymore, still here bcs of upgradeability
uint256 public blocksPerWindow;

// Mapping from block number to the winner's address
mapping(uint256 => address) public blockWinners;

Expand Down
4 changes: 4 additions & 0 deletions contracts/contracts/core/PreconfManagerStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ abstract contract PreconfManagerStorage {
/// @dev Address of the oracle contract
address public oracleContract;

/// @dev The number of blocks per window
/// Not used anymore, still here bcs of upgradeability
uint256 public blocksPerWindow;

/// @dev Address of provider registry
IProviderRegistry public providerRegistry;

Expand Down

0 comments on commit 950bf27

Please sign in to comment.