def deploy_strategy(
        self,
        id,
        strategyName,
        controller,
        params,
        governance=None,
        strategist=None,
        keeper=None,
        guardian=None,
    ):
        # TODO: Replace with prod permissions config
        deployer = self.deployer
        strategy = deploy_strategy(
            self,
            strategyName,
            controller,
            params,
            deployer,
            governance,
            strategist,
            keeper,
            guardian,
        )

        Artifact = strategy_name_to_artifact(strategyName)

        self.sett_system.strategies[id] = strategy
        self.set_strategy_artifact(id, strategyName, Artifact)
        self.track_contract_upgradeable(id + ".strategy", strategy)
        return strategy
예제 #2
0
 def deploy_sett_strategy_logic_for(self, name):
     deployer = self.deployer
     artifact = strategy_name_to_artifact(name)
     self.logic[name] = artifact.deploy({
         "from": deployer,
         "gas_price": self.gas_strategy
     })
 def connect_logic(self, logic):
     for name, address in logic.items():
         Artifact = strategy_name_to_artifact(name)
         self.logic[name] = Artifact.at(address)
 def connect_strategy(self, id, address, strategyArtifactName):
     Artifact = strategy_name_to_artifact(strategyArtifactName)
     strategy = Artifact.at(address)
     self.sett_system.strategies[id] = strategy
     self.set_strategy_artifact(id, strategyArtifactName, Artifact)
     self.track_contract_upgradeable(id + ".strategy", strategy)