rename file

This commit is contained in:
De Facto 2021-02-19 21:16:33 +08:00
parent b77e338c4b
commit a65a03faf0
6 changed files with 4 additions and 42 deletions

View File

@ -1,9 +1,9 @@
import fs from "fs"
import { Wallet } from "solray"
import { config } from "winston"
import { AggregatorDeployFile } from "./deploy"
import { AggregatorDeployFile } from "./Deployer"
import { loadJSONFile } from "./json"
import { coinbase } from "./PriceFeed"
import { coinbase } from "./feeds"
import { Submitter, SubmitterConfig } from "./Submitter"
interface IPriceFeederConfig {

View File

@ -16,7 +16,7 @@ logger.add(
})
)
import { IPriceFeed } from "./PriceFeed"
import { IPriceFeed } from "./feeds"
// allow oracle to start a new round after this many slots. each slot is about 500ms
const MAX_ROUND_STALENESS = 10

View File

@ -1,7 +1,5 @@
import { walletFromEnv } from "./utils"
import FluxAggregator from "./FluxAggregator"
import { solana, Wallet, Deployer } from "solray"
export const network = (process.env.NETWORK || "local") as any
@ -12,24 +10,6 @@ async function openDeployer(): Promise<Deployer> {
}
export class AppContext {
// static readonly AGGREGATOR_PROGRAM = "aggregatorProgram"
// static async forAdmin() {
// const deployer = await openDeployer()
// const admin = await walletFromEnv("ADMIN_MNEMONIC", conn)
// return new AppContext(deployer, admin)
// }
// static async forOracle() {
// const deployer = await openDeployer()
// const wallet = await walletFromEnv("ORACLE_MNEMONIC", conn)
// return new AppContext(deployer, wallet)
// }
// constructor(public deployer: Deployer, public wallet: Wallet) {}
async deployer() {
return Deployer.open(`deploy.${network}.json`)
}
@ -41,22 +21,4 @@ export class AppContext {
async oracleWallet() {
return walletFromEnv("ORACLE_MNEMONIC", conn)
}
// get aggregatorProgramID() {
// return this.aggregatorProgramAccount.publicKey
// }
// get aggregator() {
// return new FluxAggregator(this.wallet, this.aggregatorProgramID)
// }
// get aggregatorProgramAccount() {
// const program = this.deployer.account(AppContext.AGGREGATOR_PROGRAM)
// if (program == null) {
// throw new Error(`flux aggregator program is not yet deployed`)
// }
// return program
// }
}

View File

@ -2,7 +2,7 @@ import dotenv from "dotenv"
dotenv.config()
import { AppContext, conn, network } from "./src/context"
import { Deployer } from "./src/deploy"
import { Deployer } from "./src/Deployer"
import { PriceFeeder } from "./src/PriceFeeder"
async function main() {