Skip to main content
Version: v. 1

Probe interface

NAME

probe-interface - Generate a Ylem interface from a given ABI.

SYNOPSIS

probe interface [options] address_or_path

DESCRIPTION

Generates a Ylem interface from a given ABI.

The argument (address_or_path) can either be the path to a file containing an ABI, or an address.

If an address is provided, then the interface is generated from the ABI of the account, which is fetched from Etherscan.

ℹ️ Note

This command does not currently support ABI encoder v2.

OPTIONS

Interface Options

-n name
--name name
The name to use for the generated interface. The default name is Interface.

-o path
The path to the output file. If not specified, the interface will be output to stdout.

-p version
--pragma version
The Ylem pragma version to use in the interface. Default: ^1.1.2.

-j
--json
Output the contract's JSON ABI.

Etherscan Options

--chain chain_name
The Etherscan chain.

--etherscan-api-key key
Etherscan API key, or the key of an Etherscan configuration table.
Environment: ETHERSCAN_API_KEY

Common Options

-h
--help
Prints help information.

EXAMPLES

  1. Generate an interface from a file:

    probe interface ./path/to/abi.json
  2. Generate an interface using Etherscan:

    probe interface -o IWETH.sol 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
  3. Generate and name an interface from a file:

    probe interface -n LilENS ./path/to/abi.json
  4. Fetch the JSON ABI of a contract on Etherscan:

    probe interface -o IWETH.sol -j 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

SEE ALSO

probe, probe proof