Skip to content

Commit

Permalink
🔧 add PROPELLER source
Browse files Browse the repository at this point in the history
  • Loading branch information
EvolveArt committed Feb 14, 2024
1 parent 98e6b5f commit 42dd63b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
7 changes: 5 additions & 2 deletions scripts/register_publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"BYBIT",
"GECKOTERMINAL",
"STARKNET",
"PROPELLER",
]

DEX_SOURCES = [
Expand All @@ -55,7 +56,7 @@
"10KSWAP",
]

network = "sepolia"
network = "mainnet"

# TODO: load data from JSON/YAML
"""
Expand Down Expand Up @@ -123,18 +124,20 @@
admin_address = 0x02356B628D108863BAF8644C945D97BAD70190AF5957031F4852D00D0F690A77

if network == "sepolia":
publishers = ["PRAGMA", "EQUILIBRIUM", "FOURLEAF", "SPACESHARD"]
publishers = ["PRAGMA", "EQUILIBRIUM", "FOURLEAF", "SPACESHARD", "FLOVTEC"]
publishers_sources = [
THIRD_PARTY_SOURCES,
THIRD_PARTY_SOURCES,
["FOURLEAF"],
THIRD_PARTY_SOURCES,
["FLOVTEC"],
]
publisher_address = [
0x04C1D9DA136846AB084AE18CF6CE7A652DF7793B666A16CE46B1BF5850CC739D,
0x021D17FAF34B5E25D88C79BB1EAD9B9651C9599C49833555030EB5AC430F73DD,
0x037A10F2808C05F4A328BDAC9A9344358547AE4676EBDDC005E24FF887B188FD,
0x00005DE00D3720421AB00FDBC47D33D253605C1AC226AB1A0D267F7D57E23305,
0x07CB0DCA5767F238B056665D2F8350E83A2DEE7EAC8EC65E66BBC790A4FECE8A,
]


Expand Down
4 changes: 2 additions & 2 deletions scripts/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
NETWORKS = {
"mainnet": {
"name": "mainnet",
"rpc_url": f"https://free-rpc.nethermind.io/mainnet-juno",
"rpc_url": f"https://starknet-mainnet.public.blastapi.io/rpc/v0_6",
},
"testnet": {
"name": "testnet",
Expand All @@ -37,7 +37,7 @@
"sepolia": {
"name": "sepolia",
"explorer_url": "https://sepolia.starkscan.co/",
"rpc_url": "https://starknet-sepolia.public.blastapi.io",
"rpc_url": "https://starknet-sepolia.public.blastapi.io/rpc/v0_6",
},
"katana": {
"name": "katana",
Expand Down
24 changes: 15 additions & 9 deletions scripts/utils/starknet.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,16 @@ def dump_deployments(deployments):
{
name: {
**deployment,
"address": hex(deployment["address"])
if type(deployment["address"]) == int
else deployment["address"],
"tx": hex(deployment["tx"])
if type(deployment["tx"]) == int
else deployment["tx"],
"address": (
hex(deployment["address"])
if type(deployment["address"]) == int
else deployment["address"]
),
"tx": (
hex(deployment["tx"])
if type(deployment["tx"]) == int
else deployment["tx"]
),
}
for name, deployment in deployments.items()
},
Expand Down Expand Up @@ -244,9 +248,11 @@ async def invoke(contract_name, function_name, inputs, address=None, port=None):
account = await get_starknet_account(port=port)
deployments = get_deployments()
call = Call(
to_addr=int(deployments[contract_name]["address"], 16)
if address is None
else address,
to_addr=(
int(deployments[contract_name]["address"], 16)
if address is None
else address
),
selector=get_selector_from_name(function_name),
calldata=inputs,
)
Expand Down

0 comments on commit 42dd63b

Please sign in to comment.