UNPKG

@volare.finance/schemas.js

Version:
122 lines 5.83 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.TransactionSchema = exports.Transaction = void 0; const mongoose_1 = require("@nestjs/mongoose"); const swagger_1 = require("@nestjs/swagger"); let Transaction = class Transaction { }; exports.Transaction = Transaction; __decorate([ (0, swagger_1.ApiProperty)({ description: 'The timestamp at which the event is emitted.', example: 1646717593 }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", Number) ], Transaction.prototype, "timestamp", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The block number in which the transaction was recorded.', example: 32851612 }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", Number) ], Transaction.prototype, "blockNumber", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The block header hash of the current transaction.', example: '0x000160a0000004ebd03c3bb87b629a9cec90d7ffe684a1f26b3a5856714a1171', }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], Transaction.prototype, "blockHash", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: `The transaction's index.`, example: 1 }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", Number) ], Transaction.prototype, "transactionIndex", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The transaction hash generated after the transaction is initiated.', example: '0xd04e465a8843cd793e5374984bb70e1c05ca41bed2333c4c39f8dbaa62fe53b2', }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], Transaction.prototype, "hash", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The sending party of the transaction (must be from an EOA address).', example: '0xb5a2e48f3b6b61d1d59877c8046e7c2c59595e4e', }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], Transaction.prototype, "from", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The receiving address (if an externally-owned account, the transaction will transfer value. If a contract account, the transaction will execute the contract code).', example: '0x16327e3fbdaca3bcf7e38f5af2599d2ddc33ae52', }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], Transaction.prototype, "to", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The amount of ETH to transfer from sender to recipient (in WEI, a denomination of ETH).', example: '0' }), (0, mongoose_1.Prop)(), __metadata("design:type", String) ], Transaction.prototype, "value", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: `The function and arguments passed to the field 'to'.`, example: '0xa0712d680000000000000000000000000000000000000000000000000000000000000002', }), (0, mongoose_1.Prop)(), __metadata("design:type", String) ], Transaction.prototype, "data", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The status of the transaction (1 means the transaction is successful).', example: 1 }), (0, mongoose_1.Prop)(), __metadata("design:type", Number) ], Transaction.prototype, "status", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: `The function signature in the field 'to'.`, example: 'mint(uint256 mintedAmount)' }), (0, mongoose_1.Prop)(), __metadata("design:type", String) ], Transaction.prototype, "signature", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The signature hash.', example: '0xa0712d68' }), (0, mongoose_1.Prop)(), __metadata("design:type", String) ], Transaction.prototype, "sighash", void 0); __decorate([ (0, swagger_1.ApiProperty)({ type: [String], description: 'The decoded arguments passed to the function.', example: ['0000000000000000000000000000000000000000000000000000000000000002'], }), (0, mongoose_1.Prop)(), __metadata("design:type", Array) ], Transaction.prototype, "args", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ type: [Object], description: 'The decoded logs emitted by this transaction.', example: [ { name: 'Transfer', signature: 'Transfer(address,address,uint256)', topic: '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', args: ['0000000000000000000000000000000000000000000000000000000000000002'], }, ], }), (0, mongoose_1.Prop)(), __metadata("design:type", Array) ], Transaction.prototype, "logs", void 0); exports.Transaction = Transaction = __decorate([ (0, mongoose_1.Schema)({ collection: 'transaction' }) ], Transaction); exports.TransactionSchema = mongoose_1.SchemaFactory.createForClass(Transaction); //# sourceMappingURL=transaction.js.map