Closed seolaoh closed 3 months ago
The recent changes involve adding and modifying functionalities related to governance token management, minting, and deployment across both L1 and L2 networks. Key updates include the introduction of new deployment scripts, governance modifications in configurations, storage layout changes for GovernanceToken
and MintManager
contracts, and updates to testing functions. The changes aim to enhance minting processes, streamline token governance, and improve testing frameworks.
Files/Paths | Change Summary |
---|---|
kroma-bindings/bindings/mintmanager_more.go |
Introduced a new file for MintManager contract binding, setting up storage layout and deployed bytecode. |
kroma-chain-ops/genesis/config.go |
Added and modified governance token fields, mint managers, and proxies configurations in DeployConfig struct. |
kroma-chain-ops/genesis/layer_two_test.go |
Adjusted isProxy condition in tests and added governance checks. |
op-e2e/bridge_test.go |
Refined bridge functionality tests, updated logging levels, adjusted variable assignments, transaction handling, and assertions for GovernanceToken bridging between L1 and L2. |
op-e2e/setup.go |
Added functions for minting and setting up governance tokens on L1, alongside new imports. |
packages/contracts/.gas-snapshot |
Updated gas cost details for GovernanceToken_Test and MintManagerTest cases. |
packages/contracts/.storage-layout |
Detailed the changes in the storage layout for GovernanceToken.sol and MintManager.sol . |
packages/contracts/contracts/governance/GovernanceToken.sol |
Applied various changes for minting and burning logic, owner initialization, and several function overrides. |
packages/contracts/contracts/governance/MintManager.sol |
Added functions and constants for token minting and distribution, and renouncing ownership. |
packages/contracts/contracts/libraries/Predeploys.sol |
Removed the constant address declaration for the GOVERNANCE_TOKEN . |
packages/contracts/deploy/L1/001-Proxies.ts |
Removed L1GovernanceTokenProxy from the PROXY_NAMES array. |
packages/contracts/deploy/L1/017-L1GovernanceTokenProxy.ts |
Introduced a deployment function for L1GovernanceTokenProxy using deployDeterministicProxy . |
packages/contracts/deploy/L1/018-L1MintManager.ts |
Added a deployment script for L1MintManager with specific configurations. |
packages/contracts/deploy/L1/019-L1GovernanceToken.ts |
Updated deployment details, removed isProxyImpl , and adjusted tags. |
packages/contracts/deploy/L2/011-GovernanceTokenProxy.ts |
Added a new deployment function for GovernanceTokenProxy on L2 using hardhat-deploy . |
packages/contracts/deploy/L2/012-MintManager.ts |
Introduced a deployment function for MintManager on L2 with specific configuration settings. |
packages/contracts/deploy/L2/013-GovernanceToken.ts |
Adjusted deployment for GovernanceToken , refactoring argument passing and updating deployment tags. |
packages/contracts/scripts/rename-deploy-scripts.ts |
Renamed deployment script entries for L1GovernanceToken to L1GovernanceTokenProxy and L1MintManager . |
sequenceDiagram
participant User
participant L1Client
participant L2Client
participant DeployConfig
participant L1Deployments
participant L2Deployments
participant GovernanceToken
participant MintManager
User->>L1Client: MintGovernanceTokenOnL1
L1Client->>DeployConfig: Get MintManager address
L1Client->>GovernanceToken: Mint tokens
GovernanceToken-->>L1Client: Tokens minted
L1Client-->>User: Token Mint Success
User->>L2Client: SetupGovernanceTokenOnL2
L2Client->>DeployConfig: Get MintManager address
L2Client->>GovernanceToken: Setup tokens
GovernanceToken-->>L2Client: Tokens setup complete
L2Client-->>User: Token Setup Success
sequenceDiagram
participant User
participant ConfigScript
participant DeployScript
participant Proxy
participant GovernanceToken
participant MintManager
User->>ConfigScript: Deploy Configurations
ConfigScript->>DeployScript: Initialize Proxies and Managers
DeployScript->>Proxy: Deploy GovernanceTokenProxy
Proxy-->>DeployScript: GovernanceTokenProxy Deployed
DeployScript->>MintManager: Set up MintManager
MintManager-->>DeployScript: MintManager Set up
DeployScript-->>User: Configuration Deployed
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
Implemented
GovernanceToken
andMintManager
contracts.GovernanceToken
will be minted and distributed on both L1 and L2 in TGE.GovernanceToken
isKromaMintableERC20
, which can be bridged between both chains via standard bridge.MintManager
is the owner ofGovernanceToken
which can mint tokens, and it hasmint
anddistribute
function to automate the minting and distribution to several recipients.MintManager
also has an owner who has the permission to callmint
anddistribute
.Note that
GovernanceToken
is proxy contract butMintManager
is not. Additionally,GovernanceTokenProxy
is deployed usingCREATE2
to fix the same token address across multi-chains.Process to Follow in TGE
L1GovernanceToken
proxy with deterministic address (w/mintManagerOwner
set to admin)L1MintManager
(w/mintManagerOwner
set to owner)L1GovernanceToken
implementationL1GovernanceToken
proxy with ownership transfer toL1MintManager
bymintManagerOwner
GovernanceToken
proxy with deterministic address (w/mintManagerOwner
set to admin)MintManager
(w/mintManagerOwner
set to owner)GovernanceToken
implementationGovernanceToken
proxy with ownership transfer toMintManager
bymintManagerOwner
L1GovernanceToken.changeAdmin()
,GovernanceToken.changeAdmin()
to zero address bymintManagerOwner
L1MintManager.mint()
L1MintManager.renounceOwnershipOfToken()
byL1MintManager
ownerL1MintManager.distribute()
MintManager.mint()
MintManager.renounceOwnershipOfToken()
byMintManager
ownerMintManager.distribute()
Test Contracts on Holesky