@0x/contracts-zero-ex: Add Unused to StorageId enum
This commit is contained in:
@@ -72,7 +72,7 @@ contract Migrate is
|
||||
// If the owner is already set to ourselves then we've reentered.
|
||||
_rrevert(LibMigrateRichErrors.AlreadyMigratingError());
|
||||
}
|
||||
// Temporarily set the owner to ourselves.
|
||||
// Temporarily set the owner to ourselves to enable admin functions.
|
||||
ownableStor.owner = address(this);
|
||||
stor.migrationOwner = prevOwner;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ contract Ownable is
|
||||
/// @param impl the actual address of this feature contract.
|
||||
/// @return success Magic bytes if successful.
|
||||
function bootstrap(address impl) external returns (bytes4 success) {
|
||||
// Set the owner.
|
||||
// Set the owner to ourselves to allow bootstrappers to call `extend()`.
|
||||
LibOwnableStorage.getStorage().owner = address(this);
|
||||
|
||||
// Register feature functions.
|
||||
|
||||
@@ -30,6 +30,7 @@ library LibStorage {
|
||||
|
||||
/// @dev Storage IDs for feature storage buckets.
|
||||
enum StorageId {
|
||||
Unused, // Unused buffer for state accidents.
|
||||
Proxy,
|
||||
SimpleFunctionRegistry,
|
||||
Ownable,
|
||||
@@ -44,7 +45,6 @@ library LibStorage {
|
||||
pure
|
||||
returns (uint256 offset)
|
||||
{
|
||||
// We don't use safeMul here to save gas.
|
||||
// This should never overflow with a reasonable `STORAGE_OFFSET_MULTIPLIER`
|
||||
// because Solidity will do a range check on `storageId` during the cast.
|
||||
return uint256(storageId) * STORAGE_OFFSET_MULTIPLIER;
|
||||
|
||||
Reference in New Issue
Block a user