Skip to content

Commit 22bb16a

Browse files
committed
[SDK] Fix tsdocs for isERC20
1 parent 68ad62f commit 22bb16a

File tree

1 file changed

+7
-1
lines changed
  • packages/thirdweb/src/extensions/erc20/read

1 file changed

+7
-1
lines changed

packages/thirdweb/src/extensions/erc20/read/isERC20.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ import { isTransferFromSupported } from "../__generated__/IERC20/write/transferF
1616
* @example
1717
* ```ts
1818
* import { isERC20 } from "thirdweb/extensions/erc20";
19-
* const result = await isERC20({ contract });
19+
*
20+
* const abi = await resolveContractAbi<Abi>(contract);
21+
* const selectors = abi
22+
* .filter((f) => f.type === "function")
23+
* .map((f) => toFunctionSelector(f));
24+
*
25+
* const result = await isERC20(selectors);
2026
* ```
2127
*/
2228
export function isERC20(availableSelectors: string[]) {

0 commit comments

Comments
 (0)