Phoenix-Protocol-Group / phoenix-contracts

Source code of the smart contracts of the Phoenix DeFi hub DEX protocol
GNU General Public License v3.0
10 stars 7 forks source link

Better Error Enums #381

Open gangov opened 3 months ago

gangov commented 3 months ago

currently, all of our contracts use ContractError Enums to handle the possible errors that the smart contracts throw. All these Enums all start from 0..n .

That numbering duplication makes it difficult to work with in the frontend.

To fix this, we have to try to set number ranges for the different contracts - i.e. Factory contract uses numbers from 100-200, Xyk Pool contract from 200-300, etc..