Skip to content

Is signatureChainId intentionally hardcoded to 0x66eee in sign_user_signed_action? #254

@atomlink-ye

Description

@atomlink-ye

def sign_user_signed_action(wallet, action, payload_types, primary_type, is_mainnet):
# signatureChainId is the chain used by the wallet to sign and can be any chain.
# hyperliquidChain determines the environment and prevents replaying an action on a different chain.
action["signatureChainId"] = "0x66eee"
action["hyperliquidChain"] = "Mainnet" if is_mainnet else "Testnet"
data = user_signed_payload(primary_type, payload_types, action)
return sign_inner(wallet, data)

The inline comment says signatureChainId “can be any chain”, but hardcoding a specific chain id (notably a testnet chain id) is confusing and may cause unexpected wallet UX or signing behavior for mainnet users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions