Pinout GitHub

Call any TapeOut circuit from Solidity, by name.

Name the pins once. Get a typed library and its tests.

Circuits checked live
9
Less gas when compiled
53–198×
Tests passing
104
  1. Read a live circuit

    Enter its processor and id. Pinout reads the gates from X Layer.

  2. Name the pins

    Group bits into numbers and flags, and try values as you go.

  3. Generate + test

    Download the Solidity and a Foundry test that runs against mainnet.

Live on X Layer mainnet

Our rate limiter is circuit #1023. A deployed vault uses it to allow each owner 3 withdrawals an hour.

Load circuit 1023 in the generator

Gas per call

Live mode calls the circuit. Compiled mode runs a Solidity copy of its gates.

CircuitLiveCompiledLess gas
Seven-segment decoder 242,8934,52854×
8 × 8-bit multiplier 1,509,38925,23660×
16-bit adder 1,054,72520,04353×
Rate limiter 92,4041,30471×
Counter with memory 95,243480198×

Each bar is the live call. The bright part is compiled mode. Measured at X Layer block 77,588,977.

Before and after

By hand
bytes memory y =
    cpu.eval(13, hex"b0045901");
// y is hex"090600". Now unpack it.
With Pinout
uint24 sum = Adder.eval(
    Adder.Inputs({a: 1200, b: 345})
).sum; // 1545