Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ima-agent#10 Update ima network browser path location #1030

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions core/ima/schain.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
from ima_predeployed.generator import generate_abi
from core.schains.config.directory import schain_config_dir

from tools.configs.ima import (
SCHAIN_IMA_ABI_FILEPATH, SCHAIN_IMA_ABI_FILENAME, IMA_NETWORK_BROWSER_FILENAME
)
from tools.configs.ima import SCHAIN_IMA_ABI_FILEPATH, SCHAIN_IMA_ABI_FILENAME


logger = logging.getLogger(__name__)
Expand All @@ -52,8 +50,3 @@ def copy_schain_ima_abi(name):
def get_schain_ima_abi_filepath(schain_name):
schain_dir_path = schain_config_dir(schain_name)
return os.path.join(schain_dir_path, SCHAIN_IMA_ABI_FILENAME)


def get_ima_network_browser_filepath(schain_name):
schain_dir_path = schain_config_dir(schain_name)
return os.path.join(schain_dir_path, IMA_NETWORK_BROWSER_FILENAME)
7 changes: 4 additions & 3 deletions core/schains/ima.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@
from core.schains.config.directory import schain_config_dir
from core.schains.config.file_manager import ConfigFileManager
from core.schains.config.helper import get_schain_ports_from_config, get_chain_id
from core.ima.schain import get_schain_ima_abi_filepath, get_ima_network_browser_filepath
from core.ima.schain import get_schain_ima_abi_filepath
from tools.configs import ENV_TYPE, SGX_SSL_KEY_FILEPATH, SGX_SSL_CERT_FILEPATH, SGX_SERVER_URL
from tools.configs.containers import CONTAINERS_INFO, IMA_MIGRATION_PATH
from tools.configs.db import REDIS_URI
from tools.configs.ima import (
IMA_ENDPOINT,
MAINNET_IMA_ABI_FILEPATH,
IMA_STATE_CONTAINER_PATH,
IMA_TIME_FRAMING
IMA_TIME_FRAMING,
IMA_NETWORK_BROWSER_FILEPATH
)
from tools.configs.schains import SCHAINS_DIR_PATH
from tools.configs.web3 import ABI_FILEPATH
Expand Down Expand Up @@ -180,7 +181,7 @@ def get_ima_env(schain_name: str, mainnet_chain_id: int) -> ImaEnv:
monitoring_port=node_info['imaMonitoringPort'],
rpc_port=get_ima_rpc_port(schain_name),
time_framing=IMA_TIME_FRAMING,
network_browser_data_path=get_ima_network_browser_filepath(schain_name)
network_browser_data_path=IMA_NETWORK_BROWSER_FILEPATH
)


Expand Down
1 change: 1 addition & 0 deletions tools/configs/ima.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
DISABLE_IMA = os.getenv('DISABLE_IMA') == 'True'

IMA_NETWORK_BROWSER_FILENAME = 'ima_network_browser_data.json'
IMA_NETWORK_BROWSER_FILEPATH = os.path.join(SCHAIN_CONFIG_DIR_SKALED, IMA_NETWORK_BROWSER_FILENAME)

SCHAIN_IMA_ABI_FILENAME = 'schain_ima_abi.json'
SCHAIN_IMA_ABI_FILEPATH = os.path.join(CONTRACTS_INFO_FOLDER, SCHAIN_IMA_ABI_FILENAME)
Expand Down
Loading