Add types for ABIv2
This commit is contained in:
		@@ -9,7 +9,7 @@ export const encoder = {
 | 
				
			|||||||
        const constructorTypes: string[] = [];
 | 
					        const constructorTypes: string[] = [];
 | 
				
			||||||
        _.each(abi, (element: Web3.AbiDefinition) => {
 | 
					        _.each(abi, (element: Web3.AbiDefinition) => {
 | 
				
			||||||
            if (element.type === AbiType.Constructor) {
 | 
					            if (element.type === AbiType.Constructor) {
 | 
				
			||||||
                _.each(element.inputs, (input: Web3.FunctionParameter) => {
 | 
					                _.each(element.inputs, (input: Web3.DataItem) => {
 | 
				
			||||||
                    constructorTypes.push(input.type);
 | 
					                    constructorTypes.push(input.type);
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,9 @@
 | 
				
			|||||||
# CHANGELOG
 | 
					# CHANGELOG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## v0.9.11 - _TBD, 2018_
 | 
					## v0.10.0 - _TBD, 2018_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Fix `web3.net.peerCount` to be of type number instead of boolean (#397)
 | 
					* Fix `web3.net.peerCount` to be of type number instead of boolean (#397)
 | 
				
			||||||
 | 
					* Support ABIv2 (#401)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## v0.9.3 - _January 11, 2018_
 | 
					## v0.9.3 - _January 11, 2018_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13
									
								
								packages/web3-typescript-typings/index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								packages/web3-typescript-typings/index.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -62,8 +62,8 @@ declare module 'web3' {
 | 
				
			|||||||
        interface MethodAbi {
 | 
					        interface MethodAbi {
 | 
				
			||||||
            type: AbiType.Function;
 | 
					            type: AbiType.Function;
 | 
				
			||||||
            name: string;
 | 
					            name: string;
 | 
				
			||||||
            inputs: FunctionParameter[];
 | 
					            inputs: DataItem[];
 | 
				
			||||||
            outputs: FunctionParameter[];
 | 
					            outputs: DataItem[];
 | 
				
			||||||
            constant: boolean;
 | 
					            constant: boolean;
 | 
				
			||||||
            stateMutability: StateMutability;
 | 
					            stateMutability: StateMutability;
 | 
				
			||||||
            payable: boolean;
 | 
					            payable: boolean;
 | 
				
			||||||
@@ -71,7 +71,7 @@ declare module 'web3' {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        interface ConstructorAbi {
 | 
					        interface ConstructorAbi {
 | 
				
			||||||
            type: AbiType.Constructor;
 | 
					            type: AbiType.Constructor;
 | 
				
			||||||
            inputs: FunctionParameter[];
 | 
					            inputs: DataItem[];
 | 
				
			||||||
            payable: boolean;
 | 
					            payable: boolean;
 | 
				
			||||||
            stateMutability: ConstructorStateMutability;
 | 
					            stateMutability: ConstructorStateMutability;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -81,9 +81,7 @@ declare module 'web3' {
 | 
				
			|||||||
            payable: boolean;
 | 
					            payable: boolean;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        interface EventParameter {
 | 
					        interface EventParameter extends DataItem {
 | 
				
			||||||
            name: string;
 | 
					 | 
				
			||||||
            type: string;
 | 
					 | 
				
			||||||
            indexed: boolean;
 | 
					            indexed: boolean;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -94,9 +92,10 @@ declare module 'web3' {
 | 
				
			|||||||
            anonymous: boolean;
 | 
					            anonymous: boolean;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        interface FunctionParameter {
 | 
					        interface DataItem {
 | 
				
			||||||
            name: string;
 | 
					            name: string;
 | 
				
			||||||
            type: string;
 | 
					            type: string;
 | 
				
			||||||
 | 
					            components: DataItem[];
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        interface ContractInstance {
 | 
					        interface ContractInstance {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user