Facet Sol Foundry

facet-sol enables you to create Facet transactions in a Foundry environment:

Install with forge install 0xFacet/facet-sol.

To send Facet transactions from a smart contract, first import LibFacet:

Now you can send transactions like this:

However you can't use LibFacet directly to send transactions from within a Foundry script. This is because Foundry scripts are run as EOAs and EOAs send Facet transactions using L1 transactions, not events.

facet-sol has a separate library for creating Facet transactions from within foundry scripts, FacetScript. Here's an example:

To run this you would use a command like:

Last updated