Skip to content

Commit

Permalink
Merge pull request #2478 from Meelabs/1.0
Browse files Browse the repository at this point in the history
AbiInput and AbiOutput interface update
  • Loading branch information
nivida authored Mar 18, 2019
2 parents 441135e + d29ab09 commit f66e080
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/web3-utils/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export interface AbiItem {
constant?: boolean;
inputs?: AbiInput[];
name?: string;
outputs?: AbiOuput[];
outputs?: AbiOutput[];
payable?: boolean;
stateMutability?: StateMutabilityType;
type: AbiType;
Expand All @@ -219,9 +219,11 @@ export interface AbiInput {
name: string;
type: string;
indexed?: boolean;
components?: AbiInput[];
}

export interface AbiOuput {
export interface AbiOutput {
name: string;
type: string;
components?: AbiOutput[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,80 @@
import {jsonInterfaceMethodToString, AbiItem} from 'web3-utils';

const abiItem: AbiItem = {
anonymous: false,
constant: true,
inputs: [
{
name: 'testMe',
type: 'uint256[3]'
},
{
name: 'inputA',
type: 'tuple',
components: [
{
name: 'a',
type: 'uint8'
},
{
name: 'b',
type: 'uint8'
}
]
},
{
name: 'inputB',
type: 'tuple[]',
components: [
{
name: 'a1',
type: 'uint256'
},
{
name: 'a2',
type: 'uint256'
}
]
},
{
name: 'inputC',
type: 'uint8',
indexed: false
}
],
name: "testName",
outputs: [
{
name: "test",
type: "uint256"
},
{
name: 'outputA',
type: 'tuple',
components: [
{
name: 'a',
type: 'uint8'
},
{
name: 'b',
type: 'uint8'
}
]
},
{
name: 'outputB',
type: 'tuple[]',
components: [
{
name: 'a1',
type: 'uint256'
},
{
name: 'a2',
type: 'uint256'
}
]
}
],
payable: false,
Expand Down

0 comments on commit f66e080

Please sign in to comment.