Ejemplo n.º 1
0
 def create_keeper_join_all(self):
     keeper = AuctionKeeper(args=args(f"--eth-from {self.keeper_address} "
                                      f"--type flop "
                                      f"--from-block 1 "
                                      f"--vat-dai-target all "
                                      f"--model ./bogus-model.sh"), web3=self.web3)
     assert self.web3.eth.defaultAccount == self.keeper_address.address
     keeper.startup()
     return keeper
Ejemplo n.º 2
0
 def create_keeper(self, dai: float):
     assert isinstance(dai, float)
     keeper = AuctionKeeper(args=args(f"--eth-from {self.keeper_address} "
                                      f"--type flop "
                                      f"--from-block 1 "
                                      f"--vat-dai-target {dai} "
                                      f"--model ./bogus-model.sh"), web3=self.web3)
     assert self.web3.eth.defaultAccount == self.keeper_address.address
     keeper.startup()
     return keeper
Ejemplo n.º 3
0
 def create_keeper(self, dai: float):
     assert isinstance(dai, float)
     keeper = AuctionKeeper(args=args(f"--eth-from {self.keeper_address} "
                                      f"--type flop "
                                      f"--network testnet "
                                      f"--vat-dai-target {dai} "
                                      f"--model ./bogus-model.sh"), web3=self.web3)
     assert self.web3.eth.defaultAccount == self.keeper_address.address
     assert keeper.vat_dai_target == Wad.from_number(dai)
     keeper.startup()
     return keeper
Ejemplo n.º 4
0
 def create_keeper(self, system_coin: float):
     assert isinstance(system_coin, float)
     keeper = AuctionKeeper(args=args(
         f"--eth-from {self.keeper_address} "
         f"--type debt "
         f"--from-block 1 "
         f"--safe-engine-system-coin-target {system_coin} "
         f"--model ./bogus-model.sh"),
                            web3=self.web3)
     assert self.web3.eth.defaultAccount == self.keeper_address.address
     keeper.startup()
     return keeper
Ejemplo n.º 5
0
    def create_keeper(self, exit_dai_on_shutdown: bool, exit_gem_on_shutdown: bool):
        assert isinstance(exit_dai_on_shutdown, bool)
        assert isinstance(exit_gem_on_shutdown, bool)

        vat_dai_behavior = "" if exit_dai_on_shutdown else "--keep-dai-in-vat-on-exit"
        vat_gem_behavior = "" if exit_gem_on_shutdown else "--keep-gem-in-vat-on-exit"

        keeper = AuctionKeeper(args=args(f"--eth-from {self.keeper_address} "
                                         f"--type flop "
                                         f"--from-block 1 "
                                         f"{vat_dai_behavior} "
                                         f"{vat_gem_behavior} "
                                         f"--model ./bogus-model.sh"), web3=self.web3)
        assert self.web3.eth.defaultAccount == self.keeper_address.address
        assert keeper.arguments.exit_dai_on_shutdown == exit_dai_on_shutdown
        keeper.startup()
        return keeper
Ejemplo n.º 6
0
    def create_keeper(self, exit_system_coin_on_shutdown: bool,
                      exit_collateral_on_shutdown: bool):
        assert isinstance(exit_system_coin_on_shutdown, bool)
        assert isinstance(exit_collateral_on_shutdown, bool)

        safe_engine_system_coin_behavior = "" if exit_system_coin_on_shutdown else "--keep-system-coin-in-safe-engine-on-exit"
        safe_engine_collateral_behavior = "" if exit_collateral_on_shutdown else "--keep-collateral-in-safe-engine-on-exit"

        keeper = AuctionKeeper(args=args(
            f"--eth-from {self.keeper_address} "
            f"--type collateral --collateral-type {self.collateral.collateral_type.name} "
            f"--from-block 1 "
            f"{safe_engine_system_coin_behavior} "
            f"{safe_engine_collateral_behavior} "
            f"--model ./bogus-model.sh"),
                               web3=self.web3)
        self.web3 = keeper.web3
        self.geb = keeper.geb
        assert self.web3.eth.defaultAccount == self.keeper_address.address
        assert keeper.arguments.exit_system_coin_on_shutdown == exit_system_coin_on_shutdown
        assert keeper.arguments.exit_collateral_on_shutdown == exit_collateral_on_shutdown
        keeper.startup()
        return keeper