Skip to content

Conversation

@merolish
Copy link
Contributor

@merolish merolish commented Oct 21, 2025

Summary

Support multisig oracle update as per https://hyperliquid.gitbook.io/hyperliquid-docs/hypercore/multi-sig .

Rationale

This allows us to provide our own wallet for updating without ever having access to the deployer oracle account. They can grant and revoke access at will.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

@merolish merolish marked this pull request as draft October 21, 2025 15:47
@vercel
Copy link

vercel bot commented Oct 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
api-reference Ready Ready Preview Comment Oct 23, 2025 3:09pm
component-library Ready Ready Preview Comment Oct 23, 2025 3:09pm
developer-hub Ready Ready Preview Comment Oct 23, 2025 3:09pm
entropy-explorer Ready Ready Preview Comment Oct 23, 2025 3:09pm
insights Ready Ready Preview Comment Oct 23, 2025 3:09pm
proposals Ready Ready Preview Comment Oct 23, 2025 3:09pm
staking Ready Ready Preview Comment Oct 23, 2025 3:09pm

Copy link
Contributor

@tejasbadadare tejasbadadare left a comment

Choose a reason for hiding this comment

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

Nice work! Suggested a minor improvement but nothing that blocks merging

Comment on lines +50 to +52
if config.multisig.enable_multisig:
if not config.multisig.multisig_address:
raise Exception("Multisig enabled but missing multisig address")
Copy link
Contributor

@tejasbadadare tejasbadadare Oct 23, 2025

Choose a reason for hiding this comment

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

You can enforce this directly in the pydantic model. Doing as much validation as possible in the model itself aligns with pydantic's philosophy of "if i can construct the object, i know it's valid."

class MultisigConfig(BaseModel):
    enable_multisig: bool
    multisig_address: Optional[str] = None

    @model_validator(mode="after")
    def validate_address_exists_if_multisig_enabled(self) -> 'MultisigConfig':
        if self.enable_multisig and self.multisig_address is None:
            raise ValueError("`multisig_address` must be provided when `enable_multisig` is True")
        return self

@merolish merolish merged commit 740c5e1 into main Oct 23, 2025
9 checks passed
@merolish merolish deleted the mike/hip3-multisig branch October 23, 2025 19:24
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.

3 participants