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

refactor: change remote package path to relative path inside import_module() in starlark packages #182

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
22 changes: 11 additions & 11 deletions main.star
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
icon_setup_node = import_module("github.com/hugobyte/dive/services/jvm/icon/src/node-setup/setup_icon_node.star")
eth_contract_service = import_module("github.com/hugobyte/dive/services/evm/eth/src/node-setup/contract-service.star")
eth_relay_setup = import_module("github.com/hugobyte/dive/services/evm/eth/src/relay-setup/contract_configuration.star")
eth_node = import_module("github.com/hugobyte/dive/services/evm/eth/eth.star")
icon_relay_setup = import_module("github.com/hugobyte/dive/services/jvm/icon/src/relay-setup/contract_configuration.star")
icon_service = import_module("github.com/hugobyte/dive/services/jvm/icon/icon.star")
btp_bridge = import_module("github.com/hugobyte/dive/services/bridges/btp/src/bridge.star")
input_parser = import_module("github.com/hugobyte/dive/package_io/input_parser.star")
cosmvm_node = import_module("github.com/hugobyte/dive/services/cosmvm/cosmvm.star")
cosmvm_relay = import_module("github.com/hugobyte/dive/services/bridges/ibc/src/bridge.star")
cosmvm_relay_setup = import_module("github.com/hugobyte/dive/services/cosmvm/archway/src/relay-setup/contract-configuration.star")
icon_setup_node = import_module("./services/jvm/icon/src/node-setup/setup_icon_node.star")
eth_contract_service = import_module("./services/evm/eth/src/node-setup/contract-service.star")
eth_relay_setup = import_module("./services/evm/eth/src/relay-setup/contract_configuration.star")
eth_node = import_module("./services/evm/eth/eth.star")
icon_relay_setup = import_module("./services/jvm/icon/src/relay-setup/contract_configuration.star")
icon_service = import_module("./services/jvm/icon/icon.star")
btp_bridge = import_module("./services/bridges/btp/src/bridge.star")
input_parser = import_module("./package_io/input_parser.star")
cosmvm_node = import_module("./services/cosmvm/cosmvm.star")
cosmvm_relay = import_module("./services/bridges/ibc/src/bridge.star")
cosmvm_relay_setup = import_module("./services/cosmvm/archway/src/relay-setup/contract-configuration.star")

def run(plan, args):
return parse_input(plan, args)
Expand Down
2 changes: 1 addition & 1 deletion services/bridges/ibc/src/bridge.star
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Import required modules and constants
constants = import_module("github.com/hugobyte/dive/package_io/constants.star")
constants = import_module("../../../../package_io/constants.star")
ibc_relay_config = constants.IBC_RELAYER_SERVICE

def start_cosmos_relay(plan, src_key, src_chain_id, dst_key, dst_chain_id, src_config, dst_config, links):
Expand Down
4 changes: 2 additions & 2 deletions services/cosmvm/archway/archway.star
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
archway_node_service = import_module("github.com/hugobyte/dive/services/cosmvm/archway/src/node-setup/start_node.star")
constants = import_module("github.com/hugobyte/dive/package_io/constants.star")
archway_node_service = import_module("./src/node-setup/start_node.star")
constants = import_module("../../../package_io/constants.star")
archway_node_0_constant_config = constants.ARCHAY_NODE0_CONFIG
archway_node_1_constant_config = constants.ARCHAY_NODE1_CONFIG
archway_service_config = constants.ARCHWAY_SERVICE_CONFIG
Expand Down
2 changes: 1 addition & 1 deletion services/cosmvm/archway/src/node-setup/start_node.star
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
constants = import_module("github.com/hugobyte/dive/package_io/constants.star")
constants = import_module("../../../../../package_io/constants.star")
cosmos_node_constants = constants.ARCHWAY_SERVICE_CONFIG
network_port_keys_and_ip = constants.NETWORK_PORT_KEYS_AND_IP_ADDRESS

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cosmvm_deploy = import_module("github.com/hugobyte/dive/services/cosmvm/archway/src/node-setup/deploy.star")
cosmvm_deploy = import_module("../node-setup/deploy.star")
PASSCODE="password"

node_constants = import_module("github.com/hugobyte/dive/package_io/constants.star")
node_constants = import_module("../../../../../package_io/constants.star")
password = node_constants.ARCHWAY_SERVICE_CONFIG.password

def deploy_core(plan,service_name,chain_id,chain_key):
Expand Down
7 changes: 3 additions & 4 deletions services/cosmvm/cosmvm.star
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
archway_node_service = import_module("github.com/hugobyte/dive/services/cosmvm/archway/archway.star")
neutron_node_service = import_module("github.com/hugobyte/dive/services/cosmvm/neutron/neutron.star")
parser = import_module("github.com/hugobyte/dive/package_io/input_parser.star")

archway_node_service = import_module("./archway/archway.star")
neutron_node_service = import_module("./neutron/neutron.star")
parser = import_module("../../package_io/input_parser.star")

def start_cosmvm_chains(plan,node_name,args):
if node_name == "archway":
Expand Down
4 changes: 2 additions & 2 deletions services/cosmvm/neutron/neutron.star
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Import required modules and constants
neutron_node_service = import_module("github.com/hugobyte/dive/services/cosmvm/neutron/src/node-setup/start_node.star")
constants = import_module("github.com/hugobyte/dive/package_io/constants.star")
neutron_node_service = import_module("./src/node-setup/start_node.star")
constants = import_module("../../../package_io/constants.star")
neutron_private_ports = constants.NEUTRON_PRIVATE_PORTS
neutron_node1_config = constants.NEUTRON_NODE1_CONFIG
neutron_node2_config = constants.NEUTRON_NODE2_CONFIG
Expand Down
2 changes: 1 addition & 1 deletion services/cosmvm/neutron/src/node-setup/start_node.star
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Import constants from an external module
constants = import_module("github.com/hugobyte/dive/package_io/constants.star")
constants = import_module("../../../../../package_io/constants.star")
neutron_node_constants = constants.NEUTRON_SERVICE_CONFIG
network_port_keys_and_ip = constants.NETWORK_PORT_KEYS_AND_IP_ADDRESS

Expand Down
4 changes: 2 additions & 2 deletions services/evm/eth/eth.star
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
eth_node = import_module("github.com/hugobyte/dive/services/evm/eth/src/node-setup/start-eth-node.star")
eth_relay_setup = import_module("github.com/hugobyte/dive/services/evm/eth/src/relay-setup/contract_configuration.star")
eth_node = import_module("./src/node-setup/start-eth-node.star")
eth_relay_setup = import_module("./src/relay-setup/contract_configuration.star")

def start_eth_node_serivce(plan,args,node_type):

Expand Down
2 changes: 1 addition & 1 deletion services/evm/eth/src/node-setup/contract-deployer.star
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
constants = import_module("github.com/hugobyte/dive/package_io/constants.star")
constants = import_module("../../../../../package_io/constants.star")

# Deploy Contract to Eth Network
def deploy_contract(plan,contract_name,params,network_name):
Expand Down
3 changes: 1 addition & 2 deletions services/evm/eth/src/node-setup/contract-service.star
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
constants = import_module("github.com/hugobyte/dive/package_io/constants.star")

constants = import_module("../../../../../package_io/constants.star")
# Starts the eth deploy service
def start_deploy_service(plan,args):

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
eth_contract_deployer_service = import_module("github.com/hugobyte/dive/services/evm/eth/src/node-setup/contract-deployer.star")
eth_contract_deployer_service = import_module("../node-setup/contract-deployer.star")

# Deploy Bmc contract on ETH and Returns it's address
def deploy_bmc(plan,args,chain_name,service_name):
Expand Down
8 changes: 4 additions & 4 deletions services/jvm/icon/icon.star
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
wallet = import_module("github.com/hugobyte/dive/services/jvm/icon/src/node-setup/wallet.star")
setup_node = import_module("github.com/hugobyte/dive/services/jvm/icon/src/node-setup/setup_icon_node.star")
icon_node_launcher = import_module("github.com/hugobyte/dive/services/jvm/icon/src/node-setup/start_icon_node.star")
icon_relay_setup = import_module("github.com/hugobyte/dive/services/jvm/icon/src/relay-setup/contract_configuration.star")
wallet = import_module("./src/node-setup/wallet.star")
setup_node = import_module("./src/node-setup/setup_icon_node.star")
icon_node_launcher = import_module("./src/node-setup/start_icon_node.star")
icon_relay_setup = import_module("./src/relay-setup/contract_configuration.star")

START_FILE_FOR_ICON0 = "start-icon.sh"
START_FILE_FOR_ICON1 = "start-icon.sh"
Expand Down
2 changes: 1 addition & 1 deletion services/jvm/icon/src/node-setup/setup_icon_node.star
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
wallet_config = import_module("github.com/hugobyte/dive/services/jvm/icon/src/node-setup/wallet.star")
wallet_config = import_module("./wallet.star")

BTP_VERSION = "21" # REV Version

Expand Down
2 changes: 1 addition & 1 deletion services/jvm/icon/src/node-setup/start_icon_node.star
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
constants = import_module("github.com/hugobyte/dive/package_io/constants.star")
constants = import_module("../../../../../package_io/constants.star")
network_keys_and_public_address = constants.NETWORK_PORT_KEYS_AND_IP_ADDRESS

# Starts The Icon Node
Expand Down
4 changes: 2 additions & 2 deletions services/jvm/icon/src/relay-setup/contract_configuration.star
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
contract_deployment_service = import_module("github.com/hugobyte/dive/services/jvm/icon/src/node-setup/contract_deploy.star")
node_service = import_module("github.com/hugobyte/dive/services/jvm/icon/src/node-setup/setup_icon_node.star")
contract_deployment_service = import_module("../node-setup/contract_deploy.star")
node_service = import_module("../node-setup/setup_icon_node.star")

# Deploys BMC contract on ICON
def deploy_bmc(plan,args):
Expand Down
Loading