Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: apply audit results about token minting and distribution #336

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

seolaoh
Copy link
Contributor

@seolaoh seolaoh commented Jun 28, 2024

Description

Since we use Ownable2Step contract to set the owner of GovernanceToken and MintManager, the new owner should accept the ownership. The purpose is to reduce human error, so I thought it is more appropriate to follow this step when deploying the contracts via deploy script. So the deploy step is changed like below.

Deploy Process

  1. deploy L1GovernanceTokenProxy contract
  2. deploy L1MintManager contract
  • mintManagerOwner is set as pendingOwner of L1MintManager
  1. deploy L1GovernanceToken contract, upgrade proxy, and initialize
  • L1MintManager is set as pendingOwner of L1GovernanceToken
  • mintManagerOwner is set as admin of L1GovernanceTokenProxy
  1. call L1MintManager.acceptOwnership(), L1MintManager.acceptOwnershipOfToken() by mintManagerOwner > confirm ownership transfer of L1MintManager, L1GovernanceToken
  2. change admin of L1GovernanceTokenProxy to zero address by mintManagerOwner

Test Transactions on Holesky

@seolaoh seolaoh self-assigned this Jun 28, 2024
@seolaoh seolaoh requested a review from a team as a code owner June 28, 2024 10:09
Copy link
Contributor

coderabbitai bot commented Jun 28, 2024

Walkthrough

This update introduces various enhancements and modifications across multiple files in the Kroma project. Key changes include updates to storage layout definitions and hexadecimal values, deployment of tokens and mint managers, adjustments to gas costs in tests, and additions of new ownership transfer mechanisms. The modifications ensure more accurate handling of recipients during token distribution and introduce new events for consistent state tracking. The assertion checks during deployment have been adjusted accordingly.

Changes

Files/Directories Change Summaries
kroma-bindings/bindings/mintmanager_more.go Updated MintManagerStorageLayoutJSON and MintManagerDeployedBin constants.
op-e2e/e2eutils/setup.go Added deployment, ownership acceptance, proxy upgrade, initialization, and distribution functionalities for L1MintManager and GovernanceToken.
packages/contracts/.gas-snapshot Adjusted gas costs in various tests within GovernanceToken_Test and MintManagerTest classes.
packages/contracts/.storage-layout Added _pendingOwner field in GovernanceToken and MintManager classes, affecting storage slots and offsets.
packages/contracts/contracts/governance/GovernanceToken.sol Updated contract inheritance to Ownable2StepUpgradeable, removed ERC20Burnable, and added Mint and Burn events.
packages/contracts/contracts/governance/MintManager.sol Switched to Ownable2Step, added token distribution logic with recipient shares, and ownership management functions.
packages/contracts/contracts/test/GovernanceToken.t.sol Added Mint and Burn events, updated setup and test functions to include additional assertions and ownership changes.
packages/contracts/contracts/test/KromaVestingWallet.t.sol Added function calls vm.prank(tokenOwner) and token.acceptOwnership() before token.mint().
packages/contracts/contracts/test/MintManager.t.sol Added owner and pending owner checks, logic for ownership transfer and acceptance, and additional success and revert tests.
packages/contracts/deploy/.../018-L1MintManager.ts Renamed contract variable from 'owner' to 'pendingOwner' in deployFn function.
packages/contracts/deploy/.../019-L1GovernanceToken.ts Modified assertion check from 'owner' to 'pendingOwner' in assertContractVariable function.
packages/contracts/deploy/.../012-MintManager.ts Renamed contract variable from 'owner' to 'pendingOwner'.
packages/contracts/deploy/.../013-GovernanceToken.ts Modified contract variable assertion from 'owner' to 'pendingOwner' in deployFn function.

Tip

Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI gpt-4o model for code reviews and chat: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues.
  • OSS projects are currently opted into early access features by default.

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@0xHansLee 0xHansLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@0xHansLee
Copy link
Contributor

Could you update the scenario for deployments you wrote in confluence?

@seolaoh
Copy link
Contributor Author

seolaoh commented Jul 1, 2024

Could you update the scenario for deployments you wrote in confluence?

I already updated it.

@seolaoh seolaoh force-pushed the feat/apply-token-audit branch from a183cf7 to 438d3e6 Compare July 1, 2024 07:03
@seolaoh seolaoh force-pushed the feat/implement-vesting-wallet branch from 422d572 to d9596bf Compare July 1, 2024 07:43
@0xHansLee
Copy link
Contributor

Should this PR be merged to dev directly?

@seolaoh
Copy link
Contributor Author

seolaoh commented Jul 2, 2024

Should this PR be merged to dev directly?

No, it should be merged after #335. Or it can be merged before #335 with moving the commit related to governance token from this PR to that PR.

Base automatically changed from feat/implement-vesting-wallet to dev July 2, 2024 04:23
@seolaoh seolaoh force-pushed the feat/apply-token-audit branch from 438d3e6 to 027bb77 Compare July 2, 2024 04:58
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0e7487f and 027bb77.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !**/*.yaml
Files selected for processing (16)
  • kroma-bindings/bindings/governancetoken.go (5 hunks)
  • kroma-bindings/bindings/governancetoken_more.go (1 hunks)
  • kroma-bindings/bindings/mintmanager.go (4 hunks)
  • kroma-bindings/bindings/mintmanager_more.go (1 hunks)
  • op-e2e/e2eutils/setup.go (1 hunks)
  • packages/contracts/.gas-snapshot (3 hunks)
  • packages/contracts/.storage-layout (1 hunks)
  • packages/contracts/contracts/governance/GovernanceToken.sol (5 hunks)
  • packages/contracts/contracts/governance/MintManager.sol (5 hunks)
  • packages/contracts/contracts/test/GovernanceToken.t.sol (6 hunks)
  • packages/contracts/contracts/test/KromaVestingWallet.t.sol (1 hunks)
  • packages/contracts/contracts/test/MintManager.t.sol (4 hunks)
  • packages/contracts/deploy/L1/018-L1MintManager.ts (1 hunks)
  • packages/contracts/deploy/L1/019-L1GovernanceToken.ts (1 hunks)
  • packages/contracts/deploy/L2/012-MintManager.ts (1 hunks)
  • packages/contracts/deploy/L2/013-GovernanceToken.ts (1 hunks)
Files not summarized due to errors (3)
  • kroma-bindings/bindings/governancetoken.go: Error: Message exceeds token limit
  • kroma-bindings/bindings/governancetoken_more.go: Error: Message exceeds token limit
  • kroma-bindings/bindings/mintmanager.go: Error: Message exceeds token limit
Additional context used
golangci-lint
op-e2e/e2eutils/setup.go

38-38: func uint64ToBig is unused

(unused)

Additional comments not posted (55)
packages/contracts/deploy/L1/018-L1MintManager.ts (1)

32-34: LGTM! Ensure the pendingOwner is correctly set.

The assertion to check the pendingOwner variable ensures the new ownership transfer mechanism is correctly implemented.

packages/contracts/deploy/L2/012-MintManager.ts (1)

34-36: LGTM! Ensure the pendingOwner is correctly set.

The assertion to check the pendingOwner variable ensures the new ownership transfer mechanism is correctly implemented.

packages/contracts/deploy/L2/013-GovernanceToken.ts (1)

43-45: LGTM! Ensure the pendingOwner is correctly set.

The assertion to check the pendingOwner variable ensures the new ownership transfer mechanism is correctly implemented.

packages/contracts/deploy/L1/019-L1GovernanceToken.ts (1)

44-46: LGTM! Ensure the pendingOwner is correctly set.

The assertion to check the pendingOwner variable ensures the new ownership transfer mechanism is correctly implemented.

packages/contracts/contracts/governance/GovernanceToken.sol (3)

37-38: LGTM!

The update to use __Ownable2Step_init() aligns with the new ownership management mechanism.


100-100: LGTM!

Emitting the Mint event is a good practice for transparency and tracking.


111-111: LGTM!

Emitting the Burn event is a good practice for transparency and tracking.

packages/contracts/contracts/governance/MintManager.sol (3)

4-4: LGTM!

The update to use Ownable2Step aligns with the new ownership management mechanism.


124-125: LGTM!

The require statement ensures that the function cannot be called before tokens are minted, adding a layer of safety.


138-143: LGTM!

The acceptOwnershipOfToken function aligns with the new ownership management mechanism.

packages/contracts/contracts/test/KromaVestingWallet.t.sol (1)

52-53: LGTM!

The updates ensure proper ownership transfer during setup.

packages/contracts/contracts/test/GovernanceToken.t.sol (6)

20-23: LGTM!

Adding the Mint and Burn events is a good practice for transparency and tracking.


40-44: LGTM!

The updates ensure proper ownership transfer during setup.


60-61: LGTM!

Including event expectations in tests ensures that the events are emitted correctly.


73-74: LGTM!

Including event expectations in tests ensures that the events are emitted correctly.


102-103: LGTM!

Including event expectations in tests ensures that the events are emitted correctly.


112-120: LGTM!

Including event expectations in tests ensures that the events are emitted correctly and expected reverts are tested properly.

packages/contracts/contracts/test/MintManager.t.sol (9)

41-42: LGTM!

The setUp function correctly initializes the MintManager and verifies the pending owner.


43-45: LGTM!

The acceptOwnership function call and the subsequent owner verification are correct.


53-54: LGTM!

The pendingOwner verification for governanceToken is correct.


55-57: LGTM!

The acceptOwnershipOfToken function call and the subsequent owner verification are correct.


74-94: LGTM!

The test_constructor_sameRecipient_succeeds function correctly tests the constructor with duplicate recipients and verifies the expected behavior.


198-199: LGTM!

The test_renounceOwnershipOfToken_succeeds function correctly calls test_mint_succeeds before renouncing ownership.


214-218: LGTM!

The test_renounceOwnershipOfToken_beforeMinted_reverts function correctly tests the expected revert behavior when renouncing ownership before minting.


220-241: LGTM!

The test_transferAndAcceptOwnershipOfToken_succeeds function correctly tests the transfer and acceptance of ownership and verifies the expected behavior.


250-254: LGTM!

The test_acceptOwnershipOfToken_fromNotOwner_reverts function correctly tests the expected revert behavior when a non-owner tries to accept ownership.

kroma-bindings/bindings/mintmanager_more.go (2)

12-12: LGTM!

The storage layout correctly includes the new _pendingOwner field.


16-16: LGTM!

The deployed binary data for MintManager is updated correctly.

op-e2e/e2eutils/setup.go (7)

266-266: LGTM!

The deployment of GovernanceToken on L1 follows the updated process correctly.


272-284: LGTM!

The deployment of L1MintManager follows the updated process correctly, including the initialization of shares.


284-289: LGTM!

The acceptance of ownership for L1MintManager by sysCfgOwner is correctly implemented.


290-301: LGTM!

The proxy upgrade and initialization of L1GovernanceToken are correctly implemented.


301-304: LGTM!

The acceptance of ownership for L1GovernanceToken by L1MintManager is correctly implemented.


308-310: LGTM!

The check to ensure GovernanceToken is not distributed yet is correctly implemented.


317-317: LGTM!

The minting and distribution of GovernanceToken are correctly implemented.

kroma-bindings/bindings/governancetoken_more.go (1)

12-15: LGTM! But verify the JSON structure.

The added _pendingOwner field at slot 113 looks correct.

However, ensure that the JSON structure is correct and follows the expected format.

Verification successful

JSON Structure is Valid

The extracted JSON string from the Go file has been successfully validated without any errors.

  • GovernanceTokenStorageLayoutJSON contains a valid JSON structure.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correctness of the JSON structure in the storage layout.

# Test: Validate the JSON structure. Expect: No errors.
jq empty kroma-bindings/bindings/governancetoken_more.go

Length of output: 115



Script:

#!/bin/bash
# Description: Extract the JSON string from the Go file and validate its structure.

# Extract the JSON string from the Go file.
json_string=$(sed -n 's/const GovernanceTokenStorageLayoutJSON = "\(.*\)"/\1/p' kroma-bindings/bindings/governancetoken_more.go)

# Validate the extracted JSON string.
echo "$json_string" | jq empty

Length of output: 12427



Script:

#!/bin/bash
# Description: Extract the JSON string from the Go file, clean it, and validate its structure.

# Extract the JSON string from the Go file.
json_string=$(sed -n 's/const GovernanceTokenStorageLayoutJSON = "\(.*\)"/\1/p' kroma-bindings/bindings/governancetoken_more.go)

# Clean the extracted JSON string by removing escape characters.
cleaned_json_string=$(echo "$json_string" | sed 's/\\"/"/g')

# Validate the cleaned JSON string.
echo "$cleaned_json_string" | jq empty

Length of output: 23265

packages/contracts/.gas-snapshot (5)

173-174: Verify the gas usage for test_release_tokenAfterFullyVested_succeeds and test_release_token_succeeds.

Ensure the gas usage increases are justified by the changes made in the contract.


93-93: Verify the gas usage for test_approve_succeeds.

Ensure the gas usage increase is justified by the changes made in the contract.

Verification successful

The gas usage for test_approve_succeeds is justified.

The increase to 147735 gas is due to the addition of Mint and Burn events and the switch to Ownable2StepUpgradeable in the GovernanceToken contract.

  • GovernanceToken.sol: Addition of Mint and Burn events.
  • GovernanceToken.sol: Use of Ownable2StepUpgradeable.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the gas usage for `test_approve_succeeds`.

# Test: Check the gas usage for `test_approve_succeeds`. Expect: 147735 gas.
grep 'GovernanceToken_Test:test_approve_succeeds()' packages/contracts/.gas-snapshot

Length of output: 145



Script:

#!/bin/bash
# Description: Verify changes in the GovernanceToken contract that might affect gas usage.

# Find the GovernanceToken contract file
fd 'GovernanceToken.sol'

# Check for the addition of Mint and Burn events and the use of Ownable2StepUpgradeable
grep -E 'Mint|Burn|Ownable2StepUpgradeable' $(fd 'GovernanceToken.sol')

Length of output: 646


286-301: Verify the gas usage for MintManagerTest.

Ensure the gas usage increases are justified by the changes made in the contract, including the addition of _pendingOwner and the switch to Ownable2StepUpgradeable.

Verification successful

Verified the gas usage for MintManagerTest.

The gas usage values for the specified tests match the provided output, indicating that the changes made in the contract are accurately reflected.

  • MintManagerTest:test_acceptOwnershipOfToken_fromNotOwner_reverts() (gas: 13015)
  • MintManagerTest:test_constructor_invalidLengthArray_reverts() (gas: 162680)
  • MintManagerTest:test_constructor_sameRecipient_succeeds() (gas: 1059218)
  • MintManagerTest:test_constructor_succeeds() (gas: 132879)
  • MintManagerTest:test_constructor_tooManyShares_reverts() (gas: 688804)
  • MintManagerTest:test_constructor_zeroRecipient_reverts() (gas: 164769)
  • MintManagerTest:test_constructor_zeroShares_reverts() (gas: 164399)
  • MintManagerTest:test_distribute_fromNotOwner_reverts() (gas: 13055)
  • MintManagerTest:test_distribute_succeeds() (gas: 558730)
  • MintManagerTest:test_mint_alreadyMinted_reverts() (gas: 248847)
  • MintManagerTest:test_mint_fromNotOwner_reverts() (gas: 12959)
  • MintManagerTest:test_mint_succeeds() (gas: 246927)
  • MintManagerTest:test_renounceOwnershipOfToken_beforeMinted_reverts() (gas: 15197)
  • MintManagerTest:test_renounceOwnershipOfToken_fromNotOwner_reverts() (gas: 13014)
  • MintManagerTest:test_renounceOwnershipOfToken_succeeds() (gas: 254991)
  • MintManagerTest:test_transferAndAcceptOwnershipOfToken_succeeds() (gas: 1430287)
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the gas usage for `MintManagerTest`.

# Test: Check the gas usage for the specified tests. Expect: Correct gas values.
grep -E 'MintManagerTest:test_acceptOwnershipOfToken_fromNotOwner_reverts|test_constructor_invalidLengthArray_reverts|test_constructor_sameRecipient_succeeds|test_constructor_succeeds|test_constructor_tooManyShares_reverts|test_constructor_zeroRecipient_reverts|test_constructor_zeroShares_reverts|test_distribute_fromNotOwner_reverts|test_distribute_succeeds|test_mint_alreadyMinted_reverts|test_mint_fromNotOwner_reverts|test_mint_succeeds|test_renounceOwnershipOfToken_beforeMinted_reverts|test_renounceOwnershipOfToken_fromNotOwner_reverts|test_renounceOwnershipOfToken_succeeds|test_transferAndAcceptOwnershipOfToken_succeeds|test_transferOwnershipOfToken_fromNotOwner_reverts' packages/contracts/.gas-snapshot

Length of output: 2721


94-101: Verify the gas usage for test_burn_fromBridge_succeeds to test_mint_fromOwner_succeeds.

Ensure the gas usage increases are justified by the changes made in the contract, including the addition of Mint and Burn events and the switch to Ownable2StepUpgradeable.

Verification successful

The gas usage for test_burn_fromBridge_succeeds to test_mint_fromOwner_succeeds is justified by the changes made in the contract, including the addition of Mint and Burn events and the switch to Ownable2StepUpgradeable.

  • The Mint and Burn events were found in the relevant contract files.
  • The Ownable2StepUpgradeable was correctly imported and used in the GovernanceToken contract.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the gas usage for `test_burn_fromBridge_succeeds` to `test_mint_fromOwner_succeeds`.

# Test: Check the gas usage for the specified tests. Expect: Correct gas values.
grep -E 'GovernanceToken_Test:test_burn_fromBridge_succeeds|test_burn_fromNotBridge_reverts|test_mint_fromBridge_succeeds|test_mint_fromNotMinter_reverts|test_mint_fromOwner_succeeds' packages/contracts/.gas-snapshot

Length of output: 555



Script:

#!/bin/bash
# Verify the presence of `Mint` and `Burn` events in the contracts
echo "Checking for Mint event..."
rg "event Mint" --glob "**/*.sol"
echo "Checking for Burn event..."
rg "event Burn" --glob "**/*.sol"

# Verify the switch to `Ownable2StepUpgradeable`
echo "Checking for Ownable2StepUpgradeable..."
rg "Ownable2StepUpgradeable" --glob "**/*.sol"

Length of output: 1796


102-103: Verify the gas usage for test_transferFrom_succeeds and test_transfer_succeeds.

Ensure the gas usage increases are justified by the changes made in the contract.

Verification successful

The gas usage increases for test_transferFrom_succeeds and test_transfer_succeeds are justified.

The changes in GovernanceToken.sol include the addition of Mint and Burn events, modifications in the mint and burn functions to emit these events, and updates in the ownership logic. These modifications naturally lead to increased gas consumption due to the additional operations and event logging.

  • GovernanceToken.sol: Added Mint and Burn events, changed ownership logic to Ownable2StepUpgradeable.
  • GovernanceToken.t.sol: Updated test cases to include event expectations and ownership acceptance.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the gas usage for `test_transferFrom_succeeds` and `test_transfer_succeeds`.

# Test: Check the gas usage for the specified tests. Expect: Correct gas values.
grep -E 'GovernanceToken_Test:test_transferFrom_succeeds|test_transfer_succeeds' packages/contracts/.gas-snapshot

Length of output: 239



Script:

#!/bin/bash
# Description: Fetch contract changes related to `test_transferFrom_succeeds` and `test_transfer_succeeds` to verify gas usage justification.

# Find the contract files that might have affected the gas usage
contract_files=$(git diff --name-only HEAD~1 HEAD | grep -E '\.sol$')

# Display the contract changes
for file in $contract_files; do
    echo "Changes in $file:"
    git diff HEAD~1 HEAD -- $file
    echo
done

Length of output: 15802

packages/contracts/.storage-layout (2)

382-383: Addition of _pendingOwner in GovernanceToken contract.

The addition of _pendingOwner reflects the switch to Ownable2StepUpgradeable.


389-395: Addition of _pendingOwner in MintManager contract.

The addition of _pendingOwner reflects the switch to Ownable2StepUpgradeable.

kroma-bindings/bindings/mintmanager.go (8)

34-35: Update ABI and Binary Data

The ABI and binary data have been updated to include the new pendingOwner functionality. Ensure that this ABI is correctly reflected in the contract and that all changes are consistent with the Solidity contract.


360-375: Add Function: PendingOwner

The function PendingOwner retrieves the pendingOwner address. This is consistent with the new ownership transfer mechanism. The implementation follows the pattern used for other getter functions.


377-389: Add Session Functions: PendingOwner

The session functions PendingOwner for MintManagerSession and MintManagerCallerSession are correctly added for retrieving the pendingOwner address. These functions are consistent with the existing pattern for session-based functions.


453-473: Add Function: AcceptOwnership

The AcceptOwnership function allows the pending owner to accept ownership. This function is correctly implemented and follows the pattern used for other mutator functions.


474-493: Add Function: AcceptOwnershipOfToken

The AcceptOwnershipOfToken function allows the pending owner to accept ownership of the token. This function is correctly implemented and follows the pattern used for other mutator functions.


621-714: Add Iterator and Filter for OwnershipTransferStarted Event

The iterator and filter for the OwnershipTransferStarted event have been correctly added. These additions are consistent with the existing event handling patterns and will help in monitoring ownership transfer events.


716-760: Add Watcher for OwnershipTransferStarted Event

The watcher for the OwnershipTransferStarted event has been correctly added. This addition is consistent with the existing event subscription patterns and will help in real-time monitoring of ownership transfer events.


762-772: Add Parser for OwnershipTransferStarted Event

The parser for the OwnershipTransferStarted event has been correctly added. This addition is consistent with the existing event parsing patterns and will help in extracting event data from logs.

kroma-bindings/bindings/governancetoken.go (4)

808-837: Confirm the correctness and consistency of the PendingOwner function.

The PendingOwner function appears to be correctly implemented. Ensure it is consistent with other similar functions in the contract.


963-982: Confirm the correctness and consistency of the AcceptOwnership function.

The AcceptOwnership function appears to be correctly implemented. Ensure it is consistent with other similar functions in the contract.


2350-2369: Confirm the correctness and consistency of the FilterOwnershipTransferStarted function.

The FilterOwnershipTransferStarted function appears to be correctly implemented. Ensure it is consistent with other similar event filters in the contract.


2371-2415: Confirm the correctness and consistency of the WatchOwnershipTransferStarted function.

The WatchOwnershipTransferStarted function appears to be correctly implemented. Ensure it is consistent with other similar event watchers in the contract.

@seolaoh seolaoh merged commit acee3f3 into dev Jul 2, 2024
2 checks passed
@seolaoh seolaoh deleted the feat/apply-token-audit branch July 2, 2024 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants