-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathErrors.sol
56 lines (55 loc) · 5.41 KB
/
Errors.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title Errors library
* @author BGD Labs
* @notice Defines the error messages emitted by the different contracts of the Aave CrossChain Infrastructure
*/
library Errors {
string public constant ETH_TRANSFER_FAILED = '1'; // failed to transfer eth to destination
string public constant CALLER_IS_NOT_APPROVED_SENDER = '2'; // caller must be an approved message sender
string public constant ENVELOPE_NOT_PREVIOUSLY_REGISTERED = '3'; // envelope can only be retried if it has been previously registered
string public constant CURRENT_OR_DESTINATION_CHAIN_ADAPTER_NOT_SET = '4'; // can not enable bridge adapter if the current or destination chain adapter is 0 address
string public constant CALLER_NOT_APPROVED_BRIDGE = '5'; // caller must be an approved bridge
string public constant INVALID_VALIDITY_TIMESTAMP = '6'; // new validity timestamp is not correct (< last validity or in the future
string public constant CALLER_NOT_CCIP_ROUTER = '7'; // caller must be bridge provider contract
string public constant CCIP_ROUTER_CANT_BE_ADDRESS_0 = '8'; // CCIP bridge adapters needs a CCIP Router
string public constant RECEIVER_NOT_SET = '9'; // receiver address on destination chain can not be 0
string public constant DESTINATION_CHAIN_ID_NOT_SUPPORTED = '10'; // destination chain id must be supported by bridge provider
string public constant NOT_ENOUGH_VALUE_TO_PAY_BRIDGE_FEES = '11'; // cross chain controller does not have enough funds to forward the message
string public constant REMOTE_NOT_TRUSTED = '12'; // remote address has not been registered as a trusted origin
string public constant CALLER_NOT_HL_MAILBOX = '13'; // caller must be the HyperLane Mailbox contract
string public constant NO_BRIDGE_ADAPTERS_FOR_SPECIFIED_CHAIN = '14'; // no bridge adapters are configured for the specified destination chain
string public constant ONLY_ONE_EMERGENCY_UPDATE_PER_CHAIN = '15'; // only one emergency update is allowed at the time
string public constant INVALID_REQUIRED_CONFIRMATIONS = '16'; // required confirmations must be less or equal than allowed adapters or bigger or equal than 1
string public constant DESTINATION_CHAIN_NOT_SAME_AS_CURRENT_CHAIN = '17'; // destination chain must be the same chain as the current chain where contract is deployed
string public constant INVALID_BRIDGE_ADAPTER = '18'; // a bridge adapter address can not be the 0 address
string public constant TRANSACTION_NOT_PREVIOUSLY_FORWARDED = '19'; // to retry sending a transaction, it needs to have been previously sent
string public constant TRANSACTION_RETRY_FAILED = '20'; // transaction retry has failed (no bridge adapters where able to send)
string public constant BRIDGE_ADAPTERS_SHOULD_BE_UNIQUE = '21'; // can not use the same bridge adapter twice
string public constant ENVELOPE_NOT_CONFIRMED_OR_DELIVERED = '22'; // to deliver an envelope, this should have been previously confirmed
string public constant INVALID_BASE_ADAPTER_CROSS_CHAIN_CONTROLLER = '23'; // crossChainController address can not be 0
string public constant DELEGATE_CALL_FORBIDDEN = '24'; // calling this function during delegatecall is forbidden
string public constant CALLER_NOT_LZ_ENDPOINT = '25'; // caller must be the LayerZero endpoint contract
string public constant INVALID_LZ_ENDPOINT = '26'; // LayerZero endpoint can't be 0
string public constant INVALID_TRUSTED_REMOTE = '27'; // trusted remote endpoint can't be 0
string public constant INVALID_EMERGENCY_ORACLE = '28'; // emergency oracle can not be 0 because if not, system could not be rescued on emergency
string public constant NOT_IN_EMERGENCY = '29'; // execution can only happen when in an emergency
string public constant LINK_TOKEN_CANT_BE_ADDRESS_0 = '30'; // link token address should be set
string public constant CCIP_MESSAGE_IS_INVALID = '31'; // ccip message is not an accepted message
string public constant ADAPTER_PAYMENT_SETUP_FAILED = '32'; // adapter payment setup failed
string public constant CHAIN_ID_MISMATCH = '33'; // the message delivered to/from wrong network
string public constant CALLER_NOT_OVM = '34'; // the caller must be the optimism ovm contract
string public constant CALLER_NOT_FX_TUNNEL = '35'; // the caller must be the fx tunnel contract
string public constant INVALID_SENDER = '36'; // sender can not be address 0
string public constant CALLER_NOT_GNOSIS_ARBITRARY_MESSAGE_BRIDGE = '37'; // the caller must be the Gnosis AMB contract
string public constant ZERO_GNOSIS_ARBITRARY_MESSAGE_BRIDGE = '38'; // The passed Gnosis AMB contract is zero
string public constant CALLER_NOT_ZK_EVM_BRIDGE = '39'; // the caller must be the zk evm bridge
string public constant INVALID_HL_MAILBOX = '40'; // the Hyperlane mailbox address can not be 0
string public constant WORMHOLE_RELAYER_CANT_BE_ADDRESS_0 = '41'; // Wormhole relayer can not be address 0
string public constant CALLER_NOT_WORMHOLE_RELAYER = '42'; // caller must be the Wormhole relayer
string public constant ZK_SYNC_BRIDGE_HUB_CANT_BE_ADDRESS_0 = '43'; // ZkSync Bridgehub can not be address 0
string public constant CL_GAS_PRICE_ORACLE_CANT_BE_ADDRESS_0 = '44'; // ChainLink gas price oracle can not be address 0
string public constant CALLER_NOT_LINEA_MESSAGE_SERVICE = '45'; // caller must be the Linea message service
string public constant LINEA_MESSAGE_SERVICE_CANT_BE_ADDRESS_0 = '46'; // Linea message service can not be address 0
}