Exemplo n.º 1
0
def main():
    """
    Promote an experimental vault to official status
    """
    badger = connect_badger(load_deployer=True)

    if rpc.is_active():
        dev_multi = ApeSafe(badger.testMultisig.address)
        helper = ApeSafeHelper(badger, dev_multi)
        assert True
    else:
        from helpers.gas_utils import gas_strategies

        gas_strategies.set_default(gas_strategies.exponentialScalingFast)
Exemplo n.º 2
0
def main():
    badger = connect_badger()

    if rpc.is_active():
        dev_multi = ApeSafe(badger.testMultisig.address)
        helper = ApeSafeHelper(badger, dev_multi)
    else:
        from helpers.gas_utils import gas_strategies

        gas_strategies.set_default(gas_strategies.exponentialScalingFast)

    # Deploy logic
    logic = GatedMiniMeController.deploy({"from": badger.deployer})
    logic.initialize(badger.token)

    # Deploy proxy

    # Create Aragon Vote

    # Execute Aragon Vote
    # badger.voteWithSystemContracts(voteId)

    helper.publish()
Exemplo n.º 3
0
    run_action,
)
from assistant.rewards.rewards_checker import verify_rewards
from brownie import *
from config.badger_config import badger_config
from helpers.gas_utils import gas_strategies
from rich.console import Console
from scripts.rewards.rewards_utils import (
    get_last_proposed_cycle,
    get_last_published_cycle,
)
from scripts.systems.badger_system import BadgerSystem, LoadMethod, connect_badger

console = Console()

gas_strategies.set_default(gas_strategies.exponentialScaling)


def hash(value):
    return web3.toHex(web3.keccak(text=value))


def approve_root(badger: BadgerSystem):
    badgerTree = badger.badgerTree
    if not badgerTree.hasPendingRoot():
        console.print("No pending root")
        return False

    if rpc.is_active():
        badger.guardian = accounts.at(
            "0x626F69162Ea1556A75Dd4443D87D2fe38dd25901", force=True)
Exemplo n.º 4
0
from helpers.constants import *
from helpers.registry import registry
from helpers.gnosis_safe import GnosisSafe, MultisigTxMetadata
from helpers.time_utils import days, hours, to_days, to_timestamp, to_utc_date
from helpers.utils import val
from rich.console import Console
from scripts.systems.badger_system import BadgerSystem, connect_badger
from tabulate import tabulate
from helpers.gnosis_safe import convert_to_test_mode, exec_direct, get_first_owner
from helpers.constants import MaxUint256
from scripts.systems.sushiswap_system import SushiswapSystem
from helpers.gas_utils import gas_strategies

console = Console()

gas_strategies.set_default(gas_strategies.rapid)


def test_main():
    main()


def Average(lst):
    return sum(lst) / len(lst)


def get_average_daily_price(file):
    with open(file + ".json") as f:
        data = json.load(f)

    price_points = []