GYSR documentation
Search…
⌃K

Error codes

Core contract revert codes
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
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
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
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