diff --git a/src/logic/contractInteraction/sources/ABIService/index.ts b/src/logic/contractInteraction/sources/ABIService/index.ts index 78afd210..5c2a999a 100644 --- a/src/logic/contractInteraction/sources/ABIService/index.ts +++ b/src/logic/contractInteraction/sources/ABIService/index.ts @@ -32,10 +32,10 @@ export const getMethodSignatureAndSignatureHash = ( export const extractUsefulMethods = (abi: AbiItem[]): AbiItemExtended[] => { return abi - .filter(({ constant, name, type }) => type === 'function' && !!name && typeof constant === 'boolean') + .filter(({ stateMutability, name, type }) => type === 'function' && !!name && stateMutability !== 'pure') .map( (method): AbiItemExtended => ({ - action: method.constant ? 'read' : 'write', + action: method.stateMutability === 'view' ? 'read' : 'write', ...getMethodSignatureAndSignatureHash(method), ...method, }),