Skip to content

Commit fc55d33

Browse files
committed
[Portal] Docs: Fix detectMethod example (#5519)
CNCT-2479 <!-- start pr-codex --> --- ## PR-Codex overview This PR updates the `detectExtension.ts` file to modify how the `detectMethod` function checks for the presence of the `decimals` method in a contract. It replaces the method signature with a specific selector. ### Detailed summary - Changed the `detectMethod` call to use `availableSelectors: ["0x313ce567"]` instead of the method signature `"function decimals() view returns (uint8)"`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 708c353 commit fc55d33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/thirdweb/src/utils/bytecode/detectExtension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ type DetectExtensionOptions = {
1515
* ```ts
1616
* import { detectMethod } from "thirdweb/utils/extensions/detect.js";
1717
* const hasDecimals = await detectMethod({
18-
* contract,
1918
* method: "function decimals() view returns (uint8)",
19+
* availableSelectors: ["0x313ce567"],
2020
* });
2121
* ```
2222
* @contract

0 commit comments

Comments
 (0)