thirdweb 5.90.0 → 5.90.2
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.
- package/dist/cjs/contract/deployment/zksync/implementations.js +2 -2
- package/dist/cjs/gas/fee-data.js +1 -0
- package/dist/cjs/gas/fee-data.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +2 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js +2 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js +91 -4
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js +2 -2
- package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
- package/dist/cjs/utils/any-evm/zksync/isZkSyncChain.js +2 -1
- package/dist/cjs/utils/any-evm/zksync/isZkSyncChain.js.map +1 -1
- package/dist/cjs/utils/promise/resolve-promised-value.js +1 -0
- package/dist/cjs/utils/promise/resolve-promised-value.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wallets/smart/lib/bundler.js +1 -0
- package/dist/cjs/wallets/smart/lib/bundler.js.map +1 -1
- package/dist/cjs/wallets/smart/lib/userop.js +6 -2
- package/dist/cjs/wallets/smart/lib/userop.js.map +1 -1
- package/dist/esm/contract/deployment/zksync/implementations.js +2 -2
- package/dist/esm/gas/fee-data.js +1 -0
- package/dist/esm/gas/fee-data.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +2 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js +2 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js +91 -4
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/OTPLoginUI.js +2 -2
- package/dist/esm/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
- package/dist/esm/utils/any-evm/zksync/isZkSyncChain.js +2 -1
- package/dist/esm/utils/any-evm/zksync/isZkSyncChain.js.map +1 -1
- package/dist/esm/utils/promise/resolve-promised-value.js +1 -0
- package/dist/esm/utils/promise/resolve-promised-value.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/wallets/smart/lib/bundler.js +1 -0
- package/dist/esm/wallets/smart/lib/bundler.js.map +1 -1
- package/dist/esm/wallets/smart/lib/userop.js +6 -2
- package/dist/esm/wallets/smart/lib/userop.js.map +1 -1
- package/dist/types/auth/core/generate-jwt.d.ts.map +1 -1
- package/dist/types/auth/core/generate-login-payload.d.ts.map +1 -1
- package/dist/types/auth/core/verify-jwt.d.ts.map +1 -1
- package/dist/types/auth/core/verify-login-payload.d.ts.map +1 -1
- package/dist/types/extensions/erc721/lazyMinting/helpers/hashDelayedRevealBatch.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/BatchMetadataERC1155/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/BatchMetadataERC721/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/ClaimableERC1155/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/ClaimableERC20/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/ClaimableERC721/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/MintableERC1155/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/MintableERC20/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/MintableERC721/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/OpenEditionMetadataERC721/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/RoyaltyERC1155/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/RoyaltyERC721/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/SequentialTokenIdERC1155/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/TransferableERC1155/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/TransferableERC20/module/install.d.ts.map +1 -1
- package/dist/types/extensions/modules/__generated__/TransferableERC721/module/install.d.ts.map +1 -1
- package/dist/types/gas/fee-data.d.ts.map +1 -1
- package/dist/types/react/core/hooks/others/useInvalidateQueries.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/transaction-button-utils.d.ts.map +1 -1
- package/dist/types/react/core/utils/wait.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/Address.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/ChainIcon.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/RNImage.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/WalletImage.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ErrorView.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/LoadingView.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ReceiveScreen.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/SendScreen.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/SuccessView.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/TokenListScreen.d.ts.map +1 -1
- package/dist/types/react/web/providers/wallet-ui-states-provider.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModal.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/ConnectModalContent.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/DeepLinkConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Modal/InjectedConnectUI.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/icons/ThirdwebTextIcon.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.d.ts +2 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/pendingSwapTx.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/ChainIcon.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/QRCode.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/TextDivider.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/br.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/de.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/en.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/es.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/fr.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/ja.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/kr.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/tl.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/vi.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts.map +1 -1
- package/dist/types/transaction/actions/zksync/getEip721Domain.d.ts.map +1 -1
- package/dist/types/transaction/resolve-method.d.ts.map +1 -1
- package/dist/types/utils/any-evm/zksync/isZkSyncChain.d.ts.map +1 -1
- package/dist/types/utils/bigint.d.ts.map +1 -1
- package/dist/types/utils/domains.d.ts.map +1 -1
- package/dist/types/utils/promise/resolve-promised-value.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/connection/autoConnectCore.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/authentication/getLoginPath.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/constants/settings.d.ts.map +1 -1
- package/dist/types/wallets/in-app/native/helpers/api/fetchers.d.ts.map +1 -1
- package/dist/types/wallets/in-app/native/helpers/errors.d.ts.map +1 -1
- package/dist/types/wallets/in-app/web/lib/auth/oauth.d.ts.map +1 -1
- package/dist/types/wallets/in-app/web/lib/auth/otp.d.ts.map +1 -1
- package/dist/types/wallets/manager/index.d.ts.map +1 -1
- package/dist/types/wallets/smart/lib/bundler.d.ts.map +1 -1
- package/dist/types/wallets/smart/lib/constants.d.ts.map +1 -1
- package/dist/types/wallets/smart/lib/packUserOp.d.ts.map +1 -1
- package/dist/types/wallets/smart/lib/userop.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/contract/deployment/zksync/implementations.ts +2 -2
- package/src/extensions/erc1155/drop1155.test.ts +0 -59
- package/src/gas/fee-data.ts +1 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +3 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.tsx +3 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.tsx +116 -4
- package/src/react/web/wallets/shared/OTPLoginUI.tsx +2 -2
- package/src/transaction/actions/gasless/providers/engine.test.ts +6 -10
- package/src/transaction/actions/gasless/providers/openzeppelin.test.ts +6 -10
- package/src/utils/any-evm/zksync/isZkSyncChain.ts +2 -1
- package/src/utils/bytecode/resolveImplementation.test.ts +48 -45
- package/src/utils/promise/resolve-promised-value.ts +1 -0
- package/src/version.ts +1 -1
- package/src/wallets/smart/lib/bundler.ts +1 -0
- package/src/wallets/smart/lib/userop.ts +6 -2
- package/src/wallets/smart/smart-wallet-integration-v07.test.ts +3 -2
- package/src/wallets/smart/smart-wallet-integration.test.ts +1 -0
- package/src/wallets/smart/smart-wallet-modular.test.ts +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"userop.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/smart/lib/userop.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAI1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EACV,cAAc,EAEd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAkCrB,eAAO,MAAM,qBAAqB,
|
1
|
+
{"version":3,"file":"userop.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/smart/lib/userop.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,+BAA+B,CAAC;AAOvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAI1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EACV,cAAc,EAEd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAkCrB,eAAO,MAAM,qBAAqB,GAAI,iBAAiB,gBAAgB,SAEtE,CAAC;AAMF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,cAAc,GAAG;IACrB,UAAU,EAAE,GAAG,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GACA,OAAO,CAAC,kBAAkB,CAAC,CAc7B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,WAAW,EAAE,mBAAmB,CAAC;IACjC,eAAe,EAAE,gBAAgB,CAAC;IAClC,eAAe,EAAE,gBAAgB,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;CAC7C,GAAG,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,CAqF/C;AA0VD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE;IACrC,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAAC;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;CACvB,GAAG,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,CA0C/C;AAkDD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE;IACjD,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,cAAc,CAAC;IACvB,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,gDAiBA;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAC3C,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,cAAc,CAAC;IACvB,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,gDAqEA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "thirdweb",
|
3
|
-
"version": "5.90.
|
3
|
+
"version": "5.90.2",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/thirdweb-dev/js.git#main"
|
@@ -218,7 +218,7 @@
|
|
218
218
|
"@radix-ui/react-focus-scope": "1.1.2",
|
219
219
|
"@radix-ui/react-icons": "1.3.2",
|
220
220
|
"@radix-ui/react-tooltip": "1.1.8",
|
221
|
-
"@tanstack/react-query": "5.
|
221
|
+
"@tanstack/react-query": "5.67.1",
|
222
222
|
"@walletconnect/ethereum-provider": "2.17.5",
|
223
223
|
"@walletconnect/sign-client": "2.17.5",
|
224
224
|
"abitype": "1.0.8",
|
@@ -305,19 +305,19 @@
|
|
305
305
|
"@aws-sdk/client-lambda": "3.592.0",
|
306
306
|
"@aws-sdk/credential-providers": "3.592.0",
|
307
307
|
"@biomejs/biome": "1.9.4",
|
308
|
-
"@chromatic-com/storybook": "3.2.
|
308
|
+
"@chromatic-com/storybook": "3.2.5",
|
309
309
|
"@codspeed/vitest-plugin": "4.0.0",
|
310
310
|
"@coinbase/wallet-mobile-sdk": "1.1.2",
|
311
311
|
"@mobile-wallet-protocol/client": "0.1.2",
|
312
312
|
"@react-native-async-storage/async-storage": "2.1.1",
|
313
313
|
"@size-limit/preset-big-lib": "11.2.0",
|
314
|
-
"@storybook/addon-essentials": "8.6.
|
315
|
-
"@storybook/addon-interactions": "8.6.
|
316
|
-
"@storybook/addon-links": "8.6.
|
317
|
-
"@storybook/addon-onboarding": "8.6.
|
318
|
-
"@storybook/react": "8.6.
|
319
|
-
"@storybook/react-vite": "8.6.
|
320
|
-
"@storybook/test": "8.6.
|
314
|
+
"@storybook/addon-essentials": "8.6.3",
|
315
|
+
"@storybook/addon-interactions": "8.6.3",
|
316
|
+
"@storybook/addon-links": "8.6.3",
|
317
|
+
"@storybook/addon-onboarding": "8.6.3",
|
318
|
+
"@storybook/react": "8.6.3",
|
319
|
+
"@storybook/react-vite": "8.6.3",
|
320
|
+
"@storybook/test": "8.6.3",
|
321
321
|
"@testing-library/jest-dom": "^6.6.3",
|
322
322
|
"@testing-library/react": "^16.2.0",
|
323
323
|
"@testing-library/user-event": "^14.6.1",
|
@@ -346,10 +346,10 @@
|
|
346
346
|
"rimraf": "6.0.1",
|
347
347
|
"sharp": "^0.33.5",
|
348
348
|
"size-limit": "11.2.0",
|
349
|
-
"storybook": "8.6.
|
349
|
+
"storybook": "8.6.3",
|
350
350
|
"typedoc": "0.27.9",
|
351
351
|
"typedoc-better-json": "0.9.4",
|
352
|
-
"typescript": "5.
|
352
|
+
"typescript": "5.8.2",
|
353
353
|
"vite": "6.2.0",
|
354
354
|
"vitest": "3.0.7"
|
355
355
|
},
|
@@ -6,7 +6,7 @@ export const ZKSYNC_IMPLEMENTATIONS: Record<number, Record<string, string>> = {
|
|
6
6
|
MarketplaceV3: "0x8b0DBCf5b7D01eBB0F24525CE8AB72F16CE4F8C8",
|
7
7
|
},
|
8
8
|
[324]: {
|
9
|
-
MarketplaceV3: "
|
9
|
+
MarketplaceV3: "0x88e7F2bEf0a23073b7Cc2c79D307Dbd9138Fa79c",
|
10
10
|
},
|
11
11
|
[11124]: {
|
12
12
|
MarketplaceV3: "0x2dA4Dd326A6482679547071be21f74685d730504",
|
@@ -18,7 +18,7 @@ export const ZKSYNC_IMPLEMENTATIONS: Record<number, Record<string, string>> = {
|
|
18
18
|
MarketplaceV3: "0x9EB0830B0b10010F2a53383517A7D0B75531Bb1b",
|
19
19
|
},
|
20
20
|
[2741]: {
|
21
|
-
MarketplaceV3: "
|
21
|
+
MarketplaceV3: "0x4b14569c7B79DBe686Ac3Ba5996131E7EDaB7a93",
|
22
22
|
},
|
23
23
|
};
|
24
24
|
|
@@ -17,10 +17,8 @@ import { resolvePromisedValue } from "../../utils/promise/resolve-promised-value
|
|
17
17
|
import { toEther } from "../../utils/units.js";
|
18
18
|
import { generateMerkleTreeInfoERC1155 } from "../airdrop/write/merkleInfoERC1155.js";
|
19
19
|
import { name } from "../common/read/name.js";
|
20
|
-
import { deployERC20Contract } from "../prebuilts/deploy-erc20.js";
|
21
20
|
import { deployERC1155Contract } from "../prebuilts/deploy-erc1155.js";
|
22
21
|
import { balanceOf } from "./__generated__/IERC1155/read/balanceOf.js";
|
23
|
-
import { totalSupply } from "./__generated__/IERC1155/read/totalSupply.js";
|
24
22
|
import { nextTokenIdToMint } from "./__generated__/IERC1155Enumerable/read/nextTokenIdToMint.js";
|
25
23
|
import { canClaim } from "./drops/read/canClaim.js";
|
26
24
|
import { getActiveClaimCondition } from "./drops/read/getActiveClaimCondition.js";
|
@@ -472,63 +470,6 @@ describe.runIf(process.env.TW_SECRET_KEY)(
|
|
472
470
|
expect(isGetNFTsSupported(selectors)).toBe(true);
|
473
471
|
});
|
474
472
|
|
475
|
-
/**
|
476
|
-
* This is to document the behavior where one can claim without paying if the claiming address
|
477
|
-
* is the same as the PrimaryRecipientAddress, because of this Solidity code:
|
478
|
-
* ```solidity
|
479
|
-
* // CurrencyTransferLib.sol
|
480
|
-
* function safeTransferERC20(address _currency, address _from, address _to, uint256 _amount) internal {
|
481
|
-
* if (_from == _to) {
|
482
|
-
* return;
|
483
|
-
* }
|
484
|
-
* ...
|
485
|
-
* }
|
486
|
-
* ```
|
487
|
-
*/
|
488
|
-
it("address that is the same with PrimaryFeeRecipient can claim without paying ERC20", async () => {
|
489
|
-
const tokenAddress = await deployERC20Contract({
|
490
|
-
client: TEST_CLIENT,
|
491
|
-
chain: ANVIL_CHAIN,
|
492
|
-
account: TEST_ACCOUNT_C,
|
493
|
-
type: "TokenERC20",
|
494
|
-
params: {
|
495
|
-
name: "token20",
|
496
|
-
contractURI: TEST_CONTRACT_URI,
|
497
|
-
},
|
498
|
-
});
|
499
|
-
const tokenId = 5n;
|
500
|
-
const setClaimTx = setClaimConditions({
|
501
|
-
contract,
|
502
|
-
tokenId,
|
503
|
-
phases: [
|
504
|
-
{
|
505
|
-
maxClaimableSupply: 100n,
|
506
|
-
maxClaimablePerWallet: 100n,
|
507
|
-
currencyAddress: tokenAddress,
|
508
|
-
price: 1000,
|
509
|
-
startTime: new Date(),
|
510
|
-
},
|
511
|
-
],
|
512
|
-
});
|
513
|
-
await sendAndConfirmTransaction({
|
514
|
-
transaction: setClaimTx,
|
515
|
-
account: TEST_ACCOUNT_C,
|
516
|
-
});
|
517
|
-
|
518
|
-
const transaction = claimTo({
|
519
|
-
contract,
|
520
|
-
tokenId,
|
521
|
-
quantity: 50n,
|
522
|
-
to: TEST_ACCOUNT_C.address,
|
523
|
-
});
|
524
|
-
await sendAndConfirmTransaction({
|
525
|
-
transaction,
|
526
|
-
account: TEST_ACCOUNT_C,
|
527
|
-
});
|
528
|
-
const supplyCount = await totalSupply({ contract, id: tokenId });
|
529
|
-
expect(supplyCount).toBe(50n);
|
530
|
-
});
|
531
|
-
|
532
473
|
it("getActiveClaimCondition should work", async () => {
|
533
474
|
// Create a public allowlist claim phase
|
534
475
|
const snapshot = [
|
package/src/gas/fee-data.ts
CHANGED
@@ -6,12 +6,18 @@ import type { ThirdwebClient } from "../../../../../../../client/client.js";
|
|
6
6
|
import { NATIVE_TOKEN_ADDRESS } from "../../../../../../../constants/addresses.js";
|
7
7
|
import { getContract } from "../../../../../../../contract/contract.js";
|
8
8
|
import { allowance } from "../../../../../../../extensions/erc20/__generated__/IERC20/read/allowance.js";
|
9
|
+
import {
|
10
|
+
type GetCurrencyMetadataResult,
|
11
|
+
getCurrencyMetadata,
|
12
|
+
} from "../../../../../../../extensions/erc20/read/getCurrencyMetadata.js";
|
9
13
|
import { approve } from "../../../../../../../extensions/erc20/write/approve.js";
|
10
14
|
import { transfer } from "../../../../../../../extensions/erc20/write/transfer.js";
|
15
|
+
import type { BuyWithCryptoStatus } from "../../../../../../../pay/buyWithCrypto/getStatus.js";
|
11
16
|
import { getBuyWithCryptoTransfer } from "../../../../../../../pay/buyWithCrypto/getTransfer.js";
|
12
17
|
import { sendAndConfirmTransaction } from "../../../../../../../transaction/actions/send-and-confirm-transaction.js";
|
13
18
|
import { sendTransaction } from "../../../../../../../transaction/actions/send-transaction.js";
|
14
19
|
import { prepareTransaction } from "../../../../../../../transaction/prepare-transaction.js";
|
20
|
+
import type { TransactionReceipt } from "../../../../../../../transaction/types.js";
|
15
21
|
import type { Address } from "../../../../../../../utils/address.js";
|
16
22
|
import { toWei } from "../../../../../../../utils/units.js";
|
17
23
|
import { iconSize } from "../../../../../../core/design-system/index.js";
|
@@ -42,6 +48,7 @@ type TransferConfirmationScreenProps = {
|
|
42
48
|
tokenAmount: string;
|
43
49
|
transactionMode?: boolean;
|
44
50
|
payOptions?: PayUIOptions;
|
51
|
+
onSuccess: ((status: BuyWithCryptoStatus) => void) | undefined;
|
45
52
|
};
|
46
53
|
|
47
54
|
export function TransferConfirmationScreen(
|
@@ -202,10 +209,33 @@ export function TransferConfirmationScreen(
|
|
202
209
|
to: receiverAddress,
|
203
210
|
amount: tokenAmount,
|
204
211
|
});
|
205
|
-
await
|
206
|
-
|
207
|
-
|
208
|
-
|
212
|
+
const [txResult, tokenMetadata] = await Promise.all([
|
213
|
+
sendAndConfirmTransaction({
|
214
|
+
account: props.payer.account,
|
215
|
+
transaction,
|
216
|
+
}),
|
217
|
+
getCurrencyMetadata({
|
218
|
+
contract: getContract({
|
219
|
+
address: isNativeToken(token)
|
220
|
+
? NATIVE_TOKEN_ADDRESS
|
221
|
+
: token.address,
|
222
|
+
chain: chain,
|
223
|
+
client: client,
|
224
|
+
}),
|
225
|
+
}),
|
226
|
+
]);
|
227
|
+
// its the last step before the transaction, so propagate onPurchaseSuccess here
|
228
|
+
props.onSuccess?.(
|
229
|
+
transferBuyWithCryptoQuote({
|
230
|
+
token,
|
231
|
+
chain,
|
232
|
+
tokenMetadata,
|
233
|
+
tokenAmount,
|
234
|
+
fromAddress: payer.account.address,
|
235
|
+
toAddress: receiverAddress,
|
236
|
+
transaction: txResult,
|
237
|
+
}),
|
238
|
+
);
|
209
239
|
// switch to execute step
|
210
240
|
setStep("execute");
|
211
241
|
setStatus({ id: "idle" });
|
@@ -299,3 +329,85 @@ export function TransferConfirmationScreen(
|
|
299
329
|
</Container>
|
300
330
|
);
|
301
331
|
}
|
332
|
+
|
333
|
+
function transferBuyWithCryptoQuote(args: {
|
334
|
+
token: ERC20OrNativeToken;
|
335
|
+
chain: Chain;
|
336
|
+
tokenMetadata: GetCurrencyMetadataResult;
|
337
|
+
tokenAmount: string;
|
338
|
+
fromAddress: string;
|
339
|
+
toAddress: string;
|
340
|
+
transaction: TransactionReceipt;
|
341
|
+
}): BuyWithCryptoStatus {
|
342
|
+
const {
|
343
|
+
token,
|
344
|
+
chain,
|
345
|
+
tokenMetadata,
|
346
|
+
tokenAmount,
|
347
|
+
fromAddress,
|
348
|
+
toAddress,
|
349
|
+
transaction,
|
350
|
+
} = args;
|
351
|
+
return {
|
352
|
+
status: "COMPLETED",
|
353
|
+
subStatus: "SUCCESS",
|
354
|
+
swapType: "TRANSFER",
|
355
|
+
quote: {
|
356
|
+
createdAt: new Date().toISOString(),
|
357
|
+
fromToken: {
|
358
|
+
chainId: chain.id,
|
359
|
+
tokenAddress: isNativeToken(token)
|
360
|
+
? NATIVE_TOKEN_ADDRESS
|
361
|
+
: token.address,
|
362
|
+
decimals: tokenMetadata.decimals,
|
363
|
+
symbol: tokenMetadata.symbol,
|
364
|
+
name: tokenMetadata.name,
|
365
|
+
priceUSDCents: 0,
|
366
|
+
},
|
367
|
+
toToken: {
|
368
|
+
chainId: chain.id,
|
369
|
+
tokenAddress: isNativeToken(token)
|
370
|
+
? NATIVE_TOKEN_ADDRESS
|
371
|
+
: token.address,
|
372
|
+
decimals: tokenMetadata.decimals,
|
373
|
+
symbol: tokenMetadata.symbol,
|
374
|
+
name: tokenMetadata.name,
|
375
|
+
priceUSDCents: 0,
|
376
|
+
},
|
377
|
+
fromAmountWei: toWei(tokenAmount).toString(),
|
378
|
+
fromAmount: tokenAmount,
|
379
|
+
toAmountWei: toWei(tokenAmount).toString(),
|
380
|
+
toAmount: tokenAmount,
|
381
|
+
toAmountMin: tokenAmount,
|
382
|
+
toAmountMinWei: toWei(tokenAmount).toString(),
|
383
|
+
estimated: {
|
384
|
+
feesUSDCents: 0,
|
385
|
+
gasCostUSDCents: 0,
|
386
|
+
slippageBPS: 0,
|
387
|
+
toAmountMinUSDCents: 0,
|
388
|
+
toAmountUSDCents: 0,
|
389
|
+
fromAmountUSDCents: 0,
|
390
|
+
durationSeconds: 0,
|
391
|
+
},
|
392
|
+
},
|
393
|
+
fromAddress,
|
394
|
+
toAddress,
|
395
|
+
source: {
|
396
|
+
transactionHash: transaction.transactionHash,
|
397
|
+
amount: tokenAmount,
|
398
|
+
amountWei: toWei(tokenAmount).toString(),
|
399
|
+
amountUSDCents: 0,
|
400
|
+
completedAt: new Date().toISOString(),
|
401
|
+
token: {
|
402
|
+
chainId: chain.id,
|
403
|
+
tokenAddress: isNativeToken(token)
|
404
|
+
? NATIVE_TOKEN_ADDRESS
|
405
|
+
: token.address,
|
406
|
+
decimals: tokenMetadata.decimals,
|
407
|
+
symbol: tokenMetadata.symbol,
|
408
|
+
name: tokenMetadata.name,
|
409
|
+
priceUSDCents: 0,
|
410
|
+
},
|
411
|
+
},
|
412
|
+
};
|
413
|
+
}
|
@@ -276,7 +276,7 @@ export function OTPLoginUI(props: {
|
|
276
276
|
|
277
277
|
{!isWideModal && <Line />}
|
278
278
|
|
279
|
-
<Container p={isWideModal ? undefined : "lg"}>
|
279
|
+
<Container p={isWideModal ? undefined : "lg"} gap="xs">
|
280
280
|
{accountStatus === "error" && (
|
281
281
|
<Text size="sm" center color="danger">
|
282
282
|
{locale.emailLoginScreen.failedToSendCode}
|
@@ -297,7 +297,7 @@ export function OTPLoginUI(props: {
|
|
297
297
|
</Container>
|
298
298
|
)}
|
299
299
|
|
300
|
-
{accountStatus
|
300
|
+
{accountStatus !== "sending" && (
|
301
301
|
<LinkButton onClick={sendEmailOrSms} type="button">
|
302
302
|
{locale.emailLoginScreen.resendCode}
|
303
303
|
</LinkButton>
|
@@ -74,16 +74,12 @@ describe.runIf(process.env.TW_SECRET_KEY)("prepareengineTransaction", () => {
|
|
74
74
|
const { message, messageType, signature } = result;
|
75
75
|
|
76
76
|
expect(isHex(signature)).toBe(true);
|
77
|
-
expect(message).
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
"to": "${erc20Contract.address}",
|
84
|
-
"value": 0n,
|
85
|
-
}
|
86
|
-
`);
|
77
|
+
expect(message.data).toBe(
|
78
|
+
"0xa9059cbb00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c80000000000000000000000000000000000000000000000056bc75e2d63100000",
|
79
|
+
);
|
80
|
+
expect(message.from).toBe(TEST_ACCOUNT_A.address);
|
81
|
+
expect(message.to).toBe(erc20Contract.address);
|
82
|
+
expect(message.value).toBe(0n);
|
87
83
|
expect(messageType).toMatchInlineSnapshot(`"forward"`);
|
88
84
|
});
|
89
85
|
|
@@ -72,16 +72,12 @@ describe.runIf(process.env.TW_SECRET_KEY)(
|
|
72
72
|
const { message, messageType, signature } = result;
|
73
73
|
|
74
74
|
expect(isHex(signature)).toBe(true);
|
75
|
-
expect(message).
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
"to": "${erc20Contract.address}",
|
82
|
-
"value": 0n,
|
83
|
-
}
|
84
|
-
`);
|
75
|
+
expect(message.from).toBe(TEST_ACCOUNT_A.address);
|
76
|
+
expect(message.to).toBe(erc20Contract.address);
|
77
|
+
expect(message.value).toBe(0n);
|
78
|
+
expect(message.data).toBe(
|
79
|
+
"0xa9059cbb00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c80000000000000000000000000000000000000000000000056bc75e2d63100000",
|
80
|
+
);
|
85
81
|
expect(messageType).toMatchInlineSnapshot(`"forward"`);
|
86
82
|
});
|
87
83
|
},
|
@@ -20,54 +20,57 @@ import { getContract } from "../../contract/contract.js";
|
|
20
20
|
import { deployContract } from "../../contract/deployment/deploy-with-abi.js";
|
21
21
|
import { resolveImplementation } from "./resolveImplementation.js";
|
22
22
|
|
23
|
-
describe(
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
it("should extract implementation address for matic proxy contract", async () => {
|
30
|
-
const resolved = resolveImplementation(POLYGON_USDT_PROXY_CONTRACT);
|
31
|
-
expect((await resolved).address).to.equal(
|
32
|
-
POLYGON_USDT_IMPLEMENTATION.toLowerCase(),
|
33
|
-
);
|
34
|
-
});
|
35
|
-
|
36
|
-
it("should extract implementation address for base USDC proxy contract", async () => {
|
37
|
-
const resolved = resolveImplementation(BASE_USDC_PROXY_CONTRACT);
|
38
|
-
expect((await resolved).address).to.equal(
|
39
|
-
BASE_USDC_IMPLEMENTATION.toLowerCase(),
|
40
|
-
);
|
41
|
-
});
|
42
|
-
|
43
|
-
it("should extract implementation address for ERC1967 proxy contract", async () => {
|
44
|
-
const implementationAddress = await deployContract({
|
45
|
-
client: TEST_CLIENT,
|
46
|
-
chain: ANVIL_CHAIN,
|
47
|
-
account: TEST_ACCOUNT_A,
|
48
|
-
bytecode: DUMMY_BYTECODE,
|
49
|
-
abi: [],
|
23
|
+
describe.runIf(process.env.TW_SECRET_KEY)(
|
24
|
+
"Resolve implementation",
|
25
|
+
async () => {
|
26
|
+
it("should extract implementation address for minimal proxy contract", async () => {
|
27
|
+
const resolved = resolveImplementation(NFT_DROP_CONTRACT);
|
28
|
+
expect((await resolved).address).to.equal(NFT_DROP_IMPLEMENTATION);
|
50
29
|
});
|
51
30
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
abi: ERC1967_PROXY_CONSTRUCTOR_ABI as Abi,
|
58
|
-
constructorParams: {
|
59
|
-
logic: implementationAddress,
|
60
|
-
data: "0x",
|
61
|
-
},
|
31
|
+
it("should extract implementation address for matic proxy contract", async () => {
|
32
|
+
const resolved = resolveImplementation(POLYGON_USDT_PROXY_CONTRACT);
|
33
|
+
expect((await resolved).address).to.equal(
|
34
|
+
POLYGON_USDT_IMPLEMENTATION.toLowerCase(),
|
35
|
+
);
|
62
36
|
});
|
63
37
|
|
64
|
-
|
65
|
-
|
66
|
-
address
|
67
|
-
|
38
|
+
it("should extract implementation address for base USDC proxy contract", async () => {
|
39
|
+
const resolved = resolveImplementation(BASE_USDC_PROXY_CONTRACT);
|
40
|
+
expect((await resolved).address).to.equal(
|
41
|
+
BASE_USDC_IMPLEMENTATION.toLowerCase(),
|
42
|
+
);
|
68
43
|
});
|
69
44
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
45
|
+
it("should extract implementation address for ERC1967 proxy contract", async () => {
|
46
|
+
const implementationAddress = await deployContract({
|
47
|
+
client: TEST_CLIENT,
|
48
|
+
chain: ANVIL_CHAIN,
|
49
|
+
account: TEST_ACCOUNT_A,
|
50
|
+
bytecode: DUMMY_BYTECODE,
|
51
|
+
abi: [],
|
52
|
+
});
|
53
|
+
|
54
|
+
const proxyAddress = await deployContract({
|
55
|
+
client: TEST_CLIENT,
|
56
|
+
chain: ANVIL_CHAIN,
|
57
|
+
account: TEST_ACCOUNT_A,
|
58
|
+
bytecode: ERC1967_PROXY_BYTECODE,
|
59
|
+
abi: ERC1967_PROXY_CONSTRUCTOR_ABI as Abi,
|
60
|
+
constructorParams: {
|
61
|
+
logic: implementationAddress,
|
62
|
+
data: "0x",
|
63
|
+
},
|
64
|
+
});
|
65
|
+
|
66
|
+
const proxy = getContract({
|
67
|
+
chain: ANVIL_CHAIN,
|
68
|
+
address: proxyAddress,
|
69
|
+
client: TEST_CLIENT,
|
70
|
+
});
|
71
|
+
|
72
|
+
const resolved = await resolveImplementation(proxy);
|
73
|
+
expect(resolved.address).to.equal(implementationAddress);
|
74
|
+
});
|
75
|
+
},
|
76
|
+
);
|
@@ -10,6 +10,7 @@
|
|
10
10
|
export async function resolvePromisedValue<V>(
|
11
11
|
value: V,
|
12
12
|
): Promise<V extends () => Promise<infer R> ? R : V> {
|
13
|
+
// @ts-expect-error - this works fine, but TS doesn't like it since 5.8
|
13
14
|
return typeof value === "function" ? await value() : value;
|
14
15
|
}
|
15
16
|
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.90.
|
1
|
+
export const version = "5.90.2";
|
@@ -321,7 +321,9 @@ async function populateUserOp_v0_7(args: {
|
|
321
321
|
createAccountOverride: overrides?.createAccount,
|
322
322
|
}),
|
323
323
|
);
|
324
|
-
|
324
|
+
if (waitForDeployment) {
|
325
|
+
markAccountDeploying(accountContract);
|
326
|
+
}
|
325
327
|
}
|
326
328
|
|
327
329
|
const partialOp: UserOperationV07 = {
|
@@ -481,7 +483,9 @@ async function populateUserOp_v0_6(args: {
|
|
481
483
|
accountSalt: overrides?.accountSalt,
|
482
484
|
createAccountOverride: overrides?.createAccount,
|
483
485
|
});
|
484
|
-
|
486
|
+
if (waitForDeployment) {
|
487
|
+
markAccountDeploying(accountContract);
|
488
|
+
}
|
485
489
|
}
|
486
490
|
|
487
491
|
const partialOp: UserOperationV06 = {
|
@@ -49,9 +49,10 @@ const contract = getContract({
|
|
49
49
|
address: "0xe2cb0eb5147b42095c2FfA6F7ec953bb0bE347D8",
|
50
50
|
});
|
51
51
|
|
52
|
-
describe.sequential(
|
52
|
+
describe.runIf(process.env.TW_SECRET_KEY).sequential(
|
53
53
|
"SmartWallet 0.7 core tests",
|
54
54
|
{
|
55
|
+
retry: 0,
|
55
56
|
timeout: 240_000,
|
56
57
|
},
|
57
58
|
() => {
|
@@ -200,7 +201,7 @@ describe.sequential(
|
|
200
201
|
});
|
201
202
|
|
202
203
|
await expect(tx).rejects.toMatchInlineSnapshot(`
|
203
|
-
[TransactionError:
|
204
|
+
[TransactionError: Execution Reverted: {"code":3,"message":"execution reverted: Not authorized"}
|
204
205
|
|
205
206
|
contract: ${contract.address}
|
206
207
|
chainId: 11155111]
|
@@ -28,7 +28,7 @@ const client = TEST_CLIENT;
|
|
28
28
|
const DEFAULT_FACTORY_ADDRESS = "0xB1846E893CA01c5Dcdaa40371C1e13f2e0Df5717";
|
29
29
|
const DEFAULT_VALIDATOR_ADDRESS = "0x7D3631d823e0De311DC86f580946EeF2eEC81fba";
|
30
30
|
|
31
|
-
describe.sequential(
|
31
|
+
describe.runIf(process.env.TW_SECRET_KEY).sequential(
|
32
32
|
"SmartWallet modular tests",
|
33
33
|
{
|
34
34
|
retry: 0,
|