Skip to content

Commit a07138f

Browse files
committed
update
1 parent 68ad62f commit a07138f

File tree

1 file changed

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

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ 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+
* 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);
2027
* ```
2128
*/
2229
export function isERC20(availableSelectors: string[]) {

0 commit comments

Comments
 (0)