@layerzerolabs/oft-evm-contracts 0.2.74

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 (143) hide show
  1. package/.turbo/turbo-build.log +68 -0
  2. package/.turbo/turbo-lint.log +185 -0
  3. package/.turbo/turbo-test.log +144 -0
  4. package/LICENSE +23 -0
  5. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol/ILayerZeroEndpointV2.dbg.json +4 -0
  6. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol/ILayerZeroEndpointV2.json +1899 -0
  7. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +4 -0
  8. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.json +121 -0
  9. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol/IMessageLibManager.dbg.json +4 -0
  10. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol/IMessageLibManager.json +646 -0
  11. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol/IMessagingChannel.dbg.json +4 -0
  12. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol/IMessagingChannel.json +373 -0
  13. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol/IMessagingComposer.dbg.json +4 -0
  14. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol/IMessagingComposer.json +246 -0
  15. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol/IMessagingContext.dbg.json +4 -0
  16. package/artifacts/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol/IMessagingContext.json +42 -0
  17. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppCore.sol/IOAppCore.dbg.json +4 -0
  18. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppCore.sol/IOAppCore.json +148 -0
  19. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.dbg.json +4 -0
  20. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.json +467 -0
  21. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMsgInspection.sol/IOAppMsgInspection.dbg.json +4 -0
  22. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMsgInspection.sol/IOAppMsgInspection.json +50 -0
  23. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppOptionsType3.sol/IOAppOptionsType3.dbg.json +4 -0
  24. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppOptionsType3.sol/IOAppOptionsType3.json +135 -0
  25. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppReceiver.sol/IOAppReceiver.dbg.json +4 -0
  26. package/artifacts/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppReceiver.sol/IOAppReceiver.json +167 -0
  27. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeConfig.sol/IFeeConfig.dbg.json +4 -0
  28. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeConfig.sol/IFeeConfig.json +188 -0
  29. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeHandler.sol/IFeeHandler.dbg.json +4 -0
  30. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeHandler.sol/IFeeHandler.json +55 -0
  31. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IPauseByID.sol/IPauseByID.dbg.json +4 -0
  32. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IPauseByID.sol/IPauseByID.json +177 -0
  33. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IRateLimiter.sol/IRateLimiter.dbg.json +4 -0
  34. package/artifacts/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IRateLimiter.sol/IRateLimiter.json +532 -0
  35. package/artifacts/build-info/eba77569fb49f02e67cb445bb3ee5d37.json +1 -0
  36. package/artifacts/contracts/interfaces/IOFT.sol/IOFT.dbg.json +4 -0
  37. package/artifacts/contracts/interfaces/IOFT.sol/IOFT.json +467 -0
  38. package/artifacts/contracts/interfaces/IOFTDecimalUtils.sol/IOFTDecimalUtils.dbg.json +4 -0
  39. package/artifacts/contracts/interfaces/IOFTDecimalUtils.sol/IOFTDecimalUtils.json +66 -0
  40. package/artifacts/contracts/interfaces/IOFTExtended.sol/IOFTExtended.dbg.json +4 -0
  41. package/artifacts/contracts/interfaces/IOFTExtended.sol/IOFTExtended.json +1831 -0
  42. package/artifacts/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.dbg.json +4 -0
  43. package/artifacts/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.json +10 -0
  44. package/artifacts/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.dbg.json +4 -0
  45. package/artifacts/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.json +10 -0
  46. package/artifacts/contracts/utils/OFTDecimalUtils.sol/OFTDecimalUtils.dbg.json +4 -0
  47. package/artifacts/contracts/utils/OFTDecimalUtils.sol/OFTDecimalUtils.json +66 -0
  48. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol/ILayerZeroEndpointV2.dbg.json +4 -0
  49. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol/ILayerZeroEndpointV2.json +1899 -0
  50. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +4 -0
  51. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.json +121 -0
  52. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol/IMessageLibManager.dbg.json +4 -0
  53. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol/IMessageLibManager.json +646 -0
  54. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol/IMessagingChannel.dbg.json +4 -0
  55. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol/IMessagingChannel.json +373 -0
  56. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol/IMessagingComposer.dbg.json +4 -0
  57. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol/IMessagingComposer.json +246 -0
  58. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol/IMessagingContext.dbg.json +4 -0
  59. package/artifacts-tron/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol/IMessagingContext.json +42 -0
  60. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppCore.sol/IOAppCore.dbg.json +4 -0
  61. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppCore.sol/IOAppCore.json +148 -0
  62. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.dbg.json +4 -0
  63. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.json +467 -0
  64. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMsgInspection.sol/IOAppMsgInspection.dbg.json +4 -0
  65. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMsgInspection.sol/IOAppMsgInspection.json +50 -0
  66. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppOptionsType3.sol/IOAppOptionsType3.dbg.json +4 -0
  67. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppOptionsType3.sol/IOAppOptionsType3.json +135 -0
  68. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppReceiver.sol/IOAppReceiver.dbg.json +4 -0
  69. package/artifacts-tron/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppReceiver.sol/IOAppReceiver.json +167 -0
  70. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeConfig.sol/IFeeConfig.dbg.json +4 -0
  71. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeConfig.sol/IFeeConfig.json +188 -0
  72. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeHandler.sol/IFeeHandler.dbg.json +4 -0
  73. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeHandler.sol/IFeeHandler.json +55 -0
  74. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IPauseByID.sol/IPauseByID.dbg.json +4 -0
  75. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IPauseByID.sol/IPauseByID.json +177 -0
  76. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IRateLimiter.sol/IRateLimiter.dbg.json +4 -0
  77. package/artifacts-tron/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IRateLimiter.sol/IRateLimiter.json +532 -0
  78. package/artifacts-tron/build-info/8846688aca1ca86abc2af4e130f3effa.json +1 -0
  79. package/artifacts-tron/contracts/interfaces/IOFT.sol/IOFT.dbg.json +4 -0
  80. package/artifacts-tron/contracts/interfaces/IOFT.sol/IOFT.json +467 -0
  81. package/artifacts-tron/contracts/interfaces/IOFTDecimalUtils.sol/IOFTDecimalUtils.dbg.json +4 -0
  82. package/artifacts-tron/contracts/interfaces/IOFTDecimalUtils.sol/IOFTDecimalUtils.json +66 -0
  83. package/artifacts-tron/contracts/interfaces/IOFTExtended.sol/IOFTExtended.dbg.json +4 -0
  84. package/artifacts-tron/contracts/interfaces/IOFTExtended.sol/IOFTExtended.json +1831 -0
  85. package/artifacts-tron/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.dbg.json +4 -0
  86. package/artifacts-tron/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.json +10 -0
  87. package/artifacts-tron/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.dbg.json +4 -0
  88. package/artifacts-tron/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.json +10 -0
  89. package/artifacts-tron/contracts/utils/OFTDecimalUtils.sol/OFTDecimalUtils.dbg.json +4 -0
  90. package/artifacts-tron/contracts/utils/OFTDecimalUtils.sol/OFTDecimalUtils.json +66 -0
  91. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol/ILayerZeroEndpointV2.dbg.json +4 -0
  92. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol/ILayerZeroEndpointV2.json +1900 -0
  93. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +4 -0
  94. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.json +122 -0
  95. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol/IMessageLibManager.dbg.json +4 -0
  96. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol/IMessageLibManager.json +647 -0
  97. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol/IMessagingChannel.dbg.json +4 -0
  98. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol/IMessagingChannel.json +374 -0
  99. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol/IMessagingComposer.dbg.json +4 -0
  100. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol/IMessagingComposer.json +247 -0
  101. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol/IMessagingContext.dbg.json +4 -0
  102. package/artifacts-zk/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol/IMessagingContext.json +43 -0
  103. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppCore.sol/IOAppCore.dbg.json +4 -0
  104. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppCore.sol/IOAppCore.json +149 -0
  105. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.dbg.json +4 -0
  106. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol/IOAppExtended.json +468 -0
  107. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMsgInspection.sol/IOAppMsgInspection.dbg.json +4 -0
  108. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppMsgInspection.sol/IOAppMsgInspection.json +51 -0
  109. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppOptionsType3.sol/IOAppOptionsType3.dbg.json +4 -0
  110. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppOptionsType3.sol/IOAppOptionsType3.json +136 -0
  111. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppReceiver.sol/IOAppReceiver.dbg.json +4 -0
  112. package/artifacts-zk/@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppReceiver.sol/IOAppReceiver.json +168 -0
  113. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeConfig.sol/IFeeConfig.dbg.json +4 -0
  114. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeConfig.sol/IFeeConfig.json +189 -0
  115. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeHandler.sol/IFeeHandler.dbg.json +4 -0
  116. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeHandler.sol/IFeeHandler.json +56 -0
  117. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IPauseByID.sol/IPauseByID.dbg.json +4 -0
  118. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IPauseByID.sol/IPauseByID.json +178 -0
  119. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IRateLimiter.sol/IRateLimiter.dbg.json +4 -0
  120. package/artifacts-zk/@layerzerolabs/utils-evm-contracts/contracts/interfaces/IRateLimiter.sol/IRateLimiter.json +533 -0
  121. package/artifacts-zk/build-info/be85166c48418856c8b56dff21efc105.json +1 -0
  122. package/artifacts-zk/contracts/interfaces/IOFT.sol/IOFT.dbg.json +4 -0
  123. package/artifacts-zk/contracts/interfaces/IOFT.sol/IOFT.json +468 -0
  124. package/artifacts-zk/contracts/interfaces/IOFTDecimalUtils.sol/IOFTDecimalUtils.dbg.json +4 -0
  125. package/artifacts-zk/contracts/interfaces/IOFTDecimalUtils.sol/IOFTDecimalUtils.json +67 -0
  126. package/artifacts-zk/contracts/interfaces/IOFTExtended.sol/IOFTExtended.dbg.json +4 -0
  127. package/artifacts-zk/contracts/interfaces/IOFTExtended.sol/IOFTExtended.json +1832 -0
  128. package/artifacts-zk/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.dbg.json +4 -0
  129. package/artifacts-zk/contracts/libs/OFTComposeMsgCodec.sol/OFTComposeMsgCodec.json +11 -0
  130. package/artifacts-zk/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.dbg.json +4 -0
  131. package/artifacts-zk/contracts/libs/OFTMsgCodec.sol/OFTMsgCodec.json +11 -0
  132. package/artifacts-zk/contracts/utils/OFTDecimalUtils.sol/OFTDecimalUtils.dbg.json +4 -0
  133. package/artifacts-zk/contracts/utils/OFTDecimalUtils.sol/OFTDecimalUtils.json +67 -0
  134. package/contracts/interfaces/IOFT.sol +158 -0
  135. package/contracts/interfaces/IOFTDecimalUtils.sol +39 -0
  136. package/contracts/interfaces/IOFTExtended.sol +17 -0
  137. package/contracts/libs/OFTComposeMsgCodec.sol +90 -0
  138. package/contracts/libs/OFTMsgCodec.sol +82 -0
  139. package/contracts/utils/OFTDecimalUtils.sol +88 -0
  140. package/foundry.toml +21 -0
  141. package/package.json +44 -0
  142. package/solhint.config.js +3 -0
  143. package/test/OFTDecimalUtils.t.sol +354 -0
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/be85166c48418856c8b56dff21efc105.json"
4
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "_format": "hh-zksolc-artifact-1",
3
+ "contractName": "OFTComposeMsgCodec",
4
+ "sourceName": "contracts/libs/OFTComposeMsgCodec.sol",
5
+ "abi": [],
6
+ "bytecode": "0x00000001012001900000000c0000613d0000008001000039000000400010043f0000000001000416000000000101004b0000000c0000c13d00000020010000390000010000100443000001200000044300000005010000410000000f0001042e000000000100001900000010000104300000000e000004320000000f0001042e0000001000010430000000000000000000000000000000000000000000000000000000020000000000000000000000000000004000000100000000000000000035519ae6770075581a330117a93b2d93129c5b3cd486b7ff9e15a2ea6b4ef814",
7
+ "deployedBytecode": "0x00000001012001900000000c0000613d0000008001000039000000400010043f0000000001000416000000000101004b0000000c0000c13d00000020010000390000010000100443000001200000044300000005010000410000000f0001042e000000000100001900000010000104300000000e000004320000000f0001042e0000001000010430000000000000000000000000000000000000000000000000000000020000000000000000000000000000004000000100000000000000000035519ae6770075581a330117a93b2d93129c5b3cd486b7ff9e15a2ea6b4ef814",
8
+ "linkReferences": {},
9
+ "deployedLinkReferences": {},
10
+ "factoryDeps": {}
11
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/be85166c48418856c8b56dff21efc105.json"
4
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "_format": "hh-zksolc-artifact-1",
3
+ "contractName": "OFTMsgCodec",
4
+ "sourceName": "contracts/libs/OFTMsgCodec.sol",
5
+ "abi": [],
6
+ "bytecode": "0x00000001012001900000000c0000613d0000008001000039000000400010043f0000000001000416000000000101004b0000000c0000c13d00000020010000390000010000100443000001200000044300000005010000410000000f0001042e000000000100001900000010000104300000000e000004320000000f0001042e00000010000104300000000000000000000000000000000000000000000000000000000200000000000000000000000000000040000001000000000000000000a3a5f3688c77c3177737c078ccad07d7eea2ebfbad2585d54ced6965fc9bba11",
7
+ "deployedBytecode": "0x00000001012001900000000c0000613d0000008001000039000000400010043f0000000001000416000000000101004b0000000c0000c13d00000020010000390000010000100443000001200000044300000005010000410000000f0001042e000000000100001900000010000104300000000e000004320000000f0001042e00000010000104300000000000000000000000000000000000000000000000000000000200000000000000000000000000000040000001000000000000000000a3a5f3688c77c3177737c078ccad07d7eea2ebfbad2585d54ced6965fc9bba11",
8
+ "linkReferences": {},
9
+ "deployedLinkReferences": {},
10
+ "factoryDeps": {}
11
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/be85166c48418856c8b56dff21efc105.json"
4
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "_format": "hh-zksolc-artifact-1",
3
+ "contractName": "OFTDecimalUtils",
4
+ "sourceName": "contracts/utils/OFTDecimalUtils.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "uint256",
10
+ "name": "amountSD",
11
+ "type": "uint256"
12
+ }
13
+ ],
14
+ "name": "AmountSDOverflowed",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "inputs": [],
19
+ "name": "InvalidLocalDecimals",
20
+ "type": "error"
21
+ },
22
+ {
23
+ "inputs": [],
24
+ "name": "decimalConversionRate",
25
+ "outputs": [
26
+ {
27
+ "internalType": "uint256",
28
+ "name": "rate",
29
+ "type": "uint256"
30
+ }
31
+ ],
32
+ "stateMutability": "view",
33
+ "type": "function"
34
+ },
35
+ {
36
+ "inputs": [],
37
+ "name": "localDecimals",
38
+ "outputs": [
39
+ {
40
+ "internalType": "uint8",
41
+ "name": "ld",
42
+ "type": "uint8"
43
+ }
44
+ ],
45
+ "stateMutability": "view",
46
+ "type": "function"
47
+ },
48
+ {
49
+ "inputs": [],
50
+ "name": "sharedDecimals",
51
+ "outputs": [
52
+ {
53
+ "internalType": "uint8",
54
+ "name": "sd",
55
+ "type": "uint8"
56
+ }
57
+ ],
58
+ "stateMutability": "view",
59
+ "type": "function"
60
+ }
61
+ ],
62
+ "bytecode": "0x",
63
+ "deployedBytecode": "0x",
64
+ "linkReferences": {},
65
+ "deployedLinkReferences": {},
66
+ "factoryDeps": {}
67
+ }
@@ -0,0 +1,158 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.22;
3
+
4
+ import {
5
+ MessagingReceipt,
6
+ MessagingFee
7
+ } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
8
+
9
+ /**
10
+ * @dev Struct representing token parameters for the OFT send() operation.
11
+ */
12
+ struct SendParam {
13
+ uint32 dstEid; // Destination endpoint ID.
14
+ bytes32 to; // Recipient address.
15
+ uint256 amountLD; // Amount to send in local decimals.
16
+ uint256 minAmountLD; // Minimum amount to send in local decimals.
17
+ bytes extraOptions; // Additional options supplied by the caller to be used in the LayerZero message.
18
+ bytes composeMsg; // The composed message for the send() operation.
19
+ bytes oftCmd; // The OFT command to be executed, unused in default OFT implementations.
20
+ }
21
+
22
+ /**
23
+ * @dev Struct representing OFT limit information.
24
+ * @dev These amounts can change dynamically and are up the specific oft implementation.
25
+ */
26
+ struct OFTLimit {
27
+ uint256 minAmountLD; // Minimum amount in local decimals that can be sent to the recipient.
28
+ uint256 maxAmountLD; // Maximum amount in local decimals that can be sent to the recipient.
29
+ }
30
+
31
+ /**
32
+ * @dev Struct representing OFT receipt information.
33
+ */
34
+ struct OFTReceipt {
35
+ uint256 amountSentLD; // Amount of tokens ACTUALLY debited from the sender in local decimals.
36
+ // @dev In non-default implementations, the amountReceivedLD COULD differ from this value.
37
+ uint256 amountReceivedLD; // Amount of tokens to be received on the remote side.
38
+ }
39
+
40
+ /**
41
+ * @dev Struct representing OFT fee details.
42
+ * @dev Future proof mechanism to provide a standardized way to communicate fees to things like a UI.
43
+ */
44
+ struct OFTFeeDetail {
45
+ int256 feeAmountLD; // Amount of the fee in local decimals.
46
+ string description; // Description of the fee.
47
+ }
48
+
49
+ /**
50
+ * @title IOFT
51
+ * @dev Interface for the OftChain (OFT) token.
52
+ * @dev Does not inherit ERC20 to accommodate usage by OFTAdapter as well.
53
+ * @dev This specific interface ID is '0x02e49c2c'.
54
+ */
55
+ interface IOFT {
56
+ // Custom error messages
57
+ error InvalidLocalDecimals();
58
+ error SlippageExceeded(uint256 amountLD, uint256 minAmountLD);
59
+ error AmountSDOverflowed(uint256 amountSD);
60
+
61
+ // Events
62
+ event OFTSent(
63
+ bytes32 indexed guid, // GUID of the OFT message.
64
+ uint32 dstEid, // Destination Endpoint ID.
65
+ address indexed fromAddress, // Address of the sender on the src chain.
66
+ uint256 amountSentLD, // Amount of tokens sent in local decimals.
67
+ uint256 amountReceivedLD // Amount of tokens received in local decimals.
68
+ );
69
+ event OFTReceived(
70
+ bytes32 indexed guid, // GUID of the OFT message.
71
+ uint32 srcEid, // Source Endpoint ID.
72
+ address indexed toAddress, // Address of the recipient on the dst chain.
73
+ uint256 amountReceivedLD // Amount of tokens received in local decimals.
74
+ );
75
+
76
+ /**
77
+ * @notice Retrieves interfaceID and the version of the OFT.
78
+ * @return interfaceId The interface ID.
79
+ * @return version The version.
80
+ *
81
+ * @dev interfaceId: This specific interface ID is '0x02e49c2c'.
82
+ * @dev version: Indicates a cross-chain compatible msg encoding with other OFTs.
83
+ * @dev If a new feature is added to the OFT cross-chain msg encoding, the version will be incremented.
84
+ * ie. localOFT version(x,1) CAN send messages to remoteOFT version(x,1)
85
+ */
86
+ function oftVersion() external view returns (bytes4 interfaceId, uint64 version);
87
+
88
+ /**
89
+ * @notice Retrieves the address of the token associated with the OFT.
90
+ * @return tokenAddress The address of the ERC20 token implementation.
91
+ */
92
+ function token() external view returns (address tokenAddress);
93
+
94
+ /**
95
+ * @notice Indicates whether the OFT contract requires approval of the 'token()' to send.
96
+ * @return requiresApproval Needs approval of the underlying token implementation.
97
+ *
98
+ * @dev Allows things like wallet implementers to determine integration requirements,
99
+ * without understanding the underlying token implementation.
100
+ */
101
+ function approvalRequired() external view returns (bool requiresApproval);
102
+
103
+ /**
104
+ * @notice Retrieves the shared decimals of the OFT.
105
+ * @return sd The shared decimals of the OFT.
106
+ */
107
+ function sharedDecimals() external view returns (uint8 sd);
108
+
109
+ /**
110
+ * @notice Provides the fee breakdown and settings data for an OFT. Unused in the default implementation.
111
+ * @param _sendParam The parameters for the send operation.
112
+ * @return oftLimit The OFT limit information.
113
+ * @return oftFeeDetails The details of OFT fees.
114
+ * @return oftReceipt The OFT receipt information.
115
+ */
116
+ function quoteOFT(
117
+ SendParam calldata _sendParam
118
+ )
119
+ external
120
+ view
121
+ returns (OFTLimit memory oftLimit, OFTFeeDetail[] memory oftFeeDetails, OFTReceipt memory oftReceipt);
122
+
123
+ /**
124
+ * @notice Provides a quote for the send() operation.
125
+ * @param _sendParam The parameters for the send() operation.
126
+ * @param _payInLzToken Flag indicating whether the caller is paying in the LZ token.
127
+ * @return msgFee The calculated LayerZero messaging fee from the send() operation.
128
+ *
129
+ * @dev MessagingFee: LayerZero msg fee
130
+ * - nativeFee: The native fee.
131
+ * - lzTokenFee: The lzToken fee.
132
+ */
133
+ function quoteSend(
134
+ SendParam calldata _sendParam,
135
+ bool _payInLzToken
136
+ ) external view returns (MessagingFee memory msgFee);
137
+
138
+ /**
139
+ * @notice Executes the send() operation.
140
+ * @param _sendParam The parameters for the send operation.
141
+ * @param _fee The fee information supplied by the caller.
142
+ * - nativeFee: The native fee.
143
+ * - lzTokenFee: The lzToken fee.
144
+ * @param _refundAddress The address to receive any excess funds from fees etc. on the src.
145
+ * @return msgReceipt The LayerZero messaging receipt from the send() operation.
146
+ * @return oftReceipt The OFT receipt information.
147
+ *
148
+ * @dev MessagingReceipt: LayerZero msg receipt
149
+ * - guid: The unique identifier for the sent message.
150
+ * - nonce: The nonce of the sent message.
151
+ * - fee: The LayerZero fee incurred for the message.
152
+ */
153
+ function send(
154
+ SendParam calldata _sendParam,
155
+ MessagingFee calldata _fee,
156
+ address _refundAddress
157
+ ) external payable returns (MessagingReceipt memory msgReceipt, OFTReceipt memory oftReceipt);
158
+ }
@@ -0,0 +1,39 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.22;
3
+
4
+ /**
5
+ * @title IOFTDecimalUtils
6
+ * @author LayerZero Labs (tinom.eth)
7
+ * @custom:version 1.0.0
8
+ * @notice Interface for OFT decimal conversion utilities.
9
+ */
10
+ interface IOFTDecimalUtils {
11
+ /**
12
+ * @notice Thrown when shared decimals exceed local decimals.
13
+ */
14
+ error InvalidLocalDecimals();
15
+
16
+ /**
17
+ * @notice Thrown when the amount in shared decimals overflows `uint64`.
18
+ * @param amountSD Amount in shared decimals
19
+ */
20
+ error AmountSDOverflowed(uint256 amountSD);
21
+
22
+ /**
23
+ * @notice Returns the local decimals for tokens on this chain.
24
+ * @return ld Local decimals
25
+ */
26
+ function localDecimals() external view returns (uint8 ld);
27
+
28
+ /**
29
+ * @notice Returns the shared decimals for cross-chain messaging.
30
+ * @return sd Shared decimals
31
+ */
32
+ function sharedDecimals() external view returns (uint8 sd);
33
+
34
+ /**
35
+ * @notice Returns the conversion rate to convert from local to shared decimals.
36
+ * @return rate Conversion rate
37
+ */
38
+ function decimalConversionRate() external view returns (uint256 rate);
39
+ }
@@ -0,0 +1,17 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.22;
3
+
4
+ import { IOAppExtended } from "@layerzerolabs/oapp-evm-contracts/contracts/interfaces/IOAppExtended.sol";
5
+ import { IFeeConfig } from "@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeConfig.sol";
6
+ import { IFeeHandler } from "@layerzerolabs/utils-evm-contracts/contracts/interfaces/IFeeHandler.sol";
7
+ import { IPauseByID } from "@layerzerolabs/utils-evm-contracts/contracts/interfaces/IPauseByID.sol";
8
+ import { IRateLimiter } from "@layerzerolabs/utils-evm-contracts/contracts/interfaces/IRateLimiter.sol";
9
+ import { IOFT } from "./IOFT.sol";
10
+
11
+ /**
12
+ * @title IOFTExtended
13
+ * @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.
16
+ */
17
+ interface IOFTExtended is IOFT, IOAppExtended, IFeeConfig, IFeeHandler, IPauseByID, IRateLimiter {}
@@ -0,0 +1,90 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.22;
3
+
4
+ library OFTComposeMsgCodec {
5
+ // Offset constants for decoding composed messages
6
+ uint8 private constant NONCE_OFFSET = 8;
7
+ uint8 private constant SRC_EID_OFFSET = 12;
8
+ uint8 private constant AMOUNT_LD_OFFSET = 44;
9
+ uint8 private constant COMPOSE_FROM_OFFSET = 76;
10
+
11
+ /**
12
+ * @dev Encodes a OFT composed message.
13
+ * @param _nonce The nonce value.
14
+ * @param _srcEid The source endpoint ID.
15
+ * @param _amountLD The amount in local decimals.
16
+ * @param _composeMsg The composed message.
17
+ * @return _msg The encoded Composed message.
18
+ */
19
+ function encode(
20
+ uint64 _nonce,
21
+ uint32 _srcEid,
22
+ uint256 _amountLD,
23
+ bytes memory _composeMsg // 0x[composeFrom][composeMsg]
24
+ ) internal pure returns (bytes memory _msg) {
25
+ _msg = abi.encodePacked(_nonce, _srcEid, _amountLD, _composeMsg);
26
+ }
27
+
28
+ /**
29
+ * @dev Retrieves the nonce for the composed message.
30
+ * @param _msg The message.
31
+ * @return The nonce value.
32
+ */
33
+ function nonce(bytes calldata _msg) internal pure returns (uint64) {
34
+ return uint64(bytes8(_msg[:NONCE_OFFSET]));
35
+ }
36
+
37
+ /**
38
+ * @dev Retrieves the source endpoint ID for the composed message.
39
+ * @param _msg The message.
40
+ * @return The source endpoint ID.
41
+ */
42
+ function srcEid(bytes calldata _msg) internal pure returns (uint32) {
43
+ return uint32(bytes4(_msg[NONCE_OFFSET:SRC_EID_OFFSET]));
44
+ }
45
+
46
+ /**
47
+ * @dev Retrieves the amount in local decimals from the composed message.
48
+ * @param _msg The message.
49
+ * @return The amount in local decimals.
50
+ */
51
+ function amountLD(bytes calldata _msg) internal pure returns (uint256) {
52
+ return uint256(bytes32(_msg[SRC_EID_OFFSET:AMOUNT_LD_OFFSET]));
53
+ }
54
+
55
+ /**
56
+ * @dev Retrieves the composeFrom value from the composed message.
57
+ * @param _msg The message.
58
+ * @return The composeFrom value.
59
+ */
60
+ function composeFrom(bytes calldata _msg) internal pure returns (bytes32) {
61
+ return bytes32(_msg[AMOUNT_LD_OFFSET:COMPOSE_FROM_OFFSET]);
62
+ }
63
+
64
+ /**
65
+ * @dev Retrieves the composed message.
66
+ * @param _msg The message.
67
+ * @return The composed message.
68
+ */
69
+ function composeMsg(bytes calldata _msg) internal pure returns (bytes memory) {
70
+ return _msg[COMPOSE_FROM_OFFSET:];
71
+ }
72
+
73
+ /**
74
+ * @dev Converts an address to bytes32.
75
+ * @param _addr The address to convert.
76
+ * @return The bytes32 representation of the address.
77
+ */
78
+ function addressToBytes32(address _addr) internal pure returns (bytes32) {
79
+ return bytes32(uint256(uint160(_addr)));
80
+ }
81
+
82
+ /**
83
+ * @dev Converts bytes32 to an address.
84
+ * @param _b The bytes32 value to convert.
85
+ * @return The address representation of bytes32.
86
+ */
87
+ function bytes32ToAddress(bytes32 _b) internal pure returns (address) {
88
+ return address(uint160(uint256(_b)));
89
+ }
90
+ }
@@ -0,0 +1,82 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.22;
3
+
4
+ library OFTMsgCodec {
5
+ // Offset constants for encoding and decoding OFT messages
6
+ uint8 private constant SEND_TO_OFFSET = 32;
7
+ uint8 private constant SEND_AMOUNT_SD_OFFSET = 40;
8
+
9
+ /**
10
+ * @dev Encodes an OFT LayerZero message.
11
+ * @param _sendTo The recipient address.
12
+ * @param _amountShared The amount in shared decimals.
13
+ * @param _composeMsg The composed message.
14
+ * @return _msg The encoded message.
15
+ * @return hasCompose A boolean indicating whether the message has a composed payload.
16
+ */
17
+ function encode(
18
+ bytes32 _sendTo,
19
+ uint64 _amountShared,
20
+ bytes memory _composeMsg
21
+ ) internal view returns (bytes memory _msg, bool hasCompose) {
22
+ hasCompose = _composeMsg.length > 0;
23
+ // @dev Remote chains will want to know the composed function caller ie. msg.sender on the src.
24
+ _msg = hasCompose
25
+ ? abi.encodePacked(_sendTo, _amountShared, addressToBytes32(msg.sender), _composeMsg)
26
+ : abi.encodePacked(_sendTo, _amountShared);
27
+ }
28
+
29
+ /**
30
+ * @dev Checks if the OFT message is composed.
31
+ * @param _msg The OFT message.
32
+ * @return A boolean indicating whether the message is composed.
33
+ */
34
+ function isComposed(bytes calldata _msg) internal pure returns (bool) {
35
+ return _msg.length > SEND_AMOUNT_SD_OFFSET;
36
+ }
37
+
38
+ /**
39
+ * @dev Retrieves the recipient address from the OFT message.
40
+ * @param _msg The OFT message.
41
+ * @return The recipient address.
42
+ */
43
+ function sendTo(bytes calldata _msg) internal pure returns (bytes32) {
44
+ return bytes32(_msg[:SEND_TO_OFFSET]);
45
+ }
46
+
47
+ /**
48
+ * @dev Retrieves the amount in shared decimals from the OFT message.
49
+ * @param _msg The OFT message.
50
+ * @return The amount in shared decimals.
51
+ */
52
+ function amountSD(bytes calldata _msg) internal pure returns (uint64) {
53
+ return uint64(bytes8(_msg[SEND_TO_OFFSET:SEND_AMOUNT_SD_OFFSET]));
54
+ }
55
+
56
+ /**
57
+ * @dev Retrieves the composed message from the OFT message.
58
+ * @param _msg The OFT message.
59
+ * @return The composed message.
60
+ */
61
+ function composeMsg(bytes calldata _msg) internal pure returns (bytes memory) {
62
+ return _msg[SEND_AMOUNT_SD_OFFSET:];
63
+ }
64
+
65
+ /**
66
+ * @dev Converts an address to bytes32.
67
+ * @param _addr The address to convert.
68
+ * @return The bytes32 representation of the address.
69
+ */
70
+ function addressToBytes32(address _addr) internal pure returns (bytes32) {
71
+ return bytes32(uint256(uint160(_addr)));
72
+ }
73
+
74
+ /**
75
+ * @dev Converts bytes32 to an address.
76
+ * @param _b The bytes32 value to convert.
77
+ * @return The address representation of bytes32.
78
+ */
79
+ function bytes32ToAddress(bytes32 _b) internal pure returns (address) {
80
+ return address(uint160(uint256(_b)));
81
+ }
82
+ }
@@ -0,0 +1,88 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.22;
3
+
4
+ import { IOFTDecimalUtils } from "../interfaces/IOFTDecimalUtils.sol";
5
+
6
+ /**
7
+ * @title OFTDecimalUtils
8
+ * @author LayerZero Labs (@TRileySchwarz, tinom.eth)
9
+ * @custom:version 1.0.0
10
+ * @notice Abstract contract that implements decimal conversion utilities between local and shared decimals.
11
+ * @dev It can be inherited in either upgradeable or non-upgradeable contracts.
12
+ */
13
+ abstract contract OFTDecimalUtils is IOFTDecimalUtils {
14
+ /// @dev Immutable variable for local decimals.
15
+ uint8 private immutable LOCAL_DECIMALS;
16
+
17
+ /// @dev Immutable variable for shared decimals.
18
+ uint8 private immutable SHARED_DECIMALS;
19
+
20
+ /// @dev Immutable variable for the conversion rate between local and shared decimals.
21
+ uint256 private immutable DECIMAL_CONVERSION_RATE;
22
+
23
+ /**
24
+ * @dev Sets immutable variables.
25
+ * @dev Reverts if the shared decimals are greater than the local decimals.
26
+ * @param _localDecimals Local decimals for tokens on this chain
27
+ * @param _sharedDecimals Shared decimals for cross-chain messaging
28
+ */
29
+ constructor(uint8 _localDecimals, uint8 _sharedDecimals) {
30
+ if (_sharedDecimals > _localDecimals) revert InvalidLocalDecimals();
31
+
32
+ LOCAL_DECIMALS = _localDecimals;
33
+ SHARED_DECIMALS = _sharedDecimals;
34
+ DECIMAL_CONVERSION_RATE = 10 ** (_localDecimals - _sharedDecimals);
35
+ }
36
+
37
+ /**
38
+ * @inheritdoc IOFTDecimalUtils
39
+ */
40
+ function localDecimals() public view virtual returns (uint8 ld) {
41
+ return LOCAL_DECIMALS;
42
+ }
43
+
44
+ /**
45
+ * @inheritdoc IOFTDecimalUtils
46
+ */
47
+ function sharedDecimals() public view virtual returns (uint8 sd) {
48
+ return SHARED_DECIMALS;
49
+ }
50
+
51
+ /**
52
+ * @inheritdoc IOFTDecimalUtils
53
+ */
54
+ function decimalConversionRate() public view virtual returns (uint256 rate) {
55
+ return DECIMAL_CONVERSION_RATE;
56
+ }
57
+
58
+ /**
59
+ * @notice Removes dust from the given local decimal amount.
60
+ * @dev Prevents the loss of dust when moving amounts between chains with different decimals.
61
+ * @param _amountLD Amount in local decimals
62
+ * @return amountLD Amount after removing dust
63
+ */
64
+ function _removeDust(uint256 _amountLD) internal view virtual returns (uint256 amountLD) {
65
+ return (_amountLD / DECIMAL_CONVERSION_RATE) * DECIMAL_CONVERSION_RATE;
66
+ }
67
+
68
+ /**
69
+ * @notice Converts an amount from shared decimals into local decimals.
70
+ * @param _amountSD Amount in shared decimals
71
+ * @return amountLD Amount in local decimals
72
+ */
73
+ function _toLD(uint64 _amountSD) internal view virtual returns (uint256 amountLD) {
74
+ return _amountSD * DECIMAL_CONVERSION_RATE;
75
+ }
76
+
77
+ /**
78
+ * @notice Converts an amount from local decimals into shared decimals.
79
+ * @dev Reverts if the amount in shared decimals overflows `uint64`.
80
+ * @param _amountLD Amount in local decimals
81
+ * @return amountSD Amount in shared decimals
82
+ */
83
+ function _toSD(uint256 _amountLD) internal view virtual returns (uint64 amountSD) {
84
+ uint256 _amountSD = _amountLD / DECIMAL_CONVERSION_RATE;
85
+ if (_amountSD > type(uint64).max) revert AmountSDOverflowed(_amountSD);
86
+ return uint64(_amountSD);
87
+ }
88
+ }
package/foundry.toml ADDED
@@ -0,0 +1,21 @@
1
+ [profile.default]
2
+ solc = '0.8.22'
3
+ verbosity = 3
4
+ src = "contracts"
5
+ test = "test"
6
+ out = "artifacts"
7
+ cache_path = "cache"
8
+ libs = ['node_modules', 'node_modules/@layerzerolabs/toolbox-foundry/lib']
9
+ optimizer = true
10
+ optimizer_runs = 200
11
+
12
+ remappings = [
13
+ 'ds-test/=node_modules/@layerzerolabs/toolbox-foundry/lib/ds-test/',
14
+ 'forge-std/=node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/',
15
+ 'solidity-bytes-utils/contracts/=node_modules/@layerzerolabs/toolbox-foundry/lib/solidity-bytes-utils/',
16
+ '@openzeppelin/=node_modules/@openzeppelin/',
17
+ '@layerzerolabs/=node_modules/@layerzerolabs/',
18
+ ]
19
+
20
+ [fuzz]
21
+ runs = 1000
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@layerzerolabs/oft-evm-contracts",
3
+ "version": "0.2.74",
4
+ "private": false,
5
+ "description": "LayerZero Labs reference EVM OFT implementation",
6
+ "license": "MIT",
7
+ "devDependencies": {
8
+ "@layerzerolabs/lz-evm-messagelib-v2": "3.0.167",
9
+ "@layerzerolabs/lz-evm-protocol-v2": "3.0.167",
10
+ "@layerzerolabs/lz-evm-v1-0.7": "3.0.167",
11
+ "@layerzerolabs/test-devtools-evm-foundry": "8.0.1",
12
+ "@layerzerolabs/toolbox-foundry": "^0.1.13",
13
+ "@openzeppelin/contracts": "^5.0.2",
14
+ "@openzeppelin/contracts-upgradeable": "^5.0.2",
15
+ "ethers": "^5.8.0",
16
+ "solhint": "^6.0.1",
17
+ "@layerzerolabs/oapp-evm-contracts": "0.2.74",
18
+ "@layerzerolabs/tsup-configuration": "0.2.74",
19
+ "@layerzerolabs/typescript-configuration": "0.2.74",
20
+ "@layerzerolabs/utils-evm-contracts": "0.2.74",
21
+ "@layerzerolabs/solhint-configuration": "0.2.74",
22
+ "@layerzerolabs/vm-tooling-evm": "0.2.74"
23
+ },
24
+ "publishConfig": {
25
+ "access": "restricted",
26
+ "registry": "https://registry.npmjs.org/"
27
+ },
28
+ "externalRepoConfig": {
29
+ "targets": [
30
+ "audit-external",
31
+ "monorepo-external"
32
+ ]
33
+ },
34
+ "scripts": {
35
+ "build": "pnpm compile:evm && pnpm compile:zksync && pnpm compile:tron",
36
+ "clean": "rm -rf ./node_modules .turbo ./dist && pnpm generated:clean",
37
+ "compile:evm": "pnpm lz-tool hardhat compile --config /hardhat/hardhat.default.config.js",
38
+ "compile:tron": "pnpm lz-tool hardhat compile --config /hardhat/hardhat.default.config.js --network tron-mainnet",
39
+ "compile:zksync": "pnpm lz-tool hardhat compile --config /hardhat/hardhat.default.config.js --network zksync-mainnet",
40
+ "generated:clean": "rm -rf ./artifacts ./artifacts-tron ./artifacts-zk ./hh-cache ./hh-cache-tron ./hh-cache-zk",
41
+ "lint": "solhint --config solhint.config.js 'contracts/**/*.sol' 'test/**/*.sol' --fix --noPrompt",
42
+ "test": "pnpm lz-tool forge test"
43
+ }
44
+ }
@@ -0,0 +1,3 @@
1
+ const baseConfig = require('@layerzerolabs/solhint-configuration');
2
+
3
+ module.exports = baseConfig;