1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.AbstractBlobDataType = void 0;
|
4 | const blob_1 = require("../../calldata/blocks/blob");
|
5 | const data_type_1 = require("../data_type");
|
6 | class AbstractBlobDataType extends data_type_1.DataType {
|
7 | constructor(dataItem, factory, sizeKnownAtCompileTime) {
|
8 | super(dataItem, factory);
|
9 | this._sizeKnownAtCompileTime = sizeKnownAtCompileTime;
|
10 | }
|
11 | generateCalldataBlock(value, parentBlock) {
|
12 | const encodedValue = this.encodeValue(value);
|
13 | const name = this.getDataItem().name;
|
14 | const signature = this.getSignature();
|
15 | const parentName = parentBlock === undefined ? '' : parentBlock.getName();
|
16 | const block = new blob_1.BlobCalldataBlock(name, signature, parentName, encodedValue);
|
17 | return block;
|
18 | }
|
19 | generateValue(calldata, rules) {
|
20 | const value = this.decodeValue(calldata);
|
21 | return value;
|
22 | }
|
23 | isStatic() {
|
24 | return this._sizeKnownAtCompileTime;
|
25 | }
|
26 | }
|
27 | exports.AbstractBlobDataType = AbstractBlobDataType;
|
28 |
|
\ | No newline at end of file |