@across-protocol/contracts 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,7 +81,7 @@ exports.OP_STACK_ADDRESS_MAP = {
81
81
  L1CrossDomainMessenger: "0x5D4472f31Bd9385709ec61305AFc749F0fA8e9d0",
82
82
  L1StandardBridge: "0x697402166Fbf2F22E970df8a6486Ef171dbfc524",
83
83
  },
84
- [utils_1.CHAIN_IDs.DOCTOR_WHO]: {
84
+ [utils_1.CHAIN_IDs.UNICHAIN]: {
85
85
  L1CrossDomainMessenger: "0x9A3D64E386C18Cb1d6d5179a9596A4B5736e98A6",
86
86
  L1StandardBridge: "0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA",
87
87
  },
@@ -222,7 +222,7 @@ exports.L2_ADDRESS_MAP = {
222
222
  l2Weth: "0x3ab6C7AEb93A1CFC64AEEa8BF0f00c176EE42A2C",
223
223
  polygonZkEvmBridge: "0xF6BEEeBB578e214CA9E23B0e9683454Ff88Ed2A7",
224
224
  },
225
- [utils_1.CHAIN_IDs.DOCTOR_WHO]: {
225
+ [utils_1.CHAIN_IDs.UNICHAIN]: {
226
226
  cctpTokenMessenger: "0x4e744b28E787c3aD0e810eD65A24461D4ac5a762",
227
227
  cctpMessageTransmitter: "0x353bE9E2E38AB1D19104534e4edC21c643Df86f4",
228
228
  },
@@ -337,9 +337,9 @@ const config = {
337
337
  accounts: { mnemonic },
338
338
  companionNetworks: { l1: "mainnet" },
339
339
  },
340
- doctorwho: {
341
- chainId: constants_1.CHAIN_IDs.DOCTOR_WHO,
342
- url: "https://doctor-who-mainnet.g.alchemy.com/public",
340
+ unichain: {
341
+ chainId: constants_1.CHAIN_IDs.UNICHAIN,
342
+ url: "https://mainnet.unichain.org",
343
343
  saveDeployments: true,
344
344
  accounts: { mnemonic },
345
345
  companionNetworks: { l1: "mainnet" },
@@ -375,7 +375,7 @@ const config = {
375
375
  alephzero: "blockscout",
376
376
  ink: "blockscout",
377
377
  soneium: "blockscout",
378
- doctorwho: "blockscout",
378
+ unichain: process.env.UNISCAN_API_KEY,
379
379
  },
380
380
  customChains: [
381
381
  {
@@ -563,11 +563,11 @@ const config = {
563
563
  },
564
564
  },
565
565
  {
566
- network: "doctorwho",
567
- chainId: constants_1.CHAIN_IDs.DOCTOR_WHO,
566
+ network: "unichain",
567
+ chainId: constants_1.CHAIN_IDs.UNICHAIN,
568
568
  urls: {
569
- apiURL: "https://doctor-who.blockscout.com/api",
570
- browserURL: "https://doctorwho.blockscout.com",
569
+ apiURL: "https://api.uniscan.xyz/api",
570
+ browserURL: "https://uniscan.xyz",
571
571
  },
572
572
  },
573
573
  ],
@@ -4804,38 +4804,88 @@
4804
4804
  "errors": [
4805
4805
  {
4806
4806
  "code": 6000,
4807
- "name": "InvalidSelector",
4808
- "msg": "Invalid solidity selector"
4807
+ "name": "NotOwner",
4808
+ "msg": "Only the owner can call this function!"
4809
4809
  },
4810
4810
  {
4811
4811
  "code": 6001,
4812
- "name": "InvalidArgument",
4813
- "msg": "Invalid solidity argument"
4812
+ "name": "InvalidRelayHash",
4813
+ "msg": "Invalid relay hash!"
4814
4814
  },
4815
4815
  {
4816
4816
  "code": 6002,
4817
- "name": "InvalidBool",
4818
- "msg": "Invalid solidity bool argument"
4817
+ "name": "CanOnlyCloseFillStatusPdaIfFillDeadlinePassed",
4818
+ "msg": "The fill deadline has not passed!"
4819
4819
  },
4820
4820
  {
4821
4821
  "code": 6003,
4822
- "name": "InvalidAddress",
4823
- "msg": "Invalid solidity address argument"
4822
+ "name": "NotRelayer",
4823
+ "msg": "The caller is not the relayer!"
4824
4824
  },
4825
4825
  {
4826
4826
  "code": 6004,
4827
- "name": "InvalidUint32",
4828
- "msg": "Invalid solidity uint32 argument"
4827
+ "name": "CannotSetCurrentTime",
4828
+ "msg": "Cannot set time if not in test mode!"
4829
4829
  },
4830
4830
  {
4831
4831
  "code": 6005,
4832
- "name": "InvalidUint64",
4833
- "msg": "Invalid solidity uint64 argument"
4832
+ "name": "InvalidRemoteDomain",
4833
+ "msg": "Invalid remote domain!"
4834
4834
  },
4835
4835
  {
4836
4836
  "code": 6006,
4837
- "name": "UnsupportedSelector",
4838
- "msg": "Unsupported solidity selector"
4837
+ "name": "InvalidRemoteSender",
4838
+ "msg": "Invalid remote sender!"
4839
+ },
4840
+ {
4841
+ "code": 6007,
4842
+ "name": "InvalidMint",
4843
+ "msg": "Invalid mint!"
4844
+ },
4845
+ {
4846
+ "code": 6008,
4847
+ "name": "ExceededPendingBridgeAmount",
4848
+ "msg": "Exceeded pending bridge amount to HubPool!"
4849
+ },
4850
+ {
4851
+ "code": 6009,
4852
+ "name": "ParamsWriteOverflow",
4853
+ "msg": "Overflow writing to parameters account!"
4854
+ },
4855
+ {
4856
+ "code": 6010,
4857
+ "name": "InvalidRefund",
4858
+ "msg": "Invalid refund address!"
4859
+ },
4860
+ {
4861
+ "code": 6011,
4862
+ "name": "ZeroRefundClaim",
4863
+ "msg": "Zero relayer refund claim!"
4864
+ },
4865
+ {
4866
+ "code": 6012,
4867
+ "name": "NonZeroRefundClaim",
4868
+ "msg": "Cannot close non-zero relayer refund claim!"
4869
+ },
4870
+ {
4871
+ "code": 6013,
4872
+ "name": "InvalidClaimInitializer",
4873
+ "msg": "Invalid claim initializer!"
4874
+ },
4875
+ {
4876
+ "code": 6014,
4877
+ "name": "InvalidRefundTokenAccount",
4878
+ "msg": "Invalid refund token account!"
4879
+ },
4880
+ {
4881
+ "code": 6015,
4882
+ "name": "InvalidProductionSeed",
4883
+ "msg": "Seed must be 0 in production!"
4884
+ },
4885
+ {
4886
+ "code": 6016,
4887
+ "name": "InvalidATACreationAccounts",
4888
+ "msg": "Invalid remaining accounts for ATA creation!"
4839
4889
  }
4840
4890
  ],
4841
4891
  "types": [
@@ -4810,38 +4810,88 @@ export type SvmSpoke = {
4810
4810
  "errors": [
4811
4811
  {
4812
4812
  "code": 6000;
4813
- "name": "invalidSelector";
4814
- "msg": "Invalid solidity selector";
4813
+ "name": "notOwner";
4814
+ "msg": "Only the owner can call this function!";
4815
4815
  },
4816
4816
  {
4817
4817
  "code": 6001;
4818
- "name": "invalidArgument";
4819
- "msg": "Invalid solidity argument";
4818
+ "name": "invalidRelayHash";
4819
+ "msg": "Invalid relay hash!";
4820
4820
  },
4821
4821
  {
4822
4822
  "code": 6002;
4823
- "name": "invalidBool";
4824
- "msg": "Invalid solidity bool argument";
4823
+ "name": "canOnlyCloseFillStatusPdaIfFillDeadlinePassed";
4824
+ "msg": "The fill deadline has not passed!";
4825
4825
  },
4826
4826
  {
4827
4827
  "code": 6003;
4828
- "name": "invalidAddress";
4829
- "msg": "Invalid solidity address argument";
4828
+ "name": "notRelayer";
4829
+ "msg": "The caller is not the relayer!";
4830
4830
  },
4831
4831
  {
4832
4832
  "code": 6004;
4833
- "name": "invalidUint32";
4834
- "msg": "Invalid solidity uint32 argument";
4833
+ "name": "cannotSetCurrentTime";
4834
+ "msg": "Cannot set time if not in test mode!";
4835
4835
  },
4836
4836
  {
4837
4837
  "code": 6005;
4838
- "name": "invalidUint64";
4839
- "msg": "Invalid solidity uint64 argument";
4838
+ "name": "invalidRemoteDomain";
4839
+ "msg": "Invalid remote domain!";
4840
4840
  },
4841
4841
  {
4842
4842
  "code": 6006;
4843
- "name": "unsupportedSelector";
4844
- "msg": "Unsupported solidity selector";
4843
+ "name": "invalidRemoteSender";
4844
+ "msg": "Invalid remote sender!";
4845
+ },
4846
+ {
4847
+ "code": 6007;
4848
+ "name": "invalidMint";
4849
+ "msg": "Invalid mint!";
4850
+ },
4851
+ {
4852
+ "code": 6008;
4853
+ "name": "exceededPendingBridgeAmount";
4854
+ "msg": "Exceeded pending bridge amount to HubPool!";
4855
+ },
4856
+ {
4857
+ "code": 6009;
4858
+ "name": "paramsWriteOverflow";
4859
+ "msg": "Overflow writing to parameters account!";
4860
+ },
4861
+ {
4862
+ "code": 6010;
4863
+ "name": "invalidRefund";
4864
+ "msg": "Invalid refund address!";
4865
+ },
4866
+ {
4867
+ "code": 6011;
4868
+ "name": "zeroRefundClaim";
4869
+ "msg": "Zero relayer refund claim!";
4870
+ },
4871
+ {
4872
+ "code": 6012;
4873
+ "name": "nonZeroRefundClaim";
4874
+ "msg": "Cannot close non-zero relayer refund claim!";
4875
+ },
4876
+ {
4877
+ "code": 6013;
4878
+ "name": "invalidClaimInitializer";
4879
+ "msg": "Invalid claim initializer!";
4880
+ },
4881
+ {
4882
+ "code": 6014;
4883
+ "name": "invalidRefundTokenAccount";
4884
+ "msg": "Invalid refund token account!";
4885
+ },
4886
+ {
4887
+ "code": 6015;
4888
+ "name": "invalidProductionSeed";
4889
+ "msg": "Seed must be 0 in production!";
4890
+ },
4891
+ {
4892
+ "code": 6016;
4893
+ "name": "invalidAtaCreationAccounts";
4894
+ "msg": "Invalid remaining accounts for ATA creation!";
4845
4895
  }
4846
4896
  ];
4847
4897
  "types": [
@@ -6,21 +6,41 @@
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
8
  import { type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from '@solana/web3-v2.js';
9
- /** InvalidSelector: Invalid solidity selector */
10
- export declare const SVM_SPOKE_ERROR__INVALID_SELECTOR = 6000;
11
- /** InvalidArgument: Invalid solidity argument */
12
- export declare const SVM_SPOKE_ERROR__INVALID_ARGUMENT = 6001;
13
- /** InvalidBool: Invalid solidity bool argument */
14
- export declare const SVM_SPOKE_ERROR__INVALID_BOOL = 6002;
15
- /** InvalidAddress: Invalid solidity address argument */
16
- export declare const SVM_SPOKE_ERROR__INVALID_ADDRESS = 6003;
17
- /** InvalidUint32: Invalid solidity uint32 argument */
18
- export declare const SVM_SPOKE_ERROR__INVALID_UINT32 = 6004;
19
- /** InvalidUint64: Invalid solidity uint64 argument */
20
- export declare const SVM_SPOKE_ERROR__INVALID_UINT64 = 6005;
21
- /** UnsupportedSelector: Unsupported solidity selector */
22
- export declare const SVM_SPOKE_ERROR__UNSUPPORTED_SELECTOR = 6006;
23
- export type SvmSpokeError = typeof SVM_SPOKE_ERROR__INVALID_ADDRESS | typeof SVM_SPOKE_ERROR__INVALID_ARGUMENT | typeof SVM_SPOKE_ERROR__INVALID_BOOL | typeof SVM_SPOKE_ERROR__INVALID_SELECTOR | typeof SVM_SPOKE_ERROR__INVALID_UINT32 | typeof SVM_SPOKE_ERROR__INVALID_UINT64 | typeof SVM_SPOKE_ERROR__UNSUPPORTED_SELECTOR;
9
+ /** NotOwner: Only the owner can call this function! */
10
+ export declare const SVM_SPOKE_ERROR__NOT_OWNER = 6000;
11
+ /** InvalidRelayHash: Invalid relay hash! */
12
+ export declare const SVM_SPOKE_ERROR__INVALID_RELAY_HASH = 6001;
13
+ /** CanOnlyCloseFillStatusPdaIfFillDeadlinePassed: The fill deadline has not passed! */
14
+ export declare const SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = 6002;
15
+ /** NotRelayer: The caller is not the relayer! */
16
+ export declare const SVM_SPOKE_ERROR__NOT_RELAYER = 6003;
17
+ /** CannotSetCurrentTime: Cannot set time if not in test mode! */
18
+ export declare const SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = 6004;
19
+ /** InvalidRemoteDomain: Invalid remote domain! */
20
+ export declare const SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = 6005;
21
+ /** InvalidRemoteSender: Invalid remote sender! */
22
+ export declare const SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = 6006;
23
+ /** InvalidMint: Invalid mint! */
24
+ export declare const SVM_SPOKE_ERROR__INVALID_MINT = 6007;
25
+ /** ExceededPendingBridgeAmount: Exceeded pending bridge amount to HubPool! */
26
+ export declare const SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT = 6008;
27
+ /** ParamsWriteOverflow: Overflow writing to parameters account! */
28
+ export declare const SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = 6009;
29
+ /** InvalidRefund: Invalid refund address! */
30
+ export declare const SVM_SPOKE_ERROR__INVALID_REFUND = 6010;
31
+ /** ZeroRefundClaim: Zero relayer refund claim! */
32
+ export declare const SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = 6011;
33
+ /** NonZeroRefundClaim: Cannot close non-zero relayer refund claim! */
34
+ export declare const SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = 6012;
35
+ /** InvalidClaimInitializer: Invalid claim initializer! */
36
+ export declare const SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = 6013;
37
+ /** InvalidRefundTokenAccount: Invalid refund token account! */
38
+ export declare const SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = 6014;
39
+ /** InvalidProductionSeed: Seed must be 0 in production! */
40
+ export declare const SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 6015;
41
+ /** InvalidATACreationAccounts: Invalid remaining accounts for ATA creation! */
42
+ export declare const SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 6016;
43
+ export type SvmSpokeError = typeof SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME | typeof SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED | typeof SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT | typeof SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS | typeof SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER | typeof SVM_SPOKE_ERROR__INVALID_MINT | typeof SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED | typeof SVM_SPOKE_ERROR__INVALID_REFUND | typeof SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_RELAY_HASH | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER | typeof SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM | typeof SVM_SPOKE_ERROR__NOT_OWNER | typeof SVM_SPOKE_ERROR__NOT_RELAYER | typeof SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW | typeof SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM;
24
44
  export declare function getSvmSpokeErrorMessage(code: SvmSpokeError): string;
25
45
  export declare function isSvmSpokeError<TProgramErrorCode extends SvmSpokeError>(error: unknown, transactionMessage: {
26
46
  instructions: Record<number, {
@@ -7,35 +7,65 @@
7
7
  * @see https://github.com/codama-idl/codama
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.SVM_SPOKE_ERROR__UNSUPPORTED_SELECTOR = exports.SVM_SPOKE_ERROR__INVALID_UINT64 = exports.SVM_SPOKE_ERROR__INVALID_UINT32 = exports.SVM_SPOKE_ERROR__INVALID_ADDRESS = exports.SVM_SPOKE_ERROR__INVALID_BOOL = exports.SVM_SPOKE_ERROR__INVALID_ARGUMENT = exports.SVM_SPOKE_ERROR__INVALID_SELECTOR = void 0;
10
+ exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__INVALID_REFUND = exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT = exports.SVM_SPOKE_ERROR__INVALID_MINT = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = exports.SVM_SPOKE_ERROR__NOT_RELAYER = exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = exports.SVM_SPOKE_ERROR__INVALID_RELAY_HASH = exports.SVM_SPOKE_ERROR__NOT_OWNER = void 0;
11
11
  exports.getSvmSpokeErrorMessage = getSvmSpokeErrorMessage;
12
12
  exports.isSvmSpokeError = isSvmSpokeError;
13
13
  const web3_v2_js_1 = require("@solana/web3-v2.js");
14
14
  const programs_1 = require("../programs");
15
- /** InvalidSelector: Invalid solidity selector */
16
- exports.SVM_SPOKE_ERROR__INVALID_SELECTOR = 0x1770; // 6000
17
- /** InvalidArgument: Invalid solidity argument */
18
- exports.SVM_SPOKE_ERROR__INVALID_ARGUMENT = 0x1771; // 6001
19
- /** InvalidBool: Invalid solidity bool argument */
20
- exports.SVM_SPOKE_ERROR__INVALID_BOOL = 0x1772; // 6002
21
- /** InvalidAddress: Invalid solidity address argument */
22
- exports.SVM_SPOKE_ERROR__INVALID_ADDRESS = 0x1773; // 6003
23
- /** InvalidUint32: Invalid solidity uint32 argument */
24
- exports.SVM_SPOKE_ERROR__INVALID_UINT32 = 0x1774; // 6004
25
- /** InvalidUint64: Invalid solidity uint64 argument */
26
- exports.SVM_SPOKE_ERROR__INVALID_UINT64 = 0x1775; // 6005
27
- /** UnsupportedSelector: Unsupported solidity selector */
28
- exports.SVM_SPOKE_ERROR__UNSUPPORTED_SELECTOR = 0x1776; // 6006
15
+ /** NotOwner: Only the owner can call this function! */
16
+ exports.SVM_SPOKE_ERROR__NOT_OWNER = 0x1770; // 6000
17
+ /** InvalidRelayHash: Invalid relay hash! */
18
+ exports.SVM_SPOKE_ERROR__INVALID_RELAY_HASH = 0x1771; // 6001
19
+ /** CanOnlyCloseFillStatusPdaIfFillDeadlinePassed: The fill deadline has not passed! */
20
+ exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = 0x1772; // 6002
21
+ /** NotRelayer: The caller is not the relayer! */
22
+ exports.SVM_SPOKE_ERROR__NOT_RELAYER = 0x1773; // 6003
23
+ /** CannotSetCurrentTime: Cannot set time if not in test mode! */
24
+ exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = 0x1774; // 6004
25
+ /** InvalidRemoteDomain: Invalid remote domain! */
26
+ exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = 0x1775; // 6005
27
+ /** InvalidRemoteSender: Invalid remote sender! */
28
+ exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = 0x1776; // 6006
29
+ /** InvalidMint: Invalid mint! */
30
+ exports.SVM_SPOKE_ERROR__INVALID_MINT = 0x1777; // 6007
31
+ /** ExceededPendingBridgeAmount: Exceeded pending bridge amount to HubPool! */
32
+ exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT = 0x1778; // 6008
33
+ /** ParamsWriteOverflow: Overflow writing to parameters account! */
34
+ exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = 0x1779; // 6009
35
+ /** InvalidRefund: Invalid refund address! */
36
+ exports.SVM_SPOKE_ERROR__INVALID_REFUND = 0x177a; // 6010
37
+ /** ZeroRefundClaim: Zero relayer refund claim! */
38
+ exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = 0x177b; // 6011
39
+ /** NonZeroRefundClaim: Cannot close non-zero relayer refund claim! */
40
+ exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = 0x177c; // 6012
41
+ /** InvalidClaimInitializer: Invalid claim initializer! */
42
+ exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = 0x177d; // 6013
43
+ /** InvalidRefundTokenAccount: Invalid refund token account! */
44
+ exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = 0x177e; // 6014
45
+ /** InvalidProductionSeed: Seed must be 0 in production! */
46
+ exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 0x177f; // 6015
47
+ /** InvalidATACreationAccounts: Invalid remaining accounts for ATA creation! */
48
+ exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 0x1780; // 6016
29
49
  let svmSpokeErrorMessages;
30
50
  if (process.env.NODE_ENV !== 'production') {
31
51
  svmSpokeErrorMessages = {
32
- [exports.SVM_SPOKE_ERROR__INVALID_ADDRESS]: `Invalid solidity address argument`,
33
- [exports.SVM_SPOKE_ERROR__INVALID_ARGUMENT]: `Invalid solidity argument`,
34
- [exports.SVM_SPOKE_ERROR__INVALID_BOOL]: `Invalid solidity bool argument`,
35
- [exports.SVM_SPOKE_ERROR__INVALID_SELECTOR]: `Invalid solidity selector`,
36
- [exports.SVM_SPOKE_ERROR__INVALID_UINT32]: `Invalid solidity uint32 argument`,
37
- [exports.SVM_SPOKE_ERROR__INVALID_UINT64]: `Invalid solidity uint64 argument`,
38
- [exports.SVM_SPOKE_ERROR__UNSUPPORTED_SELECTOR]: `Unsupported solidity selector`,
52
+ [exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME]: `Cannot set time if not in test mode!`,
53
+ [exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED]: `The fill deadline has not passed!`,
54
+ [exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT]: `Exceeded pending bridge amount to HubPool!`,
55
+ [exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS]: `Invalid remaining accounts for ATA creation!`,
56
+ [exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER]: `Invalid claim initializer!`,
57
+ [exports.SVM_SPOKE_ERROR__INVALID_MINT]: `Invalid mint!`,
58
+ [exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED]: `Seed must be 0 in production!`,
59
+ [exports.SVM_SPOKE_ERROR__INVALID_REFUND]: `Invalid refund address!`,
60
+ [exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT]: `Invalid refund token account!`,
61
+ [exports.SVM_SPOKE_ERROR__INVALID_RELAY_HASH]: `Invalid relay hash!`,
62
+ [exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN]: `Invalid remote domain!`,
63
+ [exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER]: `Invalid remote sender!`,
64
+ [exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM]: `Cannot close non-zero relayer refund claim!`,
65
+ [exports.SVM_SPOKE_ERROR__NOT_OWNER]: `Only the owner can call this function!`,
66
+ [exports.SVM_SPOKE_ERROR__NOT_RELAYER]: `The caller is not the relayer!`,
67
+ [exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW]: `Overflow writing to parameters account!`,
68
+ [exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM]: `Zero relayer refund claim!`,
39
69
  };
40
70
  }
41
71
  function getSvmSpokeErrorMessage(code) {
@@ -4810,38 +4810,88 @@ export type SvmSpoke = {
4810
4810
  "errors": [
4811
4811
  {
4812
4812
  "code": 6000;
4813
- "name": "invalidSelector";
4814
- "msg": "Invalid solidity selector";
4813
+ "name": "notOwner";
4814
+ "msg": "Only the owner can call this function!";
4815
4815
  },
4816
4816
  {
4817
4817
  "code": 6001;
4818
- "name": "invalidArgument";
4819
- "msg": "Invalid solidity argument";
4818
+ "name": "invalidRelayHash";
4819
+ "msg": "Invalid relay hash!";
4820
4820
  },
4821
4821
  {
4822
4822
  "code": 6002;
4823
- "name": "invalidBool";
4824
- "msg": "Invalid solidity bool argument";
4823
+ "name": "canOnlyCloseFillStatusPdaIfFillDeadlinePassed";
4824
+ "msg": "The fill deadline has not passed!";
4825
4825
  },
4826
4826
  {
4827
4827
  "code": 6003;
4828
- "name": "invalidAddress";
4829
- "msg": "Invalid solidity address argument";
4828
+ "name": "notRelayer";
4829
+ "msg": "The caller is not the relayer!";
4830
4830
  },
4831
4831
  {
4832
4832
  "code": 6004;
4833
- "name": "invalidUint32";
4834
- "msg": "Invalid solidity uint32 argument";
4833
+ "name": "cannotSetCurrentTime";
4834
+ "msg": "Cannot set time if not in test mode!";
4835
4835
  },
4836
4836
  {
4837
4837
  "code": 6005;
4838
- "name": "invalidUint64";
4839
- "msg": "Invalid solidity uint64 argument";
4838
+ "name": "invalidRemoteDomain";
4839
+ "msg": "Invalid remote domain!";
4840
4840
  },
4841
4841
  {
4842
4842
  "code": 6006;
4843
- "name": "unsupportedSelector";
4844
- "msg": "Unsupported solidity selector";
4843
+ "name": "invalidRemoteSender";
4844
+ "msg": "Invalid remote sender!";
4845
+ },
4846
+ {
4847
+ "code": 6007;
4848
+ "name": "invalidMint";
4849
+ "msg": "Invalid mint!";
4850
+ },
4851
+ {
4852
+ "code": 6008;
4853
+ "name": "exceededPendingBridgeAmount";
4854
+ "msg": "Exceeded pending bridge amount to HubPool!";
4855
+ },
4856
+ {
4857
+ "code": 6009;
4858
+ "name": "paramsWriteOverflow";
4859
+ "msg": "Overflow writing to parameters account!";
4860
+ },
4861
+ {
4862
+ "code": 6010;
4863
+ "name": "invalidRefund";
4864
+ "msg": "Invalid refund address!";
4865
+ },
4866
+ {
4867
+ "code": 6011;
4868
+ "name": "zeroRefundClaim";
4869
+ "msg": "Zero relayer refund claim!";
4870
+ },
4871
+ {
4872
+ "code": 6012;
4873
+ "name": "nonZeroRefundClaim";
4874
+ "msg": "Cannot close non-zero relayer refund claim!";
4875
+ },
4876
+ {
4877
+ "code": 6013;
4878
+ "name": "invalidClaimInitializer";
4879
+ "msg": "Invalid claim initializer!";
4880
+ },
4881
+ {
4882
+ "code": 6014;
4883
+ "name": "invalidRefundTokenAccount";
4884
+ "msg": "Invalid refund token account!";
4885
+ },
4886
+ {
4887
+ "code": 6015;
4888
+ "name": "invalidProductionSeed";
4889
+ "msg": "Seed must be 0 in production!";
4890
+ },
4891
+ {
4892
+ "code": 6016;
4893
+ "name": "invalidAtaCreationAccounts";
4894
+ "msg": "Invalid remaining accounts for ATA creation!";
4845
4895
  }
4846
4896
  ];
4847
4897
  "types": [
@@ -1,4 +1,4 @@
1
- export { CHAIN_IDs, MAINNET_CHAIN_IDs, TOKEN_SYMBOLS_MAP } from "@across-protocol/constants";
1
+ export { CHAIN_IDs, MAINNET_CHAIN_IDs, PRODUCTION_NETWORKS, TOKEN_SYMBOLS_MAP } from "@across-protocol/constants";
2
2
  export declare const FillStatus: {
3
3
  Unfilled: number;
4
4
  RequestedSlowFill: number;
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FillStatus = exports.TOKEN_SYMBOLS_MAP = exports.MAINNET_CHAIN_IDs = exports.CHAIN_IDs = void 0;
3
+ exports.FillStatus = exports.TOKEN_SYMBOLS_MAP = exports.PRODUCTION_NETWORKS = exports.MAINNET_CHAIN_IDs = exports.CHAIN_IDs = void 0;
4
4
  var constants_1 = require("@across-protocol/constants");
5
5
  Object.defineProperty(exports, "CHAIN_IDs", { enumerable: true, get: function () { return constants_1.CHAIN_IDs; } });
6
6
  Object.defineProperty(exports, "MAINNET_CHAIN_IDs", { enumerable: true, get: function () { return constants_1.MAINNET_CHAIN_IDs; } });
7
+ Object.defineProperty(exports, "PRODUCTION_NETWORKS", { enumerable: true, get: function () { return constants_1.PRODUCTION_NETWORKS; } });
7
8
  Object.defineProperty(exports, "TOKEN_SYMBOLS_MAP", { enumerable: true, get: function () { return constants_1.TOKEN_SYMBOLS_MAP; } });
8
9
  exports.FillStatus = {
9
10
  Unfilled: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@across-protocol/contracts",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "author": "UMA Team",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -42,7 +42,7 @@
42
42
  "pre-commit-hook": "sh scripts/preCommitHook.sh"
43
43
  },
44
44
  "dependencies": {
45
- "@across-protocol/constants": "^3.1.32",
45
+ "@across-protocol/constants": "^3.1.35",
46
46
  "@coral-xyz/anchor": "^0.30.1",
47
47
  "@defi-wonderland/smock": "^2.3.4",
48
48
  "@eth-optimism/contracts": "^0.5.40",