def setUp(self): root_clear(self._score_root_path, self._state_db_root_path) self._block_height = 0 self._prev_block_hash = None config = IconConfig("", default_icon_config) config.load() config.update_conf({ConfigKey.BUILTIN_SCORE_OWNER: str(self._admin)}) config.update_conf({ ConfigKey.SERVICE: { ConfigKey.SERVICE_AUDIT: False, ConfigKey.SERVICE_FEE: False, ConfigKey.SERVICE_DEPLOYER_WHITELIST: False, ConfigKey.SERVICE_SCORE_PACKAGE_VALIDATOR: False } }) config.update_conf({ ConfigKey.SCORE_ROOT_PATH: self._score_root_path, ConfigKey.STATE_DB_ROOT_PATH: self._state_db_root_path }) config.update_conf(self._make_init_config()) self.icon_service_engine = IconServiceEngine() self.icon_service_engine.open(config) self._genesis_invoke()
def setUp(self): root_clear(self._score_root_path, self._state_db_root_path) self._block_height = 0 self._prev_block_hash = None self.config = IconConfig("", default_icon_config) self.config.load() self.config.update_conf({ConfigKey.BUILTIN_SCORE_OWNER: str(self._admin)}) self.config.update_conf({ConfigKey.SCORE_ROOT_PATH: self._score_root_path, ConfigKey.STATE_DB_ROOT_PATH: self._state_db_root_path}) self.config.update_conf(self._make_init_config())
def setUp(self): root_clear(self._score_root_path, self._state_db_root_path, self._iiss_db_root_path) self._block_height = -1 self._prev_block_hash = None config = IconConfig("", default_icon_config) config.load() config.update_conf( {ConfigKey.BUILTIN_SCORE_OWNER: str(self._admin.address)}) config.update_conf({ ConfigKey.SERVICE: { ConfigKey.SERVICE_AUDIT: False, ConfigKey.SERVICE_FEE: True, ConfigKey.SERVICE_DEPLOYER_WHITE_LIST: False, ConfigKey.SERVICE_SCORE_PACKAGE_VALIDATOR: False } }) config.update_conf({ ConfigKey.SCORE_ROOT_PATH: self._score_root_path, ConfigKey.STATE_DB_ROOT_PATH: self._state_db_root_path }) config.update_conf(self._make_init_config()) self._mock_ipc() self.icon_service_engine = IconServiceEngine() self.icon_service_engine.open(config) self._genesis_invoke() self.update_governance(version="governance_for_fee2") tx_results: List['TransactionResult'] = self.deploy_score( score_root="sample_deploy_scores", score_name="install/sample_score_fee_sharing", from_=self._admin, deploy_params={"value": hex(100)}) self.score_address = tx_results[0].score_address tx_results: List['TransactionResult'] = self.deploy_score( score_root="sample_deploy_scores", score_name="install/sample_score_fee_sharing_inter_call", from_=self._admin, deploy_params={ "value": hex(100), "score_address": str(self.score_address) }) self.score_address2 = tx_results[0].score_address
def tearDown(self): self.icon_service_engine.close() root_clear(self._score_root_path, self._state_db_root_path)