aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/abi_encoder/abstract_data_types/interfaces.ts
blob: 2ae92659c5ab1839328a92105a8853b069c919d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { DataItem } from 'ethereum-types';

import { RawCalldata } from '../calldata';

import { DataType } from './data_type';

export interface DataTypeFactory {
    create: (dataItem: DataItem, parentDataType?: DataType) => DataType;
    mapDataItemToDataType: (dataItem: DataItem) => DataType;
}

export interface DataTypeStaticInterface {
    matchType: (type: string) => boolean;
    encodeValue: (value: any) => Buffer;
    decodeValue: (rawCalldata: RawCalldata) => any;
}