From 94ea23e7a65b2c97830fcad4f891c7c43693e7f2 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Wed, 9 Mar 2022 15:55:52 +0100 Subject: [PATCH] Override contract size in preparation for new transpilation workflow - Mocks are not "fixed" --- contracts/finance/VestingWallet.sol | 2 ++ contracts/governance/extensions/GovernorVotes.sol | 2 ++ contracts/governance/extensions/GovernorVotesComp.sol | 2 ++ contracts/security/PullPayment.sol | 2 ++ contracts/token/ERC20/extensions/ERC20Capped.sol | 2 ++ contracts/token/ERC20/extensions/ERC20Wrapper.sol | 2 ++ contracts/token/ERC20/extensions/draft-ERC20Permit.sol | 2 ++ contracts/token/ERC20/utils/TokenTimelock.sol | 2 ++ contracts/utils/cryptography/draft-EIP712.sol | 2 ++ 9 files changed, 18 insertions(+) diff --git a/contracts/finance/VestingWallet.sol b/contracts/finance/VestingWallet.sol index 5ffbfcb65..891910729 100644 --- a/contracts/finance/VestingWallet.sol +++ b/contracts/finance/VestingWallet.sol @@ -16,6 +16,8 @@ import "../utils/math/Math.sol"; * Any token transferred to this contract will follow the vesting schedule as if they were locked from the beginning. * Consequently, if the vesting has already started, any amount of tokens sent to this contract will (at least partly) * be immediately releasable. + * + * @custom:storage-size 52 */ contract VestingWallet is Context { event EtherReleased(uint256 amount); diff --git a/contracts/governance/extensions/GovernorVotes.sol b/contracts/governance/extensions/GovernorVotes.sol index f0a2276fb..40ad57beb 100644 --- a/contracts/governance/extensions/GovernorVotes.sol +++ b/contracts/governance/extensions/GovernorVotes.sol @@ -10,6 +10,8 @@ import "../utils/IVotes.sol"; * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} token. * * _Available since v4.3._ + * + * @custom:storage-size 51 */ abstract contract GovernorVotes is Governor { IVotes public immutable token; diff --git a/contracts/governance/extensions/GovernorVotesComp.sol b/contracts/governance/extensions/GovernorVotesComp.sol index c31c9583b..d9f83df26 100644 --- a/contracts/governance/extensions/GovernorVotesComp.sol +++ b/contracts/governance/extensions/GovernorVotesComp.sol @@ -10,6 +10,8 @@ import "../../token/ERC20/extensions/ERC20VotesComp.sol"; * @dev Extension of {Governor} for voting weight extraction from a Comp token. * * _Available since v4.3._ + * + * @custom:storage-size 51 */ abstract contract GovernorVotesComp is Governor { ERC20VotesComp public immutable token; diff --git a/contracts/security/PullPayment.sol b/contracts/security/PullPayment.sol index 6a50f2cb2..38377dbca 100644 --- a/contracts/security/PullPayment.sol +++ b/contracts/security/PullPayment.sol @@ -22,6 +22,8 @@ import "../utils/escrow/Escrow.sol"; * To use, derive from the `PullPayment` contract, and use {_asyncTransfer} * instead of Solidity's `transfer` function. Payees can query their due * payments with {payments}, and retrieve them with {withdrawPayments}. + * + * @custom:storage-size 51 */ abstract contract PullPayment { Escrow private immutable _escrow; diff --git a/contracts/token/ERC20/extensions/ERC20Capped.sol b/contracts/token/ERC20/extensions/ERC20Capped.sol index 16f830d18..9ef981486 100644 --- a/contracts/token/ERC20/extensions/ERC20Capped.sol +++ b/contracts/token/ERC20/extensions/ERC20Capped.sol @@ -7,6 +7,8 @@ import "../ERC20.sol"; /** * @dev Extension of {ERC20} that adds a cap to the supply of tokens. + * + * @custom:storage-size 51 */ abstract contract ERC20Capped is ERC20 { uint256 private immutable _cap; diff --git a/contracts/token/ERC20/extensions/ERC20Wrapper.sol b/contracts/token/ERC20/extensions/ERC20Wrapper.sol index 32a3b830a..115ff90b0 100644 --- a/contracts/token/ERC20/extensions/ERC20Wrapper.sol +++ b/contracts/token/ERC20/extensions/ERC20Wrapper.sol @@ -14,6 +14,8 @@ import "../utils/SafeERC20.sol"; * wrapping of an existing "basic" ERC20 into a governance token. * * _Available since v4.2._ + * + * @custom:storage-size 51 */ abstract contract ERC20Wrapper is ERC20 { IERC20 public immutable underlying; diff --git a/contracts/token/ERC20/extensions/draft-ERC20Permit.sol b/contracts/token/ERC20/extensions/draft-ERC20Permit.sol index cf72fc086..4f39fa184 100644 --- a/contracts/token/ERC20/extensions/draft-ERC20Permit.sol +++ b/contracts/token/ERC20/extensions/draft-ERC20Permit.sol @@ -18,6 +18,8 @@ import "../../../utils/Counters.sol"; * need to send a transaction, and thus is not required to hold Ether at all. * * _Available since v3.4._ + * + * @custom:storage-size 51 */ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 { using Counters for Counters.Counter; diff --git a/contracts/token/ERC20/utils/TokenTimelock.sol b/contracts/token/ERC20/utils/TokenTimelock.sol index d879a7e7d..9fe068b26 100644 --- a/contracts/token/ERC20/utils/TokenTimelock.sol +++ b/contracts/token/ERC20/utils/TokenTimelock.sol @@ -11,6 +11,8 @@ import "./SafeERC20.sol"; * * Useful for simple vesting schedules like "advisors get all of their tokens * after 1 year". + * + * @custom:storage-size 53 */ contract TokenTimelock { using SafeERC20 for IERC20; diff --git a/contracts/utils/cryptography/draft-EIP712.sol b/contracts/utils/cryptography/draft-EIP712.sol index 865a9baa0..eb710eeb2 100644 --- a/contracts/utils/cryptography/draft-EIP712.sol +++ b/contracts/utils/cryptography/draft-EIP712.sol @@ -23,6 +23,8 @@ import "./ECDSA.sol"; * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ + * + * @custom:storage-size 52 */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */