Added stateMutability to ABIs

In the newest version of Solidity, additional property was added,
called state mutability, specyfing what kind of access does the
function have to memory and storage.
Additionally, constructor mutability is limited to payable/non-payable
as it HAS to modify the storage to actually deploy the contract
This commit is contained in:
Olaf Tomalka
2018-01-03 12:28:06 +01:00
committed by Leonid Logvinov
parent 3a1360ce11
commit 7233a11ba0

View File

@@ -57,12 +57,16 @@ declare module 'web3' {
Fallback = 'fallback',
}
type ConstructorStateMutability = 'nonpayable' | 'payable';
type StateMutability = 'pure' | 'view' | ConstructorStateMutability;
interface MethodAbi {
type: AbiType.Function;
name: string;
inputs: FunctionParameter[];
outputs: FunctionParameter[];
constant: boolean;
stateMutability: StateMutability;
payable: boolean;
}
@@ -70,6 +74,7 @@ declare module 'web3' {
type: AbiType.Constructor;
inputs: FunctionParameter[];
payable: boolean;
stateMutability: ConstructorStateMutability;
}
interface FallbackAbi {