Skip to main content
Crypto Readout

Crypto markets, protocols and policy

How to Check Fermi Swap Pair Status With isEnabled

Fermi Swap pair checks separate permission from current-block pricing; read both booleans at the same Ethereum block.

By Crypto Readout Editorial4 min read#f6dfd6

How to Check Fermi Swap Pair Status With isEnabled

Fermi Swap pair checks give you two results tied to one Ethereum block: whether the pair is enabled and whether pricing is active. For a proposed trade on this inventory venue, the linked Fermi Swap is where you can swap tokens after checking readiness. A prop AMM fills trades from its own token inventory instead of relying on a shared liquidity pool. In FermiSwapper VERSION 20260604, isEnabled and isActive answer separate questions, so one result cannot stand in for the other.

How do you check permission and pricing at the same block?

Use read-only contract calls with the same token addresses and block parameter. An eth_call reads contract state without submitting a transaction. Its block parameter lets you ask what the contract returned at a specific Ethereum block.

  1. Start with the proposed token pair, a verified ABI, and an Ethereum RPC endpoint. The ABI is the contract’s method description; matching it to the deployed contract version tells your call how to encode its request and decode the response.
  2. Read VERSION() on the target FermiSwapper contract. Confirm that it returns VERSION 20260604, then use the ABI that matches this version. A method name alone is not enough if the ABI describes a different contract version.
  3. Capture the current Ethereum block number as N. Save the number and the target contract address with your pair’s tokenIn and tokenOut addresses.
  4. Call isEnabled(tokenIn,tokenOut) with eth_call at block N. This reads whether the contract permits that pair. Keep the input and output token order exactly as proposed; reversing them checks the opposite direction.
  5. Call isActive(tokenIn,tokenOut) at the same block N. This checks whether current-block pricing is available for that direction. For example, send both calls with the block tag for N, rather than using “latest” separately for each.
  6. Record the contract, version, token addresses, block N, and both decoded booleans. The check is complete when those details are saved together. Keep an RPC error or decoding failure separate from a successfully decoded false: an error is not a contract answer of false.

The shared block number is what makes the pair of results useful as a snapshot. Two calls that each ask for “latest” can land on different blocks if a new block arrives between requests. It is like taking two readings from the same instrument at different times: a changed result may reflect the time of the reading, not a disagreement between methods. Pinning both calls to N lets you compare permission and pricing at one point in the chain.

What do the two booleans mean for the trade?

Read isEnabled as the permission check and isActive as the current-block pricing check. The results guide the next step:

  • isEnabled is false: stop the readiness check for this direction. The pair is not enabled, regardless of the isActive result.
  • isEnabled is true and isActive is false: permission exists, but pricing is not active at block N. Wait and check again at a later block before seeking a quote.
  • Both are true: request a quote for the specific input amount. The status calls do not give an amount-specific price.

Permission and activity are connected, but they are not interchangeable. A pair can be allowed while current-block conditions leave pricing unavailable. The trade-off is that the two-call check adds a distinction to the decision: for venue readiness, permission matters first, while pricing activity determines whether it makes sense to request a quote now.

Does a contract read cost ETH, or reserve a quote?

Does reading a contract require ETH?

An eth_call does not submit an on-chain transaction, so it incurs no on-chain transaction charge.

Does checking pair status reserve a quote?

No. A later execution encounters the state available when it runs, which may differ from the block recorded in the status check.