@across-protocol/contracts 5.0.11 → 5.0.12-alpha.2

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.
Files changed (65) hide show
  1. package/contracts/external/interfaces/CCTPInterfaces.sol +18 -0
  2. package/contracts/interfaces/SponsoredCCTPInterface.sol +11 -0
  3. package/contracts/libraries/SponsoredCCTPQuoteLib.sol +22 -0
  4. package/contracts/periphery/mintburn/ArbitraryEVMFlowExecutor.sol +38 -15
  5. package/contracts/periphery/mintburn/sponsored-cctp/SponsoredCCTPDstPeriphery.sol +41 -12
  6. package/contracts/test/MockCCTP.sol +10 -0
  7. package/dist/broadcast/deployed-addresses.json +70 -0
  8. package/dist/evm/artifacts/Arbitrum_Adapter.sol/Arbitrum_Adapter.json +1 -1
  9. package/dist/evm/artifacts/Arbitrum_CustomGasToken_Adapter.sol/Arbitrum_CustomGasToken_Adapter.json +1 -1
  10. package/dist/evm/artifacts/Arbitrum_RescueAdapter.sol/Arbitrum_RescueAdapter.json +1 -1
  11. package/dist/evm/artifacts/Arbitrum_SendTokensAdapter.sol/Arbitrum_SendTokensAdapter.json +1 -1
  12. package/dist/evm/artifacts/Arbitrum_SpokePool.sol/Arbitrum_SpokePool.json +1 -1
  13. package/dist/evm/artifacts/Arbitrum_WithdrawalHelper.sol/Arbitrum_WithdrawalHelper.json +1 -1
  14. package/dist/evm/artifacts/Base_Adapter.sol/Base_Adapter.json +1 -1
  15. package/dist/evm/artifacts/Blast_Adapter.sol/Blast_Adapter.json +1 -1
  16. package/dist/evm/artifacts/Blast_SpokePool.sol/Blast_SpokePool.json +1 -1
  17. package/dist/evm/artifacts/Boba_SpokePool.sol/Boba_SpokePool.json +1 -1
  18. package/dist/evm/artifacts/CCTPInterfaces.sol/ITokenMessengerV2.json +1 -1
  19. package/dist/evm/artifacts/CCTPInterfaces.sol/ITokenMinter.json +1 -1
  20. package/dist/evm/artifacts/Cher_SpokePool.sol/Cher_SpokePool.json +1 -1
  21. package/dist/evm/artifacts/CircleCCTPAdapter.sol/CircleDomainIds.json +1 -1
  22. package/dist/evm/artifacts/CounterfactualDepositCCTP.sol/CounterfactualDepositCCTP.json +1 -1
  23. package/dist/evm/artifacts/DoctorWho_Adapter.sol/DoctorWho_Adapter.json +1 -1
  24. package/dist/evm/artifacts/DstOFTHandler.sol/DstOFTHandler.json +1 -1
  25. package/dist/evm/artifacts/Ink_SpokePool.sol/Ink_SpokePool.json +1 -1
  26. package/dist/evm/artifacts/Lens_SpokePool.sol/Lens_SpokePool.json +1 -1
  27. package/dist/evm/artifacts/Linea_Adapter.sol/Linea_Adapter.json +1 -1
  28. package/dist/evm/artifacts/Linea_SpokePool.sol/Linea_SpokePool.json +1 -1
  29. package/dist/evm/artifacts/Lisk_Adapter.sol/Lisk_Adapter.json +1 -1
  30. package/dist/evm/artifacts/Lisk_SpokePool.sol/Lisk_SpokePool.json +1 -1
  31. package/dist/evm/artifacts/MockBedrockStandardBridge.sol/MockBedrockCrossDomainMessenger.json +1 -1
  32. package/dist/evm/artifacts/MockBedrockStandardBridge.sol/MockBedrockL1StandardBridge.json +1 -1
  33. package/dist/evm/artifacts/MockBedrockStandardBridge.sol/MockBedrockL2StandardBridge.json +1 -1
  34. package/dist/evm/artifacts/MockCCTP.sol/MockCCTPMessageTransmitter.json +1 -1
  35. package/dist/evm/artifacts/MockCCTP.sol/MockCCTPMessenger.json +1 -1
  36. package/dist/evm/artifacts/MockCCTP.sol/MockCCTPMessengerV2.json +1 -1
  37. package/dist/evm/artifacts/MockCCTP.sol/MockCCTPMinter.json +1 -1
  38. package/dist/evm/artifacts/MockOptimism_SpokePool.sol/MockOptimism_SpokePool.json +1 -1
  39. package/dist/evm/artifacts/Mode_Adapter.sol/Mode_Adapter.json +1 -1
  40. package/dist/evm/artifacts/OP_Adapter.sol/OP_Adapter.json +1 -1
  41. package/dist/evm/artifacts/OP_SpokePool.sol/OP_SpokePool.json +1 -1
  42. package/dist/evm/artifacts/Optimism_Adapter.sol/Optimism_Adapter.json +1 -1
  43. package/dist/evm/artifacts/Optimism_SpokePool.sol/Optimism_SpokePool.json +1 -1
  44. package/dist/evm/artifacts/Ovm_SpokePool.sol/Ovm_SpokePool.json +1 -1
  45. package/dist/evm/artifacts/Ovm_WithdrawalHelper.sol/Ovm_WithdrawalHelper.json +1 -1
  46. package/dist/evm/artifacts/Polygon_Adapter.sol/Polygon_Adapter.json +1 -1
  47. package/dist/evm/artifacts/Polygon_SpokePool.sol/Polygon_SpokePool.json +1 -1
  48. package/dist/evm/artifacts/Solana_Adapter.sol/Solana_Adapter.json +1 -1
  49. package/dist/evm/artifacts/SponsoredCCTPDstPeriphery.sol/SponsoredCCTPDstPeriphery.json +1 -1
  50. package/dist/evm/artifacts/SponsoredCCTPInterface.sol/SponsoredCCTPInterface.json +1 -1
  51. package/dist/evm/artifacts/SponsoredCCTPSrcPeriphery.sol/SponsoredCCTPSrcPeriphery.json +1 -1
  52. package/dist/evm/artifacts/SponsoredOFTSrcPeriphery.sol/SponsoredOFTSrcPeriphery.json +1 -1
  53. package/dist/evm/artifacts/Tron_SpokePool.sol/Tron_SpokePool.json +1 -1
  54. package/dist/evm/artifacts/Universal_Adapter.sol/Universal_Adapter.json +1 -1
  55. package/dist/evm/artifacts/Universal_SpokePool.sol/Universal_SpokePool.json +1 -1
  56. package/dist/evm/artifacts/WorldChain_SpokePool.sol/WorldChain_SpokePool.json +1 -1
  57. package/dist/evm/artifacts/ZkStack_Adapter.sol/ZkStack_Adapter.json +1 -1
  58. package/dist/evm/artifacts/ZkStack_CustomGasToken_Adapter.sol/ZkStack_CustomGasToken_Adapter.json +1 -1
  59. package/dist/evm/artifacts/ZkSync_SpokePool.sol/ZkSync_SpokePool.json +1 -1
  60. package/dist/evm/artifacts/Zora_Adapter.sol/Zora_Adapter.json +1 -1
  61. package/dist/evm/artifacts/eraVM_EIP7702.sol/SimpleContract.json +1 -1
  62. package/dist/evm/artifacts/eraVM_EIP7702.sol/SpokePoolEIP7702Test.json +1 -1
  63. package/dist/evm/artifacts/eraVM_EIP7702.sol/TestableMockSpokePool.json +1 -1
  64. package/dist/src/consts.js +5 -0
  65. package/package.json +2 -2
@@ -58,6 +58,14 @@ interface ITokenMessenger {
58
58
  }
59
59
 
60
60
  interface ITokenMessengerV2 {
61
+ /**
62
+ * @notice Minter responsible for minting and burning tokens on the local domain.
63
+ * Used on destination to prove that a received message would mint via the expected
64
+ * TokenMinter, and to resolve the local token that corresponds to a remote burnToken.
65
+ * https://github.com/circlefin/evm-cctp-contracts/blob/63ab1f0ac06ce0793c0bbfbb8d09816bc211386d/src/v2/TokenMessengerV2.sol
66
+ */
67
+ function localMinter() external view returns (ITokenMinter minter);
68
+
61
69
  // Source: https://github.com/circlefin/evm-cctp-contracts/blob/63ab1f0ac06ce0793c0bbfbb8d09816bc211386d/src/v2/TokenMessengerV2.sol#L138C1-L166C15
62
70
  /**
63
71
  * @notice Deposits and burns tokens from sender to be minted on destination domain.
@@ -139,6 +147,16 @@ interface ITokenMinter {
139
147
  * @return burnLimit maximum burn amount per message for token
140
148
  */
141
149
  function burnLimitsPerMessage(address token) external view returns (uint256);
150
+
151
+ /**
152
+ * @notice Returns the local token that is associated with the given remote burnToken on `remoteDomain`.
153
+ * Returns address(0) when no link has been configured.
154
+ * https://github.com/circlefin/evm-cctp-contracts/blob/63ab1f0ac06ce0793c0bbfbb8d09816bc211386d/src/TokenMinter.sol#L155
155
+ * @param remoteDomain CCTP source domain
156
+ * @param remoteToken burnToken (as bytes32) on the remote domain
157
+ * @return localToken the locally-minted token, or address(0) if the pair is not linked
158
+ */
159
+ function getLocalToken(uint32 remoteDomain, bytes32 remoteToken) external view returns (address localToken);
142
160
  }
143
161
 
144
162
  /**
@@ -24,6 +24,17 @@ interface SponsoredCCTPInterface is SponsoredExecutionModeInterface {
24
24
  // Error thrown when the CCTP message transmitter receive message fails.
25
25
  error CCTPMessageTransmitterFailed();
26
26
 
27
+ // Error thrown when the amount actually minted into this contract by the CCTP call does not match
28
+ // the `amount - feeExecuted` encoded in the message.
29
+ error InvalidMintedAmount();
30
+
31
+ // Error thrown when the CCTP message's top-level `recipient` is not the configured TokenMessenger.
32
+ error InvalidRecipient();
33
+
34
+ // Error thrown when the TokenMinter does not link the message's remote burnToken to this periphery's
35
+ // `baseToken` on the local domain.
36
+ error InvalidMintedToken();
37
+
27
38
  // Error thrown when direct flow destination handler is not a contract.
28
39
  error InvalidDirectHandler();
29
40
 
@@ -89,6 +89,28 @@ library SponsoredCCTPQuoteLib {
89
89
  );
90
90
  }
91
91
 
92
+ /**
93
+ * @notice Reads the top-level CCTP message `recipient` (i.e. the contract MessageTransmitter delivers to,
94
+ * typically the TokenMessenger that performs the mint). Assumes `message` has passed length validation.
95
+ */
96
+ function extractRecipient(bytes memory message) internal pure returns (bytes32) {
97
+ return message.toBytes32(RECIPIENT_INDEX);
98
+ }
99
+
100
+ /**
101
+ * @notice Reads the CCTP source domain from the message header. Assumes `message` has passed length validation.
102
+ */
103
+ function extractSourceDomain(bytes memory message) internal pure returns (uint32) {
104
+ return message.toUint32(SOURCE_DOMAIN_INDEX);
105
+ }
106
+
107
+ /**
108
+ * @notice Reads the burnToken (as bytes32) from the burn message body. Assumes `message` has passed length validation.
109
+ */
110
+ function extractBurnToken(bytes memory message) internal pure returns (bytes32) {
111
+ return message.toBytes32(MESSAGE_BODY_INDEX + BURN_TOKEN_INDEX);
112
+ }
113
+
92
114
  /**
93
115
  * @notice Validates the message that is received from CCTP. If this checks fails, then the quote on source chain was invalid
94
116
  * and we are unable to retrieve user's address to send the funds to. In that case the funds will stay in this contract.
@@ -60,9 +60,17 @@ abstract contract ArbitraryEVMFlowExecutor {
60
60
  // Decode the compressed action data
61
61
  CompressedCall[] memory compressedCalls = abi.decode(params.actionData, (CompressedCall[]));
62
62
 
63
- // Snapshot balances
64
- uint256 initialAmountSnapshot = IERC20(params.initialToken).balanceOf(address(this));
65
- uint256 finalAmountSnapshot = IERC20(params.commonParams.finalToken).balanceOf(address(this));
63
+ // Sweep any pre-existing dust on MulticallHandler so it cannot pollute our balance snapshots
64
+ _drainMulticallHandlerDust(params.initialToken);
65
+ if (params.commonParams.finalToken != params.initialToken) {
66
+ _drainMulticallHandlerDust(params.commonParams.finalToken);
67
+ }
68
+
69
+ bool differentTokens = params.initialToken != params.commonParams.finalToken;
70
+
71
+ // Read "starting balance initial token"(sBI) and "starting balance final token"(sBF)
72
+ uint256 sBI = IERC20(params.initialToken).balanceOf(address(this));
73
+ uint256 sBF = differentTokens ? IERC20(params.commonParams.finalToken).balanceOf(address(this)) : sBI;
66
74
 
67
75
  // Transfer tokens to MulticallHandler
68
76
  IERC20(params.initialToken).safeTransfer(multicallHandler, params.commonParams.amountInEVM);
@@ -82,19 +90,21 @@ abstract contract ArbitraryEVMFlowExecutor {
82
90
  instructions
83
91
  );
84
92
 
85
- uint256 finalAmount;
86
- // This means the swap (if one was intended) didn't happen (action failed), so we use the initial token as the final token.
87
- if (initialAmountSnapshot == IERC20(params.initialToken).balanceOf(address(this))) {
88
- params.commonParams.finalToken = params.initialToken;
89
- finalAmount = params.commonParams.amountInEVM;
90
- } else {
91
- uint256 finalBalance = IERC20(params.commonParams.finalToken).balanceOf(address(this));
92
- if (finalBalance >= finalAmountSnapshot) {
93
- // This means the swap did happen, so we check the balance of the output token and send it.
94
- finalAmount = finalBalance - finalAmountSnapshot;
93
+ // Default to initial-token accounting; overwrite below if finalToken was actually produced.
94
+ // Ending balance initial token
95
+ uint256 eBI = IERC20(params.initialToken).balanceOf(address(this));
96
+ uint256 finalAmount = params.commonParams.amountInEVM + eBI - sBI;
97
+ if (differentTokens) {
98
+ // Ending balance final token
99
+ uint256 eBF = IERC20(params.commonParams.finalToken).balanceOf(address(this));
100
+
101
+ // Any positive finalToken delta is treated as successful execution when initialToken != finalToken. If any
102
+ // (or all) of the initialToken amount is unspent during the execution, it lands back into this contract and
103
+ // can be withdrawn by the admin
104
+ if (eBF > sBF) {
105
+ finalAmount = eBF - sBF;
95
106
  } else {
96
- // If we somehow lost final tokens (e.g. by depositing into some contract), just set the finalAmount to 0.
97
- finalAmount = 0;
107
+ params.commonParams.finalToken = params.initialToken;
98
108
  }
99
109
  }
100
110
 
@@ -155,6 +165,19 @@ abstract contract ArbitraryEVMFlowExecutor {
155
165
  return abi.encode(instructions);
156
166
  }
157
167
 
168
+ /// @notice Drains any pre-existing balance of token from MulticallHandler
169
+ function _drainMulticallHandlerDust(address token) internal {
170
+ if (IERC20(token).balanceOf(multicallHandler) == 0) return;
171
+
172
+ // Empty instructions with `fallbackRecipient` set. Causes MulticallHandler to call `_drainRemainingTokens`, which
173
+ // does a safeTransfer of `token` to `fallbackRecipient`, this contract, essentially removing dust
174
+ bytes memory instructions = abi.encode(
175
+ MulticallHandler.Instructions({ calls: new MulticallHandler.Call[](0), fallbackRecipient: address(this) })
176
+ );
177
+
178
+ MulticallHandler(payable(multicallHandler)).handleV3AcrossMessage(token, 0, address(this), instructions);
179
+ }
180
+
158
181
  /// @notice Calculates proportional fees to sponsor in finalToken, given the fees to sponsor in initial token and initial amount
159
182
  function _calcExtraFeesFinal(
160
183
  uint256 amount,
@@ -2,7 +2,7 @@
2
2
  pragma solidity ^0.8.0;
3
3
 
4
4
  import { BaseModuleHandler } from "../BaseModuleHandler.sol";
5
- import { IMessageTransmitterV2 } from "../../../external/interfaces/CCTPInterfaces.sol";
5
+ import { IMessageTransmitterV2, ITokenMessengerV2 } from "../../../external/interfaces/CCTPInterfaces.sol";
6
6
  import { SponsoredCCTPQuoteLib } from "../../../libraries/SponsoredCCTPQuoteLib.sol";
7
7
  import { SponsoredCCTPInterface } from "../../../interfaces/SponsoredCCTPInterface.sol";
8
8
  import { Bytes32ToAddress } from "../../../libraries/AddressConverters.sol";
@@ -27,6 +27,10 @@ contract SponsoredCCTPDstPeriphery is BaseModuleHandler, SponsoredCCTPInterface,
27
27
  /// @notice The CCTP message transmitter contract.
28
28
  IMessageTransmitterV2 public immutable cctpMessageTransmitter;
29
29
 
30
+ /// @notice The CCTP token messenger contract that is the expected top-level recipient of MessageTransmitter
31
+ /// deliveries and owns the TokenMinter used to resolve burnToken -> local token for non-direct-deposit flows.
32
+ ITokenMessengerV2 public immutable cctpTokenMessenger;
33
+
30
34
  /// @notice Base token associated with this handler. The one we receive from the CCTP bridge
31
35
  address public immutable baseToken;
32
36
 
@@ -52,6 +56,8 @@ contract SponsoredCCTPDstPeriphery is BaseModuleHandler, SponsoredCCTPInterface,
52
56
  /**
53
57
  * @notice Constructor for the SponsoredCCTPDstPeriphery contract.
54
58
  * @param _cctpMessageTransmitter The address of the CCTP message transmitter contract.
59
+ * @param _cctpTokenMessenger The address of the CCTP token messenger contract. Used to pin that a received
60
+ * message actually routed through the real mint flow and that the remote burnToken links to `baseToken`.
55
61
  * @param _signer The address of the signer that was used to sign the quotes.
56
62
  * @param _donationBox The address of the donation box contract. This is used to store funds that are used for sponsored flows.
57
63
  * @param _baseToken The address of the base token which would be the USDC on HyperEVM.
@@ -59,6 +65,7 @@ contract SponsoredCCTPDstPeriphery is BaseModuleHandler, SponsoredCCTPInterface,
59
65
  */
60
66
  constructor(
61
67
  address _cctpMessageTransmitter,
68
+ address _cctpTokenMessenger,
62
69
  address _signer,
63
70
  address _donationBox,
64
71
  address _baseToken,
@@ -67,6 +74,7 @@ contract SponsoredCCTPDstPeriphery is BaseModuleHandler, SponsoredCCTPInterface,
67
74
  baseToken = _baseToken;
68
75
 
69
76
  cctpMessageTransmitter = IMessageTransmitterV2(_cctpMessageTransmitter);
77
+ cctpTokenMessenger = ITokenMessengerV2(_cctpTokenMessenger);
70
78
 
71
79
  MainStorage storage $ = _getMainStorage();
72
80
  $.signer = _signer;
@@ -127,10 +135,15 @@ contract SponsoredCCTPDstPeriphery is BaseModuleHandler, SponsoredCCTPInterface,
127
135
  bytes memory message,
128
136
  bytes memory attestation
129
137
  ) external nonReentrant onlyRole(PERMISSIONED_BOT_ROLE) {
138
+ uint256 baseBalBefore = IERC20Metadata(baseToken).balanceOf(address(this));
130
139
  bool success = cctpMessageTransmitter.receiveMessage(message, attestation);
131
140
  if (!success) {
132
141
  return;
133
142
  }
143
+ // Forward only what the CCTP call actually credited to this contract, so a message that mints nothing
144
+ // (wrong recipient, unlinked burnToken, etc.) cannot drain this contract's prior `baseToken` balance.
145
+ uint256 baseBalAfter = IERC20Metadata(baseToken).balanceOf(address(this));
146
+ uint256 mintedAmount = baseBalAfter - baseBalBefore;
134
147
 
135
148
  // Use try-catch to handle potential abi.decode reverts gracefully
136
149
  try this.validateMessage(message) returns (bool isValid) {
@@ -141,19 +154,14 @@ contract SponsoredCCTPDstPeriphery is BaseModuleHandler, SponsoredCCTPInterface,
141
154
  // Malformed message that causes abi.decode to revert then early return
142
155
  return;
143
156
  }
144
- (SponsoredCCTPInterface.SponsoredCCTPQuote memory quote, uint256 feeExecuted) = SponsoredCCTPQuoteLib
145
- .getSponsoredCCTPQuoteData(message);
146
-
147
- _getMainStorage().usedNonces[quote.nonce] = true;
157
+ (SponsoredCCTPInterface.SponsoredCCTPQuote memory quote, ) = SponsoredCCTPQuoteLib.getSponsoredCCTPQuoteData(
158
+ message
159
+ );
148
160
 
149
- IERC20Metadata(baseToken).safeTransfer(quote.finalRecipient.toAddress(), quote.amount - feeExecuted);
161
+ address finalRecipient = quote.finalRecipient.toAddress();
162
+ IERC20Metadata(baseToken).safeTransfer(finalRecipient, mintedAmount);
150
163
 
151
- emit EmergencyReceiveMessage(
152
- quote.nonce,
153
- quote.finalRecipient.toAddress(),
154
- baseToken,
155
- quote.amount - feeExecuted
156
- );
164
+ emit EmergencyReceiveMessage(quote.nonce, finalRecipient, baseToken, mintedAmount);
157
165
  }
158
166
 
159
167
  /**
@@ -168,6 +176,20 @@ contract SponsoredCCTPDstPeriphery is BaseModuleHandler, SponsoredCCTPInterface,
168
176
  bytes memory attestation,
169
177
  bytes memory signature
170
178
  ) external nonReentrant authorizeFundedFlow {
179
+ // Check that the CCTP message was actually routed through our TokenMessenger (which owns the mint flow),
180
+ // and that its TokenMinter links the remote burnToken to our `baseToken` on this domain.
181
+ if (SponsoredCCTPQuoteLib.extractRecipient(message).toAddressUnchecked() != address(cctpTokenMessenger)) {
182
+ revert InvalidRecipient();
183
+ }
184
+ address localToken = cctpTokenMessenger.localMinter().getLocalToken(
185
+ SponsoredCCTPQuoteLib.extractSourceDomain(message),
186
+ SponsoredCCTPQuoteLib.extractBurnToken(message)
187
+ );
188
+ if (localToken != baseToken) {
189
+ revert InvalidMintedToken();
190
+ }
191
+
192
+ uint256 baseBalBefore = IERC20Metadata(baseToken).balanceOf(address(this));
171
193
  bool success = cctpMessageTransmitter.receiveMessage(message, attestation);
172
194
  if (!success) {
173
195
  revert CCTPMessageTransmitterFailed();
@@ -188,6 +210,13 @@ contract SponsoredCCTPDstPeriphery is BaseModuleHandler, SponsoredCCTPInterface,
188
210
  (SponsoredCCTPInterface.SponsoredCCTPQuote memory quote, uint256 feeExecuted) = SponsoredCCTPQuoteLib
189
211
  .getSponsoredCCTPQuoteData(message);
190
212
 
213
+ // Confirm the CCTP call actually minted `baseToken` to this contract.
214
+ uint256 baseBalAfter = IERC20Metadata(baseToken).balanceOf(address(this));
215
+ uint256 amountAfterFees = quote.amount - feeExecuted;
216
+ if (baseBalAfter - baseBalBefore != amountAfterFees) {
217
+ revert InvalidMintedAmount();
218
+ }
219
+
191
220
  // Validate the quote and the signature. Revert on invalid to prevent griefing attacks
192
221
  // where an attacker provides correct message/attestation but invalid signature.
193
222
  _validateQuoteOrRevert(quote, signature);
@@ -6,14 +6,24 @@ import { IMessageTransmitter } from "../external/interfaces/CCTPInterfaces.sol";
6
6
 
7
7
  contract MockCCTPMinter is ITokenMinter {
8
8
  uint256 private _burnLimit = type(uint256).max;
9
+ // remoteDomain => remoteToken => localToken
10
+ mapping(uint32 => mapping(bytes32 => address)) private _localTokens;
9
11
 
10
12
  function setBurnLimit(uint256 limit) external {
11
13
  _burnLimit = limit;
12
14
  }
13
15
 
16
+ function setLocalToken(uint32 remoteDomain, bytes32 remoteToken, address localToken) external {
17
+ _localTokens[remoteDomain][remoteToken] = localToken;
18
+ }
19
+
14
20
  function burnLimitsPerMessage(address) external view returns (uint256) {
15
21
  return _burnLimit;
16
22
  }
23
+
24
+ function getLocalToken(uint32 remoteDomain, bytes32 remoteToken) external view returns (address) {
25
+ return _localTokens[remoteDomain][remoteToken];
26
+ }
17
27
  }
18
28
 
19
29
  contract MockCCTPMessenger is ITokenMessenger {
@@ -215,6 +215,11 @@
215
215
  "block_number": 24021499,
216
216
  "transaction_hash": "0x70b3edf99db66aac34338c3686cd708ddfc2b503c2f707f51ced67dc50e5022f"
217
217
  },
218
+ "Safe": {
219
+ "address": "0x4c45F70B1d9a7A6D1984daccAd74D0E973B73F01",
220
+ "block_number": 25138380,
221
+ "transaction_hash": "0x135450e78b12f576b5d294d2fe26000eb1bb0bbf9ba755f5e8cd41d9587ac0f9"
222
+ },
218
223
  "PermissionedMulticallHandler_CCTP_USDC": {
219
224
  "address": "0xDd52f8134f85f3979fbA24387Ce0CEC05937259E",
220
225
  "block_number": 25050834,
@@ -309,6 +314,11 @@
309
314
  "block_number": 149490330,
310
315
  "transaction_hash": "0x2afec8f5db3cebfdbf2da22673ea7f277deb91b9e9c2f403ee2260ef6dac17c9"
311
316
  },
317
+ "Safe": {
318
+ "address": "0xd396CcB6770EAB84045c9Bce2939c478639E2A7F",
319
+ "block_number": 151852638,
320
+ "transaction_hash": "0xc56c8cff88f814d4fc41149007b3b867cd8672ba7541d4153bd7e5dfbbacfb44"
321
+ },
312
322
  "SponsoredCCTPSrcPeriphery": {
313
323
  "address": "0x4d11A23E4408eF08Ae1216B3917560e0001CD000",
314
324
  "block_number": 147713295,
@@ -432,6 +442,11 @@
432
442
  "block_number": 43829804,
433
443
  "transaction_hash": "0x61efce46d1a42f37fd7e1bf27a909be972f036c629816f52147ed9826542442d"
434
444
  },
445
+ "Safe": {
446
+ "address": "0xd396CcB6770EAB84045c9Bce2939c478639E2A7F",
447
+ "block_number": 48555753,
448
+ "transaction_hash": "0x52e78f777ab18c2b0211ee814a5b9c317b348f88c7af157b0e12df7535e4f8bd"
449
+ },
435
450
  "SponsoredCCTPSrcPeriphery": {
436
451
  "address": "0xce9Cf0C8f8121b573f6212344F53BC7746846e71",
437
452
  "block_number": 40277181,
@@ -523,6 +538,11 @@
523
538
  "block_number": 84729684,
524
539
  "transaction_hash": "0xdcc74125b85cb1a7e34e6bfe318cc565b7f5423e1fe1b187dcd331fd80565a83"
525
540
  },
541
+ "Safe": {
542
+ "address": "0xd396CcB6770EAB84045c9Bce2939c478639E2A7F",
543
+ "block_number": 87180073,
544
+ "transaction_hash": "0xecd589bda3e78dcba4ad5bcb838e49889248ee07c09b3d2296259a62dcdd06f2"
545
+ },
526
546
  "SponsoredCCTPSrcPeriphery": {
527
547
  "address": "0x6005CD9f10c0Dc654445f138350b2FA7370BE42d",
528
548
  "block_number": 82952908,
@@ -775,6 +795,11 @@
775
795
  "block_number": 27739768,
776
796
  "transaction_hash": "0xe71e03f4c4aa54ffc14935f87a672503d3da92a24d7ac519b2eeba031553312f"
777
797
  },
798
+ "Safe": {
799
+ "address": "0xd396CcB6770EAB84045c9Bce2939c478639E2A7F",
800
+ "block_number": 29984927,
801
+ "transaction_hash": "0xfca2ae3fcca621ae80560c43b4bc7172b03a4e13aaa9aaf54472909c396e29f8"
802
+ },
778
803
  "SponsoredCCTPSrcPeriphery": {
779
804
  "address": "0x2C7a3cCd1a8F4f96174c42E0638AAb3BDA6Bc923",
780
805
  "block_number": 25845007,
@@ -1162,6 +1187,11 @@
1162
1187
  "block_number": 12012601,
1163
1188
  "transaction_hash": "0x24e5a21ee467e4b39435f8bfc5591237aab4ac8dac096777502411837511de70"
1164
1189
  },
1190
+ "Safe": {
1191
+ "address": "0xd396CcB6770EAB84045c9Bce2939c478639E2A7F",
1192
+ "block_number": 16508591,
1193
+ "transaction_hash": "0xd096a074d15cb298194d1cb8b0122be31e408f701311d1acf00bac3d9eb3df94"
1194
+ },
1165
1195
  "SponsoredOFTSrcPeriphery": {
1166
1196
  "address": "0x02D65fb01d3d88127dF19838902ba42c6239c0Fd",
1167
1197
  "block_number": 8234177,
@@ -1227,6 +1257,11 @@
1227
1257
  "block_number": 43894633,
1228
1258
  "transaction_hash": "0x28b429aae286cfb5f09ce924514384b64203a62def3fbb61296a93e1bb3636eb"
1229
1259
  },
1260
+ "Safe": {
1261
+ "address": "0xd396CcB6770EAB84045c9Bce2939c478639E2A7F",
1262
+ "block_number": 46258138,
1263
+ "transaction_hash": "0x3267da18ba0bb69bad4f9dac7b1932ed00e16aa87b5a7f31cccefddafad248ec"
1264
+ },
1230
1265
  "PermissionedMulticallHandler_CCTP_USDC": {
1231
1266
  "address": "0xB6CAAfD8Ecf18385fFc7c020327E111a1D40A2D4",
1232
1267
  "block_number": 44959757,
@@ -1408,6 +1443,11 @@
1408
1443
  "block_number": 446049597,
1409
1444
  "transaction_hash": "0xd229b1a48cf5a207b9c1b670299d311d83fd98d6b768e6c4a67bbeef36097dc4"
1410
1445
  },
1446
+ "Safe": {
1447
+ "address": "0xd396CcB6770EAB84045c9Bce2939c478639E2A7F",
1448
+ "block_number": 464907406,
1449
+ "transaction_hash": "0x8cde1166841d14e5ccc2d87ca76d6bc0dd96c2c06255156c0a59b073563b2eee"
1450
+ },
1411
1451
  "SponsoredCCTPSrcPeriphery": {
1412
1452
  "address": "0xc9c54d789ebc18169d942E781C75bb4e3D19a27b",
1413
1453
  "block_number": 431818720,
@@ -1430,6 +1470,26 @@
1430
1470
  }
1431
1471
  }
1432
1472
  },
1473
+ "43114": {
1474
+ "chain_name": "Avalanche",
1475
+ "contracts": {
1476
+ "SP1Helios": {
1477
+ "address": "0x3BED21dAe767e4Df894B31b14aD32369cE4bad8b",
1478
+ "block_number": 87017813,
1479
+ "transaction_hash": "0x3c91515e112c6603fc8032fe1bc51c6670f39bba287ea931b5b0c7e88463fda0"
1480
+ },
1481
+ "Safe": {
1482
+ "address": "0xd396CcB6770EAB84045c9Bce2939c478639E2A7F",
1483
+ "block_number": 86958004,
1484
+ "transaction_hash": "0x200b98e4ec8b7f99c0a41ea4732e8a11a5c2d4f6915c9d7d43f0bc083de8204a"
1485
+ },
1486
+ "SpokePool": {
1487
+ "address": "0x292A00f2368187073E80AB94fA03AFD8c796d450",
1488
+ "block_number": 87017827,
1489
+ "transaction_hash": "0x91b03ff4987f357528b49d3b9e0e7e08abbd90719f407f16fecdf77be4ca1bbe"
1490
+ }
1491
+ }
1492
+ },
1433
1493
  "57073": {
1434
1494
  "chain_name": "Ink",
1435
1495
  "contracts": {
@@ -1480,6 +1540,11 @@
1480
1540
  "block_number": 41151282,
1481
1541
  "transaction_hash": "0x4e6ab9a1f45ae5c19dde939a00c5dede6032cb3d823a3ae61317eaf1212dafa5"
1482
1542
  },
1543
+ "Safe": {
1544
+ "address": "0xd396CcB6770EAB84045c9Bce2939c478639E2A7F",
1545
+ "block_number": 45807415,
1546
+ "transaction_hash": "0xf1e9919bbbc4cabaad6e7357a122ef3f8e91aba170a88db804a6b506bfecb236"
1547
+ },
1483
1548
  "SponsoredCCTPSrcPeriphery": {
1484
1549
  "address": "0x1771c470d41b8c39338450C380bf2C080a2CEdD8",
1485
1550
  "block_number": 37528460,
@@ -1542,6 +1607,11 @@
1542
1607
  "block_number": 29966623,
1543
1608
  "transaction_hash": "0x94122db56e1f18ba93b4765902953f0a344de07c5a7ce148224646def30bc3cd"
1544
1609
  },
1610
+ "Safe": {
1611
+ "address": "0xd396CcB6770EAB84045c9Bce2939c478639E2A7F",
1612
+ "block_number": 30719985,
1613
+ "transaction_hash": "0x3b35745fa6f0cf7f9d3edac1904f6afe1ee3e9b1e31048ff781eb0c0fa0e20d5"
1614
+ },
1545
1615
  "SponsoredCCTPSrcPeriphery": {
1546
1616
  "address": "0xe3E88958d181AB43bf3902f8F00AF57cf5D44E8c",
1547
1617
  "block_number": 28853879,
@@ -1 +1 @@
1
- {"abi":[{"type":"constructor","inputs":[{"name":"_l1ArbitrumInbox","type":"address","internalType":"contract ArbitrumInboxLike"},{"name":"_l1ERC20GatewayRouter","type":"address","internalType":"contract ArbitrumL1ERC20GatewayLike"},{"name":"_l2RefundL2Address","type":"address","internalType":"address"},{"name":"_l1Usdc","type":"address","internalType":"contract IERC20"},{"name":"_cctpTokenMessenger","type":"address","internalType":"contract ITokenMessenger"},{"name":"_adapterStore","type":"address","internalType":"address"},{"name":"_oftDstEid","type":"uint32","internalType":"uint32"},{"name":"_oftFeeCap","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"EMPTY_MSG_BYTES","inputs":[],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"L1_DAI","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"L1_ERC20_GATEWAY_ROUTER","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ArbitrumL1ERC20GatewayLike"}],"stateMutability":"view"},{"type":"function","name":"L1_INBOX","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ArbitrumInboxLike"}],"stateMutability":"view"},{"type":"function","name":"L2_CALL_VALUE","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"L2_GAS_PRICE","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"L2_MAX_SUBMISSION_COST","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"L2_REFUND_L2_ADDRESS","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"OFT_ADAPTER_STORE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract AdapterStore"}],"stateMutability":"view"},{"type":"function","name":"OFT_DST_EID","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"OFT_FEE_CAP","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"RELAY_MESSAGE_L2_GAS_LIMIT","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"RELAY_TOKENS_L2_GAS_LIMIT","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"cctpTokenMessenger","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ITokenMessenger"}],"stateMutability":"view"},{"type":"function","name":"cctpV2","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getL1CallValue","inputs":[{"name":"l2GasLimit","type":"uint32","internalType":"uint32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"pure"},{"type":"function","name":"recipientCircleDomainId","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"relayMessage","inputs":[{"name":"target","type":"address","internalType":"address"},{"name":"message","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"relayTokens","inputs":[{"name":"l1Token","type":"address","internalType":"address"},{"name":"l2Token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"usdcToken","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"event","name":"MessageRelayed","inputs":[{"name":"target","type":"address","indexed":false,"internalType":"address"},{"name":"message","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokensRelayed","inputs":[{"name":"l1Token","type":"address","indexed":false,"internalType":"address"},{"name":"l2Token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"to","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"OftFeeCapExceeded","inputs":[]},{"type":"error","name":"OftIncorrectAmountReceivedLD","inputs":[]},{"type":"error","name":"OftIncorrectAmountSentLD","inputs":[]},{"type":"error","name":"OftInsufficientBalanceForFee","inputs":[]},{"type":"error","name":"OftLzFeeNotZero","inputs":[]}],"bytecode":"0x6101c0806040523461027657610100816117c68038038091610021828561027a565b8339810103126102765780516001600160a01b0381168103610276576020820151906001600160a01b03821682036102765761005f6040840161029d565b60608401519093906001600160a01b03811681036102765760808201516001600160a01b038116908181036102765761009a60a0850161029d565b9360c08101519263ffffffff84168403610276575f9260e0849301519560a05260c0526003608052604051602081019063011a412160e61b8252600481526100e360248261027a565b51915afa3d1561026f573d6001600160401b03811161025b5760405190610114601f8201601f19166020018361027a565b81523d5f602083013e5b8161024f575b81610219575b5060e05261012052610100526001600160a01b031661014052610180526101a0526101605260405161151490816102b2823960805181818161059d0152818161085701526108ff015260a05181818161072a0152818161100a01526110c2015260c0518181816104e101526106f7015260e05181818161051c01526107b90152610100518181816105d80152610b2201526101205181818161055d015261067d01526101405181818161046301526106bc0152610160518181816101b80152818161037c0152610f7a01526101805181818161021b015261030b01526101a0518181816104200152610e130152f35b905060208151910151906020811061023e575b506001600160a01b031615155f61012a565b5f199060200360031b1b165f61022c565b80516020149150610124565b634e487b7160e01b5f52604160045260245ffd5b606061011e565b5f80fd5b601f909101601f19168101906001600160401b0382119082101761025b57604052565b51906001600160a01b03821682036102765756fe6080806040526004361015610012575f80fd5b5f3560e01c90816306dd5248146110e65750806311eac855146110a35780631fc1ba761461106f57806328f2716e1461105257806352c8c75c146105fb57806361a04d30146105c15780636e400983146105815780636fd5c10e14610541578063775c0d03146105055780639748cf7c146104c2578063a2531669146104a1578063a567bbf014610487578063a6ec815e14610444578063b077d39914610401578063b4c0d7ab146103bd578063c735281e146103a0578063cc7a32901461035d578063e5216af71461032f578063e585cc47146102ec5763e6eb8ade146100f8575f80fd5b60403660031901126102d55761010c611103565b60243567ffffffffffffffff81116102d557366023820112156102d557806004013561013781611173565b916101456040519384611151565b81835236602483830101116102d557815f926024602093018386013783010152610171621e84806111b3565b8047106102d55760206001600160a01b039360405194859163679b6ded60e01b835216928360048301525f6024830152662386f26fc1000060448301526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168060648401526084830152621e848060a483015264012a05f20060c483015261010060e4830152818061020f61010482018861118f565b03916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165af180156102e15761028c575b7f9e6c52944e331ba6270e7fe4cea2a4086bae8f7a27e1cdba07f416806f5d0ac49250610287604051928392835260406020840152604083019061118f565b0390a1005b6020833d6020116102d9575b816102a560209383611151565b810103126102d5577f9e6c52944e331ba6270e7fe4cea2a4086bae8f7a27e1cdba07f416806f5d0ac49250610248565b5f80fd5b3d9150610298565b6040513d5f823e3d90fd5b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d5576020604051736b175474e89094c44da98b954eedeac495271d0f8152f35b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d5576020604051621e84808152f35b346102d5575f3660031901126102d55760405160206103dc8183611151565b5f8252601f19810136828401376103fd60405192828493845283019061118f565b0390f35b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d55760206040515f8152f35b346102d5575f3660031901126102d5576020604051662386f26fc100008152f35b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d55760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b346102d5575f3660031901126102d557602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d557602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d55760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b60803660031901126102d55761060f611103565b6024356001600160a01b0381168091036102d557604435606435916001600160a01b0383168093036102d5576040516323df66fb60e21b81527f4f46545f4d455353454e4745520000000000000000000000000000000000000060048201526001600160a01b0363ffffffff7f0000000000000000000000000000000000000000000000000000000000000000169586602484015216948560448301526020826064816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9182156102e1575f92611031575b506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169182151580610fff575b15610a045750507f00000000000000000000000000000000000000000000000000000000000000009061075584828461126b565b6040516332dd704760e21b815291602083600481855afa9283156102e1575f936109bd575b509060206001600160a01b03809316936024604051809581936352b7631960e11b8352886004840152165afa9182156102e1575f92610989575b5090917f0000000000000000000000000000000000000000000000000000000000000000919085805b610826575050505050917fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b93916080935b604051938452602084015260408301526060820152a1005b8481111561098357845b84156108e557833b156102d557604051634701287760e11b815281600482015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248201528960448201528360648201525f60848201525f60a48201526107d060c48201525f8160e48183895af180156102e1576108d5575b505b81039081116108c157806107dd565b634e487b7160e01b5f52601160045260245ffd5b5f6108df91611151565b8a6108b0565b6040516337e9a82760e11b815281600482015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248201528960448201528360648201526020816084815f895af180156102e15761094b575b506108b2565b6020813d821161097b575b8161096360209383611151565b810103126102d5576109749061146f565b508a610945565b3d9150610956565b80610830565b9091506020813d6020116109b5575b816109a560209383611151565b810103126102d5575190876107b4565b3d9150610998565b9092506020813d6020116109fc575b816109d960209383611151565b810103126102d55751906001600160a01b03821682036102d5579091602061077a565b3d91506109cc565b9395929492939091506001600160a01b03168015610de757606060c0604051610a2c81611119565b5f81525f60208201525f60408201525f838201528260808201528260a082015201525f6020604051610a5d81611135565b8281520152602060405191610a728284611151565b5f8352601f198201803684860137604051610a8d8482611151565b5f815281368583013760405191610aa48584611151565b5f8352368584013760405195610ab987611119565b8652868487015260408601948a86528a6060880152608087015260a086015260c085015260405192633b6f743b60e01b84526040600485015260408480610b0360448201896113ff565b5f60248301520381855afa9384156102e1575f94610dac575b508351917f00000000000000000000000000000000000000000000000000000000000000008311610d9d57478311610d8e57838501918251610d7f575160405163095ea7b360e01b8682019081526001600160a01b038416602483015260448083018490528252919760c095610be7939092905f9081908e90610ba0606486611151565b828551925af1610bae611484565b81610d4f575b5080610d45575b15610d01575b5060405163c7c7f5b360e01b8152608060048201529788958694859360848501906113ff565b9151602484015251604483015230606483015203925af19182156102e1575f92610c63575b508101518203610c54575103610c46577fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b9360809361080e565b623c548b60ea1b5f5260045ffd5b631bfc3cb560e11b5f5260045ffd5b90915060c03d60c011610cfa575b610c7b8183611151565b810181810360c081126102d5576080136102d55760405191606083019083821067ffffffffffffffff831117610ce657610cdf9360809260405281518152610cc486830161146f565b868201526040610cd6858285016113d7565b910152016113d7565b9087610c0c565b634e487b7160e01b5f52604160045260245ffd5b503d610c71565b610d3f90610d398d6040519063095ea7b360e01b8c8301528860248301525f604483015260448252610d34606483611151565b611346565b8c611346565b8d610bc1565b508b3b1515610bbb565b8051801592508a908315610d67575b5050508f610bb4565b610d77935082018101910161132e565b8f8981610d5e565b630e282ec960e21b5f5260045ffd5b63a6226f8560e01b5f5260045ffd5b631754d7a960e01b5f5260045ffd5b90935060403d604011610de0575b610dc48183611151565b81016040828203126102d557610dd9916113d7565b9289610b1c565b503d610dba565b5050610df5620493e06111b3565b938447106102d557604051635ed004ff60e11b8152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602082602481845afa80156102e15783610e5f915f948591610fd0575b508761126b565b60405190662386f26fc10000602083015260408083015282606083015260608252610e8b608083611151565b736b175474e89094c44da98b954eedeac495271d0f86148314610f5357610ef69160405198898094819363d2ce7d6560e01b83528a6004840152896024840152886044840152620493e0606484015264012a05f200608484015260c060a484015260c483019061118f565b03925af19384156102e1577fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b95608095610f31575b5061080e565b610f4c903d805f833e610f448183611151565b810190611208565b5086610f2b565b610ef691604051988980948193634fb1a07b60e01b83528a60048401526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024840152896044840152886064840152620493e0608484015264012a05f20060a484015260e060c484015260e483019061118f565b610ff2915060203d602011610ff8575b610fea8183611151565b8101906111e9565b8a610e58565b503d610fe0565b506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168714610721565b61104b91925060203d602011610ff857610fea8183611151565b90866106ec565b346102d5575f3660031901126102d5576020604051620493e08152f35b346102d55760203660031901126102d55760043563ffffffff811681036102d55761109b6020916111b3565b604051908152f35b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d5578064012a05f20060209252f35b600435906001600160a01b03821682036102d557565b60e0810190811067ffffffffffffffff821117610ce657604052565b6040810190811067ffffffffffffffff821117610ce657604052565b90601f8019910116810190811067ffffffffffffffff821117610ce657604052565b67ffffffffffffffff8111610ce657601f01601f191660200190565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b63ffffffff168064012a05f200029064012a05f2008204036108c157662386f26fc100000180662386f26fc10000116108c15790565b908160209103126102d557516001600160a01b03811681036102d55790565b6020818303126102d55780519067ffffffffffffffff82116102d5570181601f820112156102d55780519061123c82611173565b9261124a6040519485611151565b828452602083830101116102d557815f9260208093018386015e8301015290565b91909160405191636eb1769f60e11b83523060048401526001600160a01b03841660248401526020836044816001600160a01b0386165afa9283156102e1575f936112fa575b5082018092116108c15760405163095ea7b360e01b60208201526001600160a01b039390931660248401526044808401929092529082526112f89190610d34606483611151565b565b9092506020813d602011611326575b8161131660209383611151565b810103126102d55751915f6112b1565b3d9150611309565b908160209103126102d5575180151581036102d55790565b906001600160a01b036113a792165f8060405193611365604086611151565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564602086015260208151910182855af16113a1611484565b916114b3565b80519081159182156113bd575b5050156102d557565b6113d0925060208091830101910161132e565b5f806113b4565b91908260409103126102d5576040516113ef81611135565b6020808294805184520151910152565b61146c9163ffffffff825116815260208201516020820152604082015160408201526060820151606082015260c061145b611449608085015160e0608086015260e085019061118f565b60a085015184820360a086015261118f565b9201519060c081840391015261118f565b90565b519067ffffffffffffffff821682036102d557565b3d156114ae573d9061149582611173565b916114a36040519384611151565b82523d5f602084013e565b606090565b919250156114cf578151156114c6575090565b3b156102d55790565b5080519081156102d557602001fdfea264697066735822122025f87a97e9672ddeb93d500743cd907d7d6d2ab1a2989ede955ecfb97425a01e64736f6c634300081e0033"}
1
+ {"abi":[{"type":"constructor","inputs":[{"name":"_l1ArbitrumInbox","type":"address","internalType":"contract ArbitrumInboxLike"},{"name":"_l1ERC20GatewayRouter","type":"address","internalType":"contract ArbitrumL1ERC20GatewayLike"},{"name":"_l2RefundL2Address","type":"address","internalType":"address"},{"name":"_l1Usdc","type":"address","internalType":"contract IERC20"},{"name":"_cctpTokenMessenger","type":"address","internalType":"contract ITokenMessenger"},{"name":"_adapterStore","type":"address","internalType":"address"},{"name":"_oftDstEid","type":"uint32","internalType":"uint32"},{"name":"_oftFeeCap","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"EMPTY_MSG_BYTES","inputs":[],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"L1_DAI","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"L1_ERC20_GATEWAY_ROUTER","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ArbitrumL1ERC20GatewayLike"}],"stateMutability":"view"},{"type":"function","name":"L1_INBOX","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ArbitrumInboxLike"}],"stateMutability":"view"},{"type":"function","name":"L2_CALL_VALUE","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"L2_GAS_PRICE","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"L2_MAX_SUBMISSION_COST","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"L2_REFUND_L2_ADDRESS","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"OFT_ADAPTER_STORE","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract AdapterStore"}],"stateMutability":"view"},{"type":"function","name":"OFT_DST_EID","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"OFT_FEE_CAP","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"RELAY_MESSAGE_L2_GAS_LIMIT","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"RELAY_TOKENS_L2_GAS_LIMIT","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"cctpTokenMessenger","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ITokenMessenger"}],"stateMutability":"view"},{"type":"function","name":"cctpV2","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getL1CallValue","inputs":[{"name":"l2GasLimit","type":"uint32","internalType":"uint32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"pure"},{"type":"function","name":"recipientCircleDomainId","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"relayMessage","inputs":[{"name":"target","type":"address","internalType":"address"},{"name":"message","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"relayTokens","inputs":[{"name":"l1Token","type":"address","internalType":"address"},{"name":"l2Token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"payable"},{"type":"function","name":"usdcToken","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"event","name":"MessageRelayed","inputs":[{"name":"target","type":"address","indexed":false,"internalType":"address"},{"name":"message","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokensRelayed","inputs":[{"name":"l1Token","type":"address","indexed":false,"internalType":"address"},{"name":"l2Token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"to","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"OftFeeCapExceeded","inputs":[]},{"type":"error","name":"OftIncorrectAmountReceivedLD","inputs":[]},{"type":"error","name":"OftIncorrectAmountSentLD","inputs":[]},{"type":"error","name":"OftInsufficientBalanceForFee","inputs":[]},{"type":"error","name":"OftLzFeeNotZero","inputs":[]}],"bytecode":"0x6101c0806040523461027657610100816117c68038038091610021828561027a565b8339810103126102765780516001600160a01b0381168103610276576020820151906001600160a01b03821682036102765761005f6040840161029d565b60608401519093906001600160a01b03811681036102765760808201516001600160a01b038116908181036102765761009a60a0850161029d565b9360c08101519263ffffffff84168403610276575f9260e0849301519560a05260c0526003608052604051602081019063011a412160e61b8252600481526100e360248261027a565b51915afa3d1561026f573d6001600160401b03811161025b5760405190610114601f8201601f19166020018361027a565b81523d5f602083013e5b8161024f575b81610219575b5060e05261012052610100526001600160a01b031661014052610180526101a0526101605260405161151490816102b2823960805181818161059d0152818161085701526108ff015260a05181818161072a0152818161100a01526110c2015260c0518181816104e101526106f7015260e05181818161051c01526107b90152610100518181816105d80152610b2201526101205181818161055d015261067d01526101405181818161046301526106bc0152610160518181816101b80152818161037c0152610f7a01526101805181818161021b015261030b01526101a0518181816104200152610e130152f35b905060208151910151906020811061023e575b506001600160a01b031615155f61012a565b5f199060200360031b1b165f61022c565b80516020149150610124565b634e487b7160e01b5f52604160045260245ffd5b606061011e565b5f80fd5b601f909101601f19168101906001600160401b0382119082101761025b57604052565b51906001600160a01b03821682036102765756fe6080806040526004361015610012575f80fd5b5f3560e01c90816306dd5248146110e65750806311eac855146110a35780631fc1ba761461106f57806328f2716e1461105257806352c8c75c146105fb57806361a04d30146105c15780636e400983146105815780636fd5c10e14610541578063775c0d03146105055780639748cf7c146104c2578063a2531669146104a1578063a567bbf014610487578063a6ec815e14610444578063b077d39914610401578063b4c0d7ab146103bd578063c735281e146103a0578063cc7a32901461035d578063e5216af71461032f578063e585cc47146102ec5763e6eb8ade146100f8575f80fd5b60403660031901126102d55761010c611103565b60243567ffffffffffffffff81116102d557366023820112156102d557806004013561013781611173565b916101456040519384611151565b81835236602483830101116102d557815f926024602093018386013783010152610171621e84806111b3565b8047106102d55760206001600160a01b039360405194859163679b6ded60e01b835216928360048301525f6024830152662386f26fc1000060448301526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168060648401526084830152621e848060a483015264012a05f20060c483015261010060e4830152818061020f61010482018861118f565b03916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165af180156102e15761028c575b7f9e6c52944e331ba6270e7fe4cea2a4086bae8f7a27e1cdba07f416806f5d0ac49250610287604051928392835260406020840152604083019061118f565b0390a1005b6020833d6020116102d9575b816102a560209383611151565b810103126102d5577f9e6c52944e331ba6270e7fe4cea2a4086bae8f7a27e1cdba07f416806f5d0ac49250610248565b5f80fd5b3d9150610298565b6040513d5f823e3d90fd5b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d5576020604051736b175474e89094c44da98b954eedeac495271d0f8152f35b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d5576020604051621e84808152f35b346102d5575f3660031901126102d55760405160206103dc8183611151565b5f8252601f19810136828401376103fd60405192828493845283019061118f565b0390f35b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d55760206040515f8152f35b346102d5575f3660031901126102d5576020604051662386f26fc100008152f35b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d55760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b346102d5575f3660031901126102d557602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d557602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d55760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b60803660031901126102d55761060f611103565b6024356001600160a01b0381168091036102d557604435606435916001600160a01b0383168093036102d5576040516323df66fb60e21b81527f4f46545f4d455353454e4745520000000000000000000000000000000000000060048201526001600160a01b0363ffffffff7f0000000000000000000000000000000000000000000000000000000000000000169586602484015216948560448301526020826064816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9182156102e1575f92611031575b506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169182151580610fff575b15610a045750507f00000000000000000000000000000000000000000000000000000000000000009061075584828461126b565b6040516332dd704760e21b815291602083600481855afa9283156102e1575f936109bd575b509060206001600160a01b03809316936024604051809581936352b7631960e11b8352886004840152165afa9182156102e1575f92610989575b5090917f0000000000000000000000000000000000000000000000000000000000000000919085805b610826575050505050917fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b93916080935b604051938452602084015260408301526060820152a1005b8481111561098357845b84156108e557833b156102d557604051634701287760e11b815281600482015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248201528960448201528360648201525f60848201525f60a48201526107d060c48201525f8160e48183895af180156102e1576108d5575b505b81039081116108c157806107dd565b634e487b7160e01b5f52601160045260245ffd5b5f6108df91611151565b8a6108b0565b6040516337e9a82760e11b815281600482015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660248201528960448201528360648201526020816084815f895af180156102e15761094b575b506108b2565b6020813d821161097b575b8161096360209383611151565b810103126102d5576109749061146f565b508a610945565b3d9150610956565b80610830565b9091506020813d6020116109b5575b816109a560209383611151565b810103126102d5575190876107b4565b3d9150610998565b9092506020813d6020116109fc575b816109d960209383611151565b810103126102d55751906001600160a01b03821682036102d5579091602061077a565b3d91506109cc565b9395929492939091506001600160a01b03168015610de757606060c0604051610a2c81611119565b5f81525f60208201525f60408201525f838201528260808201528260a082015201525f6020604051610a5d81611135565b8281520152602060405191610a728284611151565b5f8352601f198201803684860137604051610a8d8482611151565b5f815281368583013760405191610aa48584611151565b5f8352368584013760405195610ab987611119565b8652868487015260408601948a86528a6060880152608087015260a086015260c085015260405192633b6f743b60e01b84526040600485015260408480610b0360448201896113ff565b5f60248301520381855afa9384156102e1575f94610dac575b508351917f00000000000000000000000000000000000000000000000000000000000000008311610d9d57478311610d8e57838501918251610d7f575160405163095ea7b360e01b8682019081526001600160a01b038416602483015260448083018490528252919760c095610be7939092905f9081908e90610ba0606486611151565b828551925af1610bae611484565b81610d4f575b5080610d45575b15610d01575b5060405163c7c7f5b360e01b8152608060048201529788958694859360848501906113ff565b9151602484015251604483015230606483015203925af19182156102e1575f92610c63575b508101518203610c54575103610c46577fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b9360809361080e565b623c548b60ea1b5f5260045ffd5b631bfc3cb560e11b5f5260045ffd5b90915060c03d60c011610cfa575b610c7b8183611151565b810181810360c081126102d5576080136102d55760405191606083019083821067ffffffffffffffff831117610ce657610cdf9360809260405281518152610cc486830161146f565b868201526040610cd6858285016113d7565b910152016113d7565b9087610c0c565b634e487b7160e01b5f52604160045260245ffd5b503d610c71565b610d3f90610d398d6040519063095ea7b360e01b8c8301528860248301525f604483015260448252610d34606483611151565b611346565b8c611346565b8d610bc1565b508b3b1515610bbb565b8051801592508a908315610d67575b5050508f610bb4565b610d77935082018101910161132e565b8f8981610d5e565b630e282ec960e21b5f5260045ffd5b63a6226f8560e01b5f5260045ffd5b631754d7a960e01b5f5260045ffd5b90935060403d604011610de0575b610dc48183611151565b81016040828203126102d557610dd9916113d7565b9289610b1c565b503d610dba565b5050610df5620493e06111b3565b938447106102d557604051635ed004ff60e11b8152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602082602481845afa80156102e15783610e5f915f948591610fd0575b508761126b565b60405190662386f26fc10000602083015260408083015282606083015260608252610e8b608083611151565b736b175474e89094c44da98b954eedeac495271d0f86148314610f5357610ef69160405198898094819363d2ce7d6560e01b83528a6004840152896024840152886044840152620493e0606484015264012a05f200608484015260c060a484015260c483019061118f565b03925af19384156102e1577fd7e09655439c3932e55857df3220186e5a7f0980825f20691c2b35d941dee75b95608095610f31575b5061080e565b610f4c903d805f833e610f448183611151565b810190611208565b5086610f2b565b610ef691604051988980948193634fb1a07b60e01b83528a60048401526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024840152896044840152886064840152620493e0608484015264012a05f20060a484015260e060c484015260e483019061118f565b610ff2915060203d602011610ff8575b610fea8183611151565b8101906111e9565b8a610e58565b503d610fe0565b506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168714610721565b61104b91925060203d602011610ff857610fea8183611151565b90866106ec565b346102d5575f3660031901126102d5576020604051620493e08152f35b346102d55760203660031901126102d55760043563ffffffff811681036102d55761109b6020916111b3565b604051908152f35b346102d5575f3660031901126102d55760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102d5575f3660031901126102d5578064012a05f20060209252f35b600435906001600160a01b03821682036102d557565b60e0810190811067ffffffffffffffff821117610ce657604052565b6040810190811067ffffffffffffffff821117610ce657604052565b90601f8019910116810190811067ffffffffffffffff821117610ce657604052565b67ffffffffffffffff8111610ce657601f01601f191660200190565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b63ffffffff168064012a05f200029064012a05f2008204036108c157662386f26fc100000180662386f26fc10000116108c15790565b908160209103126102d557516001600160a01b03811681036102d55790565b6020818303126102d55780519067ffffffffffffffff82116102d5570181601f820112156102d55780519061123c82611173565b9261124a6040519485611151565b828452602083830101116102d557815f9260208093018386015e8301015290565b91909160405191636eb1769f60e11b83523060048401526001600160a01b03841660248401526020836044816001600160a01b0386165afa9283156102e1575f936112fa575b5082018092116108c15760405163095ea7b360e01b60208201526001600160a01b039390931660248401526044808401929092529082526112f89190610d34606483611151565b565b9092506020813d602011611326575b8161131660209383611151565b810103126102d55751915f6112b1565b3d9150611309565b908160209103126102d5575180151581036102d55790565b906001600160a01b036113a792165f8060405193611365604086611151565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564602086015260208151910182855af16113a1611484565b916114b3565b80519081159182156113bd575b5050156102d557565b6113d0925060208091830101910161132e565b5f806113b4565b91908260409103126102d5576040516113ef81611135565b6020808294805184520151910152565b61146c9163ffffffff825116815260208201516020820152604082015160408201526060820151606082015260c061145b611449608085015160e0608086015260e085019061118f565b60a085015184820360a086015261118f565b9201519060c081840391015261118f565b90565b519067ffffffffffffffff821682036102d557565b3d156114ae573d9061149582611173565b916114a36040519384611151565b82523d5f602084013e565b606090565b919250156114cf578151156114c6575090565b3b156102d55790565b5080519081156102d557602001fdfea2646970667358221220e37bea599accb821317740ceac874c973cf6a0d8575e181ba5d2c03fcbb0903e64736f6c634300081e0033"}