diff --git a/.changeset/strong-ducks-tie.md b/.changeset/strong-ducks-tie.md new file mode 100644 index 00000000000..a54d7a55385 --- /dev/null +++ b/.changeset/strong-ducks-tie.md @@ -0,0 +1,5 @@ +--- +"@fuel-ts/program": patch +--- + +fix: added docs for `isReadOnly` function diff --git a/packages/program/src/types.ts b/packages/program/src/types.ts index 501395c4e21..0a34e7949e0 100644 --- a/packages/program/src/types.ts +++ b/packages/program/src/types.ts @@ -62,6 +62,11 @@ export type CallConfig = { // eslint-disable-next-line @typescript-eslint/no-explicit-any export interface InvokeFunction = Array, TReturn = any> { (...args: TArgs): FunctionInvocationScope; + /** + * Checks if the function is read-only i.e. it only reads from storage, does not write to it. + * + * @returns True if the function is read-only or pure, false otherwise. + */ isReadOnly: () => boolean; }