Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tso-data-models

Package Overview
Dependencies
Maintainers
1
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tso-data-models - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

1

lib/models/epoch/OpenEpoch.d.ts

@@ -7,2 +7,3 @@ export declare class OpenEpoch {

updateEndTime(): void;
calculateSubmitTime(secondsBeforeEpochEnd: number): number;
getDataFromBlockChain(): Promise<void>;

@@ -9,0 +10,0 @@ isOpen(): boolean;

@@ -50,2 +50,6 @@ "use strict";

};
OpenEpoch.prototype.calculateSubmitTime = function (secondsBeforeEpochEnd) {
var submitBuffer = secondsBeforeEpochEnd * 1000;
return this.epochEnd - submitBuffer;
};
OpenEpoch.prototype.getDataFromBlockChain = function () {

@@ -52,0 +56,0 @@ return __awaiter(this, void 0, void 0, function () {

2

lib/models/epoch/PriceSubmission.d.ts
import { BigNumber } from "ethers";
export declare class PriceSubmission {
providerAddress: string;
assetName: string;
assetAddress: string;
providerAddress: string;
submitTime?: number;

@@ -7,0 +7,0 @@ randomNumber?: number;

import { ethers, Contract } from 'ethers';
export declare class FAsset {
ftsoRegistry: Contract;
ftsoRegistryAddress: Contract;
ftsoRegistryContract: Contract;
tsoAddress?: string;

@@ -5,0 +6,0 @@ assetName: string;

@@ -49,3 +49,3 @@ "use strict";

this.priceProviderAddress = priceProviderAddress;
this.ftsoRegistry = new ethers_1.Contract(addresses_1.FTSO_REGISTRY_ADDRESS, abis_1.FTSO_REGISTRY_ABI, ethersProvider);
this.ftsoRegistryContract = new ethers_1.Contract(addresses_1.FTSO_REGISTRY_ADDRESS, abis_1.FTSO_REGISTRY_ABI, ethersProvider);
}

@@ -59,3 +59,3 @@ FAsset.prototype.setRegisteredTSO = function () {

_a = this;
return [4 /*yield*/, this.ftsoRegistry.getFtsoBySymbol(this.assetSymbol)];
return [4 /*yield*/, this.ftsoRegistryContract.getFtsoBySymbol(this.assetSymbol)];
case 1:

@@ -62,0 +62,0 @@ _a.tsoAddress = _b.sent();

{
"name": "tso-data-models",
"version": "1.0.9",
"version": "1.0.10",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -19,2 +19,7 @@ import { PriceSubmission } from "./PriceSubmission";

calculateSubmitTime(secondsBeforeEpochEnd: number): number {
const submitBuffer = secondsBeforeEpochEnd * 1000;
return this.epochEnd - submitBuffer;
}
async getDataFromBlockChain(): Promise<void> {

@@ -21,0 +26,0 @@ //TODO Add Ethers Code HEre to Query Chain for open Epoch

import { BigNumber, ethers } from "ethers";
export class PriceSubmission {
providerAddress: string;
assetName: string;
assetAddress: string;
providerAddress: string;
submitTime?: number;

@@ -8,0 +8,0 @@ randomNumber?: number;

@@ -6,3 +6,4 @@ import { ethers, Contract, ContractFactory } from 'ethers';

export class FAsset {
ftsoRegistry: Contract;
ftsoRegistryAddress: Contract;
ftsoRegistryContract: Contract;
//voterWhitelister: Contract;

@@ -21,7 +22,7 @@ tsoAddress?: string;

this.priceProviderAddress = priceProviderAddress;
this.ftsoRegistry = new Contract(FTSO_REGISTRY_ADDRESS, FTSO_REGISTRY_ABI, ethersProvider);
this.ftsoRegistryContract = new Contract(FTSO_REGISTRY_ADDRESS, FTSO_REGISTRY_ABI, ethersProvider);
}
async setRegisteredTSO() {
this.tsoAddress = await this.ftsoRegistry.getFtsoBySymbol(this.assetSymbol);
this.tsoAddress = await this.ftsoRegistryContract.getFtsoBySymbol(this.assetSymbol);
}

@@ -28,0 +29,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc