Skip to main content

Inspector Facet - What methods is your EIP2535 Diamond proxy contract serving?

Project description

Inspector Facet

A tool that allows you to inspect deployed EIP-2535 Diamond proxy contracts from your command line.

Inspector Facet was inspired by Louper.dev (GitHub).

Inspector Facet uses side information about facet ABIs to match the selectors that a Diamond proxy is serving to human-understandable information about the facets and the functions.

We support side information obtained from:

  • brownie build artifacts
  • hardhat build artifacts
  • Etherscan/Polygonscan/etc.

We support Diamond introspection:

  • Using the DiamondLoupeFacet interface
  • From DiamondCut events crawled from the blockchain (using the Moonstream API).

Installation

Inspector Facet is written in Python 3 and is distributed using PyPI: https://pypi.org/project/inspector-facet/

To install Inspector Facet, run:

pip install inspector-facet

Usage

inspector-facet --help

To use Inspector Facet with:

A brownie project

The following command produces human-readable output:

inspector-facet \
    --network <brownie network name for blockchain> \
    --address <address of diamond contract> \
    --project <path to brownie project (should contain build artifacts in build/contracts)> \
    --format human

The following command produces JSON output and can be used to inspect a Diamond contract programatically (e.g. as part of a CI/CD pipeline):

inspector-facet \
    --network <brownie network name for blockchain> \
    --address <address of diamond contract> \
    --project <path to brownie project (should contain build artifacts in build/contracts)> \
    --format json

Support

You can get help in any of the following ways:

  1. File an issue
  2. Ask for help on Moonstream Discord

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inspector-facet-0.1.0.tar.gz (12.9 kB view hashes)

Uploaded Source

Built Distribution

inspector_facet-0.1.0-py3-none-any.whl (13.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page