Skip to content

Commit

Permalink
🎨 cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
EvolveArt committed Apr 15, 2024
1 parent 4e1077c commit d82e964
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 71 deletions.
7 changes: 2 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ STARKNET_NETWORK=devnet
MAINNET_ACCOUNT_ADDRESS=
MAINNET_PRIVATE_KEY=

TESTNET_ACCOUNT_ADDRESS=
TESTNET_PRIVATE_KEY=

TESTNET2_ACCOUNT_ADDRESS=
TESTNET2_PRIVATE_KEY=
SEPOLIA_ACCOUNT_ADDRESS=
SEPOLIA_PRIVATE_KEY=

DEVNET_ACCOUNT_ADDRESS=
DEVNET_PRIVATE_KEY=
Expand Down
2 changes: 1 addition & 1 deletion deployments/sepolia/declarations.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"pragma_Oracle": "0x25abeffbd83906d362db31c461a2c72b71a9b106d3c29fa054bf2d23949ae26",
"pragma_Oracle": "0x1e36e19e57bd8956e59c4ae0604de92e0bbf648efbf697467c2bfb2de92a953",
"pragma_Ownable": "0x7b50a7a9bbb75d08248135003f1c87f0d44ba23018dc0ca480ac37a901531f3",
"pragma_PublisherRegistry": "0x306288971002bd7906e3a607d504dfb28dcbdc7655a115984e567dce3b67e8f",
"pragma_SummaryStats": "0x3b5bf1c2f918de14620b3c63e2c6543cf0a138df258bce3d03e3fb0b7d2183a",
Expand Down
20 changes: 10 additions & 10 deletions scripts/add_pairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@

load_dotenv()
currencies_to_add = [
# Currency(
# "STRK",
# 18,
# False,
# 0x04718F5A0FC34CC1AF16A1CDEE98FFB20C31F5CD61D6AB07201858F4287C938D,
# 0xCA14007EFF0DB1F8135F4C25B34DE49AB0D42766,
# )
Currency(
"DPI",
18,
False,
0,
0x1494CA1F11D487C2BBE4543E90080AEBA4BA3C2B,
)
]
pairs_to_add = [
# Pair("STRK/USD", "STRK", "USD"),
Pair("DPI/USD", "DPI", "USD"),
]

pairs_to_update = [
Pair("WSTETH/ETH", "WSTETH", "ETH"),
Pair("WSTETH/USD", "WSTETH", "USD"),
# Pair("WSTETH/ETH", "WSTETH", "ETH"),
# Pair("WSTETH/USD", "WSTETH", "USD"),
]


Expand Down
46 changes: 1 addition & 45 deletions scripts/register_publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"BINANCE",
"HUOBI",
"BYBIT",
"INDEXCOOP",
]

DEX_SOURCES = [
Expand All @@ -62,51 +63,6 @@

network = "sepolia"

# TODO: load data from JSON/YAML
"""
TESTNET
"""
if network == "testnet":
publishers = [
"PRAGMA",
"EQUILIBRIUM",
"ARGENT",
"GEMINI",
"SKYNET_TRADING",
"FOURLEAF",
"NETHERMIND",
"FLOWDESK",
"CRYPTOMENTUM",
"AVNU",
"SPACESHARD",
]
publishers_sources = [
THIRD_PARTY_SOURCES,
THIRD_PARTY_SOURCES,
THIRD_PARTY_SOURCES,
["GEMINI"],
["SKYNET_TRADING", "SKYNET"],
["FOURLEAF"],
THIRD_PARTY_SOURCES,
["FLOWDESK"],
["CRYPTOMENTUM"],
["AVNU"] + DEX_SOURCES,
THIRD_PARTY_SOURCES,
]
publisher_address = [
0x0624EBFB99865079BD58CFCFB925B6F5CE940D6F6E41E118B8A72B7163FB435C,
0xCF357FA043A29F7EA06736CC253D8D6D8A208C03B92FFB4B50074F8470818B,
0x01DAA5CB5F56D96832990DDF4EB9D4F09BA72AFF39AF13028AF67DCE9934A74C,
0x17A6F7E8196C9A7AFF90B7CC4BF98842894ECC2B9CC1A3703A1AAB948FCE208,
0x1D8E01188C4C8984FB19F00156491787E64FD2DE1C3CE4EB9571924C540CF3B,
0x4E2863FD0FF85803EEF98CE5DD8272AB21C6595537269A2CD855A10EBCC18CC,
0x022641362F12D72103F3BADFBDC8E1A77FCA91EB1F3835638EEC55EBCAEAAFFD,
0x0264CD871A4B5A6B441EB2862B3785E01C4CB82A133E3A65A01827BB8DF4B871,
0x5B1400D876CAAA7BA7858DF28FAA73A16318AB8551397D83016FB33CB590B28,
0x052D8E9778D026588A51595E30B0F45609B4F771EECF0E335CDEFED1D84A9D89,
0x0271E25BF6EF39B48AB319456C7DB88767F0B38D53E1285C5B3E901C60CD878C,
]
admin_address = 0x02356B628D108863BAF8644C945D97BAD70190AF5957031F4852D00D0F690A77

"""
MAINNET
Expand Down
9 changes: 2 additions & 7 deletions scripts/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@
NETWORKS = {
"mainnet": {
"name": "mainnet",
"rpc_url": f"https://free-rpc.nethermind.io/mainnet-juno",
},
"testnet": {
"name": "testnet",
"explorer_url": "https://testnet.starkscan.co",
"rpc_url": f"https://starknet-testnet.public.blastapi.io",
"rpc_url": f"https://starknet-mainnet.public.blastapi.io/rpc/v0_6",
},
"devnet": {
"name": "devnet",
Expand All @@ -37,7 +32,7 @@
"sepolia": {
"name": "sepolia",
"explorer_url": "https://sepolia.starkscan.co/",
"rpc_url": "https://free-rpc.nethermind.io/sepolia-juno",
"rpc_url": "https://starknet-sepolia.public.blastapi.io/rpc/v0_6",
},
"katana": {
"name": "katana",
Expand Down
7 changes: 4 additions & 3 deletions scripts/utils/starknet.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ async def deploy_v2(contract_name, *args, port=None):
)

await deploy_result.wait_for_acceptance()
print("deploy_result", deploy_result)

logger.info(
f"✅ {contract_name} deployed at: {hex(deploy_result.deployed_contract.address)}"
Expand All @@ -256,9 +255,11 @@ async def invoke(contract_name, function_name, inputs, address=None, port=None):
selector=get_selector_from_name(function_name),
calldata=inputs,
)
print("call", call)
logger.info(f"ℹ️ Invoking {contract_name}.{function_name}({json.dumps(inputs)})")
response = await account.execute(calls=call, max_fee=MAX_FEE)
response = await account.execute(
calls=call,
max_fee=MAX_FEE,
)
await account.client.wait_for_tx(response.transaction_hash)
logger.info(
f"✅ {contract_name}.{function_name} invoked at tx: %s",
Expand Down

0 comments on commit d82e964

Please sign in to comment.