@across-protocol/contracts 0.1.0

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 (257) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +661 -0
  3. package/README.md +53 -0
  4. package/artifacts/@eth-optimism/contracts/L2/messaging/IL2ERC20Bridge.sol/IL2ERC20Bridge.dbg.json +4 -0
  5. package/artifacts/@eth-optimism/contracts/L2/messaging/IL2ERC20Bridge.sol/IL2ERC20Bridge.json +252 -0
  6. package/artifacts/@eth-optimism/contracts/libraries/bridge/CrossDomainEnabled.sol/CrossDomainEnabled.dbg.json +4 -0
  7. package/artifacts/@eth-optimism/contracts/libraries/bridge/CrossDomainEnabled.sol/CrossDomainEnabled.json +35 -0
  8. package/artifacts/@eth-optimism/contracts/libraries/bridge/ICrossDomainMessenger.sol/ICrossDomainMessenger.dbg.json +4 -0
  9. package/artifacts/@eth-optimism/contracts/libraries/bridge/ICrossDomainMessenger.sol/ICrossDomainMessenger.json +110 -0
  10. package/artifacts/@eth-optimism/contracts/libraries/constants/Lib_PredeployAddresses.sol/Lib_PredeployAddresses.dbg.json +4 -0
  11. package/artifacts/@eth-optimism/contracts/libraries/constants/Lib_PredeployAddresses.sol/Lib_PredeployAddresses.json +10 -0
  12. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +4 -0
  13. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +215 -0
  14. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/IAccessControl.dbg.json +4 -0
  15. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/IAccessControl.json +108 -0
  16. package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +4 -0
  17. package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.json +63 -0
  18. package/artifacts/@openzeppelin/contracts/security/Pausable.sol/Pausable.dbg.json +4 -0
  19. package/artifacts/@openzeppelin/contracts/security/Pausable.sol/Pausable.json +50 -0
  20. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +4 -0
  21. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +297 -0
  22. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +4 -0
  23. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +194 -0
  24. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +4 -0
  25. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +233 -0
  26. package/artifacts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.dbg.json +4 -0
  27. package/artifacts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.json +10 -0
  28. package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +4 -0
  29. package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.json +10 -0
  30. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +4 -0
  31. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +10 -0
  32. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +4 -0
  33. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +10 -0
  34. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +4 -0
  35. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +30 -0
  36. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +4 -0
  37. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +30 -0
  38. package/artifacts/@openzeppelin/contracts/utils/math/SafeMath.sol/SafeMath.dbg.json +4 -0
  39. package/artifacts/@openzeppelin/contracts/utils/math/SafeMath.sol/SafeMath.json +10 -0
  40. package/artifacts/@openzeppelin/contracts/utils/math/SignedSafeMath.sol/SignedSafeMath.dbg.json +4 -0
  41. package/artifacts/@openzeppelin/contracts/utils/math/SignedSafeMath.sol/SignedSafeMath.json +10 -0
  42. package/artifacts/@uma/core/contracts/common/implementation/Lockable.sol/Lockable.dbg.json +4 -0
  43. package/artifacts/@uma/core/contracts/common/implementation/Lockable.sol/Lockable.json +16 -0
  44. package/artifacts/@uma/core/contracts/cross-chain-oracle/chain-adapters/Arbitrum_ParentMessenger.sol/Arbitrum_ParentMessenger.dbg.json +4 -0
  45. package/artifacts/@uma/core/contracts/cross-chain-oracle/chain-adapters/Arbitrum_ParentMessenger.sol/Arbitrum_ParentMessenger.json +611 -0
  46. package/artifacts/@uma/core/contracts/cross-chain-oracle/chain-adapters/ParentMessengerBase.sol/ParentMessengerBase.dbg.json +4 -0
  47. package/artifacts/@uma/core/contracts/cross-chain-oracle/chain-adapters/ParentMessengerBase.sol/ParentMessengerBase.json +297 -0
  48. package/artifacts/@uma/core/contracts/cross-chain-oracle/interfaces/ParentMessengerConsumerInterface.sol/ParentMessengerConsumerInterface.dbg.json +4 -0
  49. package/artifacts/@uma/core/contracts/cross-chain-oracle/interfaces/ParentMessengerConsumerInterface.sol/ParentMessengerConsumerInterface.json +29 -0
  50. package/artifacts/@uma/core/contracts/cross-chain-oracle/interfaces/ParentMessengerInterface.sol/ParentMessengerInterface.dbg.json +4 -0
  51. package/artifacts/@uma/core/contracts/cross-chain-oracle/interfaces/ParentMessengerInterface.sol/ParentMessengerInterface.json +37 -0
  52. package/artifacts/@uma/core/contracts/external/avm/interfaces/iArbitrum_Inbox.sol/IBridge.dbg.json +4 -0
  53. package/artifacts/@uma/core/contracts/external/avm/interfaces/iArbitrum_Inbox.sol/IBridge.json +24 -0
  54. package/artifacts/@uma/core/contracts/external/avm/interfaces/iArbitrum_Inbox.sol/iArbitrum_Inbox.dbg.json +4 -0
  55. package/artifacts/@uma/core/contracts/external/avm/interfaces/iArbitrum_Inbox.sol/iArbitrum_Inbox.json +78 -0
  56. package/artifacts/@uma/core/contracts/external/avm/interfaces/iArbitrum_Outbox.sol/iArbitrum_Outbox.dbg.json +4 -0
  57. package/artifacts/@uma/core/contracts/external/avm/interfaces/iArbitrum_Outbox.sol/iArbitrum_Outbox.json +24 -0
  58. package/artifacts/@uma/core/contracts/insured-bridge/avm/Arbitrum_CrossDomainEnabled.sol/Arbitrum_CrossDomainEnabled.dbg.json +4 -0
  59. package/artifacts/@uma/core/contracts/insured-bridge/avm/Arbitrum_CrossDomainEnabled.sol/Arbitrum_CrossDomainEnabled.json +24 -0
  60. package/artifacts/build-info/1cd64db7a8ac0a153df93d26826ad4e9.json +1653 -0
  61. package/artifacts/build-info/1f738b56edd7602183f2f8d2f23f6e90.json +1592 -0
  62. package/artifacts/build-info/343b9221be36acd9ddaca3f3b83d2e75.json +3943 -0
  63. package/artifacts/build-info/622e561692c193f4cd0ff989b5a231e2.json +5661 -0
  64. package/artifacts/build-info/8e408b49e0ff2873bc28d45221a7ff71.json +277715 -0
  65. package/artifacts/build-info/9d1a3182633612bd337d811d567d5d60.json +2072 -0
  66. package/artifacts/build-info/a8cd9c443d245fe513d6650634b60f93.json +23776 -0
  67. package/artifacts/build-info/d302d9d63fbafb5c8d635cc62cb1cc7c.json +167529 -0
  68. package/artifacts/contracts/common/implementation/AncillaryData.sol/AncillaryData.dbg.json +4 -0
  69. package/artifacts/contracts/common/implementation/AncillaryData.sol/AncillaryData.json +10 -0
  70. package/artifacts/contracts/common/implementation/FixedPoint.sol/FixedPoint.dbg.json +4 -0
  71. package/artifacts/contracts/common/implementation/FixedPoint.sol/FixedPoint.json +10 -0
  72. package/artifacts/contracts/common/implementation/Lockable.sol/Lockable.dbg.json +4 -0
  73. package/artifacts/contracts/common/implementation/Lockable.sol/Lockable.json +16 -0
  74. package/artifacts/contracts/common/implementation/MultiCaller.sol/MultiCaller.dbg.json +4 -0
  75. package/artifacts/contracts/common/implementation/MultiCaller.sol/MultiCaller.json +30 -0
  76. package/artifacts/contracts/common/implementation/Testable.sol/Testable.dbg.json +4 -0
  77. package/artifacts/contracts/common/implementation/Testable.sol/Testable.json +50 -0
  78. package/artifacts/contracts/common/implementation/Timer.sol/Timer.dbg.json +4 -0
  79. package/artifacts/contracts/common/implementation/Timer.sol/Timer.json +42 -0
  80. package/artifacts/contracts/common/interfaces/AddressWhitelistInterface.sol/AddressWhitelistInterface.dbg.json +4 -0
  81. package/artifacts/contracts/common/interfaces/AddressWhitelistInterface.sol/AddressWhitelistInterface.json +69 -0
  82. package/artifacts/contracts/external/avm/AVM_CrossDomainEnabled.sol/AVM_CrossDomainEnabled.dbg.json +4 -0
  83. package/artifacts/contracts/external/avm/AVM_CrossDomainEnabled.sol/AVM_CrossDomainEnabled.json +42 -0
  84. package/artifacts/contracts/external/avm/interfaces/ArbSys.sol/ArbSys.dbg.json +4 -0
  85. package/artifacts/contracts/external/avm/interfaces/ArbSys.sol/ArbSys.json +235 -0
  86. package/artifacts/contracts/external/avm/interfaces/iArbitrum_Inbox.sol/IBridge.dbg.json +4 -0
  87. package/artifacts/contracts/external/avm/interfaces/iArbitrum_Inbox.sol/IBridge.json +24 -0
  88. package/artifacts/contracts/external/avm/interfaces/iArbitrum_Inbox.sol/iArbitrum_Inbox.dbg.json +4 -0
  89. package/artifacts/contracts/external/avm/interfaces/iArbitrum_Inbox.sol/iArbitrum_Inbox.json +78 -0
  90. package/artifacts/contracts/external/avm/interfaces/iArbitrum_Outbox.sol/iArbitrum_Outbox.dbg.json +4 -0
  91. package/artifacts/contracts/external/avm/interfaces/iArbitrum_Outbox.sol/iArbitrum_Outbox.json +24 -0
  92. package/artifacts/contracts/external/chainbridge/Bridge.sol/Bridge.dbg.json +4 -0
  93. package/artifacts/contracts/external/chainbridge/Bridge.sol/Bridge.json +1019 -0
  94. package/artifacts/contracts/external/chainbridge/handlers/GenericHandler.sol/GenericHandler.dbg.json +4 -0
  95. package/artifacts/contracts/external/chainbridge/handlers/GenericHandler.sol/GenericHandler.json +314 -0
  96. package/artifacts/contracts/external/chainbridge/interfaces/IBridge.sol/IBridge.dbg.json +4 -0
  97. package/artifacts/contracts/external/chainbridge/interfaces/IBridge.sol/IBridge.json +47 -0
  98. package/artifacts/contracts/external/chainbridge/interfaces/IDepositExecute.sol/IDepositExecute.dbg.json +4 -0
  99. package/artifacts/contracts/external/chainbridge/interfaces/IDepositExecute.sol/IDepositExecute.json +62 -0
  100. package/artifacts/contracts/external/chainbridge/interfaces/IERCHandler.sol/IERCHandler.dbg.json +4 -0
  101. package/artifacts/contracts/external/chainbridge/interfaces/IERCHandler.sol/IERCHandler.json +65 -0
  102. package/artifacts/contracts/external/chainbridge/interfaces/IGenericHandler.sol/IGenericHandler.dbg.json +4 -0
  103. package/artifacts/contracts/external/chainbridge/interfaces/IGenericHandler.sol/IGenericHandler.json +39 -0
  104. package/artifacts/contracts/external/ovm/OVM_CrossDomainEnabled.sol/OVM_CrossDomainEnabled.dbg.json +4 -0
  105. package/artifacts/contracts/external/ovm/OVM_CrossDomainEnabled.sol/OVM_CrossDomainEnabled.json +35 -0
  106. package/artifacts/contracts/external/ovm/OVM_CrossDomainEnabled.sol/iOVM_CrossDomainMessenger.dbg.json +4 -0
  107. package/artifacts/contracts/external/ovm/OVM_CrossDomainEnabled.sol/iOVM_CrossDomainMessenger.json +86 -0
  108. package/artifacts/contracts/external/polygon/lib/Merkle.sol/Merkle.dbg.json +4 -0
  109. package/artifacts/contracts/external/polygon/lib/Merkle.sol/Merkle.json +10 -0
  110. package/artifacts/contracts/external/polygon/lib/MerklePatriciaProof.sol/MerklePatriciaProof.dbg.json +4 -0
  111. package/artifacts/contracts/external/polygon/lib/MerklePatriciaProof.sol/MerklePatriciaProof.json +10 -0
  112. package/artifacts/contracts/external/polygon/lib/RLPReader.sol/RLPReader.dbg.json +4 -0
  113. package/artifacts/contracts/external/polygon/lib/RLPReader.sol/RLPReader.json +10 -0
  114. package/artifacts/contracts/external/polygon/test/FxChildMock.sol/FxChildMock.dbg.json +4 -0
  115. package/artifacts/contracts/external/polygon/test/FxChildMock.sol/FxChildMock.json +104 -0
  116. package/artifacts/contracts/external/polygon/test/FxChildMock.sol/IFxMessageProcessor.dbg.json +4 -0
  117. package/artifacts/contracts/external/polygon/test/FxChildMock.sol/IFxMessageProcessor.json +34 -0
  118. package/artifacts/contracts/external/polygon/test/FxChildMock.sol/IStateReceiver.dbg.json +4 -0
  119. package/artifacts/contracts/external/polygon/test/FxChildMock.sol/IStateReceiver.json +29 -0
  120. package/artifacts/contracts/external/polygon/test/FxRootMock.sol/FxRootMock.dbg.json +4 -0
  121. package/artifacts/contracts/external/polygon/test/FxRootMock.sol/FxRootMock.json +79 -0
  122. package/artifacts/contracts/external/polygon/test/FxRootMock.sol/IFxStateSender.dbg.json +4 -0
  123. package/artifacts/contracts/external/polygon/test/FxRootMock.sol/IFxStateSender.json +29 -0
  124. package/artifacts/contracts/external/polygon/test/FxRootMock.sol/IStateSender.dbg.json +4 -0
  125. package/artifacts/contracts/external/polygon/test/FxRootMock.sol/IStateSender.json +29 -0
  126. package/artifacts/contracts/external/polygon/test/StateSyncMock.sol/StateSyncMock.dbg.json +4 -0
  127. package/artifacts/contracts/external/polygon/test/StateSyncMock.sol/StateSyncMock.json +54 -0
  128. package/artifacts/contracts/external/polygon/tunnel/FxBaseChildTunnel.sol/FxBaseChildTunnel.dbg.json +4 -0
  129. package/artifacts/contracts/external/polygon/tunnel/FxBaseChildTunnel.sol/FxBaseChildTunnel.json +86 -0
  130. package/artifacts/contracts/external/polygon/tunnel/FxBaseChildTunnel.sol/IFxMessageProcessor.dbg.json +4 -0
  131. package/artifacts/contracts/external/polygon/tunnel/FxBaseChildTunnel.sol/IFxMessageProcessor.json +34 -0
  132. package/artifacts/contracts/external/polygon/tunnel/FxBaseRootTunnel.sol/FxBaseRootTunnel.dbg.json +4 -0
  133. package/artifacts/contracts/external/polygon/tunnel/FxBaseRootTunnel.sol/FxBaseRootTunnel.json +108 -0
  134. package/artifacts/contracts/external/polygon/tunnel/FxBaseRootTunnel.sol/ICheckpointManager.dbg.json +4 -0
  135. package/artifacts/contracts/external/polygon/tunnel/FxBaseRootTunnel.sol/ICheckpointManager.json +50 -0
  136. package/artifacts/contracts/external/polygon/tunnel/FxBaseRootTunnel.sol/IFxStateSender.dbg.json +4 -0
  137. package/artifacts/contracts/external/polygon/tunnel/FxBaseRootTunnel.sol/IFxStateSender.json +29 -0
  138. package/artifacts/contracts/insured-bridge/BridgeAdmin.sol/BridgeAdmin.dbg.json +4 -0
  139. package/artifacts/contracts/insured-bridge/BridgeAdmin.sol/BridgeAdmin.json +662 -0
  140. package/artifacts/contracts/insured-bridge/BridgeDepositBox.sol/BridgeDepositBox.dbg.json +4 -0
  141. package/artifacts/contracts/insured-bridge/BridgeDepositBox.sol/BridgeDepositBox.json +391 -0
  142. package/artifacts/contracts/insured-bridge/BridgeDepositBox.sol/TokenLike.dbg.json +4 -0
  143. package/artifacts/contracts/insured-bridge/BridgeDepositBox.sol/TokenLike.json +30 -0
  144. package/artifacts/contracts/insured-bridge/BridgeDepositBox.sol/WETH9Like.dbg.json +4 -0
  145. package/artifacts/contracts/insured-bridge/BridgeDepositBox.sol/WETH9Like.json +31 -0
  146. package/artifacts/contracts/insured-bridge/BridgePool.sol/BridgePool.dbg.json +4 -0
  147. package/artifacts/contracts/insured-bridge/BridgePool.sol/BridgePool.json +1709 -0
  148. package/artifacts/contracts/insured-bridge/BridgePool.sol/BridgePoolProd.dbg.json +4 -0
  149. package/artifacts/contracts/insured-bridge/BridgePool.sol/BridgePoolProd.json +1709 -0
  150. package/artifacts/contracts/insured-bridge/BridgePool.sol/WETH9Like.dbg.json +4 -0
  151. package/artifacts/contracts/insured-bridge/BridgePool.sol/WETH9Like.json +31 -0
  152. package/artifacts/contracts/insured-bridge/avm/AVM_BridgeDepositBox.sol/AVM_BridgeDepositBox.dbg.json +4 -0
  153. package/artifacts/contracts/insured-bridge/avm/AVM_BridgeDepositBox.sol/AVM_BridgeDepositBox.json +564 -0
  154. package/artifacts/contracts/insured-bridge/avm/AVM_BridgeDepositBox.sol/StandardBridgeLike.dbg.json +4 -0
  155. package/artifacts/contracts/insured-bridge/avm/AVM_BridgeDepositBox.sol/StandardBridgeLike.json +45 -0
  156. package/artifacts/contracts/insured-bridge/avm/Arbitrum_CrossDomainEnabled.sol/Arbitrum_CrossDomainEnabled.dbg.json +4 -0
  157. package/artifacts/contracts/insured-bridge/avm/Arbitrum_CrossDomainEnabled.sol/Arbitrum_CrossDomainEnabled.json +24 -0
  158. package/artifacts/contracts/insured-bridge/avm/Arbitrum_Messenger.sol/Arbitrum_Messenger.dbg.json +4 -0
  159. package/artifacts/contracts/insured-bridge/avm/Arbitrum_Messenger.sol/Arbitrum_Messenger.json +191 -0
  160. package/artifacts/contracts/insured-bridge/interfaces/BridgeAdminInterface.sol/BridgeAdminInterface.dbg.json +4 -0
  161. package/artifacts/contracts/insured-bridge/interfaces/BridgeAdminInterface.sol/BridgeAdminInterface.json +319 -0
  162. package/artifacts/contracts/insured-bridge/interfaces/BridgePoolInterface.sol/BridgePoolInterface.dbg.json +4 -0
  163. package/artifacts/contracts/insured-bridge/interfaces/BridgePoolInterface.sol/BridgePoolInterface.json +63 -0
  164. package/artifacts/contracts/insured-bridge/interfaces/MessengerInterface.sol/MessengerInterface.dbg.json +4 -0
  165. package/artifacts/contracts/insured-bridge/interfaces/MessengerInterface.sol/MessengerInterface.json +54 -0
  166. package/artifacts/contracts/insured-bridge/ovm/OVM_BridgeDepositBox.sol/OVM_BridgeDepositBox.dbg.json +4 -0
  167. package/artifacts/contracts/insured-bridge/ovm/OVM_BridgeDepositBox.sol/OVM_BridgeDepositBox.json +528 -0
  168. package/artifacts/contracts/insured-bridge/ovm/OVM_CrossDomainEnabled.sol/OVM_CrossDomainEnabled.dbg.json +4 -0
  169. package/artifacts/contracts/insured-bridge/ovm/OVM_CrossDomainEnabled.sol/OVM_CrossDomainEnabled.json +35 -0
  170. package/artifacts/contracts/insured-bridge/ovm/OVM_OETH_BridgeDepositBox.sol/OVM_OETH_BridgeDepositBox.dbg.json +4 -0
  171. package/artifacts/contracts/insured-bridge/ovm/OVM_OETH_BridgeDepositBox.sol/OVM_OETH_BridgeDepositBox.json +572 -0
  172. package/artifacts/contracts/insured-bridge/ovm/Optimism_Messenger.sol/Optimism_Messenger.dbg.json +4 -0
  173. package/artifacts/contracts/insured-bridge/ovm/Optimism_Messenger.sol/Optimism_Messenger.json +130 -0
  174. package/artifacts/contracts/insured-bridge/ovm/Optimism_Wrapper.sol/Optimism_Wrapper.dbg.json +4 -0
  175. package/artifacts/contracts/insured-bridge/ovm/Optimism_Wrapper.sol/Optimism_Wrapper.json +142 -0
  176. package/artifacts/contracts/insured-bridge/ovm/Optimism_Wrapper.sol/WETH9Like.dbg.json +4 -0
  177. package/artifacts/contracts/insured-bridge/ovm/Optimism_Wrapper.sol/WETH9Like.json +55 -0
  178. package/artifacts/contracts/insured-bridge/ovm/iOVM_CrossDomainMessenger.sol/iOVM_CrossDomainMessenger.dbg.json +4 -0
  179. package/artifacts/contracts/insured-bridge/ovm/iOVM_CrossDomainMessenger.sol/iOVM_CrossDomainMessenger.json +86 -0
  180. package/artifacts/contracts/insured-bridge/test/Arbitrum_InboxMock.sol/Arbitrum_BridgeMock.dbg.json +4 -0
  181. package/artifacts/contracts/insured-bridge/test/Arbitrum_InboxMock.sol/Arbitrum_BridgeMock.json +68 -0
  182. package/artifacts/contracts/insured-bridge/test/Arbitrum_InboxMock.sol/Arbitrum_InboxMock.dbg.json +4 -0
  183. package/artifacts/contracts/insured-bridge/test/Arbitrum_InboxMock.sol/Arbitrum_InboxMock.json +78 -0
  184. package/artifacts/contracts/insured-bridge/test/Arbitrum_InboxMock.sol/Arbitrum_OutboxMock.dbg.json +4 -0
  185. package/artifacts/contracts/insured-bridge/test/Arbitrum_InboxMock.sol/Arbitrum_OutboxMock.json +24 -0
  186. package/artifacts/contracts/insured-bridge/test/BridgeDepositBoxMock.sol/BridgeDepositBoxMock.dbg.json +4 -0
  187. package/artifacts/contracts/insured-bridge/test/BridgeDepositBoxMock.sol/BridgeDepositBoxMock.json +510 -0
  188. package/artifacts/contracts/insured-bridge/test/MessengerMock.sol/MessengerMock.dbg.json +4 -0
  189. package/artifacts/contracts/insured-bridge/test/MessengerMock.sol/MessengerMock.json +85 -0
  190. package/artifacts/contracts/insured-bridge/test/OVM_L1CrossDomainMessengerMock.sol/OVM_L1CrossDomainMessengerMock.dbg.json +4 -0
  191. package/artifacts/contracts/insured-bridge/test/OVM_L1CrossDomainMessengerMock.sol/OVM_L1CrossDomainMessengerMock.json +110 -0
  192. package/artifacts/contracts/oracle/implementation/Constants.sol/OptimisticOracleConstraints.dbg.json +4 -0
  193. package/artifacts/contracts/oracle/implementation/Constants.sol/OptimisticOracleConstraints.json +24 -0
  194. package/artifacts/contracts/oracle/implementation/Constants.sol/OracleInterfaces.dbg.json +4 -0
  195. package/artifacts/contracts/oracle/implementation/Constants.sol/OracleInterfaces.json +141 -0
  196. package/artifacts/contracts/oracle/interfaces/FinderInterface.sol/FinderInterface.dbg.json +4 -0
  197. package/artifacts/contracts/oracle/interfaces/FinderInterface.sol/FinderInterface.json +48 -0
  198. package/artifacts/contracts/oracle/interfaces/IdentifierWhitelistInterface.sol/IdentifierWhitelistInterface.dbg.json +4 -0
  199. package/artifacts/contracts/oracle/interfaces/IdentifierWhitelistInterface.sol/IdentifierWhitelistInterface.json +56 -0
  200. package/artifacts/contracts/oracle/interfaces/OptimisticOracleInterface.sol/OptimisticOracleInterface.dbg.json +4 -0
  201. package/artifacts/contracts/oracle/interfaces/OptimisticOracleInterface.sol/OptimisticOracleInterface.json +555 -0
  202. package/artifacts/contracts/oracle/interfaces/SkinnyOptimisticOracleInterface.sol/SkinnyOptimisticOracleInterface.dbg.json +4 -0
  203. package/artifacts/contracts/oracle/interfaces/SkinnyOptimisticOracleInterface.sol/SkinnyOptimisticOracleInterface.json +853 -0
  204. package/artifacts/contracts/oracle/interfaces/StoreInterface.sol/StoreInterface.dbg.json +4 -0
  205. package/artifacts/contracts/oracle/interfaces/StoreInterface.sol/StoreInterface.json +124 -0
  206. package/contracts/common/implementation/AncillaryData.sol +144 -0
  207. package/contracts/common/implementation/FixedPoint.sol +763 -0
  208. package/contracts/common/implementation/Lockable.sol +61 -0
  209. package/contracts/common/implementation/MultiCaller.sol +27 -0
  210. package/contracts/common/implementation/Testable.sol +52 -0
  211. package/contracts/common/implementation/Timer.sol +30 -0
  212. package/contracts/common/interfaces/AddressWhitelistInterface.sol +12 -0
  213. package/contracts/external/avm/AVM_CrossDomainEnabled.sol +43 -0
  214. package/contracts/external/avm/interfaces/ArbSys.sol +79 -0
  215. package/contracts/external/avm/interfaces/iArbitrum_Inbox.sol +28 -0
  216. package/contracts/external/avm/interfaces/iArbitrum_Outbox.sol +26 -0
  217. package/contracts/external/chainbridge/Bridge.sol +454 -0
  218. package/contracts/external/chainbridge/handlers/GenericHandler.sol +237 -0
  219. package/contracts/external/chainbridge/interfaces/IBridge.sol +20 -0
  220. package/contracts/external/chainbridge/interfaces/IDepositExecute.sol +29 -0
  221. package/contracts/external/chainbridge/interfaces/IERCHandler.sol +33 -0
  222. package/contracts/external/chainbridge/interfaces/IGenericHandler.sol +23 -0
  223. package/contracts/external/ovm/OVM_CrossDomainEnabled.sol +114 -0
  224. package/contracts/external/polygon/lib/Merkle.sol +36 -0
  225. package/contracts/external/polygon/lib/MerklePatriciaProof.sol +139 -0
  226. package/contracts/external/polygon/lib/RLPReader.sol +251 -0
  227. package/contracts/external/polygon/test/FxChildMock.sol +42 -0
  228. package/contracts/external/polygon/test/FxRootMock.sol +32 -0
  229. package/contracts/external/polygon/test/StateSyncMock.sol +26 -0
  230. package/contracts/external/polygon/tunnel/FxBaseChildTunnel.sol +80 -0
  231. package/contracts/external/polygon/tunnel/FxBaseRootTunnel.sol +185 -0
  232. package/contracts/insured-bridge/BridgeAdmin.sol +394 -0
  233. package/contracts/insured-bridge/BridgeDepositBox.sol +245 -0
  234. package/contracts/insured-bridge/BridgePool.sol +980 -0
  235. package/contracts/insured-bridge/avm/AVM_BridgeDepositBox.sol +144 -0
  236. package/contracts/insured-bridge/avm/Arbitrum_CrossDomainEnabled.sol +67 -0
  237. package/contracts/insured-bridge/avm/Arbitrum_Messenger.sol +72 -0
  238. package/contracts/insured-bridge/interfaces/BridgeAdminInterface.sol +44 -0
  239. package/contracts/insured-bridge/interfaces/BridgePoolInterface.sol +14 -0
  240. package/contracts/insured-bridge/interfaces/MessengerInterface.sol +18 -0
  241. package/contracts/insured-bridge/ovm/OVM_BridgeDepositBox.sol +135 -0
  242. package/contracts/insured-bridge/ovm/OVM_CrossDomainEnabled.sol +84 -0
  243. package/contracts/insured-bridge/ovm/OVM_OETH_BridgeDepositBox.sol +89 -0
  244. package/contracts/insured-bridge/ovm/Optimism_Messenger.sol +34 -0
  245. package/contracts/insured-bridge/ovm/Optimism_Wrapper.sol +59 -0
  246. package/contracts/insured-bridge/ovm/iOVM_CrossDomainMessenger.sol +41 -0
  247. package/contracts/insured-bridge/test/Arbitrum_InboxMock.sol +50 -0
  248. package/contracts/insured-bridge/test/BridgeDepositBoxMock.sol +113 -0
  249. package/contracts/insured-bridge/test/MessengerMock.sol +32 -0
  250. package/contracts/insured-bridge/test/OVM_L1CrossDomainMessengerMock.sol +16 -0
  251. package/contracts/oracle/implementation/Constants.sol +29 -0
  252. package/contracts/oracle/interfaces/FinderInterface.sol +22 -0
  253. package/contracts/oracle/interfaces/IdentifierWhitelistInterface.sol +28 -0
  254. package/contracts/oracle/interfaces/OptimisticOracleInterface.sol +263 -0
  255. package/contracts/oracle/interfaces/SkinnyOptimisticOracleInterface.sol +251 -0
  256. package/contracts/oracle/interfaces/StoreInterface.sol +46 -0
  257. package/package.json +60 -0
@@ -0,0 +1,1592 @@
1
+ {
2
+ "id": "1f738b56edd7602183f2f8d2f23f6e90",
3
+ "_format": "hh-sol-build-info-1",
4
+ "solcVersion": "0.8.9",
5
+ "solcLongVersion": "0.8.9+commit.e5eed63a",
6
+ "input": {
7
+ "language": "Solidity",
8
+ "sources": {
9
+ "contracts/external/polygon/test/StateSyncMock.sol": {
10
+ "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @notice Dummy State Sender contract to simulate plasma state sender while testing\n */\ncontract StateSyncMock {\n /**\n * @notice Event emitted when when syncState is called\n * @dev Heimdall bridge listens to this event and sends the data to receiver contract on child chain\n * @param id Id of the sync, increamented for each event in case of actual state sender contract\n * @param contractAddress the contract receiving data on child chain\n * @param data bytes data to be sent\n */\n event StateSynced(uint256 indexed id, address indexed contractAddress, bytes data);\n\n /**\n * @notice called to send data to child chain\n * @dev sender and receiver contracts need to be registered in case of actual state sender contract\n * @param receiver the contract receiving data on child chain\n * @param data bytes data to be sent\n */\n function syncState(address receiver, bytes calldata data) external {\n emit StateSynced(1, receiver, data);\n }\n}\n"
11
+ }
12
+ },
13
+ "settings": {
14
+ "optimizer": {
15
+ "enabled": true,
16
+ "runs": 1000000
17
+ },
18
+ "outputSelection": {
19
+ "*": {
20
+ "*": [
21
+ "abi",
22
+ "evm.bytecode",
23
+ "evm.deployedBytecode",
24
+ "evm.methodIdentifiers",
25
+ "metadata",
26
+ "devdoc",
27
+ "userdoc",
28
+ "storageLayout",
29
+ "evm.gasEstimates"
30
+ ],
31
+ "": [
32
+ "ast"
33
+ ]
34
+ }
35
+ },
36
+ "metadata": {
37
+ "useLiteralContent": true
38
+ }
39
+ }
40
+ },
41
+ "output": {
42
+ "contracts": {
43
+ "contracts/external/polygon/test/StateSyncMock.sol": {
44
+ "StateSyncMock": {
45
+ "abi": [
46
+ {
47
+ "anonymous": false,
48
+ "inputs": [
49
+ {
50
+ "indexed": true,
51
+ "internalType": "uint256",
52
+ "name": "id",
53
+ "type": "uint256"
54
+ },
55
+ {
56
+ "indexed": true,
57
+ "internalType": "address",
58
+ "name": "contractAddress",
59
+ "type": "address"
60
+ },
61
+ {
62
+ "indexed": false,
63
+ "internalType": "bytes",
64
+ "name": "data",
65
+ "type": "bytes"
66
+ }
67
+ ],
68
+ "name": "StateSynced",
69
+ "type": "event"
70
+ },
71
+ {
72
+ "inputs": [
73
+ {
74
+ "internalType": "address",
75
+ "name": "receiver",
76
+ "type": "address"
77
+ },
78
+ {
79
+ "internalType": "bytes",
80
+ "name": "data",
81
+ "type": "bytes"
82
+ }
83
+ ],
84
+ "name": "syncState",
85
+ "outputs": [],
86
+ "stateMutability": "nonpayable",
87
+ "type": "function"
88
+ }
89
+ ],
90
+ "devdoc": {
91
+ "events": {
92
+ "StateSynced(uint256,address,bytes)": {
93
+ "details": "Heimdall bridge listens to this event and sends the data to receiver contract on child chain",
94
+ "params": {
95
+ "contractAddress": "the contract receiving data on child chain",
96
+ "data": "bytes data to be sent",
97
+ "id": "Id of the sync, increamented for each event in case of actual state sender contract"
98
+ }
99
+ }
100
+ },
101
+ "kind": "dev",
102
+ "methods": {
103
+ "syncState(address,bytes)": {
104
+ "details": "sender and receiver contracts need to be registered in case of actual state sender contract",
105
+ "params": {
106
+ "data": "bytes data to be sent",
107
+ "receiver": "the contract receiving data on child chain"
108
+ }
109
+ }
110
+ },
111
+ "version": 1
112
+ },
113
+ "evm": {
114
+ "bytecode": {
115
+ "functionDebugData": {},
116
+ "generatedSources": [],
117
+ "linkReferences": {},
118
+ "object": "608060405234801561001057600080fd5b506101bd806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806316f1983114610030575b600080fd5b61004361003e36600461009c565b610045565b005b8273ffffffffffffffffffffffffffffffffffffffff1660017f103fed9db65eac19c4d870f49ab7520fe03b99f1838e5996caf47e9e43308392848460405161008f92919061013a565b60405180910390a3505050565b6000806000604084860312156100b157600080fd5b833573ffffffffffffffffffffffffffffffffffffffff811681146100d557600080fd5b9250602084013567ffffffffffffffff808211156100f257600080fd5b818601915086601f83011261010657600080fd5b81358181111561011557600080fd5b87602082850101111561012757600080fd5b6020830194508093505050509250925092565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010191905056fea2646970667358221220d3368aaf2c1cff1dce136e444cf85683aa8fb8b219c6f2e5f87a3e3bab05a33564736f6c63430008090033",
119
+ "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1BD DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x16F19831 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x3E CALLDATASIZE PUSH1 0x4 PUSH2 0x9C JUMP JUMPDEST PUSH2 0x45 JUMP JUMPDEST STOP JUMPDEST DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x1 PUSH32 0x103FED9DB65EAC19C4D870F49AB7520FE03B99F1838E5996CAF47E9E43308392 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH2 0x8F SWAP3 SWAP2 SWAP1 PUSH2 0x13A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x40 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xB1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xD5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xF2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x106 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0x115 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP8 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x127 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP5 POP DUP1 SWAP4 POP POP POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x20 DUP2 MSTORE DUP2 PUSH1 0x20 DUP3 ADD MSTORE DUP2 DUP4 PUSH1 0x40 DUP4 ADD CALLDATACOPY PUSH1 0x0 DUP2 DUP4 ADD PUSH1 0x40 SWAP1 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x1F SWAP1 SWAP3 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND ADD ADD SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD3 CALLDATASIZE DUP11 0xAF 0x2C SHR SELFDESTRUCT SAR 0xCE SGT PUSH15 0x444CF85683AA8FB8B219C6F2E5F87A RETURNDATACOPY EXTCODESIZE 0xAB SDIV LOG3 CALLDATALOAD PUSH5 0x736F6C6343 STOP ADDMOD MULMOD STOP CALLER ",
120
+ "sourceMap": "150:911:0:-:0;;;;;;;;;;;;;;;;;;;"
121
+ },
122
+ "deployedBytecode": {
123
+ "functionDebugData": {
124
+ "@syncState_26": {
125
+ "entryPoint": 69,
126
+ "id": 26,
127
+ "parameterSlots": 3,
128
+ "returnSlots": 0
129
+ },
130
+ "abi_decode_tuple_t_addresst_bytes_calldata_ptr": {
131
+ "entryPoint": 156,
132
+ "id": null,
133
+ "parameterSlots": 2,
134
+ "returnSlots": 3
135
+ },
136
+ "abi_encode_tuple_t_bytes_calldata_ptr__to_t_bytes_memory_ptr__fromStack_reversed": {
137
+ "entryPoint": 314,
138
+ "id": null,
139
+ "parameterSlots": 3,
140
+ "returnSlots": 1
141
+ }
142
+ },
143
+ "generatedSources": [
144
+ {
145
+ "ast": {
146
+ "nodeType": "YulBlock",
147
+ "src": "0:1256:1",
148
+ "statements": [
149
+ {
150
+ "nodeType": "YulBlock",
151
+ "src": "6:3:1",
152
+ "statements": []
153
+ },
154
+ {
155
+ "body": {
156
+ "nodeType": "YulBlock",
157
+ "src": "120:682:1",
158
+ "statements": [
159
+ {
160
+ "body": {
161
+ "nodeType": "YulBlock",
162
+ "src": "166:16:1",
163
+ "statements": [
164
+ {
165
+ "expression": {
166
+ "arguments": [
167
+ {
168
+ "kind": "number",
169
+ "nodeType": "YulLiteral",
170
+ "src": "175:1:1",
171
+ "type": "",
172
+ "value": "0"
173
+ },
174
+ {
175
+ "kind": "number",
176
+ "nodeType": "YulLiteral",
177
+ "src": "178:1:1",
178
+ "type": "",
179
+ "value": "0"
180
+ }
181
+ ],
182
+ "functionName": {
183
+ "name": "revert",
184
+ "nodeType": "YulIdentifier",
185
+ "src": "168:6:1"
186
+ },
187
+ "nodeType": "YulFunctionCall",
188
+ "src": "168:12:1"
189
+ },
190
+ "nodeType": "YulExpressionStatement",
191
+ "src": "168:12:1"
192
+ }
193
+ ]
194
+ },
195
+ "condition": {
196
+ "arguments": [
197
+ {
198
+ "arguments": [
199
+ {
200
+ "name": "dataEnd",
201
+ "nodeType": "YulIdentifier",
202
+ "src": "141:7:1"
203
+ },
204
+ {
205
+ "name": "headStart",
206
+ "nodeType": "YulIdentifier",
207
+ "src": "150:9:1"
208
+ }
209
+ ],
210
+ "functionName": {
211
+ "name": "sub",
212
+ "nodeType": "YulIdentifier",
213
+ "src": "137:3:1"
214
+ },
215
+ "nodeType": "YulFunctionCall",
216
+ "src": "137:23:1"
217
+ },
218
+ {
219
+ "kind": "number",
220
+ "nodeType": "YulLiteral",
221
+ "src": "162:2:1",
222
+ "type": "",
223
+ "value": "64"
224
+ }
225
+ ],
226
+ "functionName": {
227
+ "name": "slt",
228
+ "nodeType": "YulIdentifier",
229
+ "src": "133:3:1"
230
+ },
231
+ "nodeType": "YulFunctionCall",
232
+ "src": "133:32:1"
233
+ },
234
+ "nodeType": "YulIf",
235
+ "src": "130:52:1"
236
+ },
237
+ {
238
+ "nodeType": "YulVariableDeclaration",
239
+ "src": "191:36:1",
240
+ "value": {
241
+ "arguments": [
242
+ {
243
+ "name": "headStart",
244
+ "nodeType": "YulIdentifier",
245
+ "src": "217:9:1"
246
+ }
247
+ ],
248
+ "functionName": {
249
+ "name": "calldataload",
250
+ "nodeType": "YulIdentifier",
251
+ "src": "204:12:1"
252
+ },
253
+ "nodeType": "YulFunctionCall",
254
+ "src": "204:23:1"
255
+ },
256
+ "variables": [
257
+ {
258
+ "name": "value",
259
+ "nodeType": "YulTypedName",
260
+ "src": "195:5:1",
261
+ "type": ""
262
+ }
263
+ ]
264
+ },
265
+ {
266
+ "body": {
267
+ "nodeType": "YulBlock",
268
+ "src": "313:16:1",
269
+ "statements": [
270
+ {
271
+ "expression": {
272
+ "arguments": [
273
+ {
274
+ "kind": "number",
275
+ "nodeType": "YulLiteral",
276
+ "src": "322:1:1",
277
+ "type": "",
278
+ "value": "0"
279
+ },
280
+ {
281
+ "kind": "number",
282
+ "nodeType": "YulLiteral",
283
+ "src": "325:1:1",
284
+ "type": "",
285
+ "value": "0"
286
+ }
287
+ ],
288
+ "functionName": {
289
+ "name": "revert",
290
+ "nodeType": "YulIdentifier",
291
+ "src": "315:6:1"
292
+ },
293
+ "nodeType": "YulFunctionCall",
294
+ "src": "315:12:1"
295
+ },
296
+ "nodeType": "YulExpressionStatement",
297
+ "src": "315:12:1"
298
+ }
299
+ ]
300
+ },
301
+ "condition": {
302
+ "arguments": [
303
+ {
304
+ "arguments": [
305
+ {
306
+ "name": "value",
307
+ "nodeType": "YulIdentifier",
308
+ "src": "249:5:1"
309
+ },
310
+ {
311
+ "arguments": [
312
+ {
313
+ "name": "value",
314
+ "nodeType": "YulIdentifier",
315
+ "src": "260:5:1"
316
+ },
317
+ {
318
+ "kind": "number",
319
+ "nodeType": "YulLiteral",
320
+ "src": "267:42:1",
321
+ "type": "",
322
+ "value": "0xffffffffffffffffffffffffffffffffffffffff"
323
+ }
324
+ ],
325
+ "functionName": {
326
+ "name": "and",
327
+ "nodeType": "YulIdentifier",
328
+ "src": "256:3:1"
329
+ },
330
+ "nodeType": "YulFunctionCall",
331
+ "src": "256:54:1"
332
+ }
333
+ ],
334
+ "functionName": {
335
+ "name": "eq",
336
+ "nodeType": "YulIdentifier",
337
+ "src": "246:2:1"
338
+ },
339
+ "nodeType": "YulFunctionCall",
340
+ "src": "246:65:1"
341
+ }
342
+ ],
343
+ "functionName": {
344
+ "name": "iszero",
345
+ "nodeType": "YulIdentifier",
346
+ "src": "239:6:1"
347
+ },
348
+ "nodeType": "YulFunctionCall",
349
+ "src": "239:73:1"
350
+ },
351
+ "nodeType": "YulIf",
352
+ "src": "236:93:1"
353
+ },
354
+ {
355
+ "nodeType": "YulAssignment",
356
+ "src": "338:15:1",
357
+ "value": {
358
+ "name": "value",
359
+ "nodeType": "YulIdentifier",
360
+ "src": "348:5:1"
361
+ },
362
+ "variableNames": [
363
+ {
364
+ "name": "value0",
365
+ "nodeType": "YulIdentifier",
366
+ "src": "338:6:1"
367
+ }
368
+ ]
369
+ },
370
+ {
371
+ "nodeType": "YulVariableDeclaration",
372
+ "src": "362:46:1",
373
+ "value": {
374
+ "arguments": [
375
+ {
376
+ "arguments": [
377
+ {
378
+ "name": "headStart",
379
+ "nodeType": "YulIdentifier",
380
+ "src": "393:9:1"
381
+ },
382
+ {
383
+ "kind": "number",
384
+ "nodeType": "YulLiteral",
385
+ "src": "404:2:1",
386
+ "type": "",
387
+ "value": "32"
388
+ }
389
+ ],
390
+ "functionName": {
391
+ "name": "add",
392
+ "nodeType": "YulIdentifier",
393
+ "src": "389:3:1"
394
+ },
395
+ "nodeType": "YulFunctionCall",
396
+ "src": "389:18:1"
397
+ }
398
+ ],
399
+ "functionName": {
400
+ "name": "calldataload",
401
+ "nodeType": "YulIdentifier",
402
+ "src": "376:12:1"
403
+ },
404
+ "nodeType": "YulFunctionCall",
405
+ "src": "376:32:1"
406
+ },
407
+ "variables": [
408
+ {
409
+ "name": "offset",
410
+ "nodeType": "YulTypedName",
411
+ "src": "366:6:1",
412
+ "type": ""
413
+ }
414
+ ]
415
+ },
416
+ {
417
+ "nodeType": "YulVariableDeclaration",
418
+ "src": "417:28:1",
419
+ "value": {
420
+ "kind": "number",
421
+ "nodeType": "YulLiteral",
422
+ "src": "427:18:1",
423
+ "type": "",
424
+ "value": "0xffffffffffffffff"
425
+ },
426
+ "variables": [
427
+ {
428
+ "name": "_1",
429
+ "nodeType": "YulTypedName",
430
+ "src": "421:2:1",
431
+ "type": ""
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "body": {
437
+ "nodeType": "YulBlock",
438
+ "src": "472:16:1",
439
+ "statements": [
440
+ {
441
+ "expression": {
442
+ "arguments": [
443
+ {
444
+ "kind": "number",
445
+ "nodeType": "YulLiteral",
446
+ "src": "481:1:1",
447
+ "type": "",
448
+ "value": "0"
449
+ },
450
+ {
451
+ "kind": "number",
452
+ "nodeType": "YulLiteral",
453
+ "src": "484:1:1",
454
+ "type": "",
455
+ "value": "0"
456
+ }
457
+ ],
458
+ "functionName": {
459
+ "name": "revert",
460
+ "nodeType": "YulIdentifier",
461
+ "src": "474:6:1"
462
+ },
463
+ "nodeType": "YulFunctionCall",
464
+ "src": "474:12:1"
465
+ },
466
+ "nodeType": "YulExpressionStatement",
467
+ "src": "474:12:1"
468
+ }
469
+ ]
470
+ },
471
+ "condition": {
472
+ "arguments": [
473
+ {
474
+ "name": "offset",
475
+ "nodeType": "YulIdentifier",
476
+ "src": "460:6:1"
477
+ },
478
+ {
479
+ "name": "_1",
480
+ "nodeType": "YulIdentifier",
481
+ "src": "468:2:1"
482
+ }
483
+ ],
484
+ "functionName": {
485
+ "name": "gt",
486
+ "nodeType": "YulIdentifier",
487
+ "src": "457:2:1"
488
+ },
489
+ "nodeType": "YulFunctionCall",
490
+ "src": "457:14:1"
491
+ },
492
+ "nodeType": "YulIf",
493
+ "src": "454:34:1"
494
+ },
495
+ {
496
+ "nodeType": "YulVariableDeclaration",
497
+ "src": "497:32:1",
498
+ "value": {
499
+ "arguments": [
500
+ {
501
+ "name": "headStart",
502
+ "nodeType": "YulIdentifier",
503
+ "src": "511:9:1"
504
+ },
505
+ {
506
+ "name": "offset",
507
+ "nodeType": "YulIdentifier",
508
+ "src": "522:6:1"
509
+ }
510
+ ],
511
+ "functionName": {
512
+ "name": "add",
513
+ "nodeType": "YulIdentifier",
514
+ "src": "507:3:1"
515
+ },
516
+ "nodeType": "YulFunctionCall",
517
+ "src": "507:22:1"
518
+ },
519
+ "variables": [
520
+ {
521
+ "name": "_2",
522
+ "nodeType": "YulTypedName",
523
+ "src": "501:2:1",
524
+ "type": ""
525
+ }
526
+ ]
527
+ },
528
+ {
529
+ "body": {
530
+ "nodeType": "YulBlock",
531
+ "src": "577:16:1",
532
+ "statements": [
533
+ {
534
+ "expression": {
535
+ "arguments": [
536
+ {
537
+ "kind": "number",
538
+ "nodeType": "YulLiteral",
539
+ "src": "586:1:1",
540
+ "type": "",
541
+ "value": "0"
542
+ },
543
+ {
544
+ "kind": "number",
545
+ "nodeType": "YulLiteral",
546
+ "src": "589:1:1",
547
+ "type": "",
548
+ "value": "0"
549
+ }
550
+ ],
551
+ "functionName": {
552
+ "name": "revert",
553
+ "nodeType": "YulIdentifier",
554
+ "src": "579:6:1"
555
+ },
556
+ "nodeType": "YulFunctionCall",
557
+ "src": "579:12:1"
558
+ },
559
+ "nodeType": "YulExpressionStatement",
560
+ "src": "579:12:1"
561
+ }
562
+ ]
563
+ },
564
+ "condition": {
565
+ "arguments": [
566
+ {
567
+ "arguments": [
568
+ {
569
+ "arguments": [
570
+ {
571
+ "name": "_2",
572
+ "nodeType": "YulIdentifier",
573
+ "src": "556:2:1"
574
+ },
575
+ {
576
+ "kind": "number",
577
+ "nodeType": "YulLiteral",
578
+ "src": "560:4:1",
579
+ "type": "",
580
+ "value": "0x1f"
581
+ }
582
+ ],
583
+ "functionName": {
584
+ "name": "add",
585
+ "nodeType": "YulIdentifier",
586
+ "src": "552:3:1"
587
+ },
588
+ "nodeType": "YulFunctionCall",
589
+ "src": "552:13:1"
590
+ },
591
+ {
592
+ "name": "dataEnd",
593
+ "nodeType": "YulIdentifier",
594
+ "src": "567:7:1"
595
+ }
596
+ ],
597
+ "functionName": {
598
+ "name": "slt",
599
+ "nodeType": "YulIdentifier",
600
+ "src": "548:3:1"
601
+ },
602
+ "nodeType": "YulFunctionCall",
603
+ "src": "548:27:1"
604
+ }
605
+ ],
606
+ "functionName": {
607
+ "name": "iszero",
608
+ "nodeType": "YulIdentifier",
609
+ "src": "541:6:1"
610
+ },
611
+ "nodeType": "YulFunctionCall",
612
+ "src": "541:35:1"
613
+ },
614
+ "nodeType": "YulIf",
615
+ "src": "538:55:1"
616
+ },
617
+ {
618
+ "nodeType": "YulVariableDeclaration",
619
+ "src": "602:30:1",
620
+ "value": {
621
+ "arguments": [
622
+ {
623
+ "name": "_2",
624
+ "nodeType": "YulIdentifier",
625
+ "src": "629:2:1"
626
+ }
627
+ ],
628
+ "functionName": {
629
+ "name": "calldataload",
630
+ "nodeType": "YulIdentifier",
631
+ "src": "616:12:1"
632
+ },
633
+ "nodeType": "YulFunctionCall",
634
+ "src": "616:16:1"
635
+ },
636
+ "variables": [
637
+ {
638
+ "name": "length",
639
+ "nodeType": "YulTypedName",
640
+ "src": "606:6:1",
641
+ "type": ""
642
+ }
643
+ ]
644
+ },
645
+ {
646
+ "body": {
647
+ "nodeType": "YulBlock",
648
+ "src": "659:16:1",
649
+ "statements": [
650
+ {
651
+ "expression": {
652
+ "arguments": [
653
+ {
654
+ "kind": "number",
655
+ "nodeType": "YulLiteral",
656
+ "src": "668:1:1",
657
+ "type": "",
658
+ "value": "0"
659
+ },
660
+ {
661
+ "kind": "number",
662
+ "nodeType": "YulLiteral",
663
+ "src": "671:1:1",
664
+ "type": "",
665
+ "value": "0"
666
+ }
667
+ ],
668
+ "functionName": {
669
+ "name": "revert",
670
+ "nodeType": "YulIdentifier",
671
+ "src": "661:6:1"
672
+ },
673
+ "nodeType": "YulFunctionCall",
674
+ "src": "661:12:1"
675
+ },
676
+ "nodeType": "YulExpressionStatement",
677
+ "src": "661:12:1"
678
+ }
679
+ ]
680
+ },
681
+ "condition": {
682
+ "arguments": [
683
+ {
684
+ "name": "length",
685
+ "nodeType": "YulIdentifier",
686
+ "src": "647:6:1"
687
+ },
688
+ {
689
+ "name": "_1",
690
+ "nodeType": "YulIdentifier",
691
+ "src": "655:2:1"
692
+ }
693
+ ],
694
+ "functionName": {
695
+ "name": "gt",
696
+ "nodeType": "YulIdentifier",
697
+ "src": "644:2:1"
698
+ },
699
+ "nodeType": "YulFunctionCall",
700
+ "src": "644:14:1"
701
+ },
702
+ "nodeType": "YulIf",
703
+ "src": "641:34:1"
704
+ },
705
+ {
706
+ "body": {
707
+ "nodeType": "YulBlock",
708
+ "src": "725:16:1",
709
+ "statements": [
710
+ {
711
+ "expression": {
712
+ "arguments": [
713
+ {
714
+ "kind": "number",
715
+ "nodeType": "YulLiteral",
716
+ "src": "734:1:1",
717
+ "type": "",
718
+ "value": "0"
719
+ },
720
+ {
721
+ "kind": "number",
722
+ "nodeType": "YulLiteral",
723
+ "src": "737:1:1",
724
+ "type": "",
725
+ "value": "0"
726
+ }
727
+ ],
728
+ "functionName": {
729
+ "name": "revert",
730
+ "nodeType": "YulIdentifier",
731
+ "src": "727:6:1"
732
+ },
733
+ "nodeType": "YulFunctionCall",
734
+ "src": "727:12:1"
735
+ },
736
+ "nodeType": "YulExpressionStatement",
737
+ "src": "727:12:1"
738
+ }
739
+ ]
740
+ },
741
+ "condition": {
742
+ "arguments": [
743
+ {
744
+ "arguments": [
745
+ {
746
+ "arguments": [
747
+ {
748
+ "name": "_2",
749
+ "nodeType": "YulIdentifier",
750
+ "src": "698:2:1"
751
+ },
752
+ {
753
+ "name": "length",
754
+ "nodeType": "YulIdentifier",
755
+ "src": "702:6:1"
756
+ }
757
+ ],
758
+ "functionName": {
759
+ "name": "add",
760
+ "nodeType": "YulIdentifier",
761
+ "src": "694:3:1"
762
+ },
763
+ "nodeType": "YulFunctionCall",
764
+ "src": "694:15:1"
765
+ },
766
+ {
767
+ "kind": "number",
768
+ "nodeType": "YulLiteral",
769
+ "src": "711:2:1",
770
+ "type": "",
771
+ "value": "32"
772
+ }
773
+ ],
774
+ "functionName": {
775
+ "name": "add",
776
+ "nodeType": "YulIdentifier",
777
+ "src": "690:3:1"
778
+ },
779
+ "nodeType": "YulFunctionCall",
780
+ "src": "690:24:1"
781
+ },
782
+ {
783
+ "name": "dataEnd",
784
+ "nodeType": "YulIdentifier",
785
+ "src": "716:7:1"
786
+ }
787
+ ],
788
+ "functionName": {
789
+ "name": "gt",
790
+ "nodeType": "YulIdentifier",
791
+ "src": "687:2:1"
792
+ },
793
+ "nodeType": "YulFunctionCall",
794
+ "src": "687:37:1"
795
+ },
796
+ "nodeType": "YulIf",
797
+ "src": "684:57:1"
798
+ },
799
+ {
800
+ "nodeType": "YulAssignment",
801
+ "src": "750:21:1",
802
+ "value": {
803
+ "arguments": [
804
+ {
805
+ "name": "_2",
806
+ "nodeType": "YulIdentifier",
807
+ "src": "764:2:1"
808
+ },
809
+ {
810
+ "kind": "number",
811
+ "nodeType": "YulLiteral",
812
+ "src": "768:2:1",
813
+ "type": "",
814
+ "value": "32"
815
+ }
816
+ ],
817
+ "functionName": {
818
+ "name": "add",
819
+ "nodeType": "YulIdentifier",
820
+ "src": "760:3:1"
821
+ },
822
+ "nodeType": "YulFunctionCall",
823
+ "src": "760:11:1"
824
+ },
825
+ "variableNames": [
826
+ {
827
+ "name": "value1",
828
+ "nodeType": "YulIdentifier",
829
+ "src": "750:6:1"
830
+ }
831
+ ]
832
+ },
833
+ {
834
+ "nodeType": "YulAssignment",
835
+ "src": "780:16:1",
836
+ "value": {
837
+ "name": "length",
838
+ "nodeType": "YulIdentifier",
839
+ "src": "790:6:1"
840
+ },
841
+ "variableNames": [
842
+ {
843
+ "name": "value2",
844
+ "nodeType": "YulIdentifier",
845
+ "src": "780:6:1"
846
+ }
847
+ ]
848
+ }
849
+ ]
850
+ },
851
+ "name": "abi_decode_tuple_t_addresst_bytes_calldata_ptr",
852
+ "nodeType": "YulFunctionDefinition",
853
+ "parameters": [
854
+ {
855
+ "name": "headStart",
856
+ "nodeType": "YulTypedName",
857
+ "src": "70:9:1",
858
+ "type": ""
859
+ },
860
+ {
861
+ "name": "dataEnd",
862
+ "nodeType": "YulTypedName",
863
+ "src": "81:7:1",
864
+ "type": ""
865
+ }
866
+ ],
867
+ "returnVariables": [
868
+ {
869
+ "name": "value0",
870
+ "nodeType": "YulTypedName",
871
+ "src": "93:6:1",
872
+ "type": ""
873
+ },
874
+ {
875
+ "name": "value1",
876
+ "nodeType": "YulTypedName",
877
+ "src": "101:6:1",
878
+ "type": ""
879
+ },
880
+ {
881
+ "name": "value2",
882
+ "nodeType": "YulTypedName",
883
+ "src": "109:6:1",
884
+ "type": ""
885
+ }
886
+ ],
887
+ "src": "14:788:1"
888
+ },
889
+ {
890
+ "body": {
891
+ "nodeType": "YulBlock",
892
+ "src": "936:318:1",
893
+ "statements": [
894
+ {
895
+ "expression": {
896
+ "arguments": [
897
+ {
898
+ "name": "headStart",
899
+ "nodeType": "YulIdentifier",
900
+ "src": "953:9:1"
901
+ },
902
+ {
903
+ "kind": "number",
904
+ "nodeType": "YulLiteral",
905
+ "src": "964:2:1",
906
+ "type": "",
907
+ "value": "32"
908
+ }
909
+ ],
910
+ "functionName": {
911
+ "name": "mstore",
912
+ "nodeType": "YulIdentifier",
913
+ "src": "946:6:1"
914
+ },
915
+ "nodeType": "YulFunctionCall",
916
+ "src": "946:21:1"
917
+ },
918
+ "nodeType": "YulExpressionStatement",
919
+ "src": "946:21:1"
920
+ },
921
+ {
922
+ "expression": {
923
+ "arguments": [
924
+ {
925
+ "arguments": [
926
+ {
927
+ "name": "headStart",
928
+ "nodeType": "YulIdentifier",
929
+ "src": "987:9:1"
930
+ },
931
+ {
932
+ "kind": "number",
933
+ "nodeType": "YulLiteral",
934
+ "src": "998:2:1",
935
+ "type": "",
936
+ "value": "32"
937
+ }
938
+ ],
939
+ "functionName": {
940
+ "name": "add",
941
+ "nodeType": "YulIdentifier",
942
+ "src": "983:3:1"
943
+ },
944
+ "nodeType": "YulFunctionCall",
945
+ "src": "983:18:1"
946
+ },
947
+ {
948
+ "name": "value1",
949
+ "nodeType": "YulIdentifier",
950
+ "src": "1003:6:1"
951
+ }
952
+ ],
953
+ "functionName": {
954
+ "name": "mstore",
955
+ "nodeType": "YulIdentifier",
956
+ "src": "976:6:1"
957
+ },
958
+ "nodeType": "YulFunctionCall",
959
+ "src": "976:34:1"
960
+ },
961
+ "nodeType": "YulExpressionStatement",
962
+ "src": "976:34:1"
963
+ },
964
+ {
965
+ "expression": {
966
+ "arguments": [
967
+ {
968
+ "arguments": [
969
+ {
970
+ "name": "headStart",
971
+ "nodeType": "YulIdentifier",
972
+ "src": "1036:9:1"
973
+ },
974
+ {
975
+ "kind": "number",
976
+ "nodeType": "YulLiteral",
977
+ "src": "1047:2:1",
978
+ "type": "",
979
+ "value": "64"
980
+ }
981
+ ],
982
+ "functionName": {
983
+ "name": "add",
984
+ "nodeType": "YulIdentifier",
985
+ "src": "1032:3:1"
986
+ },
987
+ "nodeType": "YulFunctionCall",
988
+ "src": "1032:18:1"
989
+ },
990
+ {
991
+ "name": "value0",
992
+ "nodeType": "YulIdentifier",
993
+ "src": "1052:6:1"
994
+ },
995
+ {
996
+ "name": "value1",
997
+ "nodeType": "YulIdentifier",
998
+ "src": "1060:6:1"
999
+ }
1000
+ ],
1001
+ "functionName": {
1002
+ "name": "calldatacopy",
1003
+ "nodeType": "YulIdentifier",
1004
+ "src": "1019:12:1"
1005
+ },
1006
+ "nodeType": "YulFunctionCall",
1007
+ "src": "1019:48:1"
1008
+ },
1009
+ "nodeType": "YulExpressionStatement",
1010
+ "src": "1019:48:1"
1011
+ },
1012
+ {
1013
+ "expression": {
1014
+ "arguments": [
1015
+ {
1016
+ "arguments": [
1017
+ {
1018
+ "arguments": [
1019
+ {
1020
+ "name": "headStart",
1021
+ "nodeType": "YulIdentifier",
1022
+ "src": "1091:9:1"
1023
+ },
1024
+ {
1025
+ "name": "value1",
1026
+ "nodeType": "YulIdentifier",
1027
+ "src": "1102:6:1"
1028
+ }
1029
+ ],
1030
+ "functionName": {
1031
+ "name": "add",
1032
+ "nodeType": "YulIdentifier",
1033
+ "src": "1087:3:1"
1034
+ },
1035
+ "nodeType": "YulFunctionCall",
1036
+ "src": "1087:22:1"
1037
+ },
1038
+ {
1039
+ "kind": "number",
1040
+ "nodeType": "YulLiteral",
1041
+ "src": "1111:2:1",
1042
+ "type": "",
1043
+ "value": "64"
1044
+ }
1045
+ ],
1046
+ "functionName": {
1047
+ "name": "add",
1048
+ "nodeType": "YulIdentifier",
1049
+ "src": "1083:3:1"
1050
+ },
1051
+ "nodeType": "YulFunctionCall",
1052
+ "src": "1083:31:1"
1053
+ },
1054
+ {
1055
+ "kind": "number",
1056
+ "nodeType": "YulLiteral",
1057
+ "src": "1116:1:1",
1058
+ "type": "",
1059
+ "value": "0"
1060
+ }
1061
+ ],
1062
+ "functionName": {
1063
+ "name": "mstore",
1064
+ "nodeType": "YulIdentifier",
1065
+ "src": "1076:6:1"
1066
+ },
1067
+ "nodeType": "YulFunctionCall",
1068
+ "src": "1076:42:1"
1069
+ },
1070
+ "nodeType": "YulExpressionStatement",
1071
+ "src": "1076:42:1"
1072
+ },
1073
+ {
1074
+ "nodeType": "YulAssignment",
1075
+ "src": "1127:121:1",
1076
+ "value": {
1077
+ "arguments": [
1078
+ {
1079
+ "arguments": [
1080
+ {
1081
+ "name": "headStart",
1082
+ "nodeType": "YulIdentifier",
1083
+ "src": "1143:9:1"
1084
+ },
1085
+ {
1086
+ "arguments": [
1087
+ {
1088
+ "arguments": [
1089
+ {
1090
+ "name": "value1",
1091
+ "nodeType": "YulIdentifier",
1092
+ "src": "1162:6:1"
1093
+ },
1094
+ {
1095
+ "kind": "number",
1096
+ "nodeType": "YulLiteral",
1097
+ "src": "1170:2:1",
1098
+ "type": "",
1099
+ "value": "31"
1100
+ }
1101
+ ],
1102
+ "functionName": {
1103
+ "name": "add",
1104
+ "nodeType": "YulIdentifier",
1105
+ "src": "1158:3:1"
1106
+ },
1107
+ "nodeType": "YulFunctionCall",
1108
+ "src": "1158:15:1"
1109
+ },
1110
+ {
1111
+ "kind": "number",
1112
+ "nodeType": "YulLiteral",
1113
+ "src": "1175:66:1",
1114
+ "type": "",
1115
+ "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0"
1116
+ }
1117
+ ],
1118
+ "functionName": {
1119
+ "name": "and",
1120
+ "nodeType": "YulIdentifier",
1121
+ "src": "1154:3:1"
1122
+ },
1123
+ "nodeType": "YulFunctionCall",
1124
+ "src": "1154:88:1"
1125
+ }
1126
+ ],
1127
+ "functionName": {
1128
+ "name": "add",
1129
+ "nodeType": "YulIdentifier",
1130
+ "src": "1139:3:1"
1131
+ },
1132
+ "nodeType": "YulFunctionCall",
1133
+ "src": "1139:104:1"
1134
+ },
1135
+ {
1136
+ "kind": "number",
1137
+ "nodeType": "YulLiteral",
1138
+ "src": "1245:2:1",
1139
+ "type": "",
1140
+ "value": "64"
1141
+ }
1142
+ ],
1143
+ "functionName": {
1144
+ "name": "add",
1145
+ "nodeType": "YulIdentifier",
1146
+ "src": "1135:3:1"
1147
+ },
1148
+ "nodeType": "YulFunctionCall",
1149
+ "src": "1135:113:1"
1150
+ },
1151
+ "variableNames": [
1152
+ {
1153
+ "name": "tail",
1154
+ "nodeType": "YulIdentifier",
1155
+ "src": "1127:4:1"
1156
+ }
1157
+ ]
1158
+ }
1159
+ ]
1160
+ },
1161
+ "name": "abi_encode_tuple_t_bytes_calldata_ptr__to_t_bytes_memory_ptr__fromStack_reversed",
1162
+ "nodeType": "YulFunctionDefinition",
1163
+ "parameters": [
1164
+ {
1165
+ "name": "headStart",
1166
+ "nodeType": "YulTypedName",
1167
+ "src": "897:9:1",
1168
+ "type": ""
1169
+ },
1170
+ {
1171
+ "name": "value1",
1172
+ "nodeType": "YulTypedName",
1173
+ "src": "908:6:1",
1174
+ "type": ""
1175
+ },
1176
+ {
1177
+ "name": "value0",
1178
+ "nodeType": "YulTypedName",
1179
+ "src": "916:6:1",
1180
+ "type": ""
1181
+ }
1182
+ ],
1183
+ "returnVariables": [
1184
+ {
1185
+ "name": "tail",
1186
+ "nodeType": "YulTypedName",
1187
+ "src": "927:4:1",
1188
+ "type": ""
1189
+ }
1190
+ ],
1191
+ "src": "807:447:1"
1192
+ }
1193
+ ]
1194
+ },
1195
+ "contents": "{\n { }\n function abi_decode_tuple_t_addresst_bytes_calldata_ptr(headStart, dataEnd) -> value0, value1, value2\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n let value := calldataload(headStart)\n if iszero(eq(value, and(value, 0xffffffffffffffffffffffffffffffffffffffff))) { revert(0, 0) }\n value0 := value\n let offset := calldataload(add(headStart, 32))\n let _1 := 0xffffffffffffffff\n if gt(offset, _1) { revert(0, 0) }\n let _2 := add(headStart, offset)\n if iszero(slt(add(_2, 0x1f), dataEnd)) { revert(0, 0) }\n let length := calldataload(_2)\n if gt(length, _1) { revert(0, 0) }\n if gt(add(add(_2, length), 32), dataEnd) { revert(0, 0) }\n value1 := add(_2, 32)\n value2 := length\n }\n function abi_encode_tuple_t_bytes_calldata_ptr__to_t_bytes_memory_ptr__fromStack_reversed(headStart, value1, value0) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), value1)\n calldatacopy(add(headStart, 64), value0, value1)\n mstore(add(add(headStart, value1), 64), 0)\n tail := add(add(headStart, and(add(value1, 31), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0)), 64)\n }\n}",
1196
+ "id": 1,
1197
+ "language": "Yul",
1198
+ "name": "#utility.yul"
1199
+ }
1200
+ ],
1201
+ "immutableReferences": {},
1202
+ "linkReferences": {},
1203
+ "object": "608060405234801561001057600080fd5b506004361061002b5760003560e01c806316f1983114610030575b600080fd5b61004361003e36600461009c565b610045565b005b8273ffffffffffffffffffffffffffffffffffffffff1660017f103fed9db65eac19c4d870f49ab7520fe03b99f1838e5996caf47e9e43308392848460405161008f92919061013a565b60405180910390a3505050565b6000806000604084860312156100b157600080fd5b833573ffffffffffffffffffffffffffffffffffffffff811681146100d557600080fd5b9250602084013567ffffffffffffffff808211156100f257600080fd5b818601915086601f83011261010657600080fd5b81358181111561011557600080fd5b87602082850101111561012757600080fd5b6020830194508093505050509250925092565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010191905056fea2646970667358221220d3368aaf2c1cff1dce136e444cf85683aa8fb8b219c6f2e5f87a3e3bab05a33564736f6c63430008090033",
1204
+ "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x16F19831 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x3E CALLDATASIZE PUSH1 0x4 PUSH2 0x9C JUMP JUMPDEST PUSH2 0x45 JUMP JUMPDEST STOP JUMPDEST DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x1 PUSH32 0x103FED9DB65EAC19C4D870F49AB7520FE03B99F1838E5996CAF47E9E43308392 DUP5 DUP5 PUSH1 0x40 MLOAD PUSH2 0x8F SWAP3 SWAP2 SWAP1 PUSH2 0x13A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x40 DUP5 DUP7 SUB SLT ISZERO PUSH2 0xB1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0xD5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 POP PUSH1 0x20 DUP5 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP1 DUP3 GT ISZERO PUSH2 0xF2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 DUP7 ADD SWAP2 POP DUP7 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x106 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD DUP2 DUP2 GT ISZERO PUSH2 0x115 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP8 PUSH1 0x20 DUP3 DUP6 ADD ADD GT ISZERO PUSH2 0x127 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 DUP4 ADD SWAP5 POP DUP1 SWAP4 POP POP POP POP SWAP3 POP SWAP3 POP SWAP3 JUMP JUMPDEST PUSH1 0x20 DUP2 MSTORE DUP2 PUSH1 0x20 DUP3 ADD MSTORE DUP2 DUP4 PUSH1 0x40 DUP4 ADD CALLDATACOPY PUSH1 0x0 DUP2 DUP4 ADD PUSH1 0x40 SWAP1 DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x1F SWAP1 SWAP3 ADD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 AND ADD ADD SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xD3 CALLDATASIZE DUP11 0xAF 0x2C SHR SELFDESTRUCT SAR 0xCE SGT PUSH15 0x444CF85683AA8FB8B219C6F2E5F87A RETURNDATACOPY EXTCODESIZE 0xAB SDIV LOG3 CALLDATALOAD PUSH5 0x736F6C6343 STOP ADDMOD MULMOD STOP CALLER ",
1205
+ "sourceMap": "150:911:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;940:119;;;;;;:::i;:::-;;:::i;:::-;;;1037:8;1022:30;;1034:1;1022:30;1047:4;;1022:30;;;;;;;:::i;:::-;;;;;;;;940:119;;;:::o;14:788:1:-;93:6;101;109;162:2;150:9;141:7;137:23;133:32;130:52;;;178:1;175;168:12;130:52;217:9;204:23;267:42;260:5;256:54;249:5;246:65;236:93;;325:1;322;315:12;236:93;348:5;-1:-1:-1;404:2:1;389:18;;376:32;427:18;457:14;;;454:34;;;484:1;481;474:12;454:34;522:6;511:9;507:22;497:32;;567:7;560:4;556:2;552:13;548:27;538:55;;589:1;586;579:12;538:55;629:2;616:16;655:2;647:6;644:14;641:34;;;671:1;668;661:12;641:34;716:7;711:2;702:6;698:2;694:15;690:24;687:37;684:57;;;737:1;734;727:12;684:57;768:2;764;760:11;750:21;;790:6;780:16;;;;;14:788;;;;;:::o;807:447::-;964:2;953:9;946:21;1003:6;998:2;987:9;983:18;976:34;1060:6;1052;1047:2;1036:9;1032:18;1019:48;1116:1;1087:22;;;1111:2;1083:31;;;1076:42;;;;1170:2;1158:15;;;1175:66;1154:88;1139:104;1135:113;;807:447;-1:-1:-1;807:447:1:o"
1206
+ },
1207
+ "gasEstimates": {
1208
+ "creation": {
1209
+ "codeDepositCost": "89000",
1210
+ "executionCost": "135",
1211
+ "totalCost": "89135"
1212
+ },
1213
+ "external": {
1214
+ "syncState(address,bytes)": "infinite"
1215
+ }
1216
+ },
1217
+ "methodIdentifiers": {
1218
+ "syncState(address,bytes)": "16f19831"
1219
+ }
1220
+ },
1221
+ "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"StateSynced\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"syncState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"StateSynced(uint256,address,bytes)\":{\"details\":\"Heimdall bridge listens to this event and sends the data to receiver contract on child chain\",\"params\":{\"contractAddress\":\"the contract receiving data on child chain\",\"data\":\"bytes data to be sent\",\"id\":\"Id of the sync, increamented for each event in case of actual state sender contract\"}}},\"kind\":\"dev\",\"methods\":{\"syncState(address,bytes)\":{\"details\":\"sender and receiver contracts need to be registered in case of actual state sender contract\",\"params\":{\"data\":\"bytes data to be sent\",\"receiver\":\"the contract receiving data on child chain\"}}},\"version\":1},\"userdoc\":{\"events\":{\"StateSynced(uint256,address,bytes)\":{\"notice\":\"Event emitted when when syncState is called\"}},\"kind\":\"user\",\"methods\":{\"syncState(address,bytes)\":{\"notice\":\"called to send data to child chain\"}},\"notice\":\"Dummy State Sender contract to simulate plasma state sender while testing\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/external/polygon/test/StateSyncMock.sol\":\"StateSyncMock\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"contracts/external/polygon/test/StateSyncMock.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @notice Dummy State Sender contract to simulate plasma state sender while testing\\n */\\ncontract StateSyncMock {\\n /**\\n * @notice Event emitted when when syncState is called\\n * @dev Heimdall bridge listens to this event and sends the data to receiver contract on child chain\\n * @param id Id of the sync, increamented for each event in case of actual state sender contract\\n * @param contractAddress the contract receiving data on child chain\\n * @param data bytes data to be sent\\n */\\n event StateSynced(uint256 indexed id, address indexed contractAddress, bytes data);\\n\\n /**\\n * @notice called to send data to child chain\\n * @dev sender and receiver contracts need to be registered in case of actual state sender contract\\n * @param receiver the contract receiving data on child chain\\n * @param data bytes data to be sent\\n */\\n function syncState(address receiver, bytes calldata data) external {\\n emit StateSynced(1, receiver, data);\\n }\\n}\\n\",\"keccak256\":\"0x05023f6f00304ad3172ae502811d24217da4368050957f314441615a35bb6912\",\"license\":\"MIT\"}},\"version\":1}",
1222
+ "storageLayout": {
1223
+ "storage": [],
1224
+ "types": null
1225
+ },
1226
+ "userdoc": {
1227
+ "events": {
1228
+ "StateSynced(uint256,address,bytes)": {
1229
+ "notice": "Event emitted when when syncState is called"
1230
+ }
1231
+ },
1232
+ "kind": "user",
1233
+ "methods": {
1234
+ "syncState(address,bytes)": {
1235
+ "notice": "called to send data to child chain"
1236
+ }
1237
+ },
1238
+ "notice": "Dummy State Sender contract to simulate plasma state sender while testing",
1239
+ "version": 1
1240
+ }
1241
+ }
1242
+ }
1243
+ },
1244
+ "sources": {
1245
+ "contracts/external/polygon/test/StateSyncMock.sol": {
1246
+ "ast": {
1247
+ "absolutePath": "contracts/external/polygon/test/StateSyncMock.sol",
1248
+ "exportedSymbols": {
1249
+ "StateSyncMock": [
1250
+ 27
1251
+ ]
1252
+ },
1253
+ "id": 28,
1254
+ "license": "MIT",
1255
+ "nodeType": "SourceUnit",
1256
+ "nodes": [
1257
+ {
1258
+ "id": 1,
1259
+ "literals": [
1260
+ "solidity",
1261
+ "^",
1262
+ "0.8",
1263
+ ".0"
1264
+ ],
1265
+ "nodeType": "PragmaDirective",
1266
+ "src": "32:23:0"
1267
+ },
1268
+ {
1269
+ "abstract": false,
1270
+ "baseContracts": [],
1271
+ "canonicalName": "StateSyncMock",
1272
+ "contractDependencies": [],
1273
+ "contractKind": "contract",
1274
+ "documentation": {
1275
+ "id": 2,
1276
+ "nodeType": "StructuredDocumentation",
1277
+ "src": "57:92:0",
1278
+ "text": " @notice Dummy State Sender contract to simulate plasma state sender while testing"
1279
+ },
1280
+ "fullyImplemented": true,
1281
+ "id": 27,
1282
+ "linearizedBaseContracts": [
1283
+ 27
1284
+ ],
1285
+ "name": "StateSyncMock",
1286
+ "nameLocation": "159:13:0",
1287
+ "nodeType": "ContractDefinition",
1288
+ "nodes": [
1289
+ {
1290
+ "anonymous": false,
1291
+ "documentation": {
1292
+ "id": 3,
1293
+ "nodeType": "StructuredDocumentation",
1294
+ "src": "179:390:0",
1295
+ "text": " @notice Event emitted when when syncState is called\n @dev Heimdall bridge listens to this event and sends the data to receiver contract on child chain\n @param id Id of the sync, increamented for each event in case of actual state sender contract\n @param contractAddress the contract receiving data on child chain\n @param data bytes data to be sent"
1296
+ },
1297
+ "id": 11,
1298
+ "name": "StateSynced",
1299
+ "nameLocation": "580:11:0",
1300
+ "nodeType": "EventDefinition",
1301
+ "parameters": {
1302
+ "id": 10,
1303
+ "nodeType": "ParameterList",
1304
+ "parameters": [
1305
+ {
1306
+ "constant": false,
1307
+ "id": 5,
1308
+ "indexed": true,
1309
+ "mutability": "mutable",
1310
+ "name": "id",
1311
+ "nameLocation": "608:2:0",
1312
+ "nodeType": "VariableDeclaration",
1313
+ "scope": 11,
1314
+ "src": "592:18:0",
1315
+ "stateVariable": false,
1316
+ "storageLocation": "default",
1317
+ "typeDescriptions": {
1318
+ "typeIdentifier": "t_uint256",
1319
+ "typeString": "uint256"
1320
+ },
1321
+ "typeName": {
1322
+ "id": 4,
1323
+ "name": "uint256",
1324
+ "nodeType": "ElementaryTypeName",
1325
+ "src": "592:7:0",
1326
+ "typeDescriptions": {
1327
+ "typeIdentifier": "t_uint256",
1328
+ "typeString": "uint256"
1329
+ }
1330
+ },
1331
+ "visibility": "internal"
1332
+ },
1333
+ {
1334
+ "constant": false,
1335
+ "id": 7,
1336
+ "indexed": true,
1337
+ "mutability": "mutable",
1338
+ "name": "contractAddress",
1339
+ "nameLocation": "628:15:0",
1340
+ "nodeType": "VariableDeclaration",
1341
+ "scope": 11,
1342
+ "src": "612:31:0",
1343
+ "stateVariable": false,
1344
+ "storageLocation": "default",
1345
+ "typeDescriptions": {
1346
+ "typeIdentifier": "t_address",
1347
+ "typeString": "address"
1348
+ },
1349
+ "typeName": {
1350
+ "id": 6,
1351
+ "name": "address",
1352
+ "nodeType": "ElementaryTypeName",
1353
+ "src": "612:7:0",
1354
+ "stateMutability": "nonpayable",
1355
+ "typeDescriptions": {
1356
+ "typeIdentifier": "t_address",
1357
+ "typeString": "address"
1358
+ }
1359
+ },
1360
+ "visibility": "internal"
1361
+ },
1362
+ {
1363
+ "constant": false,
1364
+ "id": 9,
1365
+ "indexed": false,
1366
+ "mutability": "mutable",
1367
+ "name": "data",
1368
+ "nameLocation": "651:4:0",
1369
+ "nodeType": "VariableDeclaration",
1370
+ "scope": 11,
1371
+ "src": "645:10:0",
1372
+ "stateVariable": false,
1373
+ "storageLocation": "default",
1374
+ "typeDescriptions": {
1375
+ "typeIdentifier": "t_bytes_memory_ptr",
1376
+ "typeString": "bytes"
1377
+ },
1378
+ "typeName": {
1379
+ "id": 8,
1380
+ "name": "bytes",
1381
+ "nodeType": "ElementaryTypeName",
1382
+ "src": "645:5:0",
1383
+ "typeDescriptions": {
1384
+ "typeIdentifier": "t_bytes_storage_ptr",
1385
+ "typeString": "bytes"
1386
+ }
1387
+ },
1388
+ "visibility": "internal"
1389
+ }
1390
+ ],
1391
+ "src": "591:65:0"
1392
+ },
1393
+ "src": "574:83:0"
1394
+ },
1395
+ {
1396
+ "body": {
1397
+ "id": 25,
1398
+ "nodeType": "Block",
1399
+ "src": "1007:52:0",
1400
+ "statements": [
1401
+ {
1402
+ "eventCall": {
1403
+ "arguments": [
1404
+ {
1405
+ "hexValue": "31",
1406
+ "id": 20,
1407
+ "isConstant": false,
1408
+ "isLValue": false,
1409
+ "isPure": true,
1410
+ "kind": "number",
1411
+ "lValueRequested": false,
1412
+ "nodeType": "Literal",
1413
+ "src": "1034:1:0",
1414
+ "typeDescriptions": {
1415
+ "typeIdentifier": "t_rational_1_by_1",
1416
+ "typeString": "int_const 1"
1417
+ },
1418
+ "value": "1"
1419
+ },
1420
+ {
1421
+ "id": 21,
1422
+ "name": "receiver",
1423
+ "nodeType": "Identifier",
1424
+ "overloadedDeclarations": [],
1425
+ "referencedDeclaration": 14,
1426
+ "src": "1037:8:0",
1427
+ "typeDescriptions": {
1428
+ "typeIdentifier": "t_address",
1429
+ "typeString": "address"
1430
+ }
1431
+ },
1432
+ {
1433
+ "id": 22,
1434
+ "name": "data",
1435
+ "nodeType": "Identifier",
1436
+ "overloadedDeclarations": [],
1437
+ "referencedDeclaration": 16,
1438
+ "src": "1047:4:0",
1439
+ "typeDescriptions": {
1440
+ "typeIdentifier": "t_bytes_calldata_ptr",
1441
+ "typeString": "bytes calldata"
1442
+ }
1443
+ }
1444
+ ],
1445
+ "expression": {
1446
+ "argumentTypes": [
1447
+ {
1448
+ "typeIdentifier": "t_rational_1_by_1",
1449
+ "typeString": "int_const 1"
1450
+ },
1451
+ {
1452
+ "typeIdentifier": "t_address",
1453
+ "typeString": "address"
1454
+ },
1455
+ {
1456
+ "typeIdentifier": "t_bytes_calldata_ptr",
1457
+ "typeString": "bytes calldata"
1458
+ }
1459
+ ],
1460
+ "id": 19,
1461
+ "name": "StateSynced",
1462
+ "nodeType": "Identifier",
1463
+ "overloadedDeclarations": [],
1464
+ "referencedDeclaration": 11,
1465
+ "src": "1022:11:0",
1466
+ "typeDescriptions": {
1467
+ "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$",
1468
+ "typeString": "function (uint256,address,bytes memory)"
1469
+ }
1470
+ },
1471
+ "id": 23,
1472
+ "isConstant": false,
1473
+ "isLValue": false,
1474
+ "isPure": false,
1475
+ "kind": "functionCall",
1476
+ "lValueRequested": false,
1477
+ "names": [],
1478
+ "nodeType": "FunctionCall",
1479
+ "src": "1022:30:0",
1480
+ "tryCall": false,
1481
+ "typeDescriptions": {
1482
+ "typeIdentifier": "t_tuple$__$",
1483
+ "typeString": "tuple()"
1484
+ }
1485
+ },
1486
+ "id": 24,
1487
+ "nodeType": "EmitStatement",
1488
+ "src": "1017:35:0"
1489
+ }
1490
+ ]
1491
+ },
1492
+ "documentation": {
1493
+ "id": 12,
1494
+ "nodeType": "StructuredDocumentation",
1495
+ "src": "663:272:0",
1496
+ "text": " @notice called to send data to child chain\n @dev sender and receiver contracts need to be registered in case of actual state sender contract\n @param receiver the contract receiving data on child chain\n @param data bytes data to be sent"
1497
+ },
1498
+ "functionSelector": "16f19831",
1499
+ "id": 26,
1500
+ "implemented": true,
1501
+ "kind": "function",
1502
+ "modifiers": [],
1503
+ "name": "syncState",
1504
+ "nameLocation": "949:9:0",
1505
+ "nodeType": "FunctionDefinition",
1506
+ "parameters": {
1507
+ "id": 17,
1508
+ "nodeType": "ParameterList",
1509
+ "parameters": [
1510
+ {
1511
+ "constant": false,
1512
+ "id": 14,
1513
+ "mutability": "mutable",
1514
+ "name": "receiver",
1515
+ "nameLocation": "967:8:0",
1516
+ "nodeType": "VariableDeclaration",
1517
+ "scope": 26,
1518
+ "src": "959:16:0",
1519
+ "stateVariable": false,
1520
+ "storageLocation": "default",
1521
+ "typeDescriptions": {
1522
+ "typeIdentifier": "t_address",
1523
+ "typeString": "address"
1524
+ },
1525
+ "typeName": {
1526
+ "id": 13,
1527
+ "name": "address",
1528
+ "nodeType": "ElementaryTypeName",
1529
+ "src": "959:7:0",
1530
+ "stateMutability": "nonpayable",
1531
+ "typeDescriptions": {
1532
+ "typeIdentifier": "t_address",
1533
+ "typeString": "address"
1534
+ }
1535
+ },
1536
+ "visibility": "internal"
1537
+ },
1538
+ {
1539
+ "constant": false,
1540
+ "id": 16,
1541
+ "mutability": "mutable",
1542
+ "name": "data",
1543
+ "nameLocation": "992:4:0",
1544
+ "nodeType": "VariableDeclaration",
1545
+ "scope": 26,
1546
+ "src": "977:19:0",
1547
+ "stateVariable": false,
1548
+ "storageLocation": "calldata",
1549
+ "typeDescriptions": {
1550
+ "typeIdentifier": "t_bytes_calldata_ptr",
1551
+ "typeString": "bytes"
1552
+ },
1553
+ "typeName": {
1554
+ "id": 15,
1555
+ "name": "bytes",
1556
+ "nodeType": "ElementaryTypeName",
1557
+ "src": "977:5:0",
1558
+ "typeDescriptions": {
1559
+ "typeIdentifier": "t_bytes_storage_ptr",
1560
+ "typeString": "bytes"
1561
+ }
1562
+ },
1563
+ "visibility": "internal"
1564
+ }
1565
+ ],
1566
+ "src": "958:39:0"
1567
+ },
1568
+ "returnParameters": {
1569
+ "id": 18,
1570
+ "nodeType": "ParameterList",
1571
+ "parameters": [],
1572
+ "src": "1007:0:0"
1573
+ },
1574
+ "scope": 27,
1575
+ "src": "940:119:0",
1576
+ "stateMutability": "nonpayable",
1577
+ "virtual": false,
1578
+ "visibility": "external"
1579
+ }
1580
+ ],
1581
+ "scope": 28,
1582
+ "src": "150:911:0",
1583
+ "usedErrors": []
1584
+ }
1585
+ ],
1586
+ "src": "32:1030:0"
1587
+ },
1588
+ "id": 0
1589
+ }
1590
+ }
1591
+ }
1592
+ }