UNPKG

@volare.finance/schemas.js

Version:
112 lines 5.71 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.VolareLogSchema = exports.VolareLog = exports.VolareLogEventToAction = exports.VolareLogTag = void 0; const mongoose_1 = require("@nestjs/mongoose"); const swagger_1 = require("@nestjs/swagger"); var VolareLogTag; (function (VolareLogTag) { VolareLogTag["Vault"] = "vault"; VolareLogTag["Collateral"] = "collateral"; VolareLogTag["Short"] = "short"; VolareLogTag["Long"] = "long"; VolareLogTag["Order"] = "order"; })(VolareLogTag || (exports.VolareLogTag = VolareLogTag = {})); var VolareLogEventToAction; (function (VolareLogEventToAction) { VolareLogEventToAction["LimitOrderFilled"] = "FillLimitOrder"; VolareLogEventToAction["LimitOrderCancelled"] = "CancelLimitOrder"; VolareLogEventToAction["VaultOpened"] = "OpenVault"; VolareLogEventToAction["VaultSettled"] = "SettleVault"; VolareLogEventToAction["VaultLiquidated"] = "Liquidate"; VolareLogEventToAction["CollateralAssetDeposited"] = "DepositCollateral"; VolareLogEventToAction["CollateralAssetWithdrawed"] = "WithdrawCollateral"; VolareLogEventToAction["ShortVTokenMinted"] = "MintShortOption"; VolareLogEventToAction["ShortVTokenBurned"] = "BurnShortOption"; VolareLogEventToAction["LongVTokenDeposited"] = "DepositLongOption"; VolareLogEventToAction["LongVTokenWithdrawed"] = "WithdrawLongOption"; VolareLogEventToAction["Redeem"] = "Redeem"; })(VolareLogEventToAction || (exports.VolareLogEventToAction = VolareLogEventToAction = {})); let VolareLog = class VolareLog { }; exports.VolareLog = VolareLog; __decorate([ (0, swagger_1.ApiProperty)({ description: 'The timestamp at which the event is emitted.', example: 1655285800 }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", Number) ], VolareLog.prototype, "timestamp", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The block number in which the transaction was recorded.', example: 10704363 }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", Number) ], VolareLog.prototype, "blockNumber", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The hash of the transaction which generates the current log.', example: '0xba6badab8ab2555e29df5549cc4fed63eab4d1768f6fdad0caca088d26d74395', }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], VolareLog.prototype, "transactionHash", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The log index in the transaction.', example: 2 }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", Number) ], VolareLog.prototype, "logIndex", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The owner address.', example: '0xa02bb661eef3b5de20cb1682003911cd984c574f' }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], VolareLog.prototype, "owner", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The vault ID.', example: 3 }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", Number) ], VolareLog.prototype, "vaultId", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'The asset symbol.', example: 'WETH-07DEC22-1000-C' }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], VolareLog.prototype, "asset", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'The asset changed.', example: 1 }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", Number) ], VolareLog.prototype, "assetChanged", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The action name.', example: 'MintShortOption' }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], VolareLog.prototype, "action", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The event name.', example: 'ShortVTokenMinted' }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], VolareLog.prototype, "event", void 0); __decorate([ (0, swagger_1.ApiProperty)({ type: [String], description: 'Additional arguments passed to the event.', example: ['0000000000000000000000000000000000000000000000000000000000000002'], }), (0, mongoose_1.Prop)(), __metadata("design:type", Array) ], VolareLog.prototype, "args", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The event tag.', example: 'short' }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], VolareLog.prototype, "tag", void 0); exports.VolareLog = VolareLog = __decorate([ (0, mongoose_1.Schema)({ collection: 'volare_log' }) ], VolareLog); exports.VolareLogSchema = mongoose_1.SchemaFactory.createForClass(VolareLog); //# sourceMappingURL=volare.log.js.map