We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68ad62f commit a07138fCopy full SHA for a07138f
packages/thirdweb/src/extensions/erc20/read/isERC20.ts
@@ -16,7 +16,14 @@ import { isTransferFromSupported } from "../__generated__/IERC20/write/transferF
16
* @example
17
* ```ts
18
* import { isERC20 } from "thirdweb/extensions/erc20";
19
- * const result = await isERC20({ contract });
+ * import { resolveContractAbi } from "thirdweb/contract";
20
+ *
21
+ * const abi = await resolveContractAbi(contract);
22
+ * const selectors = abi
23
+ * .filter((f) => f.type === "function")
24
+ * .map((f) => toFunctionSelector(f));
25
26
+ * const result = await isERC20(selectors);
27
* ```
28
*/
29
export function isERC20(availableSelectors: string[]) {
0 commit comments