MCPcopy Create free account
hub / github.com/dethcrypto/TypeChain / findStateMutability

Function findStateMutability

packages/typechain/src/parser/abiParser.ts:256–265  ·  view source on GitHub ↗
(abiPiece: RawAbiDefinition)

Source from the content-addressed store, hash-verified

254
255// if stateMutability is not available we will use old spec containing constant and payable
256function findStateMutability(abiPiece: RawAbiDefinition): StateMutability {
257 if (abiPiece.stateMutability) {
258 return abiPiece.stateMutability
259 }
260
261 if (abiPiece.constant) {
262 return 'view'
263 }
264 return abiPiece.payable ? 'payable' : 'nonpayable'
265}
266
267export function getFunctionDocumentation(
268 abiPiece: RawAbiDefinition,

Callers 3

parseConstructorFunction · 0.85
parseFallbackFunction · 0.85
parseFunctionDeclarationFunction · 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…