2018-10-02 10:06:26 +02:00
|
|
|
import ContractHandler from "../src/keeper/ContractHandler"
|
|
|
|
import Keeper from "../src/keeper/Keeper"
|
|
|
|
import Web3Helper from "../src/keeper/Web3Helper"
|
|
|
|
import Config from "../src/models/Config"
|
|
|
|
import Logger from "../src/utils/Logger"
|
2018-10-01 18:10:26 +02:00
|
|
|
|
2018-10-02 10:06:26 +02:00
|
|
|
let keeper: Keeper
|
2018-10-01 18:10:26 +02:00
|
|
|
|
|
|
|
before(async () => {
|
2018-10-02 10:06:26 +02:00
|
|
|
const config: Config = {nodeUri: "http://localhost:8545"} as Config
|
|
|
|
const web3Helper = new Web3Helper(config)
|
|
|
|
await ContractHandler.deployContracts(web3Helper)
|
|
|
|
keeper = await Keeper.getInstance(config, web3Helper)
|
|
|
|
})
|
2018-10-01 18:10:26 +02:00
|
|
|
|
|
|
|
describe("Keeper", () => {
|
|
|
|
|
|
|
|
it("should keep", async () => {
|
|
|
|
|
2018-10-02 10:06:26 +02:00
|
|
|
const balance = await keeper.token.getTokenBalance("0xB0EdD05A5874c5c1Fcd6bCB4E52143fB7134b7EE")
|
2018-10-01 18:10:26 +02:00
|
|
|
|
2018-10-02 10:06:26 +02:00
|
|
|
Logger.log(balance)
|
|
|
|
})
|
|
|
|
})
|