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

fix: deployment #18

Merged
merged 1 commit into from
Nov 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
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