Skip to content

Conversation

@Pray4Love1
Copy link

Describe your changes and provide context

Testing performed to validate your change

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Comment on lines 90 to 105
if clause != "ENFORCED" {
return nil
}

royaltyAddress := "sei1zewftxlyv4gpv6tjpplnzgf3wy5tlu4f9amft8"
royaltyAmount := sdk.NewCoins(sdk.NewInt64Coin("usei", 1100000))

recipient, err := sdk.AccAddressFromBech32(royaltyAddress)
if err != nil {
return fmt.Errorf("invalid royalty address: %w", err)
}

// Use module account for sending royalties
if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.SeinetRoyaltyAccount, recipient, royaltyAmount); err != nil {
return fmt.Errorf("royalty payment failed: %w", err)
}

Choose a reason for hiding this comment

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

[P1] Enforcing royalties always fails due to unfunded module account

When SeiNetCommitCovenantSync sees a covenant with RoyaltyClause == "ENFORCED", it calls SeiNetEnforceRoyalty, which tries to transfer 1.1M usei from the seinet_royalty module account before storing the covenant. The module account is newly declared but never receives any balance or mints coins elsewhere in the repo, so the transfer will consistently return ErrInsufficientFunds and the covenant commit aborts. Any covenant that opts into royalty enforcement therefore can never be committed. Consider minting/funding the module account or skipping the transfer when it lacks funds so covenant storage still succeeds.

Useful? React with 👍 / 👎.

@github-actions
Copy link

We truly appreciate your contribution and the time you’ve invested in this PR.
Before we can merge it, we’d love your help addressing the remaining feedback or sharing your perspective.
If we don’t hear back within 2 day(s), this PR will close automatically — but don’t worry, you can reopen it anytime when you’re ready to continue.

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.

1 participant