Skip to content

Commit

Permalink
Merge branch 'release/0.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
web3technologies committed Mar 1, 2024
2 parents 187ef76 + fe93c0f commit f826e11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

setup(
name="starknet-simple-deploy",
version="0.1.2",
version="0.1.4",
description="Starknet Simple Deploy",
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down
10 changes: 5 additions & 5 deletions src/starknet_simple_deploy/contract_data_writer.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from pathlib import Path
import json
import re
from pathlib import Path


class ContractDataWriter:

@staticmethod
def write_data(deploy_env, abi, chain_id, contract_name, address=""):
def write_data(base_output_path, deploy_env, abi, chain_id, contract_name, address=""):
match = re.search(r'\.(.*)', str(chain_id))
base_data_path = Path.cwd() / f"deadalus-interface/src/contracts/{deploy_env}/{match.group(1)}"
base_data_path.mkdir(parents=True, exist_ok=True)
data_path_output_path = Path(f"{base_output_path}/{deploy_env}/{match.group(1)}")
data_path_output_path.mkdir(parents=True, exist_ok=True)
file_data = {
"address": hex(address) if address else "null",
"chain_id": repr(chain_id),
"abi": abi
}
with open(base_data_path / f"{contract_name}_output.json", "w") as file:
with open(data_path_output_path / f"{contract_name}_output.json", "w") as file:
json.dump(file_data, file, indent=4)

0 comments on commit f826e11

Please sign in to comment.