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

import { DataType, DataTypeFactory, DependentDataType } from '../data_type';

export class Pointer extends DependentDataType {
    constructor(destDataType: DataType, parentDataType: DataType, dataTypeFactory: DataTypeFactory) {
        const destDataItem = destDataType.getDataItem();
        const dataItem: DataItem = { name: `ptr<${destDataItem.name}>`, type: `ptr<${destDataItem.type}>` };
        super(dataItem, dataTypeFactory, destDataType, parentDataType);
    }

    public getSignature(): string {
        return this._dependency.getSignature();
    }
}