MCPcopy Index your code
hub / github.com/dethcrypto/TypeChain / isConstant

Function isConstant

packages/typechain/src/parser/abiParser.ts:503–509  ·  view source on GitHub ↗
(fn: FunctionDeclaration)

Source from the content-addressed store, hash-verified

501}
502
503export function isConstant(fn: FunctionDeclaration): boolean {
504 return (
505 (fn.stateMutability === 'pure' || fn.stateMutability === 'view') &&
506 fn.inputs.length === 0 &&
507 fn.outputs.length === 1
508 )
509}
510
511export function isConstantFn(fn: FunctionDeclaration): boolean {
512 return (fn.stateMutability === 'pure' || fn.stateMutability === 'view') && !isConstant(fn)

Callers 5

generateFunctionFunction · 0.90
generateFunctionFunction · 0.90
abiParser.test.tsFile · 0.90
isConstantFnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…