From 17b6f64f5866cc37af0bebb2043700b40d4defec Mon Sep 17 00:00:00 2001 From: Jonas Daniels Date: Fri, 23 Feb 2024 11:31:34 -0800 Subject: [PATCH] fix: Fix incorrect parameter order in tokenURI function --- packages/thirdweb/package.json | 8 ++++---- packages/thirdweb/src/exports/adapters.ts | 3 --- packages/thirdweb/src/exports/adapters/ethers5.ts | 1 + packages/thirdweb/src/exports/adapters/ethers6.ts | 1 + packages/thirdweb/src/exports/adapters/viem.ts | 1 + packages/thirdweb/src/extensions/erc1155/read/tokenURI.ts | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 packages/thirdweb/src/exports/adapters.ts create mode 100644 packages/thirdweb/src/exports/adapters/ethers5.ts create mode 100644 packages/thirdweb/src/exports/adapters/ethers6.ts create mode 100644 packages/thirdweb/src/exports/adapters/viem.ts diff --git a/packages/thirdweb/package.json b/packages/thirdweb/package.json index 5c8070113b9..5352f6e31fe 100644 --- a/packages/thirdweb/package.json +++ b/packages/thirdweb/package.json @@ -26,9 +26,9 @@ "default": "./dist/cjs/exports/thirdweb.js" }, "./adapters": { - "types": "./dist/types/exports/adapters.d.ts", - "import": "./dist/esm/exports/adapters.js", - "default": "./dist/cjs/exports/adapters.js" + "types": "./dist/types/exports/adapters/*.d.ts", + "import": "./dist/esm/exports/adapters/*.js", + "default": "./dist/cjs/exports/adapters/*.js" }, "./chains": { "types": "./dist/types/exports/chains.d.ts", @@ -95,7 +95,7 @@ "typesVersions": { "*": { "adapters": [ - "./dist/types/exports/adapters.d.ts" + "./dist/types/exports/adapters/*.d.ts" ], "chains": [ "./dist/types/exports/chains.d.ts" diff --git a/packages/thirdweb/src/exports/adapters.ts b/packages/thirdweb/src/exports/adapters.ts deleted file mode 100644 index bc7ccc61040..00000000000 --- a/packages/thirdweb/src/exports/adapters.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { ethers5Adapter } from "../adapters/ethers5.js"; -export { ethers6Adapter } from "../adapters/ethers6.js"; -export { viemAdapter } from "../adapters/viem.js"; diff --git a/packages/thirdweb/src/exports/adapters/ethers5.ts b/packages/thirdweb/src/exports/adapters/ethers5.ts new file mode 100644 index 00000000000..eadce6e45cd --- /dev/null +++ b/packages/thirdweb/src/exports/adapters/ethers5.ts @@ -0,0 +1 @@ +export { ethers5Adapter } from "../../adapters/ethers5.js"; diff --git a/packages/thirdweb/src/exports/adapters/ethers6.ts b/packages/thirdweb/src/exports/adapters/ethers6.ts new file mode 100644 index 00000000000..158c5adcdd6 --- /dev/null +++ b/packages/thirdweb/src/exports/adapters/ethers6.ts @@ -0,0 +1 @@ +export { ethers6Adapter } from "../../adapters/ethers6.js"; diff --git a/packages/thirdweb/src/exports/adapters/viem.ts b/packages/thirdweb/src/exports/adapters/viem.ts new file mode 100644 index 00000000000..797869fd8fa --- /dev/null +++ b/packages/thirdweb/src/exports/adapters/viem.ts @@ -0,0 +1 @@ +export { viemAdapter } from "../../adapters/viem.js"; diff --git a/packages/thirdweb/src/extensions/erc1155/read/tokenURI.ts b/packages/thirdweb/src/extensions/erc1155/read/tokenURI.ts index 720a350792a..d50bddd6e42 100644 --- a/packages/thirdweb/src/extensions/erc1155/read/tokenURI.ts +++ b/packages/thirdweb/src/extensions/erc1155/read/tokenURI.ts @@ -20,7 +20,7 @@ export function tokenURI( return readContract({ ...options, method: - "function tokenURI(uint256 tokenId) external view returns (string memory)", + "function tokenURI(tokenId uint256) external view returns (string memory)", params: [options.tokenId], }); }