Skip to content

Support multisig userSetAbstraction#299

Open
hl-core-dev wants to merge 2 commits into
hyperliquid-dex:masterfrom
hl-core-dev:multisig_abstraction_example
Open

Support multisig userSetAbstraction#299
hl-core-dev wants to merge 2 commits into
hyperliquid-dex:masterfrom
hl-core-dev:multisig_abstraction_example

Conversation

@hl-core-dev
Copy link
Copy Markdown

Summary

  • canonicalize userSetAbstraction payload actions to wire enum values for outer multisig hashing
  • expand abstraction type literals
  • add a multisig userSetAbstraction example and regression coverage

Test plan

  • .venv/bin/python -m pytest tests/signing_test.py -q -o addopts=''
  • verified on testnet with example_key: multisig userSetAbstraction returned ok for unifiedAccount and disabled

@chameleon-jeff chameleon-jeff requested a review from traderben May 30, 2026 14:16
# b is the public address of the builder, f is the amount of the fee in tenths of basis points. e.g. 10 means 1 basis point
BuilderInfo = TypedDict("BuilderInfo", {"b": str, "f": int})
Abstraction = Literal["unifiedAccount", "portfolioMargin", "disabled"]
Abstraction = Literal["default", "dexAbstraction", "unifiedAccount", "portfolioMargin", "disabled"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can't set default and we are in the process of removing support for dexAbstraction, so I don't think it's worth adding these



def main():
_address, info, exchange = example_utils.setup(constants.TESTNET_API_URL, skip_ws=True)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reason we don't use address and instead use exchange.wallet.address? I think using address is simpler and matches the other examples

abstraction = "disabled"
timestamp = get_timestamp_ms()

# Use the human abstraction string here. Exchange.multi_sig canonicalizes this action to the wire enum value
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe this should be a bit stronger? E.g. You must use

The way things get parsed and converted it's easy to not realize that some of the signatures need one version and others need a different version

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.

2 participants