Skip to main content
Use this page when the starter flow or your own consumer integration does not behave as expected.

Build fails due remapping errors

Symptom

Imports like @rollcodes/... cannot be resolved.

Fix

@rollcodes/=lib/roll.codes/src/
forge-std/=lib/forge-std/src/
Then re-run:
forge build --zksync

forge install fails

Symptom

Dependency installation fails while cloning or resolving the target repo.

Fix

forge install roll.codes=jarrodwatts/roll.codes@main --no-git
forge install forge-std=foundry-rs/forge-std --no-git
If main is unavailable, pin a known tag or commit with --git-ref.

Unauthorized during callback

Symptom

randomNumberCallback reverts with an authorization error.

Cause

The callback caller is not the configured coordinator.

Fix

  • enforce msg.sender == address(vrfSystem)
  • confirm the deployed coordinator address matches the target network
  • verify the callback is pointing at the expected contract

IncorrectFee or request revert

Symptom

The request call reverts before creating a valid request.

Cause

msg.value does not match requestFee().

Fix

uint256 fee = vrfSystem.requestFee();
vrfSystem.requestRandomNumberWithTraceId{value: fee}(traceId);
roll.codes requires the exact fee in msg.value for this request flow.

Requests stay pending

Symptom

You see the request transaction, but no fulfillment callback arrives.

Check

  • confirm the request event was emitted on-chain
  • confirm the coordinator address is correct
  • confirm your callback does not revert
  • if you run your own infrastructure, verify relayer and signer setup

Where to go next

Integration pattern

Recheck the minimal request and callback flow.

Callback security

Validate the required callback guards.

Coordinator reference

Confirm the request function, requestFee() usage, and callback interface.
Last modified on March 9, 2026