Error codes
Core contract revert codes
Last updated
Core contract revert codes
Last updated
We have adopted a system of error codes at GYSR to save gas costs on long revert messages.
Code | Contract | Description |
---|---|---|
p1
Pool
withdraw amount is zero
p2
Pool
withdraw amount exceeds vested balance
f1
PoolFactory
invalid staking module factory
f2
PoolFactory
invalid reward module factory
f3
PoolFactory
fee exceeds max
f4
PoolFactory
invalid whitelist type
f5
PoolFactory
module factory is zero address
oc1
OwnerController
sender is not owner
oc2
OwnerController
sender is not controller
oc3
OwnerController
new owner is zero address
oc4
OwnerController
new controller is zero address
sm1
ERC20StakingModule
stake amount is zero
sm2
ERC20StakingModule
stake amount is too small
sm3
ERC20StakingModule
unstake or claim amount is zero
sm4
ERC20StakingModule
staking module has zero balance
sm5
ERC20StakingModule
unstake or claim amount is too small
sm6
ERC20StakingModule
unstake or claim amount exceeds user balance
sm7
ERC20StakingModule
invalid bytes data for account address
sm8
ERC20StakingModule
staking operator is not approved
smf1
ERC20StakingModuleFactory
invalid constructor data
smn1
ERC721StakingModule
token does not support ERC721 interface
smn2
ERC721StakingModule
stake amount is zero
smn3
ERC721StakingModule
stake amount exceeds user balance
smn4
ERC721StakingModule
stake token ID data is invalid
smn5
ERC721StakingModule
unstake amount is zero
smn6
ERC721StakingModule
unstake amount exceeds user balance
smn7
ERC721StakingModule
unstake token ID data is invalid
smn8
ERC721StakingModule
user does not own the specified token
smn9
ERC721StakingModule
claim amount is zero
smn10
ERC721StakingModule
claim amount exceeds user balance
smnf1
ERC721StakingModuleFactory
invalid constructor data
rm1
ERC20BaseRewardModule
reward funding amount is zero
rm2
ERC20BaseRewardModule
funding start is in the past
rm3
ERC20BaseRewardModule
exceeds max active funding schedules
crm1
ERC20CompetitiveRewardModule
initial time bonus is greater than max
crm2
ERC20CompetitiveRewardModule
unstake, invalid gysr bonus data
crm3
ERC20CompetitiveRewardModule
unstake in same block, no time has elapsed
crmf1
ERC20CompetitiveRewardModuleFactory
invalid constructor data
frm1
ERC20FriendlyRewardModule
vesting start is greater than 1.0
frm2
ERC20FriendlyRewardModule
stake, invalid gysr bonus data
frm3
ERC20FriendlyRewardModule
unstake in same block, no time has elapsed
frmf1
ERC20FriendlyRewardModuleFactory
invalid constructor data
asm1
AssignmentStakingModule
stake amount is zero
asm2
AssignmentStakingModule
sender is not the controller
asm3
AssignmentStakingModule
invalid byte encoding for assignee address
asm4
AssignmentStakingModule
unstake amount is zero
asm5
AssignmentStakingModule
sender is not the controller
asm6
AssignmentStakingModule
invalid byte encoding for assignee address
asm7
AssignmentStakingModule
unstake amount exceeds current assignee rate
asm8
AssignmentStakingModule
claim amount is zero
asm9
AssignmentStakingModule
claim amount exceeds current assignee rate
bsm1
ERC20BondStakingModule
vesting period below minimum threshold
bsm2
ERC20BondStakingModule
stake amount is zero
bsm3
ERC20BondStakingModule
invalid byte encoding for stake params
bsm4
ERC20BondStakingModule
token market is not open
bsm5
ERC20BondStakingModule
debt exceeds market max for individual bond
bsm6
ERC20BondStakingModule
debt exceeds remaining market capacity
bsm7
ERC20BondStakingModule
bond debt is below user minimum threshold
bsm8
ERC20BondStakingModule
invalid byte encoding for unstake bond ID
bsm9
ERC20BondStakingModule
unstake sender does not own specified bond
bsm10
ERC20BondStakingModule
unstake in same block, time has not elapsed
bsm11
ERC20BondStakingModule
unstake amount must be zero when burndown is disabled
bsm12
ERC20BondStakingModule
vesting period has elapsed, no principal left to unstake
bsm13
ERC20BondStakingModule
unstake amount exceeds remaining principal
bsm14
ERC20BondStakingModule
unstake amount is too small
bsm15
ERC20BondStakingModule
invalid byte encoding for claim bond ID
bsm16
ERC20BondStakingModule
claim sender does not own specified bond
bsm17
ERC20BondStakingModule
invalid byte encoding for update bond ID
bsm18
ERC20BondStakingModule
update sender does not own specified bond
bsm19
ERC20BondStakingModule
market has already been opened
bsm20
ERC20BondStakingModule
max number of markets has been reached
bsm21
ERC20BondStakingModule
open market, minimum price is zero
bsm22
ERC20BondStakingModule
open market, max bond size is zero
bsm23
ERC20BondStakingModule
open market, total debt capacity is zero
bsm24
ERC20BondStakingModule
close market, capacity is already zero
bsm25
ERC20BondStakingModule
adjusted market does not exist
bsm26
ERC20BondStakingModule
adjust market, minimum price is zero
bsm27
ERC20BondStakingModule
adjust market, max bond size is zero
bsm28
ERC20BondStakingModule
adjust market, total debt capacity is zero
bsm29
ERC20BondStakingModule
withdraw from market that does not exist
bsm30
ERC20BondStakingModule
withdraw amount is zero
bsm31
ERC20BondStakingModule
withdraw amount exceeds vested principal
xrm1
ERC20FixedRewardModule
time period is zero
xrm2
ERC20FixedRewardModule
constant reward rate is zero
xrm3
ERC20FixedRewardModule
stake amount exceeds rewards capacity
xrm4
ERC20FixedRewardModule
current stake has not fully vested
xrm5
ERC20FixedRewardModule
fund amount is zero
xrm6
ERC20FixedRewardModule
withdraw amount is zero
xrm7
ERC20FixedRewardModule
withdraw amount exceeds module balance
xrm8
ERC20FixedRewardModule
withdraw amount exceeds uncommitted budget
lrm1
ERC20LinearRewardModule
time period is zero
lrm2
ERC20LinearRewardModule
constant reward rate is zero
lrm3
ERC20LinearRewardModule
stake amount exceeds rewards capacity
lrm4
ERC20LinearRewardModule
fund amount is zero
lrm5
ERC20LinearRewardModule
withdraw amount is zero
lrm6
ERC20LinearRewardModule
withdraw amount exceeds module balance
lrm7
ERC20LinearRewardModule
withdraw amount exceeds budget for committed runway
mrm1
ERC20MultiRewardModule
vesting start exceeds 1.0
mrm2
ERC20MultiRewardModule
invalid byte encoding for stake params
mrm3
ERC20MultiRewardModule
stake, reward token count exceeds total
mrm4
ERC20MultiRewardModule
stake, duplicate reward token
mrm5
ERC20MultiRewardModule
invalid byte encoding for unstake params
mrm6
ERC20MultiRewardModule
unstake, reward token count exceeds total
mrm7
ERC20MultiRewardModule
unstake, duplicate reward token
mrm8
ERC20MultiRewardModule
cannot unstake with remaining reward tokens registered
mrm9
ERC20MultiRewardModule
missing bytes data for claim params
mrm10
ERC20MultiRewardModule
invalid byte encoding for claim params
mrm11
ERC20MultiRewardModule
claim, reward token count exceeds total
mrm12
ERC20MultiRewardModule
claim index range is invalid
mrm13
ERC20MultiRewardModule
claim end index exceeds total user stakes
mrm14
ERC20MultiRewardModule
claim, duplicate reward token
mrm15
ERC20MultiRewardModule
missing bytes data for update params
mrm16
ERC20MultiRewardModule
invalid byte encoding for update params
mrm17
ERC20MultiRewardModule
update, reward token count exceeds total
mrm18
ERC20MultiRewardModule
update index range is invalid
mrm19
ERC20MultiRewardModule
update end index exceeds total user stakes
mrm20
ERC20MultiRewardModule
update, duplicate reward token
mrm21
ERC20MultiRewardModule
invalid byte encoding for clean params
mrm22
ERC20MultiRewardModule
clean, reward token count exceeds total
mrm23
ERC20MultiRewardModule
reward token does not exist
mrm24
ERC20MultiRewardModule
time elapsed is zero
crmi1
ERC20CompetitiveRewardModuleInfo
shares must be greater than zero
crmi2
ERC20CompetitiveRewardModuleInfo
shares greater than balance in user position
frmi1
ERC20FriendlyRewardModuleInfo
shares must be greater than zero
frmi2
ERC20FriendlyRewardModuleInfo
shares greater than balance in user position