thirdweb 5.64.4-nightly-043ee925981bdc39649d30ad65d2fce922515ab0-20241030000335 → 5.64.4

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 (248) hide show
  1. package/dist/cjs/exports/wallets/smart.js +2 -1
  2. package/dist/cjs/exports/wallets/smart.js.map +1 -1
  3. package/dist/cjs/extensions/erc1155/__generated__/IDropSinglePhase1155/events/ClaimConditionUpdated.js +31 -0
  4. package/dist/cjs/extensions/erc1155/__generated__/IDropSinglePhase1155/events/ClaimConditionUpdated.js.map +1 -0
  5. package/dist/cjs/extensions/erc1155/__generated__/IDropSinglePhase1155/events/TokensClaimed.js +33 -0
  6. package/dist/cjs/extensions/erc1155/__generated__/IDropSinglePhase1155/events/TokensClaimed.js.map +1 -0
  7. package/dist/cjs/extensions/erc1155/__generated__/IDropSinglePhase1155/read/claimCondition.js +149 -0
  8. package/dist/cjs/extensions/erc1155/__generated__/IDropSinglePhase1155/read/claimCondition.js.map +1 -0
  9. package/dist/cjs/extensions/erc1155/__generated__/IDropSinglePhase1155/write/claim.js +193 -0
  10. package/dist/cjs/extensions/erc1155/__generated__/IDropSinglePhase1155/write/claim.js.map +1 -0
  11. package/dist/cjs/extensions/erc1155/__generated__/IDropSinglePhase1155/write/setClaimConditions.js +173 -0
  12. package/dist/cjs/extensions/erc1155/__generated__/IDropSinglePhase1155/write/setClaimConditions.js.map +1 -0
  13. package/dist/cjs/extensions/erc1155/drops/write/claimTo.js +5 -2
  14. package/dist/cjs/extensions/erc1155/drops/write/claimTo.js.map +1 -1
  15. package/dist/cjs/extensions/erc1155/drops/write/setClaimConditions.js +4 -1
  16. package/dist/cjs/extensions/erc1155/drops/write/setClaimConditions.js.map +1 -1
  17. package/dist/cjs/extensions/erc20/drops/write/claimTo.js +1 -0
  18. package/dist/cjs/extensions/erc20/drops/write/claimTo.js.map +1 -1
  19. package/dist/cjs/extensions/erc20/drops/write/setClaimConditions.js +1 -0
  20. package/dist/cjs/extensions/erc20/drops/write/setClaimConditions.js.map +1 -1
  21. package/dist/cjs/extensions/erc721/__generated__/IDropSinglePhase/events/ClaimConditionUpdated.js +27 -0
  22. package/dist/cjs/extensions/erc721/__generated__/IDropSinglePhase/events/ClaimConditionUpdated.js.map +1 -0
  23. package/dist/cjs/extensions/erc721/__generated__/IDropSinglePhase/events/TokensClaimed.js +33 -0
  24. package/dist/cjs/extensions/erc721/__generated__/IDropSinglePhase/events/TokensClaimed.js.map +1 -0
  25. package/dist/cjs/extensions/erc721/__generated__/IDropSinglePhase/read/claimCondition.js +105 -0
  26. package/dist/cjs/extensions/erc721/__generated__/IDropSinglePhase/read/claimCondition.js.map +1 -0
  27. package/dist/cjs/extensions/erc721/__generated__/IDropSinglePhase/write/claim.js +184 -0
  28. package/dist/cjs/extensions/erc721/__generated__/IDropSinglePhase/write/claim.js.map +1 -0
  29. package/dist/cjs/extensions/erc721/__generated__/IDropSinglePhase/write/setClaimConditions.js +164 -0
  30. package/dist/cjs/extensions/erc721/__generated__/IDropSinglePhase/write/setClaimConditions.js.map +1 -0
  31. package/dist/cjs/extensions/erc721/drops/write/claimTo.js +6 -3
  32. package/dist/cjs/extensions/erc721/drops/write/claimTo.js.map +1 -1
  33. package/dist/cjs/extensions/erc721/drops/write/setClaimConditions.js +4 -1
  34. package/dist/cjs/extensions/erc721/drops/write/setClaimConditions.js.map +1 -1
  35. package/dist/cjs/react/web/ui/ConnectWallet/TransactionsScreen.js +2 -1
  36. package/dist/cjs/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -1
  37. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +3 -2
  38. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
  39. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +2 -1
  40. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
  41. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js +4 -3
  42. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +1 -1
  43. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js +2 -1
  44. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js.map +1 -1
  45. package/dist/cjs/react/web/ui/TransactionButton/ExecutingScreen.js +2 -1
  46. package/dist/cjs/react/web/ui/TransactionButton/ExecutingScreen.js.map +1 -1
  47. package/dist/cjs/transaction/prepare-contract-call.js +23 -0
  48. package/dist/cjs/transaction/prepare-contract-call.js.map +1 -1
  49. package/dist/cjs/utils/extensions/drops/get-claim-params.js +20 -0
  50. package/dist/cjs/utils/extensions/drops/get-claim-params.js.map +1 -1
  51. package/dist/cjs/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.js +39 -12
  52. package/dist/cjs/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.js.map +1 -1
  53. package/dist/cjs/utils/url.js +8 -0
  54. package/dist/cjs/utils/url.js.map +1 -1
  55. package/dist/cjs/version.js +1 -1
  56. package/dist/cjs/version.js.map +1 -1
  57. package/dist/cjs/wallets/in-app/core/authentication/authEndpoint.js +7 -6
  58. package/dist/cjs/wallets/in-app/core/authentication/authEndpoint.js.map +1 -1
  59. package/dist/cjs/wallets/in-app/core/authentication/guest.js +17 -20
  60. package/dist/cjs/wallets/in-app/core/authentication/guest.js.map +1 -1
  61. package/dist/cjs/wallets/in-app/core/authentication/jwt.js +7 -6
  62. package/dist/cjs/wallets/in-app/core/authentication/jwt.js.map +1 -1
  63. package/dist/cjs/wallets/in-app/native/helpers/api/fetchers.js +0 -1
  64. package/dist/cjs/wallets/in-app/native/helpers/api/fetchers.js.map +1 -1
  65. package/dist/cjs/wallets/in-app/native/native-connector.js +2 -2
  66. package/dist/cjs/wallets/in-app/native/native-connector.js.map +1 -1
  67. package/dist/cjs/wallets/in-app/web/lib/web-connector.js +17 -20
  68. package/dist/cjs/wallets/in-app/web/lib/web-connector.js.map +1 -1
  69. package/dist/cjs/wallets/smart/lib/calls.js +31 -0
  70. package/dist/cjs/wallets/smart/lib/calls.js.map +1 -1
  71. package/dist/cjs/wallets/smart/lib/userop.js +1 -0
  72. package/dist/cjs/wallets/smart/lib/userop.js.map +1 -1
  73. package/dist/esm/exports/wallets/smart.js +1 -1
  74. package/dist/esm/exports/wallets/smart.js.map +1 -1
  75. package/dist/esm/extensions/erc1155/__generated__/IDropSinglePhase1155/events/ClaimConditionUpdated.js +28 -0
  76. package/dist/esm/extensions/erc1155/__generated__/IDropSinglePhase1155/events/ClaimConditionUpdated.js.map +1 -0
  77. package/dist/esm/extensions/erc1155/__generated__/IDropSinglePhase1155/events/TokensClaimed.js +30 -0
  78. package/dist/esm/extensions/erc1155/__generated__/IDropSinglePhase1155/events/TokensClaimed.js.map +1 -0
  79. package/dist/esm/extensions/erc1155/__generated__/IDropSinglePhase1155/read/claimCondition.js +141 -0
  80. package/dist/esm/extensions/erc1155/__generated__/IDropSinglePhase1155/read/claimCondition.js.map +1 -0
  81. package/dist/esm/extensions/erc1155/__generated__/IDropSinglePhase1155/write/claim.js +186 -0
  82. package/dist/esm/extensions/erc1155/__generated__/IDropSinglePhase1155/write/claim.js.map +1 -0
  83. package/dist/esm/extensions/erc1155/__generated__/IDropSinglePhase1155/write/setClaimConditions.js +166 -0
  84. package/dist/esm/extensions/erc1155/__generated__/IDropSinglePhase1155/write/setClaimConditions.js.map +1 -0
  85. package/dist/esm/extensions/erc1155/drops/write/claimTo.js +5 -2
  86. package/dist/esm/extensions/erc1155/drops/write/claimTo.js.map +1 -1
  87. package/dist/esm/extensions/erc1155/drops/write/setClaimConditions.js +4 -1
  88. package/dist/esm/extensions/erc1155/drops/write/setClaimConditions.js.map +1 -1
  89. package/dist/esm/extensions/erc20/drops/write/claimTo.js +1 -0
  90. package/dist/esm/extensions/erc20/drops/write/claimTo.js.map +1 -1
  91. package/dist/esm/extensions/erc20/drops/write/setClaimConditions.js +1 -0
  92. package/dist/esm/extensions/erc20/drops/write/setClaimConditions.js.map +1 -1
  93. package/dist/esm/extensions/erc721/__generated__/IDropSinglePhase/events/ClaimConditionUpdated.js +24 -0
  94. package/dist/esm/extensions/erc721/__generated__/IDropSinglePhase/events/ClaimConditionUpdated.js.map +1 -0
  95. package/dist/esm/extensions/erc721/__generated__/IDropSinglePhase/events/TokensClaimed.js +30 -0
  96. package/dist/esm/extensions/erc721/__generated__/IDropSinglePhase/events/TokensClaimed.js.map +1 -0
  97. package/dist/esm/extensions/erc721/__generated__/IDropSinglePhase/read/claimCondition.js +99 -0
  98. package/dist/esm/extensions/erc721/__generated__/IDropSinglePhase/read/claimCondition.js.map +1 -0
  99. package/dist/esm/extensions/erc721/__generated__/IDropSinglePhase/write/claim.js +177 -0
  100. package/dist/esm/extensions/erc721/__generated__/IDropSinglePhase/write/claim.js.map +1 -0
  101. package/dist/esm/extensions/erc721/__generated__/IDropSinglePhase/write/setClaimConditions.js +157 -0
  102. package/dist/esm/extensions/erc721/__generated__/IDropSinglePhase/write/setClaimConditions.js.map +1 -0
  103. package/dist/esm/extensions/erc721/drops/write/claimTo.js +6 -3
  104. package/dist/esm/extensions/erc721/drops/write/claimTo.js.map +1 -1
  105. package/dist/esm/extensions/erc721/drops/write/setClaimConditions.js +4 -1
  106. package/dist/esm/extensions/erc721/drops/write/setClaimConditions.js.map +1 -1
  107. package/dist/esm/react/web/ui/ConnectWallet/TransactionsScreen.js +2 -1
  108. package/dist/esm/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -1
  109. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +3 -2
  110. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
  111. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +2 -1
  112. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
  113. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js +4 -3
  114. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +1 -1
  115. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js +2 -1
  116. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js.map +1 -1
  117. package/dist/esm/react/web/ui/TransactionButton/ExecutingScreen.js +2 -1
  118. package/dist/esm/react/web/ui/TransactionButton/ExecutingScreen.js.map +1 -1
  119. package/dist/esm/transaction/prepare-contract-call.js +23 -0
  120. package/dist/esm/transaction/prepare-contract-call.js.map +1 -1
  121. package/dist/esm/utils/extensions/drops/get-claim-params.js +20 -0
  122. package/dist/esm/utils/extensions/drops/get-claim-params.js.map +1 -1
  123. package/dist/esm/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.js +39 -12
  124. package/dist/esm/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.js.map +1 -1
  125. package/dist/esm/utils/url.js +6 -0
  126. package/dist/esm/utils/url.js.map +1 -1
  127. package/dist/esm/version.js +1 -1
  128. package/dist/esm/version.js.map +1 -1
  129. package/dist/esm/wallets/in-app/core/authentication/authEndpoint.js +7 -6
  130. package/dist/esm/wallets/in-app/core/authentication/authEndpoint.js.map +1 -1
  131. package/dist/esm/wallets/in-app/core/authentication/guest.js +17 -20
  132. package/dist/esm/wallets/in-app/core/authentication/guest.js.map +1 -1
  133. package/dist/esm/wallets/in-app/core/authentication/jwt.js +7 -6
  134. package/dist/esm/wallets/in-app/core/authentication/jwt.js.map +1 -1
  135. package/dist/esm/wallets/in-app/native/helpers/api/fetchers.js +1 -1
  136. package/dist/esm/wallets/in-app/native/helpers/api/fetchers.js.map +1 -1
  137. package/dist/esm/wallets/in-app/native/native-connector.js +2 -2
  138. package/dist/esm/wallets/in-app/native/native-connector.js.map +1 -1
  139. package/dist/esm/wallets/in-app/web/lib/web-connector.js +17 -20
  140. package/dist/esm/wallets/in-app/web/lib/web-connector.js.map +1 -1
  141. package/dist/esm/wallets/smart/lib/calls.js +30 -0
  142. package/dist/esm/wallets/smart/lib/calls.js.map +1 -1
  143. package/dist/esm/wallets/smart/lib/userop.js +1 -0
  144. package/dist/esm/wallets/smart/lib/userop.js.map +1 -1
  145. package/dist/types/exports/wallets/smart.d.ts +1 -1
  146. package/dist/types/exports/wallets/smart.d.ts.map +1 -1
  147. package/dist/types/extensions/erc1155/__generated__/IDropSinglePhase1155/events/ClaimConditionUpdated.d.ts +72 -0
  148. package/dist/types/extensions/erc1155/__generated__/IDropSinglePhase1155/events/ClaimConditionUpdated.d.ts.map +1 -0
  149. package/dist/types/extensions/erc1155/__generated__/IDropSinglePhase1155/events/TokensClaimed.d.ts +64 -0
  150. package/dist/types/extensions/erc1155/__generated__/IDropSinglePhase1155/events/TokensClaimed.d.ts.map +1 -0
  151. package/dist/types/extensions/erc1155/__generated__/IDropSinglePhase1155/read/claimCondition.d.ts +101 -0
  152. package/dist/types/extensions/erc1155/__generated__/IDropSinglePhase1155/read/claimCondition.d.ts.map +1 -0
  153. package/dist/types/extensions/erc1155/__generated__/IDropSinglePhase1155/write/claim.d.ts +139 -0
  154. package/dist/types/extensions/erc1155/__generated__/IDropSinglePhase1155/write/claim.d.ts.map +1 -0
  155. package/dist/types/extensions/erc1155/__generated__/IDropSinglePhase1155/write/setClaimConditions.d.ts +127 -0
  156. package/dist/types/extensions/erc1155/__generated__/IDropSinglePhase1155/write/setClaimConditions.d.ts.map +1 -0
  157. package/dist/types/extensions/erc1155/drops/write/claimTo.d.ts +1 -0
  158. package/dist/types/extensions/erc1155/drops/write/claimTo.d.ts.map +1 -1
  159. package/dist/types/extensions/erc1155/drops/write/setClaimConditions.d.ts +1 -0
  160. package/dist/types/extensions/erc1155/drops/write/setClaimConditions.d.ts.map +1 -1
  161. package/dist/types/extensions/erc20/drops/write/claimTo.d.ts +1 -0
  162. package/dist/types/extensions/erc20/drops/write/claimTo.d.ts.map +1 -1
  163. package/dist/types/extensions/erc20/drops/write/setClaimConditions.d.ts +1 -0
  164. package/dist/types/extensions/erc20/drops/write/setClaimConditions.d.ts.map +1 -1
  165. package/dist/types/extensions/erc721/__generated__/IDropSinglePhase/events/ClaimConditionUpdated.d.ts +54 -0
  166. package/dist/types/extensions/erc721/__generated__/IDropSinglePhase/events/ClaimConditionUpdated.d.ts.map +1 -0
  167. package/dist/types/extensions/erc721/__generated__/IDropSinglePhase/events/TokensClaimed.d.ts +64 -0
  168. package/dist/types/extensions/erc721/__generated__/IDropSinglePhase/events/TokensClaimed.d.ts.map +1 -0
  169. package/dist/types/extensions/erc721/__generated__/IDropSinglePhase/read/claimCondition.d.ts +62 -0
  170. package/dist/types/extensions/erc721/__generated__/IDropSinglePhase/read/claimCondition.d.ts.map +1 -0
  171. package/dist/types/extensions/erc721/__generated__/IDropSinglePhase/write/claim.d.ts +132 -0
  172. package/dist/types/extensions/erc721/__generated__/IDropSinglePhase/write/claim.d.ts.map +1 -0
  173. package/dist/types/extensions/erc721/__generated__/IDropSinglePhase/write/setClaimConditions.d.ts +120 -0
  174. package/dist/types/extensions/erc721/__generated__/IDropSinglePhase/write/setClaimConditions.d.ts.map +1 -0
  175. package/dist/types/extensions/erc721/drops/write/claimTo.d.ts +1 -0
  176. package/dist/types/extensions/erc721/drops/write/claimTo.d.ts.map +1 -1
  177. package/dist/types/extensions/erc721/drops/write/setClaimConditions.d.ts +1 -0
  178. package/dist/types/extensions/erc721/drops/write/setClaimConditions.d.ts.map +1 -1
  179. package/dist/types/react/web/ui/ConnectWallet/TransactionsScreen.d.ts.map +1 -1
  180. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.d.ts.map +1 -1
  181. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.d.ts.map +1 -1
  182. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.d.ts.map +1 -1
  183. package/dist/types/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.d.ts.map +1 -1
  184. package/dist/types/react/web/ui/TransactionButton/ExecutingScreen.d.ts.map +1 -1
  185. package/dist/types/transaction/prepare-contract-call.d.ts +23 -0
  186. package/dist/types/transaction/prepare-contract-call.d.ts.map +1 -1
  187. package/dist/types/utils/extensions/drops/get-claim-params.d.ts +1 -0
  188. package/dist/types/utils/extensions/drops/get-claim-params.d.ts.map +1 -1
  189. package/dist/types/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.d.ts +1 -0
  190. package/dist/types/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.d.ts.map +1 -1
  191. package/dist/types/utils/url.d.ts +2 -0
  192. package/dist/types/utils/url.d.ts.map +1 -1
  193. package/dist/types/version.d.ts +1 -1
  194. package/dist/types/version.d.ts.map +1 -1
  195. package/dist/types/wallets/in-app/core/authentication/authEndpoint.d.ts +2 -2
  196. package/dist/types/wallets/in-app/core/authentication/authEndpoint.d.ts.map +1 -1
  197. package/dist/types/wallets/in-app/core/authentication/guest.d.ts.map +1 -1
  198. package/dist/types/wallets/in-app/core/authentication/jwt.d.ts +2 -2
  199. package/dist/types/wallets/in-app/core/authentication/jwt.d.ts.map +1 -1
  200. package/dist/types/wallets/in-app/native/helpers/api/fetchers.d.ts +0 -4
  201. package/dist/types/wallets/in-app/native/helpers/api/fetchers.d.ts.map +1 -1
  202. package/dist/types/wallets/in-app/web/lib/web-connector.d.ts +1 -1
  203. package/dist/types/wallets/in-app/web/lib/web-connector.d.ts.map +1 -1
  204. package/dist/types/wallets/smart/lib/calls.d.ts +27 -1
  205. package/dist/types/wallets/smart/lib/calls.d.ts.map +1 -1
  206. package/dist/types/wallets/smart/lib/userop.d.ts.map +1 -1
  207. package/package.json +1 -1
  208. package/src/exports/wallets/smart.ts +4 -1
  209. package/src/extensions/erc1155/__generated__/IDropSinglePhase1155/events/ClaimConditionUpdated.ts +43 -0
  210. package/src/extensions/erc1155/__generated__/IDropSinglePhase1155/events/TokensClaimed.ts +53 -0
  211. package/src/extensions/erc1155/__generated__/IDropSinglePhase1155/read/claimCondition.ts +160 -0
  212. package/src/extensions/erc1155/__generated__/IDropSinglePhase1155/write/claim.ts +229 -0
  213. package/src/extensions/erc1155/__generated__/IDropSinglePhase1155/write/setClaimConditions.ts +213 -0
  214. package/src/extensions/erc1155/customDrop1155.test.ts +181 -0
  215. package/src/extensions/erc1155/drops/write/claimTo.ts +6 -2
  216. package/src/extensions/erc1155/drops/write/setClaimConditions.ts +5 -1
  217. package/src/extensions/erc20/customDrop20.test.ts +80 -0
  218. package/src/extensions/erc20/drops/write/claimTo.ts +2 -0
  219. package/src/extensions/erc20/drops/write/setClaimConditions.ts +2 -0
  220. package/src/extensions/erc721/__generated__/IDropSinglePhase/events/ClaimConditionUpdated.ts +25 -0
  221. package/src/extensions/erc721/__generated__/IDropSinglePhase/events/TokensClaimed.ts +53 -0
  222. package/src/extensions/erc721/__generated__/IDropSinglePhase/read/claimCondition.ts +105 -0
  223. package/src/extensions/erc721/__generated__/IDropSinglePhase/write/claim.ts +219 -0
  224. package/src/extensions/erc721/__generated__/IDropSinglePhase/write/setClaimConditions.ts +203 -0
  225. package/src/extensions/erc721/customDrop721.test.ts +115 -0
  226. package/src/extensions/erc721/drops/write/claimTo.ts +7 -3
  227. package/src/extensions/erc721/drops/write/setClaimConditions.ts +5 -1
  228. package/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx +5 -1
  229. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx +9 -2
  230. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.tsx +5 -3
  231. package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.tsx +13 -3
  232. package/src/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.tsx +2 -1
  233. package/src/react/web/ui/TransactionButton/ExecutingScreen.tsx +5 -1
  234. package/src/transaction/prepare-contract-call.ts +23 -0
  235. package/src/utils/extensions/drops/get-claim-params.ts +29 -2
  236. package/src/utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.ts +46 -16
  237. package/src/utils/url.ts +8 -0
  238. package/src/version.ts +1 -1
  239. package/src/wallets/in-app/core/authentication/authEndpoint.ts +11 -8
  240. package/src/wallets/in-app/core/authentication/guest.ts +16 -19
  241. package/src/wallets/in-app/core/authentication/jwt.ts +11 -8
  242. package/src/wallets/in-app/native/helpers/api/fetchers.ts +1 -1
  243. package/src/wallets/in-app/native/native-connector.ts +2 -2
  244. package/src/wallets/in-app/web/lib/web-connector.ts +20 -20
  245. package/src/wallets/smart/lib/calls.ts +42 -1
  246. package/src/wallets/smart/lib/userop.ts +1 -0
  247. package/src/wallets/smart/smart-wallet-integration-v07.test.ts +8 -0
  248. package/src/wallets/smart/smart-wallet-integration.test.ts +7 -0
@@ -0,0 +1,219 @@
1
+ import type { AbiParameterToPrimitiveType } from "abitype";
2
+ import type {
3
+ BaseTransactionOptions,
4
+ WithOverrides,
5
+ } from "../../../../../transaction/types.js";
6
+ import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js";
7
+ import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js";
8
+ import { once } from "../../../../../utils/promise/once.js";
9
+ import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js";
10
+
11
+ /**
12
+ * Represents the parameters for the "claim" function.
13
+ */
14
+ export type ClaimParams = WithOverrides<{
15
+ receiver: AbiParameterToPrimitiveType<{ type: "address"; name: "receiver" }>;
16
+ quantity: AbiParameterToPrimitiveType<{ type: "uint256"; name: "quantity" }>;
17
+ currency: AbiParameterToPrimitiveType<{ type: "address"; name: "currency" }>;
18
+ pricePerToken: AbiParameterToPrimitiveType<{
19
+ type: "uint256";
20
+ name: "pricePerToken";
21
+ }>;
22
+ allowlistProof: AbiParameterToPrimitiveType<{
23
+ type: "tuple";
24
+ name: "allowlistProof";
25
+ components: [
26
+ { type: "bytes32[]"; name: "proof" },
27
+ { type: "uint256"; name: "quantityLimitPerWallet" },
28
+ { type: "uint256"; name: "pricePerToken" },
29
+ { type: "address"; name: "currency" },
30
+ ];
31
+ }>;
32
+ data: AbiParameterToPrimitiveType<{ type: "bytes"; name: "data" }>;
33
+ }>;
34
+
35
+ export const FN_SELECTOR = "0x84bb1e42" as const;
36
+ const FN_INPUTS = [
37
+ {
38
+ type: "address",
39
+ name: "receiver",
40
+ },
41
+ {
42
+ type: "uint256",
43
+ name: "quantity",
44
+ },
45
+ {
46
+ type: "address",
47
+ name: "currency",
48
+ },
49
+ {
50
+ type: "uint256",
51
+ name: "pricePerToken",
52
+ },
53
+ {
54
+ type: "tuple",
55
+ name: "allowlistProof",
56
+ components: [
57
+ {
58
+ type: "bytes32[]",
59
+ name: "proof",
60
+ },
61
+ {
62
+ type: "uint256",
63
+ name: "quantityLimitPerWallet",
64
+ },
65
+ {
66
+ type: "uint256",
67
+ name: "pricePerToken",
68
+ },
69
+ {
70
+ type: "address",
71
+ name: "currency",
72
+ },
73
+ ],
74
+ },
75
+ {
76
+ type: "bytes",
77
+ name: "data",
78
+ },
79
+ ] as const;
80
+ const FN_OUTPUTS = [] as const;
81
+
82
+ /**
83
+ * Checks if the `claim` method is supported by the given contract.
84
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
85
+ * @returns A boolean indicating if the `claim` method is supported.
86
+ * @extension ERC721
87
+ * @example
88
+ * ```ts
89
+ * import { isClaimSupported } from "thirdweb/extensions/erc721";
90
+ *
91
+ * const supported = isClaimSupported(["0x..."]);
92
+ * ```
93
+ */
94
+ export function isClaimSupported(availableSelectors: string[]) {
95
+ return detectMethod({
96
+ availableSelectors,
97
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
98
+ });
99
+ }
100
+
101
+ /**
102
+ * Encodes the parameters for the "claim" function.
103
+ * @param options - The options for the claim function.
104
+ * @returns The encoded ABI parameters.
105
+ * @extension ERC721
106
+ * @example
107
+ * ```ts
108
+ * import { encodeClaimParams } from "thirdweb/extensions/erc721";
109
+ * const result = encodeClaimParams({
110
+ * receiver: ...,
111
+ * quantity: ...,
112
+ * currency: ...,
113
+ * pricePerToken: ...,
114
+ * allowlistProof: ...,
115
+ * data: ...,
116
+ * });
117
+ * ```
118
+ */
119
+ export function encodeClaimParams(options: ClaimParams) {
120
+ return encodeAbiParameters(FN_INPUTS, [
121
+ options.receiver,
122
+ options.quantity,
123
+ options.currency,
124
+ options.pricePerToken,
125
+ options.allowlistProof,
126
+ options.data,
127
+ ]);
128
+ }
129
+
130
+ /**
131
+ * Encodes the "claim" function into a Hex string with its parameters.
132
+ * @param options - The options for the claim function.
133
+ * @returns The encoded hexadecimal string.
134
+ * @extension ERC721
135
+ * @example
136
+ * ```ts
137
+ * import { encodeClaim } from "thirdweb/extensions/erc721";
138
+ * const result = encodeClaim({
139
+ * receiver: ...,
140
+ * quantity: ...,
141
+ * currency: ...,
142
+ * pricePerToken: ...,
143
+ * allowlistProof: ...,
144
+ * data: ...,
145
+ * });
146
+ * ```
147
+ */
148
+ export function encodeClaim(options: ClaimParams) {
149
+ // we do a "manual" concat here to avoid the overhead of the "concatHex" function
150
+ // we can do this because we know the specific formats of the values
151
+ return (FN_SELECTOR +
152
+ encodeClaimParams(options).slice(2)) as `${typeof FN_SELECTOR}${string}`;
153
+ }
154
+
155
+ /**
156
+ * Prepares a transaction to call the "claim" function on the contract.
157
+ * @param options - The options for the "claim" function.
158
+ * @returns A prepared transaction object.
159
+ * @extension ERC721
160
+ * @example
161
+ * ```ts
162
+ * import { sendTransaction } from "thirdweb";
163
+ * import { claim } from "thirdweb/extensions/erc721";
164
+ *
165
+ * const transaction = claim({
166
+ * contract,
167
+ * receiver: ...,
168
+ * quantity: ...,
169
+ * currency: ...,
170
+ * pricePerToken: ...,
171
+ * allowlistProof: ...,
172
+ * data: ...,
173
+ * overrides: {
174
+ * ...
175
+ * }
176
+ * });
177
+ *
178
+ * // Send the transaction
179
+ * await sendTransaction({ transaction, account });
180
+ * ```
181
+ */
182
+ export function claim(
183
+ options: BaseTransactionOptions<
184
+ | ClaimParams
185
+ | {
186
+ asyncParams: () => Promise<ClaimParams>;
187
+ }
188
+ >,
189
+ ) {
190
+ const asyncOptions = once(async () => {
191
+ return "asyncParams" in options ? await options.asyncParams() : options;
192
+ });
193
+
194
+ return prepareContractCall({
195
+ contract: options.contract,
196
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
197
+ params: async () => {
198
+ const resolvedOptions = await asyncOptions();
199
+ return [
200
+ resolvedOptions.receiver,
201
+ resolvedOptions.quantity,
202
+ resolvedOptions.currency,
203
+ resolvedOptions.pricePerToken,
204
+ resolvedOptions.allowlistProof,
205
+ resolvedOptions.data,
206
+ ] as const;
207
+ },
208
+ value: async () => (await asyncOptions()).overrides?.value,
209
+ accessList: async () => (await asyncOptions()).overrides?.accessList,
210
+ gas: async () => (await asyncOptions()).overrides?.gas,
211
+ gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
212
+ maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
213
+ maxPriorityFeePerGas: async () =>
214
+ (await asyncOptions()).overrides?.maxPriorityFeePerGas,
215
+ nonce: async () => (await asyncOptions()).overrides?.nonce,
216
+ extraGas: async () => (await asyncOptions()).overrides?.extraGas,
217
+ erc20Value: async () => (await asyncOptions()).overrides?.erc20Value,
218
+ });
219
+ }
@@ -0,0 +1,203 @@
1
+ import type { AbiParameterToPrimitiveType } from "abitype";
2
+ import type {
3
+ BaseTransactionOptions,
4
+ WithOverrides,
5
+ } from "../../../../../transaction/types.js";
6
+ import { prepareContractCall } from "../../../../../transaction/prepare-contract-call.js";
7
+ import { encodeAbiParameters } from "../../../../../utils/abi/encodeAbiParameters.js";
8
+ import { once } from "../../../../../utils/promise/once.js";
9
+ import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js";
10
+
11
+ /**
12
+ * Represents the parameters for the "setClaimConditions" function.
13
+ */
14
+ export type SetClaimConditionsParams = WithOverrides<{
15
+ phase: AbiParameterToPrimitiveType<{
16
+ type: "tuple";
17
+ name: "phase";
18
+ components: [
19
+ { type: "uint256"; name: "startTimestamp" },
20
+ { type: "uint256"; name: "maxClaimableSupply" },
21
+ { type: "uint256"; name: "supplyClaimed" },
22
+ { type: "uint256"; name: "quantityLimitPerWallet" },
23
+ { type: "bytes32"; name: "merkleRoot" },
24
+ { type: "uint256"; name: "pricePerToken" },
25
+ { type: "address"; name: "currency" },
26
+ { type: "string"; name: "metadata" },
27
+ ];
28
+ }>;
29
+ resetClaimEligibility: AbiParameterToPrimitiveType<{
30
+ type: "bool";
31
+ name: "resetClaimEligibility";
32
+ }>;
33
+ }>;
34
+
35
+ export const FN_SELECTOR = "0x426cfaf3" as const;
36
+ const FN_INPUTS = [
37
+ {
38
+ type: "tuple",
39
+ name: "phase",
40
+ components: [
41
+ {
42
+ type: "uint256",
43
+ name: "startTimestamp",
44
+ },
45
+ {
46
+ type: "uint256",
47
+ name: "maxClaimableSupply",
48
+ },
49
+ {
50
+ type: "uint256",
51
+ name: "supplyClaimed",
52
+ },
53
+ {
54
+ type: "uint256",
55
+ name: "quantityLimitPerWallet",
56
+ },
57
+ {
58
+ type: "bytes32",
59
+ name: "merkleRoot",
60
+ },
61
+ {
62
+ type: "uint256",
63
+ name: "pricePerToken",
64
+ },
65
+ {
66
+ type: "address",
67
+ name: "currency",
68
+ },
69
+ {
70
+ type: "string",
71
+ name: "metadata",
72
+ },
73
+ ],
74
+ },
75
+ {
76
+ type: "bool",
77
+ name: "resetClaimEligibility",
78
+ },
79
+ ] as const;
80
+ const FN_OUTPUTS = [] as const;
81
+
82
+ /**
83
+ * Checks if the `setClaimConditions` method is supported by the given contract.
84
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
85
+ * @returns A boolean indicating if the `setClaimConditions` method is supported.
86
+ * @extension ERC721
87
+ * @example
88
+ * ```ts
89
+ * import { isSetClaimConditionsSupported } from "thirdweb/extensions/erc721";
90
+ *
91
+ * const supported = isSetClaimConditionsSupported(["0x..."]);
92
+ * ```
93
+ */
94
+ export function isSetClaimConditionsSupported(availableSelectors: string[]) {
95
+ return detectMethod({
96
+ availableSelectors,
97
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
98
+ });
99
+ }
100
+
101
+ /**
102
+ * Encodes the parameters for the "setClaimConditions" function.
103
+ * @param options - The options for the setClaimConditions function.
104
+ * @returns The encoded ABI parameters.
105
+ * @extension ERC721
106
+ * @example
107
+ * ```ts
108
+ * import { encodeSetClaimConditionsParams } from "thirdweb/extensions/erc721";
109
+ * const result = encodeSetClaimConditionsParams({
110
+ * phase: ...,
111
+ * resetClaimEligibility: ...,
112
+ * });
113
+ * ```
114
+ */
115
+ export function encodeSetClaimConditionsParams(
116
+ options: SetClaimConditionsParams,
117
+ ) {
118
+ return encodeAbiParameters(FN_INPUTS, [
119
+ options.phase,
120
+ options.resetClaimEligibility,
121
+ ]);
122
+ }
123
+
124
+ /**
125
+ * Encodes the "setClaimConditions" function into a Hex string with its parameters.
126
+ * @param options - The options for the setClaimConditions function.
127
+ * @returns The encoded hexadecimal string.
128
+ * @extension ERC721
129
+ * @example
130
+ * ```ts
131
+ * import { encodeSetClaimConditions } from "thirdweb/extensions/erc721";
132
+ * const result = encodeSetClaimConditions({
133
+ * phase: ...,
134
+ * resetClaimEligibility: ...,
135
+ * });
136
+ * ```
137
+ */
138
+ export function encodeSetClaimConditions(options: SetClaimConditionsParams) {
139
+ // we do a "manual" concat here to avoid the overhead of the "concatHex" function
140
+ // we can do this because we know the specific formats of the values
141
+ return (FN_SELECTOR +
142
+ encodeSetClaimConditionsParams(options).slice(
143
+ 2,
144
+ )) as `${typeof FN_SELECTOR}${string}`;
145
+ }
146
+
147
+ /**
148
+ * Prepares a transaction to call the "setClaimConditions" function on the contract.
149
+ * @param options - The options for the "setClaimConditions" function.
150
+ * @returns A prepared transaction object.
151
+ * @extension ERC721
152
+ * @example
153
+ * ```ts
154
+ * import { sendTransaction } from "thirdweb";
155
+ * import { setClaimConditions } from "thirdweb/extensions/erc721";
156
+ *
157
+ * const transaction = setClaimConditions({
158
+ * contract,
159
+ * phase: ...,
160
+ * resetClaimEligibility: ...,
161
+ * overrides: {
162
+ * ...
163
+ * }
164
+ * });
165
+ *
166
+ * // Send the transaction
167
+ * await sendTransaction({ transaction, account });
168
+ * ```
169
+ */
170
+ export function setClaimConditions(
171
+ options: BaseTransactionOptions<
172
+ | SetClaimConditionsParams
173
+ | {
174
+ asyncParams: () => Promise<SetClaimConditionsParams>;
175
+ }
176
+ >,
177
+ ) {
178
+ const asyncOptions = once(async () => {
179
+ return "asyncParams" in options ? await options.asyncParams() : options;
180
+ });
181
+
182
+ return prepareContractCall({
183
+ contract: options.contract,
184
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS] as const,
185
+ params: async () => {
186
+ const resolvedOptions = await asyncOptions();
187
+ return [
188
+ resolvedOptions.phase,
189
+ resolvedOptions.resetClaimEligibility,
190
+ ] as const;
191
+ },
192
+ value: async () => (await asyncOptions()).overrides?.value,
193
+ accessList: async () => (await asyncOptions()).overrides?.accessList,
194
+ gas: async () => (await asyncOptions()).overrides?.gas,
195
+ gasPrice: async () => (await asyncOptions()).overrides?.gasPrice,
196
+ maxFeePerGas: async () => (await asyncOptions()).overrides?.maxFeePerGas,
197
+ maxPriorityFeePerGas: async () =>
198
+ (await asyncOptions()).overrides?.maxPriorityFeePerGas,
199
+ nonce: async () => (await asyncOptions()).overrides?.nonce,
200
+ extraGas: async () => (await asyncOptions()).overrides?.extraGas,
201
+ erc20Value: async () => (await asyncOptions()).overrides?.erc20Value,
202
+ });
203
+ }
@@ -0,0 +1,115 @@
1
+ import { fetchDeployMetadata } from "../../utils/any-evm/deploy-metadata.js";
2
+
3
+ import { beforeAll, describe, expect, it } from "vitest";
4
+ import { ANVIL_CHAIN } from "../../../test/src/chains.js";
5
+ import { TEST_CLIENT } from "../../../test/src/test-clients.js";
6
+ import { TEST_ACCOUNT_C } from "../../../test/src/test-wallets.js";
7
+ import { type ThirdwebContract, getContract } from "../../contract/contract.js";
8
+ import { sendAndConfirmTransaction } from "../../transaction/actions/send-and-confirm-transaction.js";
9
+ import { deployContractfromDeployMetadata } from "../prebuilts/deploy-published.js";
10
+ import { balanceOf } from "./__generated__/IERC721A/read/balanceOf.js";
11
+ import { nextTokenIdToMint } from "./__generated__/IERC721Enumerable/read/nextTokenIdToMint.js";
12
+ import { claimTo } from "./drops/write/claimTo.js";
13
+ import { setClaimConditions } from "./drops/write/setClaimConditions.js";
14
+ import { getNFT } from "./read/getNFT.js";
15
+ import { lazyMint } from "./write/lazyMint.js";
16
+
17
+ describe.runIf(process.env.TW_SECRET_KEY)(
18
+ "CustomDropERC721",
19
+ {
20
+ retry: 0,
21
+ },
22
+ () => {
23
+ let contract: ThirdwebContract;
24
+
25
+ beforeAll(async () => {
26
+ const customDropDeployMetadata = await fetchDeployMetadata({
27
+ client: TEST_CLIENT,
28
+ uri: "ipfs://QmY6CHFuhDpQzuv3y3NyQBPdAa7cYjZGJgFeFcw9BfSMQx",
29
+ });
30
+ const contractAddress = await deployContractfromDeployMetadata({
31
+ chain: ANVIL_CHAIN,
32
+ client: TEST_CLIENT,
33
+ account: TEST_ACCOUNT_C,
34
+ deployMetadata: customDropDeployMetadata,
35
+ initializeParams: {
36
+ defaultAdmin: TEST_ACCOUNT_C.address,
37
+ name: "TestCustomDropERC721",
38
+ symbol: "TT",
39
+ },
40
+ });
41
+
42
+ contract = getContract({
43
+ address: contractAddress,
44
+ chain: ANVIL_CHAIN,
45
+ client: TEST_CLIENT,
46
+ });
47
+ // this deploys a contract, it may take some time
48
+ }, 60_000);
49
+
50
+ it("should allow for lazy minting tokens", async () => {
51
+ const mintTx = lazyMint({
52
+ contract,
53
+ nfts: [
54
+ { name: "Test NFT" },
55
+ { name: "Test NFT 2" },
56
+ { name: "Test NFT 3" },
57
+ { name: "Test NFT 4" },
58
+ { name: "Test NFT 5" },
59
+ { name: "Test NFT 6" },
60
+ ],
61
+ });
62
+ await sendAndConfirmTransaction({
63
+ transaction: mintTx,
64
+ account: TEST_ACCOUNT_C,
65
+ });
66
+
67
+ await expect(nextTokenIdToMint({ contract })).resolves.toBe(6n);
68
+ await expect(
69
+ getNFT({ contract, tokenId: 0n }),
70
+ ).resolves.toMatchInlineSnapshot(`
71
+ {
72
+ "id": 0n,
73
+ "metadata": {
74
+ "name": "Test NFT",
75
+ },
76
+ "owner": null,
77
+ "tokenURI": "ipfs://QmTo68Dm1ntSp2BHLmE9gesS6ELuXosRz5mAgFCK6tfsRk/0",
78
+ "type": "ERC721",
79
+ }
80
+ `);
81
+ });
82
+
83
+ it("should allow to claim tokens", async () => {
84
+ await expect(
85
+ balanceOf({ contract, owner: TEST_ACCOUNT_C.address }),
86
+ ).resolves.toBe(0n);
87
+ await sendAndConfirmTransaction({
88
+ transaction: setClaimConditions({
89
+ contract,
90
+ phases: [
91
+ {
92
+ startTime: new Date(0),
93
+ maxClaimableSupply: 10n,
94
+ },
95
+ ],
96
+ singlePhaseDrop: true,
97
+ }),
98
+ account: TEST_ACCOUNT_C,
99
+ });
100
+ const claimTx = claimTo({
101
+ contract,
102
+ to: TEST_ACCOUNT_C.address,
103
+ quantity: 1n,
104
+ singlePhaseDrop: true,
105
+ });
106
+ await sendAndConfirmTransaction({
107
+ transaction: claimTx,
108
+ account: TEST_ACCOUNT_C,
109
+ });
110
+ await expect(
111
+ balanceOf({ contract, owner: TEST_ACCOUNT_C.address }),
112
+ ).resolves.toBe(1n);
113
+ });
114
+ },
115
+ );
@@ -6,6 +6,7 @@ import {
6
6
  claim,
7
7
  isClaimSupported,
8
8
  } from "../../__generated__/IDrop/write/claim.js";
9
+ import { isClaimConditionSupported } from "../../__generated__/IDropSinglePhase/read/claimCondition.js";
9
10
  import { isGetActiveClaimConditionSupported } from "../read/getActiveClaimCondition.js";
10
11
 
11
12
  /**
@@ -16,6 +17,7 @@ export type ClaimToParams = {
16
17
  to: Address;
17
18
  quantity: bigint;
18
19
  from?: Address;
20
+ singlePhaseDrop?: boolean;
19
21
  };
20
22
 
21
23
  /**
@@ -61,6 +63,7 @@ export function claimTo(options: BaseTransactionOptions<ClaimToParams>) {
61
63
  to: options.to,
62
64
  quantity: options.quantity,
63
65
  from: options.from,
66
+ singlePhaseDrop: options.singlePhaseDrop,
64
67
  }),
65
68
  });
66
69
  }
@@ -80,9 +83,10 @@ export function claimTo(options: BaseTransactionOptions<ClaimToParams>) {
80
83
  export function isClaimToSupported(availableSelectors: string[]) {
81
84
  return (
82
85
  isClaimSupported(availableSelectors) &&
83
- // required to check if the contract supports the getActiveClaimCondition method
84
- isGetActiveClaimConditionSupported(availableSelectors) &&
85
86
  // requires contractMetadata for claimer proofs
86
- isGetContractMetadataSupported(availableSelectors)
87
+ isGetContractMetadataSupported(availableSelectors) &&
88
+ // required to check if the contract supports the getActiveClaimCondition method
89
+ (isGetActiveClaimConditionSupported(availableSelectors) ||
90
+ isClaimConditionSupported(availableSelectors))
87
91
  );
88
92
  }
@@ -8,6 +8,7 @@ import {
8
8
  } from "../../../common/__generated__/IMulticall/write/multicall.js";
9
9
  import { isGetContractMetadataSupported } from "../../../common/read/getContractMetadata.js";
10
10
  import { isSetClaimConditionsSupported as isSetClaimConditionsSupportedGenerated } from "../../__generated__/IDrop/write/setClaimConditions.js";
11
+ import { isSetClaimConditionsSupported as isSetClaimConditionsSupportedGeneratedSinglePhase } from "../../__generated__/IDropSinglePhase/write/setClaimConditions.js";
11
12
 
12
13
  /**
13
14
  * @extension ERC721
@@ -15,6 +16,7 @@ import { isSetClaimConditionsSupported as isSetClaimConditionsSupportedGenerated
15
16
  export type SetClaimConditionsParams = {
16
17
  phases: ClaimConditionsInput[];
17
18
  resetClaimEligibility?: boolean;
19
+ singlePhaseDrop?: boolean;
18
20
  };
19
21
 
20
22
  /**
@@ -55,6 +57,7 @@ export function setClaimConditions(
55
57
  phases: options.phases,
56
58
  resetClaimEligibility: options.resetClaimEligibility,
57
59
  tokenDecimals: 0,
60
+ singlePhase: options.singlePhaseDrop,
58
61
  }),
59
62
  };
60
63
  },
@@ -80,6 +83,7 @@ export function isSetClaimConditionsSupported(availableSelectors: string[]) {
80
83
  isGetContractMetadataSupported(availableSelectors) &&
81
84
  isSetContractURISupported(availableSelectors) &&
82
85
  // needs to actually be able to set the claim Conditions
83
- isSetClaimConditionsSupportedGenerated(availableSelectors)
86
+ (isSetClaimConditionsSupportedGenerated(availableSelectors) ||
87
+ isSetClaimConditionsSupportedGeneratedSinglePhase(availableSelectors))
84
88
  );
85
89
  }
@@ -3,6 +3,7 @@
3
3
  import { ExternalLinkIcon } from "@radix-ui/react-icons";
4
4
  import { useState } from "react";
5
5
  import type { ThirdwebClient } from "../../../../client/client.js";
6
+ import { formatExplorerAddressUrl } from "../../../../utils/url.js";
6
7
  import { iconSize } from "../../../core/design-system/index.js";
7
8
  import { useChainExplorers } from "../../../core/hooks/others/useChainQuery.js";
8
9
  import { useActiveAccount } from "../../../core/hooks/wallets/useActiveAccount.js";
@@ -125,7 +126,10 @@ export function TransactionsScreen(props: {
125
126
  <ButtonLink
126
127
  fullWidth
127
128
  variant="outline"
128
- href={`${chainExplorers.explorers[0]?.url}/address/${activeAccount?.address}`}
129
+ href={formatExplorerAddressUrl(
130
+ chainExplorers.explorers[0]?.url ?? "",
131
+ activeAccount?.address ?? "",
132
+ )}
129
133
  target="_blank"
130
134
  as="a"
131
135
  gap="xs"
@@ -10,6 +10,7 @@ import { NATIVE_TOKEN_ADDRESS } from "../../../../../../../constants/addresses.j
10
10
  import type { BuyWithFiatQuote } from "../../../../../../../pay/buyWithFiat/getQuote.js";
11
11
  import type { BuyWithFiatStatus } from "../../../../../../../pay/buyWithFiat/getStatus.js";
12
12
  import { formatNumber } from "../../../../../../../utils/formatNumber.js";
13
+ import { formatExplorerTxUrl } from "../../../../../../../utils/url.js";
13
14
  import {
14
15
  type Theme,
15
16
  fontSize,
@@ -345,7 +346,10 @@ export function FiatSteps(props: {
345
346
  onRampExplorers.explorers[0]?.url && onRampTxHash
346
347
  ? {
347
348
  label: "View on Explorer",
348
- url: `${onRampExplorers.explorers[0]?.url}/tx/${onRampTxHash}`,
349
+ url: formatExplorerTxUrl(
350
+ onRampExplorers.explorers[0]?.url,
351
+ onRampTxHash,
352
+ ),
349
353
  }
350
354
  : undefined
351
355
  }
@@ -382,7 +386,10 @@ export function FiatSteps(props: {
382
386
  toChainExplorers.explorers[0]?.url && toTokenTxHash
383
387
  ? {
384
388
  label: "View on Explorer",
385
- url: `${toChainExplorers.explorers[0].url}/tx/${toTokenTxHash}`,
389
+ url: formatExplorerTxUrl(
390
+ toChainExplorers.explorers[0]?.url,
391
+ toTokenTxHash,
392
+ ),
386
393
  }
387
394
  : undefined
388
395
  }
@@ -2,6 +2,7 @@ import { ExternalLinkIcon } from "@radix-ui/react-icons";
2
2
  import { getCachedChain } from "../../../../../../../chains/utils.js";
3
3
  import type { ThirdwebClient } from "../../../../../../../client/client.js";
4
4
  import { formatNumber } from "../../../../../../../utils/formatNumber.js";
5
+ import { formatExplorerTxUrl } from "../../../../../../../utils/url.js";
5
6
  import {
6
7
  fontSize,
7
8
  iconSize,
@@ -121,9 +122,10 @@ export function OnRampTxDetailsTable(props: {
121
122
  <ButtonLink
122
123
  fullWidth
123
124
  variant="outline"
124
- href={`${
125
- onRampExplorers.explorers[0].url || ""
126
- }/tx/${onrampTxHash}`}
125
+ href={formatExplorerTxUrl(
126
+ onRampExplorers.explorers[0]?.url,
127
+ onrampTxHash,
128
+ )}
127
129
  target="_blank"
128
130
  gap="xs"
129
131
  style={{