@layerzerolabs/oft-evm-contracts 1.2.18 → 1.2.20

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 (101) hide show
  1. package/.turbo/turbo-build.log +140 -33
  2. package/.turbo/turbo-lint.log +1 -1
  3. package/.turbo/turbo-test.log +97 -75
  4. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol/ILayerZeroEndpointV2.dbg.json +1 -1
  5. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
  6. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol/IMessageLibManager.dbg.json +1 -1
  7. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol/IMessagingChannel.dbg.json +1 -1
  8. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol/IMessagingComposer.dbg.json +1 -1
  9. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol/IMessagingContext.dbg.json +1 -1
  10. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppCore.sol/IOAppCore.dbg.json +1 -1
  11. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.dbg.json +1 -1
  12. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.json +119 -0
  13. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMessagingChannel.sol/IOAppMessagingChannel.dbg.json +4 -0
  14. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMessagingChannel.sol/IOAppMessagingChannel.json +130 -0
  15. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMsgInspection.sol/IOAppMsgInspection.dbg.json +1 -1
  16. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppOptionsType3.sol/IOAppOptionsType3.dbg.json +1 -1
  17. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppReceiver.sol/IOAppReceiver.dbg.json +1 -1
  18. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/ICreditRedirect.sol/ICreditRedirect.dbg.json +4 -0
  19. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/ICreditRedirect.sol/ICreditRedirect.json +116 -0
  20. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeConfig.sol/IFeeConfig.dbg.json +1 -1
  21. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeHandler.sol/IFeeHandler.dbg.json +1 -1
  22. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IPauseByID.sol/IPauseByID.dbg.json +1 -1
  23. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IRateLimiter.sol/IRateLimiter.dbg.json +1 -1
  24. package/artifacts/build-info/0534f1d5f0d8cd63830d8f134ee75e3e.json +1 -0
  25. package/artifacts/contracts/interfaces/IOFT.sol/IOFT.dbg.json +1 -1
  26. package/artifacts/contracts/interfaces/IOFTDecimalUtils.sol/IOFTDecimalUtils.dbg.json +1 -1
  27. package/artifacts/contracts/interfaces/IOFTExtended.sol/IOFTExtended.dbg.json +1 -1
  28. package/artifacts/contracts/interfaces/IOFTExtended.sol/IOFTExtended.json +224 -0
  29. package/artifacts/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.dbg.json +1 -1
  30. package/artifacts/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.json +2 -2
  31. package/artifacts/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.dbg.json +1 -1
  32. package/artifacts/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.json +2 -2
  33. package/artifacts/contracts/utils/OFTDecimalUtils.sol/OFTDecimalUtils.dbg.json +1 -1
  34. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol/ILayerZeroEndpointV2.dbg.json +1 -1
  35. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
  36. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol/IMessageLibManager.dbg.json +1 -1
  37. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol/IMessagingChannel.dbg.json +1 -1
  38. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol/IMessagingComposer.dbg.json +1 -1
  39. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol/IMessagingContext.dbg.json +1 -1
  40. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppCore.sol/IOAppCore.dbg.json +1 -1
  41. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.dbg.json +1 -1
  42. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.json +119 -0
  43. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMessagingChannel.sol/IOAppMessagingChannel.dbg.json +4 -0
  44. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMessagingChannel.sol/IOAppMessagingChannel.json +130 -0
  45. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMsgInspection.sol/IOAppMsgInspection.dbg.json +1 -1
  46. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppOptionsType3.sol/IOAppOptionsType3.dbg.json +1 -1
  47. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppReceiver.sol/IOAppReceiver.dbg.json +1 -1
  48. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/ICreditRedirect.sol/ICreditRedirect.dbg.json +4 -0
  49. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/ICreditRedirect.sol/ICreditRedirect.json +116 -0
  50. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeConfig.sol/IFeeConfig.dbg.json +1 -1
  51. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeHandler.sol/IFeeHandler.dbg.json +1 -1
  52. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IPauseByID.sol/IPauseByID.dbg.json +1 -1
  53. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IRateLimiter.sol/IRateLimiter.dbg.json +1 -1
  54. package/artifacts-tron/build-info/6372fe30cb41b2f9b7315d1272ecb0f3.json +1 -0
  55. package/artifacts-tron/contracts/interfaces/IOFT.sol/IOFT.dbg.json +1 -1
  56. package/artifacts-tron/contracts/interfaces/IOFTDecimalUtils.sol/IOFTDecimalUtils.dbg.json +1 -1
  57. package/artifacts-tron/contracts/interfaces/IOFTExtended.sol/IOFTExtended.dbg.json +1 -1
  58. package/artifacts-tron/contracts/interfaces/IOFTExtended.sol/IOFTExtended.json +224 -0
  59. package/artifacts-tron/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.dbg.json +1 -1
  60. package/artifacts-tron/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.json +2 -2
  61. package/artifacts-tron/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.dbg.json +1 -1
  62. package/artifacts-tron/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.json +2 -2
  63. package/artifacts-tron/contracts/utils/OFTDecimalUtils.sol/OFTDecimalUtils.dbg.json +1 -1
  64. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol/ILayerZeroEndpointV2.dbg.json +1 -1
  65. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
  66. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol/IMessageLibManager.dbg.json +1 -1
  67. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol/IMessagingChannel.dbg.json +1 -1
  68. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol/IMessagingComposer.dbg.json +1 -1
  69. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol/IMessagingContext.dbg.json +1 -1
  70. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppCore.sol/IOAppCore.dbg.json +1 -1
  71. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.dbg.json +1 -1
  72. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.json +119 -0
  73. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMessagingChannel.sol/IOAppMessagingChannel.dbg.json +4 -0
  74. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMessagingChannel.sol/IOAppMessagingChannel.json +131 -0
  75. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMsgInspection.sol/IOAppMsgInspection.dbg.json +1 -1
  76. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppOptionsType3.sol/IOAppOptionsType3.dbg.json +1 -1
  77. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppReceiver.sol/IOAppReceiver.dbg.json +1 -1
  78. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/ICreditRedirect.sol/ICreditRedirect.dbg.json +4 -0
  79. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/ICreditRedirect.sol/ICreditRedirect.json +117 -0
  80. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeConfig.sol/IFeeConfig.dbg.json +1 -1
  81. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeHandler.sol/IFeeHandler.dbg.json +1 -1
  82. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IPauseByID.sol/IPauseByID.dbg.json +1 -1
  83. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IRateLimiter.sol/IRateLimiter.dbg.json +1 -1
  84. package/artifacts-zk/build-info/d2467fad10cf5fa07f3c4c460f383314.json +1 -0
  85. package/artifacts-zk/contracts/interfaces/IOFT.sol/IOFT.dbg.json +1 -1
  86. package/artifacts-zk/contracts/interfaces/IOFTDecimalUtils.sol/IOFTDecimalUtils.dbg.json +1 -1
  87. package/artifacts-zk/contracts/interfaces/IOFTExtended.sol/IOFTExtended.dbg.json +1 -1
  88. package/artifacts-zk/contracts/interfaces/IOFTExtended.sol/IOFTExtended.json +224 -0
  89. package/artifacts-zk/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.dbg.json +1 -1
  90. package/artifacts-zk/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.json +2 -2
  91. package/artifacts-zk/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.dbg.json +1 -1
  92. package/artifacts-zk/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.json +2 -2
  93. package/artifacts-zk/contracts/utils/OFTDecimalUtils.sol/OFTDecimalUtils.dbg.json +1 -1
  94. package/contracts/interfaces/IOFTExtended.sol +17 -4
  95. package/foundry.toml +2 -2
  96. package/hardhat.config.js +54 -0
  97. package/package.json +13 -10
  98. package/turbo-snapshot.lock.json +144 -96
  99. package/artifacts/build-info/eba77569fb49f02e67cb445bb3ee5d37.json +0 -1
  100. package/artifacts-tron/build-info/8846688aca1ca86abc2af4e130f3effa.json +0 -1
  101. package/artifacts-zk/build-info/be85166c48418856c8b56dff21efc105.json +0 -1
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/be85166c48418856c8b56dff21efc105.json"
3
+ "buildInfo": "../../../build-info/d2467fad10cf5fa07f3c4c460f383314.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/be85166c48418856c8b56dff21efc105.json"
3
+ "buildInfo": "../../../build-info/d2467fad10cf5fa07f3c4c460f383314.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/be85166c48418856c8b56dff21efc105.json"
3
+ "buildInfo": "../../../build-info/d2467fad10cf5fa07f3c4c460f383314.json"
4
4
  }
@@ -41,6 +41,11 @@
41
41
  "name": "InvalidBps",
42
42
  "type": "error"
43
43
  },
44
+ {
45
+ "inputs": [],
46
+ "name": "InvalidCreditRedirectConfig",
47
+ "type": "error"
48
+ },
44
49
  {
45
50
  "inputs": [],
46
51
  "name": "InvalidDelegate",
@@ -180,6 +185,56 @@
180
185
  "name": "SlippageExceeded",
181
186
  "type": "error"
182
187
  },
188
+ {
189
+ "anonymous": false,
190
+ "inputs": [
191
+ {
192
+ "components": [
193
+ {
194
+ "internalType": "address",
195
+ "name": "allowlist",
196
+ "type": "address"
197
+ },
198
+ {
199
+ "internalType": "address",
200
+ "name": "escrow",
201
+ "type": "address"
202
+ }
203
+ ],
204
+ "indexed": false,
205
+ "internalType": "struct ICreditRedirect.CreditRedirectConfig",
206
+ "name": "config",
207
+ "type": "tuple"
208
+ }
209
+ ],
210
+ "name": "CreditRedirectConfigSet",
211
+ "type": "event"
212
+ },
213
+ {
214
+ "anonymous": false,
215
+ "inputs": [
216
+ {
217
+ "indexed": true,
218
+ "internalType": "address",
219
+ "name": "from",
220
+ "type": "address"
221
+ },
222
+ {
223
+ "indexed": true,
224
+ "internalType": "address",
225
+ "name": "to",
226
+ "type": "address"
227
+ },
228
+ {
229
+ "indexed": false,
230
+ "internalType": "uint256",
231
+ "name": "amountLD",
232
+ "type": "uint256"
233
+ }
234
+ ],
235
+ "name": "CreditRedirected",
236
+ "type": "event"
237
+ },
183
238
  {
184
239
  "anonymous": false,
185
240
  "inputs": [
@@ -594,6 +649,34 @@
594
649
  "stateMutability": "view",
595
650
  "type": "function"
596
651
  },
652
+ {
653
+ "inputs": [
654
+ {
655
+ "internalType": "uint32",
656
+ "name": "_srcEid",
657
+ "type": "uint32"
658
+ },
659
+ {
660
+ "internalType": "bytes32",
661
+ "name": "_sender",
662
+ "type": "bytes32"
663
+ },
664
+ {
665
+ "internalType": "uint64",
666
+ "name": "_nonce",
667
+ "type": "uint64"
668
+ },
669
+ {
670
+ "internalType": "bytes32",
671
+ "name": "_payloadHash",
672
+ "type": "bytes32"
673
+ }
674
+ ],
675
+ "name": "burn",
676
+ "outputs": [],
677
+ "stateMutability": "nonpayable",
678
+ "type": "function"
679
+ },
597
680
  {
598
681
  "inputs": [
599
682
  {
@@ -607,6 +690,46 @@
607
690
  "stateMutability": "nonpayable",
608
691
  "type": "function"
609
692
  },
693
+ {
694
+ "inputs": [
695
+ {
696
+ "components": [
697
+ {
698
+ "internalType": "uint32",
699
+ "name": "srcEid",
700
+ "type": "uint32"
701
+ },
702
+ {
703
+ "internalType": "bytes32",
704
+ "name": "sender",
705
+ "type": "bytes32"
706
+ },
707
+ {
708
+ "internalType": "uint64",
709
+ "name": "nonce",
710
+ "type": "uint64"
711
+ }
712
+ ],
713
+ "internalType": "struct Origin",
714
+ "name": "_origin",
715
+ "type": "tuple"
716
+ },
717
+ {
718
+ "internalType": "bytes32",
719
+ "name": "_guid",
720
+ "type": "bytes32"
721
+ },
722
+ {
723
+ "internalType": "bytes",
724
+ "name": "_message",
725
+ "type": "bytes"
726
+ }
727
+ ],
728
+ "name": "clear",
729
+ "outputs": [],
730
+ "stateMutability": "nonpayable",
731
+ "type": "function"
732
+ },
610
733
  {
611
734
  "inputs": [
612
735
  {
@@ -636,6 +759,31 @@
636
759
  "stateMutability": "view",
637
760
  "type": "function"
638
761
  },
762
+ {
763
+ "inputs": [],
764
+ "name": "creditRedirectConfig",
765
+ "outputs": [
766
+ {
767
+ "components": [
768
+ {
769
+ "internalType": "address",
770
+ "name": "allowlist",
771
+ "type": "address"
772
+ },
773
+ {
774
+ "internalType": "address",
775
+ "name": "escrow",
776
+ "type": "address"
777
+ }
778
+ ],
779
+ "internalType": "struct ICreditRedirect.CreditRedirectConfig",
780
+ "name": "config",
781
+ "type": "tuple"
782
+ }
783
+ ],
784
+ "stateMutability": "view",
785
+ "type": "function"
786
+ },
639
787
  {
640
788
  "inputs": [],
641
789
  "name": "defaultFeeBps",
@@ -1021,6 +1169,34 @@
1021
1169
  "stateMutability": "view",
1022
1170
  "type": "function"
1023
1171
  },
1172
+ {
1173
+ "inputs": [
1174
+ {
1175
+ "internalType": "uint32",
1176
+ "name": "_srcEid",
1177
+ "type": "uint32"
1178
+ },
1179
+ {
1180
+ "internalType": "bytes32",
1181
+ "name": "_sender",
1182
+ "type": "bytes32"
1183
+ },
1184
+ {
1185
+ "internalType": "uint64",
1186
+ "name": "_nonce",
1187
+ "type": "uint64"
1188
+ },
1189
+ {
1190
+ "internalType": "bytes32",
1191
+ "name": "_payloadHash",
1192
+ "type": "bytes32"
1193
+ }
1194
+ ],
1195
+ "name": "nilify",
1196
+ "outputs": [],
1197
+ "stateMutability": "nonpayable",
1198
+ "type": "function"
1199
+ },
1024
1200
  {
1025
1201
  "inputs": [],
1026
1202
  "name": "oAppVersion",
@@ -1467,6 +1643,31 @@
1467
1643
  "stateMutability": "payable",
1468
1644
  "type": "function"
1469
1645
  },
1646
+ {
1647
+ "inputs": [
1648
+ {
1649
+ "components": [
1650
+ {
1651
+ "internalType": "address",
1652
+ "name": "allowlist",
1653
+ "type": "address"
1654
+ },
1655
+ {
1656
+ "internalType": "address",
1657
+ "name": "escrow",
1658
+ "type": "address"
1659
+ }
1660
+ ],
1661
+ "internalType": "struct ICreditRedirect.CreditRedirectConfig",
1662
+ "name": "_config",
1663
+ "type": "tuple"
1664
+ }
1665
+ ],
1666
+ "name": "setCreditRedirectConfig",
1667
+ "outputs": [],
1668
+ "stateMutability": "nonpayable",
1669
+ "type": "function"
1670
+ },
1470
1671
  {
1471
1672
  "inputs": [
1472
1673
  {
@@ -1810,6 +2011,29 @@
1810
2011
  "stateMutability": "view",
1811
2012
  "type": "function"
1812
2013
  },
2014
+ {
2015
+ "inputs": [
2016
+ {
2017
+ "internalType": "uint32",
2018
+ "name": "_srcEid",
2019
+ "type": "uint32"
2020
+ },
2021
+ {
2022
+ "internalType": "bytes32",
2023
+ "name": "_sender",
2024
+ "type": "bytes32"
2025
+ },
2026
+ {
2027
+ "internalType": "uint64",
2028
+ "name": "_nonce",
2029
+ "type": "uint64"
2030
+ }
2031
+ ],
2032
+ "name": "skip",
2033
+ "outputs": [],
2034
+ "stateMutability": "nonpayable",
2035
+ "type": "function"
2036
+ },
1813
2037
  {
1814
2038
  "inputs": [],
1815
2039
  "name": "token",
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/be85166c48418856c8b56dff21efc105.json"
3
+ "buildInfo": "../../../build-info/d2467fad10cf5fa07f3c4c460f383314.json"
4
4
  }
@@ -3,8 +3,8 @@
3
3
  "contractName": "OFTComposeMsgCodec",
4
4
  "sourceName": "contracts/libs/OFTComposeMsgCodec.sol",
5
5
  "abi": [],
6
- "bytecode": "0x00000001012001900000000c0000613d0000008001000039000000400010043f0000000001000416000000000101004b0000000c0000c13d00000020010000390000010000100443000001200000044300000005010000410000000f0001042e000000000100001900000010000104300000000e000004320000000f0001042e0000001000010430000000000000000000000000000000000000000000000000000000020000000000000000000000000000004000000100000000000000000035519ae6770075581a330117a93b2d93129c5b3cd486b7ff9e15a2ea6b4ef814",
7
- "deployedBytecode": "0x00000001012001900000000c0000613d0000008001000039000000400010043f0000000001000416000000000101004b0000000c0000c13d00000020010000390000010000100443000001200000044300000005010000410000000f0001042e000000000100001900000010000104300000000e000004320000000f0001042e0000001000010430000000000000000000000000000000000000000000000000000000020000000000000000000000000000004000000100000000000000000035519ae6770075581a330117a93b2d93129c5b3cd486b7ff9e15a2ea6b4ef814",
6
+ "bytecode": "0x0000000100200190000000100000613d0000008001000039000000400010043f0000000001000416000000000001004b000000100000c13d00000140000004430000000001000410000001600010044300000020010000390000010000100443000000010100003900000120001004430000000601000041000000130001042e000000000100001900000014000104300000001200000432000000130001042e000000140001043000000000000000000000000000000000000000000000000000000002000000000000000000000000000000800000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a26469706673582212206abef5b9e3fc784f1809ffaa0bc1e8df81a30f252a494fb299e1f5057e7c480664736f6c6378247a6b736f6c633a312e352e31353b736f6c633a302e382e32363b6c6c766d3a312e302e320055",
7
+ "deployedBytecode": "0x0000000100200190000000100000613d0000008001000039000000400010043f0000000001000416000000000001004b000000100000c13d00000140000004430000000001000410000001600010044300000020010000390000010000100443000000010100003900000120001004430000000601000041000000130001042e000000000100001900000014000104300000001200000432000000130001042e000000140001043000000000000000000000000000000000000000000000000000000002000000000000000000000000000000800000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a26469706673582212206abef5b9e3fc784f1809ffaa0bc1e8df81a30f252a494fb299e1f5057e7c480664736f6c6378247a6b736f6c633a312e352e31353b736f6c633a302e382e32363b6c6c766d3a312e302e320055",
8
8
  "linkReferences": {},
9
9
  "deployedLinkReferences": {},
10
10
  "factoryDeps": {}
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/be85166c48418856c8b56dff21efc105.json"
3
+ "buildInfo": "../../../build-info/d2467fad10cf5fa07f3c4c460f383314.json"
4
4
  }
@@ -3,8 +3,8 @@
3
3
  "contractName": "OFTMsgCodec",
4
4
  "sourceName": "contracts/libs/OFTMsgCodec.sol",
5
5
  "abi": [],
6
- "bytecode": "0x00000001012001900000000c0000613d0000008001000039000000400010043f0000000001000416000000000101004b0000000c0000c13d00000020010000390000010000100443000001200000044300000005010000410000000f0001042e000000000100001900000010000104300000000e000004320000000f0001042e00000010000104300000000000000000000000000000000000000000000000000000000200000000000000000000000000000040000001000000000000000000a3a5f3688c77c3177737c078ccad07d7eea2ebfbad2585d54ced6965fc9bba11",
7
- "deployedBytecode": "0x00000001012001900000000c0000613d0000008001000039000000400010043f0000000001000416000000000101004b0000000c0000c13d00000020010000390000010000100443000001200000044300000005010000410000000f0001042e000000000100001900000010000104300000000e000004320000000f0001042e00000010000104300000000000000000000000000000000000000000000000000000000200000000000000000000000000000040000001000000000000000000a3a5f3688c77c3177737c078ccad07d7eea2ebfbad2585d54ced6965fc9bba11",
6
+ "bytecode": "0x0000000100200190000000100000613d0000008001000039000000400010043f0000000001000416000000000001004b000000100000c13d00000140000004430000000001000410000001600010044300000020010000390000010000100443000000010100003900000120001004430000000601000041000000130001042e000000000100001900000014000104300000001200000432000000130001042e000000140001043000000000000000000000000000000000000000000000000000000002000000000000000000000000000000800000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a2646970667358221220cacc58adcf4adbae229e366e80d899edc8d602ffb80efd2d47145895d19e42af64736f6c6378247a6b736f6c633a312e352e31353b736f6c633a302e382e32363b6c6c766d3a312e302e320055",
7
+ "deployedBytecode": "0x0000000100200190000000100000613d0000008001000039000000400010043f0000000001000416000000000001004b000000100000c13d00000140000004430000000001000410000001600010044300000020010000390000010000100443000000010100003900000120001004430000000601000041000000130001042e000000000100001900000014000104300000001200000432000000130001042e000000140001043000000000000000000000000000000000000000000000000000000002000000000000000000000000000000800000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a2646970667358221220cacc58adcf4adbae229e366e80d899edc8d602ffb80efd2d47145895d19e42af64736f6c6378247a6b736f6c633a312e352e31353b736f6c633a302e382e32363b6c6c766d3a312e302e320055",
8
8
  "linkReferences": {},
9
9
  "deployedLinkReferences": {},
10
10
  "factoryDeps": {}
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/be85166c48418856c8b56dff21efc105.json"
3
+ "buildInfo": "../../../build-info/d2467fad10cf5fa07f3c4c460f383314.json"
4
4
  }
@@ -1,7 +1,11 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  pragma solidity ^0.8.22;
3
3
 
4
- import { IOAppExtended } from "@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol";
4
+ import {
5
+ IOAppExtended,
6
+ OAPP_EXTENDED_INTERFACE_ID
7
+ } from "@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol";
8
+ import { ICreditRedirect } from "@layerzerolabs/utils-evm-contracts/contracts/interfaces/ICreditRedirect.sol";
5
9
  import { IFeeConfig } from "@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeConfig.sol";
6
10
  import { IFeeHandler } from "@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeHandler.sol";
7
11
  import { IPauseByID } from "@layerzerolabs/utils-evm-contracts/contracts/interfaces/IPauseByID.sol";
@@ -11,7 +15,16 @@ import { IOFT } from "./IOFT.sol";
11
15
  /**
12
16
  * @title IOFTExtended
13
17
  * @author LayerZero Labs (@TRileySchwarz, tinom.eth)
14
- * @custom:version 1.0.0
15
- * @notice Interface for extended OFT contracts with fee, pause, and rate limiter functionality.
18
+ * @custom:version 1.1.0
19
+ * @notice Interface for extended OFT contracts with credit redirect, fee, pause, and rate limiter functionality.
16
20
  */
17
- interface IOFTExtended is IOFT, IOAppExtended, IFeeConfig, IFeeHandler, IPauseByID, IRateLimiter {}
21
+ interface IOFTExtended is IOFT, IOAppExtended, ICreditRedirect, IFeeConfig, IFeeHandler, IPauseByID, IRateLimiter {}
22
+
23
+ /// @dev Flatten all leaf interface IDs.
24
+ bytes4 constant OFT_EXTENDED_INTERFACE_ID = type(IOFT).interfaceId ^
25
+ OAPP_EXTENDED_INTERFACE_ID ^
26
+ type(ICreditRedirect).interfaceId ^
27
+ type(IFeeConfig).interfaceId ^
28
+ type(IFeeHandler).interfaceId ^
29
+ type(IPauseByID).interfaceId ^
30
+ type(IRateLimiter).interfaceId;
package/foundry.toml CHANGED
@@ -1,5 +1,5 @@
1
1
  [profile.default]
2
- solc = '0.8.22'
2
+ solc = '0.8.26'
3
3
  verbosity = 3
4
4
  src = "contracts"
5
5
  test = "test"
@@ -7,7 +7,7 @@ out = "out"
7
7
  cache_path = "cache"
8
8
  libs = ['node_modules', 'node_modules/@layerzerolabs/toolbox-foundry/lib']
9
9
  optimizer = true
10
- optimizer_runs = 200
10
+ optimizer_runs = 20_000
11
11
 
12
12
  remappings = [
13
13
  'ds-test/=node_modules/@layerzerolabs/toolbox-foundry/lib/ds-test/',
@@ -0,0 +1,54 @@
1
+ require('@matterlabs/hardhat-zksync-solc');
2
+ // `hardhat-deploy` is required by `@layerzerolabs/hardhat-tron`.
3
+ require('hardhat-deploy');
4
+ require('@layerzerolabs/hardhat-tron');
5
+
6
+ module.exports = {
7
+ paths: {
8
+ cache: 'hh-cache',
9
+ },
10
+ solidity: {
11
+ compilers: [
12
+ {
13
+ version: '0.8.26',
14
+ settings: {
15
+ evmVersion: 'cancun',
16
+ optimizer: {
17
+ enabled: true,
18
+ runs: 20_000,
19
+ },
20
+ },
21
+ },
22
+ ],
23
+ },
24
+ zksolc: {
25
+ version: '1.5.15',
26
+ compilerSource: 'binary',
27
+ settings: {},
28
+ },
29
+ tronSolc: {
30
+ enable: true,
31
+ compilers: [
32
+ {
33
+ version: '0.8.24',
34
+ settings: {
35
+ optimizer: {
36
+ enabled: true,
37
+ runs: 20_000,
38
+ },
39
+ },
40
+ },
41
+ ],
42
+ },
43
+ networks: {
44
+ 'zksync-mainnet': {
45
+ url: 'https://zksync2-mainnet.zksync.io',
46
+ ethNetwork: 'https://eth-mainnet.public.blastapi.io',
47
+ zksync: true,
48
+ },
49
+ 'tron-mainnet': {
50
+ url: 'http://127.0.0.1:8514/jsonrpc',
51
+ tron: true,
52
+ },
53
+ },
54
+ };
package/package.json CHANGED
@@ -1,23 +1,26 @@
1
1
  {
2
2
  "name": "@layerzerolabs/oft-evm-contracts",
3
- "version": "1.2.18",
3
+ "version": "1.2.20",
4
4
  "private": false,
5
5
  "description": "LayerZero Labs reference EVM OFT implementation",
6
6
  "license": "MIT",
7
7
  "devDependencies": {
8
+ "@layerzerolabs/hardhat-tron": "3.0.168",
8
9
  "@layerzerolabs/lz-evm-messagelib-v2": "3.0.168",
9
10
  "@layerzerolabs/lz-evm-protocol-v2": "3.0.168",
10
11
  "@layerzerolabs/lz-evm-v1-0.7": "3.0.168",
11
12
  "@layerzerolabs/test-devtools-evm-foundry": "8.0.1",
12
13
  "@layerzerolabs/toolbox-foundry": "^0.1.13",
13
- "@openzeppelin/contracts": ">=5.0.2 <5.5.0",
14
- "@openzeppelin/contracts-upgradeable": ">=5.0.2 <5.5.0",
14
+ "@matterlabs/hardhat-zksync-solc": "^1.4.0",
15
+ "@openzeppelin/contracts": "^5.0.2",
16
+ "@openzeppelin/contracts-upgradeable": "^5.0.2",
15
17
  "ethers": "^5.8.0",
18
+ "hardhat-deploy": "^0.12.4",
16
19
  "solhint": "^6.0.1",
17
- "@layerzerolabs/oapp-evm-contracts": "1.2.18",
18
- "@layerzerolabs/vm-tooling-evm": "1.2.18",
19
- "@layerzerolabs/solhint-configuration": "1.2.18",
20
- "@layerzerolabs/utils-evm-contracts": "1.2.18"
20
+ "@layerzerolabs/oapp-evm-contracts": "1.2.20",
21
+ "@layerzerolabs/utils-evm-contracts": "1.2.20",
22
+ "@layerzerolabs/solhint-configuration": "1.2.20",
23
+ "@layerzerolabs/vm-tooling-evm": "1.2.20"
21
24
  },
22
25
  "publishConfig": {
23
26
  "access": "public",
@@ -33,9 +36,9 @@
33
36
  "scripts": {
34
37
  "build": "pnpm compile:evm && pnpm compile:zksync && pnpm compile:tron",
35
38
  "clean": "rm -rf ./node_modules .turbo ./dist && pnpm generated:clean",
36
- "compile:evm": "pnpm lz-tool hardhat compile --config /hardhat/hardhat.default.config.js",
37
- "compile:tron": "pnpm lz-tool hardhat compile --config /hardhat/hardhat.default.config.js --network tron-mainnet",
38
- "compile:zksync": "pnpm lz-tool hardhat compile --config /hardhat/hardhat.default.config.js --network zksync-mainnet",
39
+ "compile:evm": "pnpm lz-tool hardhat compile --config ./hardhat.config.js",
40
+ "compile:tron": "pnpm lz-tool hardhat compile --config ./hardhat.config.js --network tron-mainnet",
41
+ "compile:zksync": "pnpm lz-tool hardhat compile --config ./hardhat.config.js --network zksync-mainnet",
39
42
  "generated:clean": "rm -rf ./artifacts* ./hh-cache* ./out ./cache",
40
43
  "lint": "solhint --config solhint.config.js 'contracts/**/*.sol' 'test/**/*.sol' --fix --noPrompt",
41
44
  "test": "pnpm lz-tool forge test",