ERROR_INFO = {
    # successful error code
    0: 'sendRawTransaction successful',
    # System error
    1: 'System error',
    # Object not found
    2: 'Object not found',
    # Invalid parameter
    3: 'Invalid parameter',

    # Node manager contract error code definition
    301001: 'Node manager contract internal error',
    301002: 'the node name is empty',
    301003: 'the length of node name is too long',
    301004: 'the length of node name is too short',
    301005: 'The node name has already used',
    301006: 'the value of node type is wrong',
    301007: 'the node owner is empty',
    301008: 'the length of node desc is too long',
    301009: 'the node publicKey is empty',
    301010: 'the node publicKey value format error',
    301011: 'The node publicKey has already used',
    301012: 'the node blsPubKey is empty',
    301013: 'the node blsPubKey value format error',
    301014: 'the node host address is empty',
    301015: 'The host address and port has already used',
    301016: 'the node rpc port is empty',
    301017: 'the node p2p port is empty',
    301018: 'the value of the audit status is wrong',
    301019: 'The node does not exists',
    301020: 'The node is not valid',
    301021: 'The node status is not unaudited',
    301022: 'The node status is not disabled',
    301023: 'The root node does not support update',
    301024: 'The node status value error',
    301025: 'The node owner does not exists',
    301026: 'The node owner is not valid',
    301027: 'The node owner has no permission',
    301028: 'The consensus node cannot be deleted',
    301029: 'The consensus node cannot be disabled',
    301030: 'get consensus node numbers error',
    301031: 'consensus node more than license definitioned number',

    # User manager contract error code definition'
    302001: 'User manager contract internal error',
    302002: 'the user address is empty',
    302003: 'the user name is empty',
    302004: 'the length of user name is too long',
    302005: 'the length of user name is too short',
    302006: 'the user mobile is empty',
    302007: 'the user mobile format is wrong',
    302008: 'the user email is empty',
    302009: 'the length of user email is too long',
    302010: 'the user email format is wrong',
    302011: 'the length of user desc is too long',
    302012: 'the value of the roles is wrong',
    302013: 'The user address has already registered',
    302014: 'The user name has already registered',
    302015: 'the value of the audit status is wrong',
    302016: 'The user does not exist',
    302017: 'The user is not a valid user',
    302018: 'The user status is not unaudited',
    302019: 'The user status is not disabled',
    302020: 'The caller does not exist',
    302021: 'The caller is not a valid user',
    302022: 'The caller has no permission',
    302023: 'The user has no roles',
    302024: 'The user status value error',

    # System parameter contract error code definition'
    303001: 'parameter error',
    303002: 'Internal error',
    303003: 'permission deny',

    # CNS contract error code definition'
    304001: 'Internal error',
    304002: 'Wrong contract name',
    304003: 'Wrong contract version',
    304004: 'Wrong contract address',
    304005: 'The caller is not the contract owner',
    304006: 'Contract name and version already registered',
    304007: 'Contract name already registered',
    304008: 'Compare contract version error',
    304009: 'Version is lower than registered version',
    304010: 'The contract is does not exists',

    # Ledger manager contract error code definition'
    305001: 'Wrong LedgerInfo Iuputs',
    305002: 'Internal error',
    305003: 'permission deny',
    305004: 'The ledgerName has already existed',
    305005: 'The ledgerName has already existed',
    305006: 'The ledgerName is empty',
    305007: 'The ledgerNode publicKey value format error',
    305008: 'The ledgerNode publicKey is empty',
    305009: 'The ledgerNode is does not exist',
    305010: 'The ledgerNodes do not have consensus node',
    305011: 'The ledgerNode BlsPublicKey value format error',
    305012: 'The ledgerNode BlsPublicKey is empty',
    305013: 'The JoinNode has already existed',
    305014: 'The quitNode is does not exist in ledger',
    305015: 'The ledgerName is too long',
    305016: 'Cannot quit the last node',
    305017: 'The ledger has deleted',
    305018: 'The ledgerNode is not valid',

    # Ledger node manager contract error code definition'
    306001: 'Internal error',
    306002: 'Empty public key',
    306003: 'Invalid public key',
    306004: 'Empty bls public key',
    306005: 'Invalid bls public key',
    306006: 'Permission deny',
    306007: 'Can not remove consensus node',
    306008: 'Node not found',
    306009: 'Invalid node type',
    306010: 'Empty address',
    306011: 'Cannot update the last consensus node type',
    306012: 'Node has already exist',

    307001: 'Invalid cipher data',
    307002: 'Re-encrypt cipher failed',
}
