mirror of https://github.com/nucypher/nucypher.git
Fix small bugs after migration to solidity 0.8.x
parent
1c10b9bf54
commit
cc332a5436
|
@ -105,9 +105,9 @@ contract PolicyManager is Upgradeable {
|
|||
|
||||
bytes16 internal constant RESERVED_POLICY_ID = bytes16(0);
|
||||
address internal constant RESERVED_NODE = address(0);
|
||||
uint256 internal constant MAX_BALANCE = uint256(uint128(0) - 1);
|
||||
uint256 internal constant MAX_BALANCE = uint256(type(uint128).max);
|
||||
// controlled overflow to get max int256
|
||||
int256 public constant DEFAULT_FEE_DELTA = int256((uint256(0) - 1) >> 1);
|
||||
int256 public constant DEFAULT_FEE_DELTA = int256((type(uint256).max) >> 1);
|
||||
|
||||
IStakingEscrow public immutable escrow;
|
||||
uint32 public immutable genesisSecondsPerPeriod;
|
||||
|
|
|
@ -353,7 +353,7 @@ contract WorkLock is Ownable {
|
|||
function internalShutdown() internal {
|
||||
startBidDate = 0;
|
||||
endBidDate = 0;
|
||||
endCancellationDate = uint256(0) - 1; // "infinite" cancellation window
|
||||
endCancellationDate = type(uint256).max; // "infinite" cancellation window
|
||||
token.safeTransfer(owner(), tokenSupply);
|
||||
emit Shutdown(msg.sender);
|
||||
}
|
||||
|
|
|
@ -122,9 +122,9 @@ library SignatureVerifier {
|
|||
}
|
||||
bytes memory lengthAsText = new bytes(digits);
|
||||
length = _message.length;
|
||||
uint256 index = digits - 1;
|
||||
uint256 index = digits;
|
||||
while (length != 0) {
|
||||
lengthAsText[index--] = bytes1(uint8(48 + length % 10));
|
||||
lengthAsText[--index] = bytes1(uint8(48 + length % 10));
|
||||
length /= 10;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue