View Source Hyperliquid.Api.Exchange.FinalizeEvmContract (hyperliquid v0.4.1)

Link a HyperCore token to its deployed HyperEVM contract.

The verification method must match how the contract was deployed:

See: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm/interacting-with-hypercore

Usage

{:ok, result} = FinalizeEvmContract.finalize_with_create(42, 7)

Summary

Functions

Finalize a contract deployed from an EOA using its deployment nonce.

Finalize a contract that stores the finalizer address at keccak256("HyperCore deployer").

Finalize a contract that stores the finalizer address in its first storage slot.

Functions

Link to this function

finalize_with_create(token, deploy_nonce, opts \\ [])

View Source
@spec finalize_with_create(non_neg_integer(), non_neg_integer(), keyword()) ::
  {:ok, map()} | {:error, term()}

Finalize a contract deployed from an EOA using its deployment nonce.

Parameters

  • token: Token identifier to link
  • deploy_nonce: Nonce used to deploy the EVM contract
  • opts: Optional parameters

Returns

  • {:ok, response} / {:error, term()}

Examples

{:ok, result} = FinalizeEvmContract.finalize_with_create(42, 7)
Link to this function

finalize_with_custom_storage_slot(token, opts \\ [])

View Source
@spec finalize_with_custom_storage_slot(
  non_neg_integer(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Finalize a contract that stores the finalizer address at keccak256("HyperCore deployer").

Parameters

  • token: Token identifier to link
  • opts: Optional parameters

Returns

  • {:ok, response} / {:error, term()}
Link to this function

finalize_with_first_storage_slot(token, opts \\ [])

View Source
@spec finalize_with_first_storage_slot(
  non_neg_integer(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Finalize a contract that stores the finalizer address in its first storage slot.

Parameters

  • token: Token identifier to link
  • opts: Optional parameters

Returns

  • {:ok, response} / {:error, term()}