Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Errors

Git Source

Author: luoyhang003

Centralized custom error definitions used across the Genesis Expedition contracts.

Custom errors significantly reduce gas costs compared to revert strings. These errors are grouped by contract/module for clarity and maintainability. For off-chain tools, debuggers, and log parsers, selectors can be derived from:

bytes4(keccak256("ErrorName()")).

Errors

ZeroAddress

Thrown when a required address argument is zero.

Selector: 0xd92e233d

error ZeroAddress();

IndexOutOfBounds

Thrown when accessing an array index out of bounds.

Selector: 0x4e23d035

error IndexOutOfBounds();

InvalidArrayLength

Thrown when input arrays have mismatched or invalid lengths.

Selector: 0x9d89020a

error InvalidArrayLength();

NotStakingContract

Thrown when caller is not an authorized staking contract.

Selector: 0x135420fb

error NotStakingContract();

InvalidSignature

Thrown when EIP-712 signature validation fails.

Selector: 0x8baa579f

error InvalidSignature();

SignatureExpired

Thrown when a signature is past its deadline.

Selector: 0x0819bdcd

error SignatureExpired();

InvalidNonce

Thrown when a signature nonce is invalid or already used.

Selector: 0x756688fe

error InvalidNonce();

RawStoneNotEnough

Thrown when user does not have enough Raw Stones.

Selector: 0xfdc0d989

error RawStoneNotEnough();

GoldenStoneNotEnough

Thrown when user does not have enough Golden Stones.

Selector: 0xd867d602

error GoldenStoneNotEnough();

GoldenStoneNotActivated

Thrown when attempting to interact with an inactive Golden Stone.

Selector: 0x0fdef728

error GoldenStoneNotActivated();

GoldenStoneExpired

Thrown when Golden Stone has expired and cannot be used.

Selector: 0x15089372

error GoldenStoneExpired();

GoldenStoneNotExpired

Thrown when Golden Stone is expected to be expired but is not.

Selector: 0x1265e724

error GoldenStoneNotExpired();

NotGoldenStoneOwner

Thrown when caller is not the owner of a Golden Stone.

Selector: 0xb9e8af49

error NotGoldenStoneOwner();

NotRawStoneOwner

Thrown when user attempts to consume Raw Stones they do not own.

Selector: 0xf08bbab8

error NotRawStoneOwner();

AlreadyTapped

Thrown when a user attempts to tap a Golden Stone more than once.

Selector: 0xf1fa8e2f

error AlreadyTapped();

GoldenStoneAlreadyForged

Thrown when attempting to forge a Golden Stone that is already forged.

Selector: 0x03d15bb0

error GoldenStoneAlreadyForged();

NotEnoughParticipants

Thrown when Golden Stone forging does not meet minimum participants.

Selector: 0x99f46cd5

error NotEnoughParticipants();

ExceedMaxParticipants

Thrown when Golden Stone forging exceeds maximum allowed participants.

Selector: 0xfc8b1cb6

error ExceedMaxParticipants();

HammerNotEnough

Thrown when user lacks the required hammers for forging actions.

Selector: 0xc1bb1476

error HammerNotEnough();

InvalidGoldenStoneConfig

Thrown when configuration for Golden Stones is invalid.

Selector: 0x42431218

error InvalidGoldenStoneConfig();

NotMasterSigner

Thrown when signature validates, but signer is not the authorized master signer.

Selector: 0x4d053391

error NotMasterSigner();

EventNotActive

Thrown when an action requires the event to be active but it is not.

Selector: 0x0f0c1bc8

error EventNotActive();

EventNotEnded

Thrown when an action requires the event to have ended but it has not.

Selector: 0xfb141a0d

error EventNotEnded();

InvalidStartTime

Thrown when the staking start time is invalid or misaligned.

Selector: 0xb290253c

error InvalidStartTime();

InvalidPrice

Thrown when an admin sets an invalid price or configuration value.

Selector: 0x00bfc921

error InvalidPrice();

ExceedMaxLockCap

Thrown when a user attempts to lock more than the maximum allowed.

Selector: 0xba4beea8

error ExceedMaxLockCap();

BelowMinimumLockAmount

Thrown when user locks less than the required minimum amount.

Selector: 0xdcb6ca48

error BelowMinimumLockAmount();

UnlockNotMatured

Thrown when user attempts to unlock tokens before maturity.

Selector: 0x2a916d02

error UnlockNotMatured();

NothingToUnlock

Thrown when a user attempts to unlock but has no unlockable balance.

Selector: 0x764c157f

error NothingToUnlock();

NotKeeperContract

Thrown when caller is not the authorized keeper contract.

Selector: 0x90023044

error NotKeeperContract();