Skip to content

Commit

Permalink
fix: deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Th0rgal committed Nov 16, 2023
1 parent 14b137b commit ab785a1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion scripts/deploy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# %% Imports
import logging
from asyncio import run

from dotenv import load_dotenv
from utils.constants import COMPILED_CONTRACTS, ETH_TOKEN_ADDRESS
from utils.starknet import (
deploy_v2,
Expand All @@ -10,11 +10,22 @@
get_starknet_account,
dump_deployments,
)
import os

logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)

load_dotenv()
NETWORK = os.getenv("STARKNET_NETWORK", "devnet")
# https://api.starknet.id/uri?id=
MAINNET_CONST = [0x68747470733A2F2F6170692E737461726B6E65742E69642F7572693F69643D]
# https://goerli.api.starknet.id/uri?id="
GOERLI_CONST = [
0x68747470733A2F2F676F65726C692E6170692E737461726B6E65742E69642F,
0x7572693F69643D,
]


# %% Main
async def main():
Expand All @@ -31,6 +42,8 @@ async def main():
deployments = {}
deployments["naming_Identity"] = await deploy_v2(
"naming_Identity",
account.address,
(MAINNET_CONST if NETWORK == "mainnet" else GOERLI_CONST),
)
identity_addr = deployments["naming_Identity"]["address"]

Expand Down
4 changes: 2 additions & 2 deletions scripts/utils/starknet.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ def get_tx_url(tx_hash: int) -> str:


def get_sierra_artifact(contract_name):
return BUILD_DIR / f"{contract_name}.sierra.json"
return BUILD_DIR / f"{contract_name}.contract_class.json"


def get_casm_artifact(contract_name):
return BUILD_DIR / f"{contract_name}.casm.json"
return BUILD_DIR / f"{contract_name}.compiled_contract_class.json"


def get_abi(contract_name):
Expand Down

0 comments on commit ab785a1

Please sign in to comment.