Skip to Content
Debugging

Debugging Image

Overview

This page collects the issues developers run into most often on Reactive Network, with the checks and commands to resolve them. The examples use the following variables:

  • $REACTIVE_RPC — Reactive Mainnet or Lasna Testnet RPC URL
  • $SYSTEM_CONTRACT_ADDR — 0x8888888888888888888888888888888888888888 on both networks
  • $DESTINATION_RPC — RPC URL of the destination chain
  • $CALLBACK_PROXY_ADDR — callback proxy on that chain, listed in Origins & Destinations

Callback Structure

Callbacks must include at least one argument, and the first slot must always be an address, passed as address(0). Reactive Network overwrites the first 160 bits of the payload with the address of the reactive contract that requested the callback, so the destination can authenticate the sender. The overwrite happens whatever the payload contains, so without a reserved slot it corrupts your first real argument.

bytes memory payload = abi.encodeWithSignature( "stop(address,address,address,bool,uint256,uint256)", address(0), pair, client, token0, coefficient, threshold ); SYSTEM.requestCallbackV_1_0(ISystemContract.CallbackConfiguration_V_1_0({ chainId: chainId, recipient: stopOrder, gasLimit: CALLBACK_GAS_LIMIT, payload: payload }));

More on Requesting Callbacks →

Callback Not Arriving

The system contract records every callback posted to a destination chain, indexed by the hash of the reactive transaction that requested it. Start there:

cast call $SYSTEM_CONTRACT_ADDR "getCallbacks(uint256)((uint256,address,uint256,uint256,uint256,bytes)[])" $REACTIVE_TX_HASH --rpc-url $REACTIVE_RPC

Each record includes the destination transaction hash and any error data returned by the destination contract; err is empty when the callback succeeded. Validators write these records after delivery, so an empty array means no callback has been recorded yet, not that one failed.

If the callback is missing or failing, check these in order:

  • Gas limit below 100,000. Requests under the minimum callback gas limit are ignored and never delivered.
  • Recipient in debt. The callback proxy reverts with InDebt before delivery. Fund the callback contract on the destination chain, as described in Reactivate the Contract.
  • Recipient has no code. The proxy reverts with NotAContract when the recipient address holds no contract, for example a wrong address or a contract deployed on a different chain. No charge applies.
  • Gas limit too low for the overhead. The proxy withholds gas for its own accounting and payment settlement. If too little remains, delivery fails with InsufficientGas before the callback method runs.
  • Callback method reverts. The proxy emits CallbackFailure and still charges the recipient. Common causes are a gas limit that covers the overhead but not the method itself, and an authorization check that rejects the call: onlyServiceProvider fails when the contract was deployed with the wrong callback proxy, and onlyCallbackSender fails when the authorized reactive contract address doesn’t match the one requesting the callback. Both addresses are immutable, so a mismatch means redeploying.

Gas limits are set on the reactive side, so a callback contract that keeps failing may need the reactive contract to request a higher gasLimit rather than more funding.

More on Callback Contracts →

Check Debt and Reserves

For a reactive contract, query the system contract on Reactive:

cast call $SYSTEM_CONTRACT_ADDR "debt(address)" $REACTIVE_CONTRACT_ADDR --rpc-url $REACTIVE_RPC | cast to-dec
cast call $SYSTEM_CONTRACT_ADDR "reserves(address)" $REACTIVE_CONTRACT_ADDR --rpc-url $REACTIVE_RPC | cast to-dec

For a callback contract, query the callback proxy on the destination chain:

cast call $CALLBACK_PROXY_ADDR "debt(address)" $CALLBACK_CONTRACT_ADDR --rpc-url $DESTINATION_RPC | cast to-dec
cast call $CALLBACK_PROXY_ADDR "reserves(address)" $CALLBACK_CONTRACT_ADDR --rpc-url $DESTINATION_RPC | cast to-dec

Reactivate the Contract

The most reliable fix is depositTo(), which settles debt first and adds the remainder to reserves. It works on any contract, without its cooperation.

For a reactive contract, pay in REACT through the system contract:

cast send --rpc-url $REACTIVE_RPC --private-key $REACTIVE_PRIVATE_KEY $SYSTEM_CONTRACT_ADDR "depositTo(address)" $REACTIVE_CONTRACT_ADDR --value 1ether

For a callback contract, pay in the destination chain’s native token through the callback proxy:

cast send --rpc-url $DESTINATION_RPC --private-key $DESTINATION_PRIVATE_KEY $CALLBACK_PROXY_ADDR "depositTo(address)" $CALLBACK_CONTRACT_ADDR --value 0.1ether
Warning

Direct Transfers Don’t Clear Debt on Their Own

Sending funds straight to an indebted contract raises its balance but settles nothing. The balance is applied only if the contract exposes a coverDebt() wrapper around the internal _coverDebt(), which the base contracts don’t do by default. Without one, the funds are stranded and the contract stays inactive. Sending funds directly to the system contract or callback proxy credits the sender’s own address, not the contract. Use depositTo() when in doubt.

If the contract does expose coverDebt(), transfer the funds and then settle:

cast send $REACTIVE_CONTRACT_ADDR --rpc-url $REACTIVE_RPC --private-key $REACTIVE_PRIVATE_KEY --value 1ether
cast send --rpc-url $REACTIVE_RPC --private-key $REACTIVE_PRIVATE_KEY $REACTIVE_CONTRACT_ADDR "coverDebt()"

Passing --value at deployment only works if the contract declares a payable constructor. Otherwise the deployment reverts.

More on Reactive Economy →

Reverting react()

A react() call that reverts is caught by the system contract, logged as a ReactiveContractReverted event, and charged in full. A contract that reverts on every notification keeps paying until it runs out of funds and goes inactive.

Don’t use revert or require to filter out unwanted logs. Let non-matching logs fall through instead:

function react(LogRecord memory log_) external onlySystem { if (log_.topic0 == _topic0 && log_.opCode == 3) { // Handle the event. } // Anything else falls through at no extra cost. }

More on Reacting to Events →

Testnet REACT Not Received

To get testnet REACT, send ETH on Ethereum Sepolia or Base Sepolia to the Reactive faucet contract on that chain. Full instructions are in Get Testnet REACT.

  • Ethereum Sepolia: 0x9b9BB25f1A81078C544C829c5EB7822d747Cf434
  • Base Sepolia: 0x2afaFD298b23b62760711756088F75B7409f5967
Important

Do not send more than 5 ETH in a single transaction. Any excess is lost. Maximum per request: 5 ETH → 500 REACT.

If you’ve sent ETH to a faucet but haven’t received testnet REACT within a few minutes, the faucet may be having a temporary issue. Report it in our General Telegram channel . You will receive your testnet REACT once the issue is resolved.

Nonce & Gas Price Issue

The Replacement transaction underpriced error means a new transaction is trying to replace a pending one with an equal or lower gas price. First, check the current nonce of the sending wallet:

cast nonce --rpc-url $REACTIVE_RPC $WALLET_ADDR

Then resend the transaction with the same nonce and higher gas prices, using the --priority-gas-price and --gas-price flags:

cast send --rpc-url $REACTIVE_RPC --private-key $PRIVATE_KEY --priority-gas-price $VALUE --gas-price $VALUE --nonce $VALUE $CONTRACT_ADDR …

MetaMask Smart Transactions Issue

When sending a transaction on Reactive Network, a bridge transfer, or a faucet claim, MetaMask may show Smart Transaction interrupted — this transaction was going to fail, or the transaction may never appear on-chain.

MetaMask’s Smart Transactions feature doesn’t send transactions straight to the network’s RPC. It submits them through MetaMask’s own relay service, which simulates them first and supports only a limited set of networks. Reactive Network isn’t one of them, so these transactions can be rejected or never broadcast.

To disable Smart Transactions:

  1. Open MetaMask.
  2. Tap the menu icon (☰) in the top-right corner.
  3. Go to Settings → Advanced.
  4. Find Smart Transactions.
  5. Toggle it OFF.

After this, your transactions go through the regular route and should work correctly.

More on MetaMask’s Smart Transactions →