This pull request introduces significant changes to the token minting and allowance system by replacing the MintAllowanceUpgradeable contract with a new RateLimitsUpgradeable contract. Additionally, it includes various updates to deployment scripts and contract configurations to align with the new rate limits approach.
Key Changes:
Major Contract Updates:
Rate Limits Implementation:
Replaced MintAllowanceUpgradeable with RateLimitsUpgradeable to manage minting and burning limits more dynamically (src/RateLimitsUpgradeable.sol).
Updated Token contract to use RateLimitsUpgradeable instead of MintAllowanceUpgradeable (src/Token.sol). [1][2][3]
Contract Adjustments:
Modified various controller contracts (ControllerToken, EthereumControllerToken, GnosisControllerToken, PolygonControllerToken) to use _useMinterLimits instead of _useMintAllowance for checking minting permissions. [1][2][3][4]
Deployment and Configuration Scripts:
Script Updates:
Updated configureToken.s.sol to use LIMIT_CAP instead of MAX_MINT_ALLOWANCE and added new logic for setting rate limits (script/configureToken.s.sol). [1][2]
Added support for Gnosis Mainnet deployment in deployAll.sh (script/deployAll.sh). [1][2]
Updated shell script to use LIMIT_CAP environment variable (script/configureToken.sh).
Batch Mint Script:
Commented out the setMaxMintAllowance and setMintAllowance calls in the batchMint.s.sol script, indicating a shift away from the old allowance system (script/batchMint.s.sol).
These changes collectively enhance the flexibility and security of the token minting process by introducing rate limits and updating the deployment scripts to support the new system.
This pull request introduces significant changes to the token minting and allowance system by replacing the
MintAllowanceUpgradeable
contract with a newRateLimitsUpgradeable
contract. Additionally, it includes various updates to deployment scripts and contract configurations to align with the new rate limits approach.Key Changes:
Major Contract Updates:
Rate Limits Implementation:
MintAllowanceUpgradeable
withRateLimitsUpgradeable
to manage minting and burning limits more dynamically (src/RateLimitsUpgradeable.sol
).Token
contract to useRateLimitsUpgradeable
instead ofMintAllowanceUpgradeable
(src/Token.sol
). [1] [2] [3]Contract Adjustments:
ControllerToken
,EthereumControllerToken
,GnosisControllerToken
,PolygonControllerToken
) to use_useMinterLimits
instead of_useMintAllowance
for checking minting permissions. [1] [2] [3] [4]Deployment and Configuration Scripts:
Script Updates:
configureToken.s.sol
to useLIMIT_CAP
instead ofMAX_MINT_ALLOWANCE
and added new logic for setting rate limits (script/configureToken.s.sol
). [1] [2]deployAll.sh
(script/deployAll.sh
). [1] [2]LIMIT_CAP
environment variable (script/configureToken.sh
).Batch Mint Script:
setMaxMintAllowance
andsetMintAllowance
calls in thebatchMint.s.sol
script, indicating a shift away from the old allowance system (script/batchMint.s.sol
).These changes collectively enhance the flexibility and security of the token minting process by introducing rate limits and updating the deployment scripts to support the new system.