Skip to content

Commit ee2b8e5

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 change the way the `hasDecimals` variable checks for the presence of the `decimals` method in a contract. It replaces the method signature with a specific available selector. ### Detailed summary - Replaced the method signature `"function decimals() view returns (uint8)"` with the `availableSelectors` array containing `["0x313ce567"]` in the `detectMethod` call. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 497e550 commit ee2b8e5

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)