Migrate utils to ethersjs v6 (#4736)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: ernestognw <ernestognw@gmail.com>
This commit is contained in:
@ -4,7 +4,7 @@ pragma solidity ^0.8.20;
|
||||
|
||||
import {ERC20MulticallMock} from "./token/ERC20MulticallMock.sol";
|
||||
|
||||
contract MulticallTest {
|
||||
contract MulticallHelper {
|
||||
function checkReturnValues(
|
||||
ERC20MulticallMock multicallToken,
|
||||
address[] calldata recipients,
|
||||
@ -7,41 +7,41 @@ import {StorageSlot} from "../utils/StorageSlot.sol";
|
||||
contract StorageSlotMock {
|
||||
using StorageSlot for *;
|
||||
|
||||
function setBoolean(bytes32 slot, bool value) public {
|
||||
function setBooleanSlot(bytes32 slot, bool value) public {
|
||||
slot.getBooleanSlot().value = value;
|
||||
}
|
||||
|
||||
function setAddress(bytes32 slot, address value) public {
|
||||
function setAddressSlot(bytes32 slot, address value) public {
|
||||
slot.getAddressSlot().value = value;
|
||||
}
|
||||
|
||||
function setBytes32(bytes32 slot, bytes32 value) public {
|
||||
function setBytes32Slot(bytes32 slot, bytes32 value) public {
|
||||
slot.getBytes32Slot().value = value;
|
||||
}
|
||||
|
||||
function setUint256(bytes32 slot, uint256 value) public {
|
||||
function setUint256Slot(bytes32 slot, uint256 value) public {
|
||||
slot.getUint256Slot().value = value;
|
||||
}
|
||||
|
||||
function getBoolean(bytes32 slot) public view returns (bool) {
|
||||
function getBooleanSlot(bytes32 slot) public view returns (bool) {
|
||||
return slot.getBooleanSlot().value;
|
||||
}
|
||||
|
||||
function getAddress(bytes32 slot) public view returns (address) {
|
||||
function getAddressSlot(bytes32 slot) public view returns (address) {
|
||||
return slot.getAddressSlot().value;
|
||||
}
|
||||
|
||||
function getBytes32(bytes32 slot) public view returns (bytes32) {
|
||||
function getBytes32Slot(bytes32 slot) public view returns (bytes32) {
|
||||
return slot.getBytes32Slot().value;
|
||||
}
|
||||
|
||||
function getUint256(bytes32 slot) public view returns (uint256) {
|
||||
function getUint256Slot(bytes32 slot) public view returns (uint256) {
|
||||
return slot.getUint256Slot().value;
|
||||
}
|
||||
|
||||
mapping(uint256 key => string) public stringMap;
|
||||
|
||||
function setString(bytes32 slot, string calldata value) public {
|
||||
function setStringSlot(bytes32 slot, string calldata value) public {
|
||||
slot.getStringSlot().value = value;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ contract StorageSlotMock {
|
||||
stringMap[key].getStringSlot().value = value;
|
||||
}
|
||||
|
||||
function getString(bytes32 slot) public view returns (string memory) {
|
||||
function getStringSlot(bytes32 slot) public view returns (string memory) {
|
||||
return slot.getStringSlot().value;
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ contract StorageSlotMock {
|
||||
|
||||
mapping(uint256 key => bytes) public bytesMap;
|
||||
|
||||
function setBytes(bytes32 slot, bytes calldata value) public {
|
||||
function setBytesSlot(bytes32 slot, bytes calldata value) public {
|
||||
slot.getBytesSlot().value = value;
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ contract StorageSlotMock {
|
||||
bytesMap[key].getBytesSlot().value = value;
|
||||
}
|
||||
|
||||
function getBytes(bytes32 slot) public view returns (bytes memory) {
|
||||
function getBytesSlot(bytes32 slot) public view returns (bytes memory) {
|
||||
return slot.getBytesSlot().value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user