"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transactionMapper = void 0;
const transaction_1 = require("../../../../domain/entities/transaction");
const transaction_entity_1 = require("../../entities/transaction.entity");
exports.transactionMapper = {
    toDomain(entity) {
        return new transaction_1.Transaction(entity.id, entity.hash, entity.status, entity.block, entity.networkId, entity.timestamp, entity.fromAddressId, entity.toAddressId, entity.interactedWith, entity.value, entity.fee, entity.gasPrice, entity.gasLimit, entity.method, entity.data, entity.createdAt, entity.updatedAt);
    },
    toEntity(domain) {
        const entity = new transaction_entity_1.TransactionEntity();
        entity.id = domain.id;
        entity.hash = domain.hash;
        entity.status = domain.status;
        entity.block = domain.block;
        entity.networkId = domain.networkId;
        entity.timestamp = domain.timestamp;
        entity.fromAddressId = domain.from;
        entity.toAddressId = domain.to;
        entity.interactedWith = domain.interactedWith;
        entity.value = domain.value;
        entity.fee = domain.fee;
        entity.gasPrice = domain.gasPrice;
        entity.gasLimit = domain.gasLimit;
        entity.method = domain.method;
        entity.data = domain.data;
        entity.createdAt = domain.createdAt;
        entity.updatedAt = domain.updatedAt;
        return entity;
    },
};
//# sourceMappingURL=transaction.mapper.js.map