Errors
This section covers the errors that can be thrown by the SpaceManager contract. These errors are useful for UIs integrating with the contracts, as they provide specific information about why a transaction might have failed.
TotalSupplyMismatch
Thrown when there's a mismatch in the total supply calculation.
DepositsNotEnabled
Thrown when deposits are not enabled for a space.
OnlyGameEngineOrOwner
Thrown when a function restricted to the game engine or owner is called by an unauthorized address.
AccountsBalancesMismatch
Thrown when there's a mismatch between the number of accounts and balances provided.
IncorrectJoinFee
Thrown when an incorrect join fee is provided.
SpaceIsFull
Thrown when attempting to join a space that has reached its maximum member count.
WithdrawalNotEnabled
Thrown when a withdrawal is attempted but not enabled for the user or space.
NoBalanceToWithdraw
Thrown when a user attempts to withdraw with no balance.
USDCTransferFailed
Thrown when a USDC transfer fails.
SpaceDoesNotExist
Thrown when trying to interact with a non-existent space.
InsufficientUSDCBalance
Thrown when the user has insufficient USDC balance for an operation.
InsufficientUSDCAllowance
Thrown when the contract has insufficient USDC allowance from the user.
IncorrectETHAmount
Thrown when an incorrect amount of ETH is sent with a transaction.
InsufficientETHBalance
Thrown when the user has insufficient ETH balance for an operation.
ETHNotAccepted
Thrown when ETH is sent to a function that doesn't accept it.
InsufficientTokenBalance
Thrown when the user has insufficient token balance for an operation.
InsufficientTokenAllowance
Thrown when the contract has insufficient token allowance from the user.
TokenTransferFailed
Thrown when a token transfer fails.
These errors provide valuable information for debugging and improving user experience in applications integrating with the SpaceManager contract.