UNPKG

@dydxprotocol/exchange-wrappers

Version:

Collection of exchange wrapper contracts used by the dYdX Protocol

22 lines 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TestExchangeWrapper = void 0; var BytesHelper_1 = require("../helpers/BytesHelper"); var deployed_json_1 = require("../../migrations/deployed.json"); var TestExchangeWrapper = /** @class */ (function () { function TestExchangeWrapper(networkId) { this.networkId = networkId; } TestExchangeWrapper.prototype.getAddress = function () { return deployed_json_1.TestExchangeWrapper[this.networkId.toString()].address; }; TestExchangeWrapper.prototype.setNetworkId = function (networkId) { this.networkId = networkId; }; TestExchangeWrapper.prototype.orderToBytes = function (order) { return BytesHelper_1.allToBytes(order.originator, order.makerToken, order.takerToken, order.makerAmount, order.takerAmount, order.allegedTakerAmount, order.desiredMakerAmount); }; return TestExchangeWrapper; }()); exports.TestExchangeWrapper = TestExchangeWrapper; //# sourceMappingURL=TestExchangeWrapper.js.map