@volare.finance/schemas.js
Version:
58 lines • 3 kB
JavaScript
;
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.ContractSchema = exports.Contract = void 0;
const mongoose_1 = require("@nestjs/mongoose");
const swagger_1 = require("@nestjs/swagger");
let Contract = class Contract {
};
exports.Contract = Contract;
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The contract address.', example: '0xF491e7B69E4244ad4002BC14e878a34207E38c29' }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], Contract.prototype, "address", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ description: 'The contract name.', example: 'UniswapV2Router02' }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], Contract.prototype, "name", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The block number which the contract is deployed at.', example: 32851612 }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Number)
], Contract.prototype, "blockNumber", void 0);
__decorate([
(0, swagger_1.ApiProperty)({
description: 'The hash of transaction by the contract is deployed at.',
example: '0x8f6be9c28c752f08946b0226324e1ae99818134d66f18b70328a739435d17395',
}),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], Contract.prototype, "transactionHash", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The contract deployer.', example: '0x95478c4f7d22d1048f46100001c2c69d2ba57380' }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], Contract.prototype, "owner", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({
description: `The logo url of contract which can be only modified by 'owner'.`,
example: 'https://storage.googleapis.com/opensea-prod.appspot.com/puffs/1.png',
}),
(0, mongoose_1.Prop)(),
__metadata("design:type", String)
], Contract.prototype, "logo", void 0);
exports.Contract = Contract = __decorate([
(0, mongoose_1.Schema)({ collection: 'contract' })
], Contract);
exports.ContractSchema = mongoose_1.SchemaFactory.createForClass(Contract);
//# sourceMappingURL=contract.js.map