CustomErrorHandlings

In our protocol we use custom errors, it allows us to increase the capacity of contracts and also to reduce the gas fee, so for more convenient third-party integration, as well as for convenience of internal debugging we maintain and constantly update the config with error selectors:

{
   "0x0": "Unknown",
   "0x17d53eed": "Not enough liquidity : EntangleTestBridge",
   "0x10b9fa31": "tokenIndexTo wasn't found : EntangleTestBridge",
   "0x5cc96c61": "Bridge Operation Failed : SynapseBridgeWrapper",
   "0xe6b22221": "DexWrapper already exists : DexWrapper",
   "0x9a75f0fd": "protoDexWrapper eq 0 : DexWrapper",
   "0x34ae80be": "token addresses eq 0 : DexWrapper",
   "0xaad5b67d": "amount to swap eq 0 : DexWrapper",
   "0x62605cdb": "amount to swap eq 0 : UniswapDexWrapper",
   "0x2336ba0f": "amount to swap eq 0 : VelocoreDexWrapper",
   "0x3d46c391": "amount to swap eq 0 : VelodromeDexWapper",
   "0x1aa4845b": "aggregationSpotter is already set : BaseEntangleToken",
   "0x8a92fed6": "bridgeRouterAddress is already set : BaseEntangleToken",
   "0x63e16557": "Bridge is not active yet, aggregationSpotter not set : BaseEntangleToken",
   "0x8becdc87": "Bridge is not active yet, bridgeRouterAddress not set : BaseEntangleToken",
   "0xb5c796bd": "Ngl token address is invalid for specified chainId : BridgeRouter",
   "0xdbcc3f10": "OracleStateSpotter: Chain id does not exist : OracleStateSpotter",
   "0x15e0fc5e": "OracleStateSpotter: Sid does not exist : OracleStateSpotter",
   "0x4114469a": "Chain ID already exist : OracleStateSpotter",
   "0x6ca156ef": "Sid already exist : OracleStateSpotter",
   "0x273671d6": "Failed to call decodeESynthStateParams : OracleStateSpotter",
   "0x3d1e8dc6": "Failed to call decodeEChefStateParams : OracleStateSpotter",
   "0x4dcee03d": "Only balanceSpotter : OracleStateSpotter",
   "0xc87bf425": "poolId already exists : CurveCompoundConvexSynthChef",
   "0x80fd1f28": "poolId doesnot exist : CurveCompoundConvexSynthChef",
   "0x1afafca5": "amount eq 0 : CurveCompoundConvexSynthChef",
   "0x7c0461bd": "withdraw unsuc : CurveCompoundConvexSynthChef",
   "0x699d6cb0": "poolId already exists : FusionxSynthChef",
   "0xd7652d77": "amount eq 0 : FusionxSynthChef",
   "0xfded2203": "poolId already exists : PancakeSwapSynthChef",
   "0x29d02573": "amount eq 0 : PancakeSwapSynthChef",
   "0x5bcba64d": "poolId already exists : SpookySwapSynthChef",
   "0xd76ff7d6": "amount eq 0 : SpookySwapSynthChef",
   "0x2fb5d420": "poolid doesnot exist : SpookySwapSynthChef",
   "0x6efa18d8": "poolId already exists : StargateSynthChef",
   "0xd4e730dd": "poolId doesnot exist : StargateSynthChef",
   "0x6a7567c6": "amount eq 0 : StargateSynthChef",
   "0xbc8418aa": "poolId already exists : VelocoreSynthChef",
   "0xab254977": "amount eq 0 : VelocoreSynthChef",
   "0x1ebeaa73": "poolId already exists : VelodromeSynthChef",
   "0x526d3d4e": "poolId doesnot exist : VelodromeSynthChef",
   "0xaa460ff9": "amount eq 0 : VelodromeSynthChef",
   "0x2d966d74": "poolId already exists : WombatSynthChef",
   "0xef4f9c20": "poolId doesnot exist : WombatSynthChef",
   "0x9214ef57": "amount eq 0 : WombatSynthChef",
   "0xfb14c334": "amounts length not 1 : WombatSynthChef",
   "0xd030644e": "additionalTokens length != additionalRewards length : WombatSynthChef",
 "0xef61990e": "paused sid : EntangleDexV2",
   "0x674c5907": "Non liquidable sid : EntangleDexV2",
   "0xd51e30dc": "Not an lp staking synth : EntangleDexV2",
   "0xdbd9cfac": "Not the home network for synth : EntangleDexV2",
   "0x6f9234bb": "zero amount : EntangleDexV2",
   "0x7b8d8bc5": "failed to send native : FaucetEnt",
   "0xc931cd59": "not enough native to send : FaucetEnt",
   "0xba5d3105": "not enough liquidity in storage : LpFaucet",
   "0xa5824c98": "Synth already delpoyed : SynthFactory",
   "0x398241da": "SID is not active : SynthFactory",
   "0xb9ce44ba": "not lp staking sid : MasterSynthChef",
   "0xae0a6097": "wrong chain id : MasterSynthChef",
   "0x083fef05": "wrong protocol id : MasterSynthChef",
   "0x92432058": "wrong pool Id : MasterSynthChef",
   "0x814e743c": "opToken address eq 0 : MasterSynthChef",
   "0xf41825f9": "feerate should gt 0 : MasterSynthChef",
   "0xa559a604": "feeCollector address eq 0 : MasterSynthChef",
   "0xe7b62a8d": "Protocol id already exists : MasterSynthChef",
   "0x7c85368b": "chefAddress eq 0 : MasterSynthChef",
   "0xa218b1b2": "Amount eq 0 : MasterSynthChef",
   "0xbe507c60": "recipient address eq 0 : MasterSynthChef",
   "0x0f61903a": "CustomErrorTest revert test1 func",
   "0x9e3d442e": "CustomErrorTest revert test2 func with arg"
}

Last updated