viem 2.8.18 → 2.9.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 (226) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/_cjs/chains/definitions/optimismSepolia.js +5 -0
  3. package/_cjs/chains/definitions/optimismSepolia.js.map +1 -1
  4. package/_cjs/chains/opStack/abis.js +1070 -1
  5. package/_cjs/chains/opStack/abis.js.map +1 -1
  6. package/_cjs/chains/opStack/actions/buildProveWithdrawal.js +3 -3
  7. package/_cjs/chains/opStack/actions/buildProveWithdrawal.js.map +1 -1
  8. package/_cjs/chains/opStack/actions/getGame.js +20 -0
  9. package/_cjs/chains/opStack/actions/getGame.js.map +1 -0
  10. package/_cjs/chains/opStack/actions/getGames.js +56 -0
  11. package/_cjs/chains/opStack/actions/getGames.js.map +1 -0
  12. package/_cjs/chains/opStack/actions/getL2Output.js +12 -0
  13. package/_cjs/chains/opStack/actions/getL2Output.js.map +1 -1
  14. package/_cjs/chains/opStack/actions/getPortalVersion.js +25 -0
  15. package/_cjs/chains/opStack/actions/getPortalVersion.js.map +1 -0
  16. package/_cjs/chains/opStack/actions/getTimeToFinalize.js +52 -26
  17. package/_cjs/chains/opStack/actions/getTimeToFinalize.js.map +1 -1
  18. package/_cjs/chains/opStack/actions/getTimeToNextGame.js +45 -0
  19. package/_cjs/chains/opStack/actions/getTimeToNextGame.js.map +1 -0
  20. package/_cjs/chains/opStack/actions/getTimeToProve.js +9 -1
  21. package/_cjs/chains/opStack/actions/getTimeToProve.js.map +1 -1
  22. package/_cjs/chains/opStack/actions/getWithdrawalStatus.js +79 -28
  23. package/_cjs/chains/opStack/actions/getWithdrawalStatus.js.map +1 -1
  24. package/_cjs/chains/opStack/actions/proveWithdrawal.js +1 -1
  25. package/_cjs/chains/opStack/actions/proveWithdrawal.js.map +1 -1
  26. package/_cjs/chains/opStack/actions/waitForNextGame.js +35 -0
  27. package/_cjs/chains/opStack/actions/waitForNextGame.js.map +1 -0
  28. package/_cjs/chains/opStack/actions/waitForNextL2Output.js.map +1 -1
  29. package/_cjs/chains/opStack/actions/waitToProve.js +34 -3
  30. package/_cjs/chains/opStack/actions/waitToProve.js.map +1 -1
  31. package/_cjs/chains/opStack/decorators/publicL1.js +10 -0
  32. package/_cjs/chains/opStack/decorators/publicL1.js.map +1 -1
  33. package/_cjs/chains/opStack/errors/withdrawal.js +13 -1
  34. package/_cjs/chains/opStack/errors/withdrawal.js.map +1 -1
  35. package/_cjs/chains/opStack/index.js +11 -1
  36. package/_cjs/chains/opStack/index.js.map +1 -1
  37. package/_cjs/chains/zksync/actions/deployContract.js +26 -0
  38. package/_cjs/chains/zksync/actions/deployContract.js.map +1 -0
  39. package/_cjs/chains/zksync/constants/abis.js +427 -0
  40. package/_cjs/chains/zksync/constants/abis.js.map +1 -0
  41. package/_cjs/chains/zksync/constants/address.js +5 -0
  42. package/_cjs/chains/zksync/constants/address.js.map +1 -0
  43. package/_cjs/chains/zksync/constants/contract.js +6 -0
  44. package/_cjs/chains/zksync/constants/contract.js.map +1 -0
  45. package/_cjs/chains/zksync/constants/number.js +6 -0
  46. package/_cjs/chains/zksync/constants/number.js.map +1 -0
  47. package/_cjs/chains/zksync/decorators/eip712.js +2 -0
  48. package/_cjs/chains/zksync/decorators/eip712.js.map +1 -1
  49. package/_cjs/chains/zksync/errors/bytecode.js +41 -0
  50. package/_cjs/chains/zksync/errors/bytecode.js.map +1 -0
  51. package/_cjs/chains/zksync/formatters.js +5 -1
  52. package/_cjs/chains/zksync/formatters.js.map +1 -1
  53. package/_cjs/chains/zksync/index.js +3 -1
  54. package/_cjs/chains/zksync/index.js.map +1 -1
  55. package/_cjs/chains/zksync/types/contract.js +3 -0
  56. package/_cjs/chains/zksync/types/contract.js.map +1 -0
  57. package/_cjs/chains/zksync/utils/abi/encodeDeployData.js +68 -0
  58. package/_cjs/chains/zksync/utils/abi/encodeDeployData.js.map +1 -0
  59. package/_cjs/chains/zksync/utils/getEip712Domain.js +4 -2
  60. package/_cjs/chains/zksync/utils/getEip712Domain.js.map +1 -1
  61. package/_cjs/chains/zksync/utils/hashBytecode.js +36 -0
  62. package/_cjs/chains/zksync/utils/hashBytecode.js.map +1 -0
  63. package/_cjs/errors/version.js +1 -1
  64. package/_cjs/errors/version.js.map +1 -1
  65. package/_esm/chains/definitions/optimismSepolia.js +5 -0
  66. package/_esm/chains/definitions/optimismSepolia.js.map +1 -1
  67. package/_esm/chains/opStack/abis.js +1069 -0
  68. package/_esm/chains/opStack/abis.js.map +1 -1
  69. package/_esm/chains/opStack/actions/buildProveWithdrawal.js +4 -3
  70. package/_esm/chains/opStack/actions/buildProveWithdrawal.js.map +1 -1
  71. package/_esm/chains/opStack/actions/getGame.js +40 -0
  72. package/_esm/chains/opStack/actions/getGame.js.map +1 -0
  73. package/_esm/chains/opStack/actions/getGames.js +75 -0
  74. package/_esm/chains/opStack/actions/getGames.js.map +1 -0
  75. package/_esm/chains/opStack/actions/getL2Output.js +12 -0
  76. package/_esm/chains/opStack/actions/getL2Output.js.map +1 -1
  77. package/_esm/chains/opStack/actions/getPortalVersion.js +48 -0
  78. package/_esm/chains/opStack/actions/getPortalVersion.js.map +1 -0
  79. package/_esm/chains/opStack/actions/getTimeToFinalize.js +54 -27
  80. package/_esm/chains/opStack/actions/getTimeToFinalize.js.map +1 -1
  81. package/_esm/chains/opStack/actions/getTimeToNextGame.js +71 -0
  82. package/_esm/chains/opStack/actions/getTimeToNextGame.js.map +1 -0
  83. package/_esm/chains/opStack/actions/getTimeToProve.js +10 -1
  84. package/_esm/chains/opStack/actions/getTimeToProve.js.map +1 -1
  85. package/_esm/chains/opStack/actions/getWithdrawalStatus.js +84 -32
  86. package/_esm/chains/opStack/actions/getWithdrawalStatus.js.map +1 -1
  87. package/_esm/chains/opStack/actions/proveWithdrawal.js +1 -1
  88. package/_esm/chains/opStack/actions/proveWithdrawal.js.map +1 -1
  89. package/_esm/chains/opStack/actions/waitForNextGame.js +61 -0
  90. package/_esm/chains/opStack/actions/waitForNextGame.js.map +1 -0
  91. package/_esm/chains/opStack/actions/waitForNextL2Output.js.map +1 -1
  92. package/_esm/chains/opStack/actions/waitToProve.js +35 -3
  93. package/_esm/chains/opStack/actions/waitToProve.js.map +1 -1
  94. package/_esm/chains/opStack/decorators/publicL1.js +10 -0
  95. package/_esm/chains/opStack/decorators/publicL1.js.map +1 -1
  96. package/_esm/chains/opStack/errors/withdrawal.js +11 -0
  97. package/_esm/chains/opStack/errors/withdrawal.js.map +1 -1
  98. package/_esm/chains/opStack/index.js +5 -0
  99. package/_esm/chains/opStack/index.js.map +1 -1
  100. package/_esm/chains/zksync/actions/deployContract.js +52 -0
  101. package/_esm/chains/zksync/actions/deployContract.js.map +1 -0
  102. package/_esm/chains/zksync/constants/abis.js +425 -0
  103. package/_esm/chains/zksync/constants/abis.js.map +1 -0
  104. package/_esm/chains/zksync/constants/address.js +2 -0
  105. package/_esm/chains/zksync/constants/address.js.map +1 -0
  106. package/_esm/chains/zksync/constants/contract.js +3 -0
  107. package/_esm/chains/zksync/constants/contract.js.map +1 -0
  108. package/_esm/chains/zksync/constants/number.js +3 -0
  109. package/_esm/chains/zksync/constants/number.js.map +1 -0
  110. package/_esm/chains/zksync/decorators/eip712.js +2 -0
  111. package/_esm/chains/zksync/decorators/eip712.js.map +1 -1
  112. package/_esm/chains/zksync/errors/bytecode.js +35 -0
  113. package/_esm/chains/zksync/errors/bytecode.js.map +1 -0
  114. package/_esm/chains/zksync/formatters.js +5 -1
  115. package/_esm/chains/zksync/formatters.js.map +1 -1
  116. package/_esm/chains/zksync/index.js +1 -0
  117. package/_esm/chains/zksync/index.js.map +1 -1
  118. package/_esm/chains/zksync/types/contract.js +2 -0
  119. package/_esm/chains/zksync/types/contract.js.map +1 -0
  120. package/_esm/chains/zksync/utils/abi/encodeDeployData.js +65 -0
  121. package/_esm/chains/zksync/utils/abi/encodeDeployData.js.map +1 -0
  122. package/_esm/chains/zksync/utils/getEip712Domain.js +4 -2
  123. package/_esm/chains/zksync/utils/getEip712Domain.js.map +1 -1
  124. package/_esm/chains/zksync/utils/hashBytecode.js +36 -0
  125. package/_esm/chains/zksync/utils/hashBytecode.js.map +1 -0
  126. package/_esm/errors/version.js +1 -1
  127. package/_esm/errors/version.js.map +1 -1
  128. package/_types/chains/definitions/optimismSepolia.d.ts +5 -0
  129. package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
  130. package/_types/chains/opStack/abis.d.ts +824 -0
  131. package/_types/chains/opStack/abis.d.ts.map +1 -1
  132. package/_types/chains/opStack/actions/buildProveWithdrawal.d.ts +6 -2
  133. package/_types/chains/opStack/actions/buildProveWithdrawal.d.ts.map +1 -1
  134. package/_types/chains/opStack/actions/getGame.d.ts +57 -0
  135. package/_types/chains/opStack/actions/getGame.d.ts.map +1 -0
  136. package/_types/chains/opStack/actions/getGames.d.ts +48 -0
  137. package/_types/chains/opStack/actions/getGames.d.ts.map +1 -0
  138. package/_types/chains/opStack/actions/getL2Output.d.ts +8 -1
  139. package/_types/chains/opStack/actions/getL2Output.d.ts.map +1 -1
  140. package/_types/chains/opStack/actions/getPortalVersion.d.ts +46 -0
  141. package/_types/chains/opStack/actions/getPortalVersion.d.ts.map +1 -0
  142. package/_types/chains/opStack/actions/getTimeToFinalize.d.ts.map +1 -1
  143. package/_types/chains/opStack/actions/getTimeToNextGame.d.ts +61 -0
  144. package/_types/chains/opStack/actions/getTimeToNextGame.d.ts.map +1 -0
  145. package/_types/chains/opStack/actions/getTimeToProve.d.ts +6 -3
  146. package/_types/chains/opStack/actions/getTimeToProve.d.ts.map +1 -1
  147. package/_types/chains/opStack/actions/getWithdrawalStatus.d.ts +7 -1
  148. package/_types/chains/opStack/actions/getWithdrawalStatus.d.ts.map +1 -1
  149. package/_types/chains/opStack/actions/proveWithdrawal.d.ts +1 -1
  150. package/_types/chains/opStack/actions/proveWithdrawal.d.ts.map +1 -1
  151. package/_types/chains/opStack/actions/waitForNextGame.d.ts +60 -0
  152. package/_types/chains/opStack/actions/waitForNextGame.d.ts.map +1 -0
  153. package/_types/chains/opStack/actions/waitForNextL2Output.d.ts.map +1 -1
  154. package/_types/chains/opStack/actions/waitToProve.d.ts +10 -2
  155. package/_types/chains/opStack/actions/waitToProve.d.ts.map +1 -1
  156. package/_types/chains/opStack/decorators/publicL1.d.ts +129 -0
  157. package/_types/chains/opStack/decorators/publicL1.d.ts.map +1 -1
  158. package/_types/chains/opStack/errors/withdrawal.d.ts +7 -0
  159. package/_types/chains/opStack/errors/withdrawal.d.ts.map +1 -1
  160. package/_types/chains/opStack/index.d.ts +5 -0
  161. package/_types/chains/opStack/index.d.ts.map +1 -1
  162. package/_types/chains/opStack/types/chain.d.ts +1 -1
  163. package/_types/chains/opStack/types/chain.d.ts.map +1 -1
  164. package/_types/chains/opStack/types/withdrawal.d.ts +7 -0
  165. package/_types/chains/opStack/types/withdrawal.d.ts.map +1 -1
  166. package/_types/chains/zksync/actions/deployContract.d.ts +49 -0
  167. package/_types/chains/zksync/actions/deployContract.d.ts.map +1 -0
  168. package/_types/chains/zksync/constants/abis.d.ts +70 -0
  169. package/_types/chains/zksync/constants/abis.d.ts.map +1 -0
  170. package/_types/chains/zksync/constants/address.d.ts +2 -0
  171. package/_types/chains/zksync/constants/address.d.ts.map +1 -0
  172. package/_types/chains/zksync/constants/contract.d.ts +3 -0
  173. package/_types/chains/zksync/constants/contract.d.ts.map +1 -0
  174. package/_types/chains/zksync/constants/number.d.ts +2 -0
  175. package/_types/chains/zksync/constants/number.d.ts.map +1 -0
  176. package/_types/chains/zksync/decorators/eip712.d.ts +32 -0
  177. package/_types/chains/zksync/decorators/eip712.d.ts.map +1 -1
  178. package/_types/chains/zksync/errors/bytecode.d.ts +30 -0
  179. package/_types/chains/zksync/errors/bytecode.d.ts.map +1 -0
  180. package/_types/chains/zksync/formatters.d.ts.map +1 -1
  181. package/_types/chains/zksync/index.d.ts +1 -0
  182. package/_types/chains/zksync/index.d.ts.map +1 -1
  183. package/_types/chains/zksync/types/contract.d.ts +2 -0
  184. package/_types/chains/zksync/types/contract.d.ts.map +1 -0
  185. package/_types/chains/zksync/utils/abi/encodeDeployData.d.ts +13 -0
  186. package/_types/chains/zksync/utils/abi/encodeDeployData.d.ts.map +1 -0
  187. package/_types/chains/zksync/utils/getEip712Domain.d.ts.map +1 -1
  188. package/_types/chains/zksync/utils/hashBytecode.d.ts +3 -0
  189. package/_types/chains/zksync/utils/hashBytecode.d.ts.map +1 -0
  190. package/_types/errors/version.d.ts +1 -1
  191. package/_types/errors/version.d.ts.map +1 -1
  192. package/chains/definitions/optimismSepolia.ts +5 -0
  193. package/chains/opStack/abis.ts +1071 -0
  194. package/chains/opStack/actions/buildProveWithdrawal.ts +7 -6
  195. package/chains/opStack/actions/getGame.ts +99 -0
  196. package/chains/opStack/actions/getGames.ts +133 -0
  197. package/chains/opStack/actions/getL2Output.ts +44 -3
  198. package/chains/opStack/actions/getPortalVersion.ts +87 -0
  199. package/chains/opStack/actions/getTimeToFinalize.ts +64 -27
  200. package/chains/opStack/actions/getTimeToNextGame.ts +143 -0
  201. package/chains/opStack/actions/getTimeToProve.ts +43 -5
  202. package/chains/opStack/actions/getWithdrawalStatus.ts +130 -38
  203. package/chains/opStack/actions/proveWithdrawal.ts +3 -1
  204. package/chains/opStack/actions/waitForNextGame.ts +122 -0
  205. package/chains/opStack/actions/waitForNextL2Output.ts +5 -1
  206. package/chains/opStack/actions/waitToProve.ts +65 -7
  207. package/chains/opStack/decorators/publicL1.ts +164 -0
  208. package/chains/opStack/errors/withdrawal.ts +10 -0
  209. package/chains/opStack/index.ts +30 -0
  210. package/chains/opStack/types/chain.ts +4 -1
  211. package/chains/opStack/types/withdrawal.ts +8 -0
  212. package/chains/zksync/actions/deployContract.ts +100 -0
  213. package/chains/zksync/constants/abis.ts +424 -0
  214. package/chains/zksync/constants/address.ts +2 -0
  215. package/chains/zksync/constants/contract.ts +2 -0
  216. package/chains/zksync/constants/number.ts +3 -0
  217. package/chains/zksync/decorators/eip712.ts +47 -0
  218. package/chains/zksync/errors/bytecode.ts +46 -0
  219. package/chains/zksync/formatters.ts +7 -1
  220. package/chains/zksync/index.ts +6 -0
  221. package/chains/zksync/types/contract.ts +6 -0
  222. package/chains/zksync/utils/abi/encodeDeployData.ts +120 -0
  223. package/chains/zksync/utils/getEip712Domain.ts +4 -2
  224. package/chains/zksync/utils/hashBytecode.ts +48 -0
  225. package/errors/version.ts +1 -1
  226. package/package.json +1 -1
@@ -897,6 +897,1075 @@ export const l2ToL1MessagePasserAbi = [
897
897
  },
898
898
  { stateMutability: 'payable', type: 'receive' },
899
899
  ];
900
+ export const disputeGameFactoryAbi = [
901
+ {
902
+ type: 'constructor',
903
+ inputs: [],
904
+ stateMutability: 'nonpayable',
905
+ },
906
+ {
907
+ type: 'function',
908
+ name: 'create',
909
+ inputs: [
910
+ {
911
+ name: '_gameType',
912
+ type: 'uint32',
913
+ internalType: 'GameType',
914
+ },
915
+ {
916
+ name: '_rootClaim',
917
+ type: 'bytes32',
918
+ internalType: 'Claim',
919
+ },
920
+ {
921
+ name: '_extraData',
922
+ type: 'bytes',
923
+ internalType: 'bytes',
924
+ },
925
+ ],
926
+ outputs: [
927
+ {
928
+ name: 'proxy_',
929
+ type: 'address',
930
+ internalType: 'contract IDisputeGame',
931
+ },
932
+ ],
933
+ stateMutability: 'payable',
934
+ },
935
+ {
936
+ type: 'function',
937
+ name: 'findLatestGames',
938
+ inputs: [
939
+ {
940
+ name: '_gameType',
941
+ type: 'uint32',
942
+ internalType: 'GameType',
943
+ },
944
+ {
945
+ name: '_start',
946
+ type: 'uint256',
947
+ internalType: 'uint256',
948
+ },
949
+ {
950
+ name: '_n',
951
+ type: 'uint256',
952
+ internalType: 'uint256',
953
+ },
954
+ ],
955
+ outputs: [
956
+ {
957
+ name: 'games_',
958
+ type: 'tuple[]',
959
+ internalType: 'struct IDisputeGameFactory.GameSearchResult[]',
960
+ components: [
961
+ {
962
+ name: 'index',
963
+ type: 'uint256',
964
+ internalType: 'uint256',
965
+ },
966
+ {
967
+ name: 'metadata',
968
+ type: 'bytes32',
969
+ internalType: 'GameId',
970
+ },
971
+ {
972
+ name: 'timestamp',
973
+ type: 'uint64',
974
+ internalType: 'Timestamp',
975
+ },
976
+ {
977
+ name: 'rootClaim',
978
+ type: 'bytes32',
979
+ internalType: 'Claim',
980
+ },
981
+ {
982
+ name: 'extraData',
983
+ type: 'bytes',
984
+ internalType: 'bytes',
985
+ },
986
+ ],
987
+ },
988
+ ],
989
+ stateMutability: 'view',
990
+ },
991
+ {
992
+ type: 'function',
993
+ name: 'gameAtIndex',
994
+ inputs: [
995
+ {
996
+ name: '_index',
997
+ type: 'uint256',
998
+ internalType: 'uint256',
999
+ },
1000
+ ],
1001
+ outputs: [
1002
+ {
1003
+ name: 'gameType_',
1004
+ type: 'uint32',
1005
+ internalType: 'GameType',
1006
+ },
1007
+ {
1008
+ name: 'timestamp_',
1009
+ type: 'uint64',
1010
+ internalType: 'Timestamp',
1011
+ },
1012
+ {
1013
+ name: 'proxy_',
1014
+ type: 'address',
1015
+ internalType: 'contract IDisputeGame',
1016
+ },
1017
+ ],
1018
+ stateMutability: 'view',
1019
+ },
1020
+ {
1021
+ type: 'function',
1022
+ name: 'gameCount',
1023
+ inputs: [],
1024
+ outputs: [
1025
+ {
1026
+ name: 'gameCount_',
1027
+ type: 'uint256',
1028
+ internalType: 'uint256',
1029
+ },
1030
+ ],
1031
+ stateMutability: 'view',
1032
+ },
1033
+ {
1034
+ type: 'function',
1035
+ name: 'gameImpls',
1036
+ inputs: [
1037
+ {
1038
+ name: '',
1039
+ type: 'uint32',
1040
+ internalType: 'GameType',
1041
+ },
1042
+ ],
1043
+ outputs: [
1044
+ {
1045
+ name: '',
1046
+ type: 'address',
1047
+ internalType: 'contract IDisputeGame',
1048
+ },
1049
+ ],
1050
+ stateMutability: 'view',
1051
+ },
1052
+ {
1053
+ type: 'function',
1054
+ name: 'games',
1055
+ inputs: [
1056
+ {
1057
+ name: '_gameType',
1058
+ type: 'uint32',
1059
+ internalType: 'GameType',
1060
+ },
1061
+ {
1062
+ name: '_rootClaim',
1063
+ type: 'bytes32',
1064
+ internalType: 'Claim',
1065
+ },
1066
+ {
1067
+ name: '_extraData',
1068
+ type: 'bytes',
1069
+ internalType: 'bytes',
1070
+ },
1071
+ ],
1072
+ outputs: [
1073
+ {
1074
+ name: 'proxy_',
1075
+ type: 'address',
1076
+ internalType: 'contract IDisputeGame',
1077
+ },
1078
+ {
1079
+ name: 'timestamp_',
1080
+ type: 'uint64',
1081
+ internalType: 'Timestamp',
1082
+ },
1083
+ ],
1084
+ stateMutability: 'view',
1085
+ },
1086
+ {
1087
+ type: 'function',
1088
+ name: 'getGameUUID',
1089
+ inputs: [
1090
+ {
1091
+ name: '_gameType',
1092
+ type: 'uint32',
1093
+ internalType: 'GameType',
1094
+ },
1095
+ {
1096
+ name: '_rootClaim',
1097
+ type: 'bytes32',
1098
+ internalType: 'Claim',
1099
+ },
1100
+ {
1101
+ name: '_extraData',
1102
+ type: 'bytes',
1103
+ internalType: 'bytes',
1104
+ },
1105
+ ],
1106
+ outputs: [
1107
+ {
1108
+ name: 'uuid_',
1109
+ type: 'bytes32',
1110
+ internalType: 'Hash',
1111
+ },
1112
+ ],
1113
+ stateMutability: 'pure',
1114
+ },
1115
+ {
1116
+ type: 'function',
1117
+ name: 'initBonds',
1118
+ inputs: [
1119
+ {
1120
+ name: '',
1121
+ type: 'uint32',
1122
+ internalType: 'GameType',
1123
+ },
1124
+ ],
1125
+ outputs: [
1126
+ {
1127
+ name: '',
1128
+ type: 'uint256',
1129
+ internalType: 'uint256',
1130
+ },
1131
+ ],
1132
+ stateMutability: 'view',
1133
+ },
1134
+ {
1135
+ type: 'function',
1136
+ name: 'initialize',
1137
+ inputs: [
1138
+ {
1139
+ name: '_owner',
1140
+ type: 'address',
1141
+ internalType: 'address',
1142
+ },
1143
+ ],
1144
+ outputs: [],
1145
+ stateMutability: 'nonpayable',
1146
+ },
1147
+ {
1148
+ type: 'function',
1149
+ name: 'owner',
1150
+ inputs: [],
1151
+ outputs: [
1152
+ {
1153
+ name: '',
1154
+ type: 'address',
1155
+ internalType: 'address',
1156
+ },
1157
+ ],
1158
+ stateMutability: 'view',
1159
+ },
1160
+ {
1161
+ type: 'function',
1162
+ name: 'renounceOwnership',
1163
+ inputs: [],
1164
+ outputs: [],
1165
+ stateMutability: 'nonpayable',
1166
+ },
1167
+ {
1168
+ type: 'function',
1169
+ name: 'setImplementation',
1170
+ inputs: [
1171
+ {
1172
+ name: '_gameType',
1173
+ type: 'uint32',
1174
+ internalType: 'GameType',
1175
+ },
1176
+ {
1177
+ name: '_impl',
1178
+ type: 'address',
1179
+ internalType: 'contract IDisputeGame',
1180
+ },
1181
+ ],
1182
+ outputs: [],
1183
+ stateMutability: 'nonpayable',
1184
+ },
1185
+ {
1186
+ type: 'function',
1187
+ name: 'setInitBond',
1188
+ inputs: [
1189
+ {
1190
+ name: '_gameType',
1191
+ type: 'uint32',
1192
+ internalType: 'GameType',
1193
+ },
1194
+ {
1195
+ name: '_initBond',
1196
+ type: 'uint256',
1197
+ internalType: 'uint256',
1198
+ },
1199
+ ],
1200
+ outputs: [],
1201
+ stateMutability: 'nonpayable',
1202
+ },
1203
+ {
1204
+ type: 'function',
1205
+ name: 'transferOwnership',
1206
+ inputs: [
1207
+ {
1208
+ name: 'newOwner',
1209
+ type: 'address',
1210
+ internalType: 'address',
1211
+ },
1212
+ ],
1213
+ outputs: [],
1214
+ stateMutability: 'nonpayable',
1215
+ },
1216
+ {
1217
+ type: 'function',
1218
+ name: 'version',
1219
+ inputs: [],
1220
+ outputs: [
1221
+ {
1222
+ name: '',
1223
+ type: 'string',
1224
+ internalType: 'string',
1225
+ },
1226
+ ],
1227
+ stateMutability: 'view',
1228
+ },
1229
+ {
1230
+ type: 'event',
1231
+ name: 'DisputeGameCreated',
1232
+ inputs: [
1233
+ {
1234
+ name: 'disputeProxy',
1235
+ type: 'address',
1236
+ indexed: true,
1237
+ internalType: 'address',
1238
+ },
1239
+ {
1240
+ name: 'gameType',
1241
+ type: 'uint32',
1242
+ indexed: true,
1243
+ internalType: 'GameType',
1244
+ },
1245
+ {
1246
+ name: 'rootClaim',
1247
+ type: 'bytes32',
1248
+ indexed: true,
1249
+ internalType: 'Claim',
1250
+ },
1251
+ ],
1252
+ anonymous: false,
1253
+ },
1254
+ {
1255
+ type: 'event',
1256
+ name: 'ImplementationSet',
1257
+ inputs: [
1258
+ {
1259
+ name: 'impl',
1260
+ type: 'address',
1261
+ indexed: true,
1262
+ internalType: 'address',
1263
+ },
1264
+ {
1265
+ name: 'gameType',
1266
+ type: 'uint32',
1267
+ indexed: true,
1268
+ internalType: 'GameType',
1269
+ },
1270
+ ],
1271
+ anonymous: false,
1272
+ },
1273
+ {
1274
+ type: 'event',
1275
+ name: 'InitBondUpdated',
1276
+ inputs: [
1277
+ {
1278
+ name: 'gameType',
1279
+ type: 'uint32',
1280
+ indexed: true,
1281
+ internalType: 'GameType',
1282
+ },
1283
+ {
1284
+ name: 'newBond',
1285
+ type: 'uint256',
1286
+ indexed: true,
1287
+ internalType: 'uint256',
1288
+ },
1289
+ ],
1290
+ anonymous: false,
1291
+ },
1292
+ {
1293
+ type: 'event',
1294
+ name: 'Initialized',
1295
+ inputs: [
1296
+ {
1297
+ name: 'version',
1298
+ type: 'uint8',
1299
+ indexed: false,
1300
+ internalType: 'uint8',
1301
+ },
1302
+ ],
1303
+ anonymous: false,
1304
+ },
1305
+ {
1306
+ type: 'event',
1307
+ name: 'OwnershipTransferred',
1308
+ inputs: [
1309
+ {
1310
+ name: 'previousOwner',
1311
+ type: 'address',
1312
+ indexed: true,
1313
+ internalType: 'address',
1314
+ },
1315
+ {
1316
+ name: 'newOwner',
1317
+ type: 'address',
1318
+ indexed: true,
1319
+ internalType: 'address',
1320
+ },
1321
+ ],
1322
+ anonymous: false,
1323
+ },
1324
+ {
1325
+ type: 'error',
1326
+ name: 'GameAlreadyExists',
1327
+ inputs: [
1328
+ {
1329
+ name: 'uuid',
1330
+ type: 'bytes32',
1331
+ internalType: 'Hash',
1332
+ },
1333
+ ],
1334
+ },
1335
+ {
1336
+ type: 'error',
1337
+ name: 'InsufficientBond',
1338
+ inputs: [],
1339
+ },
1340
+ {
1341
+ type: 'error',
1342
+ name: 'NoImplementation',
1343
+ inputs: [
1344
+ {
1345
+ name: 'gameType',
1346
+ type: 'uint32',
1347
+ internalType: 'GameType',
1348
+ },
1349
+ ],
1350
+ },
1351
+ ];
1352
+ export const portal2Abi = [
1353
+ {
1354
+ inputs: [
1355
+ {
1356
+ internalType: 'uint256',
1357
+ name: '_proofMaturityDelaySeconds',
1358
+ type: 'uint256',
1359
+ },
1360
+ {
1361
+ internalType: 'uint256',
1362
+ name: '_disputeGameFinalityDelaySeconds',
1363
+ type: 'uint256',
1364
+ },
1365
+ {
1366
+ internalType: 'GameType',
1367
+ name: '_initialRespectedGameType',
1368
+ type: 'uint32',
1369
+ },
1370
+ ],
1371
+ stateMutability: 'nonpayable',
1372
+ type: 'constructor',
1373
+ },
1374
+ {
1375
+ stateMutability: 'payable',
1376
+ type: 'receive',
1377
+ },
1378
+ {
1379
+ inputs: [],
1380
+ name: 'GUARDIAN',
1381
+ outputs: [
1382
+ {
1383
+ internalType: 'address',
1384
+ name: '',
1385
+ type: 'address',
1386
+ },
1387
+ ],
1388
+ stateMutability: 'view',
1389
+ type: 'function',
1390
+ },
1391
+ {
1392
+ inputs: [],
1393
+ name: 'SYSTEM_CONFIG',
1394
+ outputs: [
1395
+ {
1396
+ internalType: 'contract SystemConfig',
1397
+ name: '',
1398
+ type: 'address',
1399
+ },
1400
+ ],
1401
+ stateMutability: 'view',
1402
+ type: 'function',
1403
+ },
1404
+ {
1405
+ inputs: [
1406
+ {
1407
+ internalType: 'contract IDisputeGame',
1408
+ name: '_disputeGame',
1409
+ type: 'address',
1410
+ },
1411
+ ],
1412
+ name: 'blacklistDisputeGame',
1413
+ outputs: [],
1414
+ stateMutability: 'nonpayable',
1415
+ type: 'function',
1416
+ },
1417
+ {
1418
+ inputs: [
1419
+ {
1420
+ internalType: 'bytes32',
1421
+ name: '_withdrawalHash',
1422
+ type: 'bytes32',
1423
+ },
1424
+ ],
1425
+ name: 'checkWithdrawal',
1426
+ outputs: [],
1427
+ stateMutability: 'view',
1428
+ type: 'function',
1429
+ },
1430
+ {
1431
+ inputs: [
1432
+ {
1433
+ internalType: 'address',
1434
+ name: '_to',
1435
+ type: 'address',
1436
+ },
1437
+ {
1438
+ internalType: 'uint256',
1439
+ name: '_value',
1440
+ type: 'uint256',
1441
+ },
1442
+ {
1443
+ internalType: 'uint64',
1444
+ name: '_gasLimit',
1445
+ type: 'uint64',
1446
+ },
1447
+ {
1448
+ internalType: 'bool',
1449
+ name: '_isCreation',
1450
+ type: 'bool',
1451
+ },
1452
+ {
1453
+ internalType: 'bytes',
1454
+ name: '_data',
1455
+ type: 'bytes',
1456
+ },
1457
+ ],
1458
+ name: 'depositTransaction',
1459
+ outputs: [],
1460
+ stateMutability: 'payable',
1461
+ type: 'function',
1462
+ },
1463
+ {
1464
+ inputs: [
1465
+ {
1466
+ internalType: 'contract IDisputeGame',
1467
+ name: '',
1468
+ type: 'address',
1469
+ },
1470
+ ],
1471
+ name: 'disputeGameBlacklist',
1472
+ outputs: [
1473
+ {
1474
+ internalType: 'bool',
1475
+ name: '',
1476
+ type: 'bool',
1477
+ },
1478
+ ],
1479
+ stateMutability: 'view',
1480
+ type: 'function',
1481
+ },
1482
+ {
1483
+ inputs: [],
1484
+ name: 'disputeGameFactory',
1485
+ outputs: [
1486
+ {
1487
+ internalType: 'contract DisputeGameFactory',
1488
+ name: '',
1489
+ type: 'address',
1490
+ },
1491
+ ],
1492
+ stateMutability: 'view',
1493
+ type: 'function',
1494
+ },
1495
+ {
1496
+ inputs: [],
1497
+ name: 'disputeGameFinalityDelaySeconds',
1498
+ outputs: [
1499
+ {
1500
+ internalType: 'uint256',
1501
+ name: '',
1502
+ type: 'uint256',
1503
+ },
1504
+ ],
1505
+ stateMutability: 'view',
1506
+ type: 'function',
1507
+ },
1508
+ {
1509
+ inputs: [],
1510
+ name: 'donateETH',
1511
+ outputs: [],
1512
+ stateMutability: 'payable',
1513
+ type: 'function',
1514
+ },
1515
+ {
1516
+ inputs: [
1517
+ {
1518
+ components: [
1519
+ {
1520
+ internalType: 'uint256',
1521
+ name: 'nonce',
1522
+ type: 'uint256',
1523
+ },
1524
+ {
1525
+ internalType: 'address',
1526
+ name: 'sender',
1527
+ type: 'address',
1528
+ },
1529
+ {
1530
+ internalType: 'address',
1531
+ name: 'target',
1532
+ type: 'address',
1533
+ },
1534
+ {
1535
+ internalType: 'uint256',
1536
+ name: 'value',
1537
+ type: 'uint256',
1538
+ },
1539
+ {
1540
+ internalType: 'uint256',
1541
+ name: 'gasLimit',
1542
+ type: 'uint256',
1543
+ },
1544
+ {
1545
+ internalType: 'bytes',
1546
+ name: 'data',
1547
+ type: 'bytes',
1548
+ },
1549
+ ],
1550
+ internalType: 'struct Types.WithdrawalTransaction',
1551
+ name: '_tx',
1552
+ type: 'tuple',
1553
+ },
1554
+ ],
1555
+ name: 'finalizeWithdrawalTransaction',
1556
+ outputs: [],
1557
+ stateMutability: 'nonpayable',
1558
+ type: 'function',
1559
+ },
1560
+ {
1561
+ inputs: [
1562
+ {
1563
+ internalType: 'bytes32',
1564
+ name: '',
1565
+ type: 'bytes32',
1566
+ },
1567
+ ],
1568
+ name: 'finalizedWithdrawals',
1569
+ outputs: [
1570
+ {
1571
+ internalType: 'bool',
1572
+ name: '',
1573
+ type: 'bool',
1574
+ },
1575
+ ],
1576
+ stateMutability: 'view',
1577
+ type: 'function',
1578
+ },
1579
+ {
1580
+ inputs: [],
1581
+ name: 'guardian',
1582
+ outputs: [
1583
+ {
1584
+ internalType: 'address',
1585
+ name: '',
1586
+ type: 'address',
1587
+ },
1588
+ ],
1589
+ stateMutability: 'view',
1590
+ type: 'function',
1591
+ },
1592
+ {
1593
+ inputs: [
1594
+ {
1595
+ internalType: 'contract DisputeGameFactory',
1596
+ name: '_disputeGameFactory',
1597
+ type: 'address',
1598
+ },
1599
+ {
1600
+ internalType: 'contract SystemConfig',
1601
+ name: '_systemConfig',
1602
+ type: 'address',
1603
+ },
1604
+ {
1605
+ internalType: 'contract SuperchainConfig',
1606
+ name: '_superchainConfig',
1607
+ type: 'address',
1608
+ },
1609
+ ],
1610
+ name: 'initialize',
1611
+ outputs: [],
1612
+ stateMutability: 'nonpayable',
1613
+ type: 'function',
1614
+ },
1615
+ {
1616
+ inputs: [],
1617
+ name: 'l2Sender',
1618
+ outputs: [
1619
+ {
1620
+ internalType: 'address',
1621
+ name: '',
1622
+ type: 'address',
1623
+ },
1624
+ ],
1625
+ stateMutability: 'view',
1626
+ type: 'function',
1627
+ },
1628
+ {
1629
+ inputs: [
1630
+ {
1631
+ internalType: 'uint64',
1632
+ name: '_byteCount',
1633
+ type: 'uint64',
1634
+ },
1635
+ ],
1636
+ name: 'minimumGasLimit',
1637
+ outputs: [
1638
+ {
1639
+ internalType: 'uint64',
1640
+ name: '',
1641
+ type: 'uint64',
1642
+ },
1643
+ ],
1644
+ stateMutability: 'pure',
1645
+ type: 'function',
1646
+ },
1647
+ {
1648
+ inputs: [],
1649
+ name: 'params',
1650
+ outputs: [
1651
+ {
1652
+ internalType: 'uint128',
1653
+ name: 'prevBaseFee',
1654
+ type: 'uint128',
1655
+ },
1656
+ {
1657
+ internalType: 'uint64',
1658
+ name: 'prevBoughtGas',
1659
+ type: 'uint64',
1660
+ },
1661
+ {
1662
+ internalType: 'uint64',
1663
+ name: 'prevBlockNum',
1664
+ type: 'uint64',
1665
+ },
1666
+ ],
1667
+ stateMutability: 'view',
1668
+ type: 'function',
1669
+ },
1670
+ {
1671
+ inputs: [],
1672
+ name: 'paused',
1673
+ outputs: [
1674
+ {
1675
+ internalType: 'bool',
1676
+ name: '',
1677
+ type: 'bool',
1678
+ },
1679
+ ],
1680
+ stateMutability: 'view',
1681
+ type: 'function',
1682
+ },
1683
+ {
1684
+ inputs: [],
1685
+ name: 'proofMaturityDelaySeconds',
1686
+ outputs: [
1687
+ {
1688
+ internalType: 'uint256',
1689
+ name: '',
1690
+ type: 'uint256',
1691
+ },
1692
+ ],
1693
+ stateMutability: 'view',
1694
+ type: 'function',
1695
+ },
1696
+ {
1697
+ inputs: [
1698
+ {
1699
+ components: [
1700
+ {
1701
+ internalType: 'uint256',
1702
+ name: 'nonce',
1703
+ type: 'uint256',
1704
+ },
1705
+ {
1706
+ internalType: 'address',
1707
+ name: 'sender',
1708
+ type: 'address',
1709
+ },
1710
+ {
1711
+ internalType: 'address',
1712
+ name: 'target',
1713
+ type: 'address',
1714
+ },
1715
+ {
1716
+ internalType: 'uint256',
1717
+ name: 'value',
1718
+ type: 'uint256',
1719
+ },
1720
+ {
1721
+ internalType: 'uint256',
1722
+ name: 'gasLimit',
1723
+ type: 'uint256',
1724
+ },
1725
+ {
1726
+ internalType: 'bytes',
1727
+ name: 'data',
1728
+ type: 'bytes',
1729
+ },
1730
+ ],
1731
+ internalType: 'struct Types.WithdrawalTransaction',
1732
+ name: '_tx',
1733
+ type: 'tuple',
1734
+ },
1735
+ {
1736
+ internalType: 'uint256',
1737
+ name: '_disputeGameIndex',
1738
+ type: 'uint256',
1739
+ },
1740
+ {
1741
+ components: [
1742
+ {
1743
+ internalType: 'bytes32',
1744
+ name: 'version',
1745
+ type: 'bytes32',
1746
+ },
1747
+ {
1748
+ internalType: 'bytes32',
1749
+ name: 'stateRoot',
1750
+ type: 'bytes32',
1751
+ },
1752
+ {
1753
+ internalType: 'bytes32',
1754
+ name: 'messagePasserStorageRoot',
1755
+ type: 'bytes32',
1756
+ },
1757
+ {
1758
+ internalType: 'bytes32',
1759
+ name: 'latestBlockhash',
1760
+ type: 'bytes32',
1761
+ },
1762
+ ],
1763
+ internalType: 'struct Types.OutputRootProof',
1764
+ name: '_outputRootProof',
1765
+ type: 'tuple',
1766
+ },
1767
+ {
1768
+ internalType: 'bytes[]',
1769
+ name: '_withdrawalProof',
1770
+ type: 'bytes[]',
1771
+ },
1772
+ ],
1773
+ name: 'proveWithdrawalTransaction',
1774
+ outputs: [],
1775
+ stateMutability: 'nonpayable',
1776
+ type: 'function',
1777
+ },
1778
+ {
1779
+ inputs: [
1780
+ {
1781
+ internalType: 'bytes32',
1782
+ name: '',
1783
+ type: 'bytes32',
1784
+ },
1785
+ ],
1786
+ name: 'provenWithdrawals',
1787
+ outputs: [
1788
+ {
1789
+ internalType: 'contract IDisputeGame',
1790
+ name: 'disputeGameProxy',
1791
+ type: 'address',
1792
+ },
1793
+ {
1794
+ internalType: 'uint64',
1795
+ name: 'timestamp',
1796
+ type: 'uint64',
1797
+ },
1798
+ ],
1799
+ stateMutability: 'view',
1800
+ type: 'function',
1801
+ },
1802
+ {
1803
+ inputs: [],
1804
+ name: 'respectedGameType',
1805
+ outputs: [
1806
+ {
1807
+ internalType: 'GameType',
1808
+ name: '',
1809
+ type: 'uint32',
1810
+ },
1811
+ ],
1812
+ stateMutability: 'view',
1813
+ type: 'function',
1814
+ },
1815
+ {
1816
+ inputs: [],
1817
+ name: 'respectedGameTypeUpdatedAt',
1818
+ outputs: [
1819
+ {
1820
+ internalType: 'uint64',
1821
+ name: '',
1822
+ type: 'uint64',
1823
+ },
1824
+ ],
1825
+ stateMutability: 'view',
1826
+ type: 'function',
1827
+ },
1828
+ {
1829
+ inputs: [
1830
+ {
1831
+ internalType: 'GameType',
1832
+ name: '_gameType',
1833
+ type: 'uint32',
1834
+ },
1835
+ ],
1836
+ name: 'setRespectedGameType',
1837
+ outputs: [],
1838
+ stateMutability: 'nonpayable',
1839
+ type: 'function',
1840
+ },
1841
+ {
1842
+ inputs: [],
1843
+ name: 'superchainConfig',
1844
+ outputs: [
1845
+ {
1846
+ internalType: 'contract SuperchainConfig',
1847
+ name: '',
1848
+ type: 'address',
1849
+ },
1850
+ ],
1851
+ stateMutability: 'view',
1852
+ type: 'function',
1853
+ },
1854
+ {
1855
+ inputs: [],
1856
+ name: 'systemConfig',
1857
+ outputs: [
1858
+ {
1859
+ internalType: 'contract SystemConfig',
1860
+ name: '',
1861
+ type: 'address',
1862
+ },
1863
+ ],
1864
+ stateMutability: 'view',
1865
+ type: 'function',
1866
+ },
1867
+ {
1868
+ inputs: [],
1869
+ name: 'version',
1870
+ outputs: [
1871
+ {
1872
+ internalType: 'string',
1873
+ name: '',
1874
+ type: 'string',
1875
+ },
1876
+ ],
1877
+ stateMutability: 'view',
1878
+ type: 'function',
1879
+ },
1880
+ {
1881
+ anonymous: false,
1882
+ inputs: [
1883
+ {
1884
+ indexed: false,
1885
+ internalType: 'uint8',
1886
+ name: 'version',
1887
+ type: 'uint8',
1888
+ },
1889
+ ],
1890
+ name: 'Initialized',
1891
+ type: 'event',
1892
+ },
1893
+ {
1894
+ anonymous: false,
1895
+ inputs: [
1896
+ {
1897
+ indexed: true,
1898
+ internalType: 'address',
1899
+ name: 'from',
1900
+ type: 'address',
1901
+ },
1902
+ {
1903
+ indexed: true,
1904
+ internalType: 'address',
1905
+ name: 'to',
1906
+ type: 'address',
1907
+ },
1908
+ {
1909
+ indexed: true,
1910
+ internalType: 'uint256',
1911
+ name: 'version',
1912
+ type: 'uint256',
1913
+ },
1914
+ {
1915
+ indexed: false,
1916
+ internalType: 'bytes',
1917
+ name: 'opaqueData',
1918
+ type: 'bytes',
1919
+ },
1920
+ ],
1921
+ name: 'TransactionDeposited',
1922
+ type: 'event',
1923
+ },
1924
+ {
1925
+ anonymous: false,
1926
+ inputs: [
1927
+ {
1928
+ indexed: true,
1929
+ internalType: 'bytes32',
1930
+ name: 'withdrawalHash',
1931
+ type: 'bytes32',
1932
+ },
1933
+ {
1934
+ indexed: false,
1935
+ internalType: 'bool',
1936
+ name: 'success',
1937
+ type: 'bool',
1938
+ },
1939
+ ],
1940
+ name: 'WithdrawalFinalized',
1941
+ type: 'event',
1942
+ },
1943
+ {
1944
+ anonymous: false,
1945
+ inputs: [
1946
+ {
1947
+ indexed: true,
1948
+ internalType: 'bytes32',
1949
+ name: 'withdrawalHash',
1950
+ type: 'bytes32',
1951
+ },
1952
+ {
1953
+ indexed: true,
1954
+ internalType: 'address',
1955
+ name: 'from',
1956
+ type: 'address',
1957
+ },
1958
+ {
1959
+ indexed: true,
1960
+ internalType: 'address',
1961
+ name: 'to',
1962
+ type: 'address',
1963
+ },
1964
+ ],
1965
+ name: 'WithdrawalProven',
1966
+ type: 'event',
1967
+ },
1968
+ ];
900
1969
  export const portalAbi = [
901
1970
  { stateMutability: 'nonpayable', type: 'constructor', inputs: [] },
902
1971
  {