@@ -4,19 +4,18 @@ pragma solidity 0.8.24;
4
4
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol " ;
5
5
import "@openzeppelin/contracts/token/ERC20/IERC20.sol " ;
6
6
import "../../common/IAddressResolver.sol " ;
7
+ import "../../common/LibConstStrings.sol " ;
7
8
import "../../libs/LibAddress.sol " ;
8
9
import "../../libs/LibNetwork.sol " ;
9
10
import "../hooks/IHook.sol " ;
10
11
import "../tiers/ITierProvider.sol " ;
11
- import "./LibConstStrings.sol " ;
12
12
13
13
/// @title LibProposing
14
14
/// @notice A library for handling block proposals in the Taiko protocol.
15
15
/// @custom:security-contact [email protected]
16
16
library LibProposing {
17
17
using LibAddress for address ;
18
18
19
- /// @notice Leaving this here to not forget about that this is a removed feature
20
19
// = keccak256(abi.encode(new TaikoData.EthDeposit[](0)))
21
20
bytes32 private constant _EMPTY_ETH_DEPOSIT_HASH =
22
21
0x569e75fc77c1a856f6daaf9e69d8a9566ca34aa47f9133711ce065a571af0cfd ;
@@ -157,7 +156,7 @@ library LibProposing {
157
156
158
157
// Use the difficulty as a random number
159
158
meta_.minTier = ITierProvider (
160
- _resolver.resolve (LibConstStrings.BYTES32_STR_TIER_PROVIDER , false )
159
+ _resolver.resolve (LibConstStrings.BYTES32_TIER_PROVIDER , false )
161
160
).getMinTier (uint256 (meta_.difficulty));
162
161
163
162
// Create the block that will be stored onchain
@@ -186,7 +185,7 @@ library LibProposing {
186
185
}
187
186
188
187
{
189
- IERC20 tko = IERC20 (_resolver.resolve (LibConstStrings.BYTES32_STR_TKO , false ));
188
+ IERC20 tko = IERC20 (_resolver.resolve (LibConstStrings.BYTES32_TAIKO_TOKEN , false ));
190
189
uint256 tkoBalance = tko.balanceOf (address (this ));
191
190
192
191
// Run all hooks.
@@ -242,13 +241,13 @@ library LibProposing {
242
241
{
243
242
if (_slotB.numBlocks == 1 ) {
244
243
// Only proposer_one can propose the first block after genesis
245
- address proposerOne = _resolver.resolve (" proposer_one " , true );
244
+ address proposerOne = _resolver.resolve (LibConstStrings.BYTES32_PROPOSER_ONE , true );
246
245
if (proposerOne != address (0 )) {
247
246
return msg .sender == proposerOne;
248
247
}
249
248
}
250
249
251
- address proposer = _resolver.resolve (LibConstStrings.BYTES32_STR_PROPOSER , true );
250
+ address proposer = _resolver.resolve (LibConstStrings.BYTES32_PROPOSER , true );
252
251
return proposer == address (0 ) || msg .sender == proposer;
253
252
}
254
253
}
0 commit comments