コード例 #1
0
def main():
    badger = connect_badger(load_deployer=True, load_keeper=True)
    skip = keeper_config.get_active_chain_skipped_setts("earn")
    run_interval = keeper_config.get_active_chain_run_interval("earn")

    console.print("=== Earn (Eternal) ===")
    console.print("All Setts on chain", badger.getAllSettIds())
    console.print("Setts to skip", skip)
    console.print("Interval between runs: {} minutes".format(
        to_minutes(run_interval)))

    run_persistent(earn_all, (badger, skip), run_interval=run_interval)
コード例 #2
0
ファイル: harvest.py プロジェクト: sajanrajdev/badger-system
def main():
    badger = connect_badger(load_keeper=True)

    if rpc.is_active():
        """
        Test: Load up testing accounts with ETH
        """
        accounts[0].transfer(badger.deployer, Wei("5 ether"))
        accounts[0].transfer(badger.keeper, Wei("5 ether"))
        accounts[0].transfer(badger.guardian, Wei("5 ether"))

    skip = keeper_config.get_active_chain_skipped_setts("harvest")
    harvest_all(badger, skip)
コード例 #3
0
def main():
    badger = connect_badger(load_keeper=True, load_harvester=True)
    skip = keeper_config.get_active_chain_skipped_setts("tend")
    console.print(badger.getAllSettIds())

    if rpc.is_active():
        """
        Test: Load up testing accounts with ETH
        """
        accounts[0].transfer(badger.keeper, Wei("5 ether"))

        skip.append("yearn.wbtc")
        skip.append("native.test")
        skip.append("experimental.sushiIBbtcWbtc")
        skip.append("experimental.digg")

    tend_all(badger, skip)
コード例 #4
0
def main():
    badger = connect_badger()

    new_logic = StrategyConvexStakingOptimizer.deploy(
        {"from": badger.deployer})

    tm = accounts.at(badger.testMultisig.address, force=True)

    strategy = badger.getStrategy("native.pbtcCrv")
    console.print("Before", {"curvePool": strategy.curvePool()})
    badger.testProxyAdmin.upgrade(strategy, new_logic, {"from": tm})
    strategy.setCurvePoolSwap(registry.curve.pools.pbtcCrv.swap, {"from": tm})
    console.print("After", {"curvePool": strategy.curvePool()})

    strategy = badger.getStrategy("native.obtcCrv")
    # console.print("Before 2", {
    #     "curvePool": strategy.curvePool()
    # })
    # badger.testProxyAdmin.upgrade(strategy, new_logic, {'from': tm})
    strategy.setCurvePoolSwap(registry.curve.pools.obtcCrv.swap, {"from": tm})
    # console.print("After 2", {
    #     "curvePool": strategy.curvePool()
    # })

    strategy = badger.getStrategy("native.bbtcCrv")
    # console.print("Before 3", {
    #     "curvePool": strategy.curvePool()
    # })
    # badger.testProxyAdmin.upgrade(strategy, new_logic, {'from': tm})
    strategy.setCurvePoolSwap(registry.curve.pools.bbtcCrv.swap, {"from": tm})

    # console.print("After 3", {
    #     "curvePool": strategy.curvePool()
    # })

    if rpc.is_active():
        """
        Test: Load up testing accounts with ETH
        """
        accounts[0].transfer(badger.deployer, Wei("5 ether"))
        accounts[0].transfer(badger.keeper, Wei("5 ether"))
        accounts[0].transfer(badger.guardian, Wei("5 ether"))

    skip = keeper_config.get_active_chain_skipped_setts("harvest")
    harvest_all(badger, skip)
コード例 #5
0
def main():
    badger = connect_badger(load_keeper=True)

    if rpc.is_active():
        """
        Test: Load up testing accounts with ETH
        """
        accounts[0].transfer(badger.deployer, Wei("5 ether"))
        accounts[0].transfer(badger.keeper, Wei("5 ether"))
        accounts[0].transfer(badger.guardian, Wei("5 ether"))

    skip = keeper_config.get_active_chain_skipped_setts("harvest")
    run_interval = keeper_config.get_active_chain_run_interval("harvest")

    console.print("=== Harvest (Eternal) ===")
    console.print("All Setts on chain", badger.getAllSettIds())
    console.print("Setts to skip", skip)
    console.print("Interval between runs: {} minutes".format(to_minutes(run_interval)))

    run_persistent(harvest_all, [badger, skip], run_interval=run_interval)
コード例 #6
0
ファイル: earn.py プロジェクト: zhm/badger-system
def main():
    # TODO: Output message when failure

    badger = connect_badger(load_keeper=True)
    skip = keeper_config.get_active_chain_skipped_setts("earn")
    earn_all(badger, skip)
コード例 #7
0
def main():
    badger = connect_badger(load_keeper=True)
    skip = keeper_config.get_active_chain_skipped_setts("tend")
    console.print(badger.getAllSettIds())

    tend_all(badger, skip)