set immutables and constants

Fixes vacp2p/minime#21
This commit is contained in:
Ricardo Guilherme Schmidt
2023-09-14 16:56:29 -03:00
parent d6ce59e502
commit 9014aee8a2
2 changed files with 18 additions and 18 deletions

View File

@@ -1,13 +1,13 @@
AllowanceTest:testAllowance() (gas: 248574)
AllowanceTest:testDeployment() (gas: 52144)
CreateCloneTokenTest:testCreateCloneToken() (gas: 2209744)
CreateCloneTokenTest:testDeployment() (gas: 52099)
CreateCloneTokenTest:testGenerateTokens() (gas: 2084957)
DestroyTokensTest:testDeployment() (gas: 51928)
DestroyTokensTest:testDestroyTokens() (gas: 127040)
GenerateTokensTest:testDeployment() (gas: 51883)
GenerateTokensTest:testGenerateTokens() (gas: 116764)
AllowanceTest:testAllowance() (gas: 244240)
AllowanceTest:testDeployment() (gas: 45814)
CreateCloneTokenTest:testCreateCloneToken() (gas: 2165972)
CreateCloneTokenTest:testDeployment() (gas: 45769)
CreateCloneTokenTest:testGenerateTokens() (gas: 2045315)
DestroyTokensTest:testDeployment() (gas: 45598)
DestroyTokensTest:testDestroyTokens() (gas: 124840)
GenerateTokensTest:testDeployment() (gas: 45553)
GenerateTokensTest:testGenerateTokens() (gas: 114564)
GenerateTokensTest:test_RevertWhen_SenderIsNotController() (gas: 14930)
MiniMeTokenTest:testDeployment() (gas: 51928)
TransferTest:testDeployment() (gas: 52144)
TransferTest:testTransfer() (gas: 205596)
MiniMeTokenTest:testDeployment() (gas: 45598)
TransferTest:testDeployment() (gas: 45814)
TransferTest:testTransfer() (gas: 201218)

View File

@@ -48,9 +48,9 @@ import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
/// token controller contract, which Giveth will call a "Campaign"
contract MiniMeToken is Controlled, IERC20 {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
uint8 public immutable decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = "MMT_0.2"; //An arbitrary versioning scheme
string public constant TOKEN_VERSION = "MMT_0.2"; //An arbitrary versioning scheme
/// @dev `Checkpoint` is the structure that attaches a block number to a
/// given value, the block number attached is the one that last changed the
@@ -64,14 +64,14 @@ contract MiniMeToken is Controlled, IERC20 {
// `parentToken` is the Token address that was cloned to produce this token;
// it will be 0x0 for a token that was not cloned
MiniMeToken public parentToken;
MiniMeToken public immutable parentToken;
// `parentSnapShotBlock` is the block number from the Parent Token that was
// used to determine the initial distribution of the Clone Token
uint256 public parentSnapShotBlock;
uint256 public immutable parentSnapShotBlock;
// `creationBlock` is the block number that the Clone Token was created
uint256 public creationBlock;
uint256 public immutable creationBlock;
// `balances` is the map that tracks the balance of each address, in this
// contract when the balance changes the block number that the change
@@ -88,7 +88,7 @@ contract MiniMeToken is Controlled, IERC20 {
bool public transfersEnabled;
// The factory used to create new clone tokens
MiniMeTokenFactory public tokenFactory;
MiniMeTokenFactory public immutable tokenFactory;
////////////////
// Constructor