From 156c019206159c784773f80abe8930f5289f9570 Mon Sep 17 00:00:00 2001 From: Rodrigo <95635797+poly-rodr@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:30:19 -0300 Subject: [PATCH 1/2] Replacing `mumbai` with `amoy` --- examples/GTD_order.py | 4 ++-- examples/are_orders_scoring.py | 4 ++-- examples/cancel_all.py | 4 ++-- examples/cancel_market_orders.py | 4 ++-- examples/cancel_order.py | 4 ++-- examples/cancel_orders.py | 4 ++-- examples/create_api_key.py | 4 ++-- examples/derive_api_key.py | 4 ++-- examples/drop_notifications.py | 4 ++-- examples/get_api_keys.py | 4 ++-- examples/get_balance_allowance.py | 4 ++-- examples/get_last_trade_price.py | 4 ++-- examples/get_last_trades_prices.py | 4 ++-- examples/get_market_trades_events.py | 4 ++-- examples/get_markets.py | 4 ++-- examples/get_mid_market_price.py | 4 ++-- examples/get_mid_markets_prices.py | 4 ++-- examples/get_notifications.py | 4 ++-- examples/get_order.py | 4 ++-- examples/get_orders.py | 4 ++-- examples/get_trades.py | 4 ++-- examples/is_order_scoring.py | 4 ++-- examples/order.py | 4 ++-- py_clob_client/config.py | 16 ++++++++-------- py_clob_client/constants.py | 2 +- requirements.txt | 2 +- setup.py | 2 +- tests/headers/test_headers.py | 4 ++-- tests/order_builder/test_builder.py | 4 ++-- tests/signing/test_eip712.py | 4 ++-- tests/test_utilities.py | 18 +++++++++--------- 31 files changed, 72 insertions(+), 72 deletions(-) diff --git a/examples/GTD_order.py b/examples/GTD_order.py index f40a3db..f180069 100644 --- a/examples/GTD_order.py +++ b/examples/GTD_order.py @@ -3,7 +3,7 @@ from py_clob_client.client import ClobClient from py_clob_client.clob_types import ApiCreds, OrderArgs, OrderType from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY from py_clob_client.order_builder.constants import BUY @@ -19,7 +19,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) # Create and sign a limit order buying 100 YES tokens for 0.50c each diff --git a/examples/are_orders_scoring.py b/examples/are_orders_scoring.py index e3e3d83..e4c87f6 100644 --- a/examples/are_orders_scoring.py +++ b/examples/are_orders_scoring.py @@ -3,7 +3,7 @@ from py_clob_client.client import ClobClient from py_clob_client.clob_types import ApiCreds, OrdersScoringParams from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -16,7 +16,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) scoring = client.are_orders_scoring( diff --git a/examples/cancel_all.py b/examples/cancel_all.py index 54f1dcf..6f40ac4 100644 --- a/examples/cancel_all.py +++ b/examples/cancel_all.py @@ -4,7 +4,7 @@ from py_clob_client.clob_types import ApiCreds from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -18,7 +18,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) resp = client.cancel_all() diff --git a/examples/cancel_market_orders.py b/examples/cancel_market_orders.py index a32d2f6..2223351 100644 --- a/examples/cancel_market_orders.py +++ b/examples/cancel_market_orders.py @@ -4,7 +4,7 @@ from py_clob_client.clob_types import ApiCreds from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -18,7 +18,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) resp = client.cancel_market_orders(market="0xaaa", asset_id="100") diff --git a/examples/cancel_order.py b/examples/cancel_order.py index 3fb0b90..41006b4 100644 --- a/examples/cancel_order.py +++ b/examples/cancel_order.py @@ -4,7 +4,7 @@ from py_clob_client.clob_types import ApiCreds from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -18,7 +18,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) resp = client.cancel(order_id="0xaaaa") diff --git a/examples/cancel_orders.py b/examples/cancel_orders.py index 8a84b22..3b601f4 100644 --- a/examples/cancel_orders.py +++ b/examples/cancel_orders.py @@ -4,7 +4,7 @@ from py_clob_client.clob_types import ApiCreds from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -18,7 +18,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) resp = client.cancel_orders(["0xaaaa"]) diff --git a/examples/create_api_key.py b/examples/create_api_key.py index a5a6df2..e88f15e 100644 --- a/examples/create_api_key.py +++ b/examples/create_api_key.py @@ -2,7 +2,7 @@ import os from py_clob_client.client import ClobClient -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -10,7 +10,7 @@ def main(): host = "http://localhost:8080" key = os.getenv("PK") - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id) print(client.create_api_key()) diff --git a/examples/derive_api_key.py b/examples/derive_api_key.py index fcfd920..2cc0e8b 100644 --- a/examples/derive_api_key.py +++ b/examples/derive_api_key.py @@ -2,7 +2,7 @@ import os from py_clob_client.client import ClobClient -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -10,7 +10,7 @@ def main(): host = "http://localhost:8080" key = os.getenv("PK") - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id) print(client.derive_api_key()) diff --git a/examples/drop_notifications.py b/examples/drop_notifications.py index a36924e..b68a69d 100644 --- a/examples/drop_notifications.py +++ b/examples/drop_notifications.py @@ -5,7 +5,7 @@ from py_clob_client.clob_types import ApiCreds, DropNotificationParams from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -18,7 +18,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) print(client.drop_notifications(params=DropNotificationParams(ids=["1", "2"]))) diff --git a/examples/get_api_keys.py b/examples/get_api_keys.py index dc07424..d93292d 100644 --- a/examples/get_api_keys.py +++ b/examples/get_api_keys.py @@ -4,7 +4,7 @@ from py_clob_client.clob_types import ApiCreds from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -18,7 +18,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) print(client.get_api_keys()) diff --git a/examples/get_balance_allowance.py b/examples/get_balance_allowance.py index 6afff3e..419e8b9 100644 --- a/examples/get_balance_allowance.py +++ b/examples/get_balance_allowance.py @@ -3,7 +3,7 @@ from py_clob_client.client import ClobClient from py_clob_client.clob_types import ApiCreds, BalanceAllowanceParams, AssetType from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -16,7 +16,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) collateral = client.get_balance_allowance( diff --git a/examples/get_last_trade_price.py b/examples/get_last_trade_price.py index 46fb22a..08f82f1 100644 --- a/examples/get_last_trade_price.py +++ b/examples/get_last_trade_price.py @@ -4,7 +4,7 @@ from dotenv import load_dotenv from pprint import pprint -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -13,7 +13,7 @@ def main(): host = "http://localhost:8080" key = os.getenv("PK") - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id) resp = client.get_last_trade_price( diff --git a/examples/get_last_trades_prices.py b/examples/get_last_trades_prices.py index 590d09a..db473e5 100644 --- a/examples/get_last_trades_prices.py +++ b/examples/get_last_trades_prices.py @@ -5,7 +5,7 @@ from dotenv import load_dotenv from pprint import pprint -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -14,7 +14,7 @@ def main(): host = "http://localhost:8080" key = os.getenv("PK") - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id) resp = client.get_last_trades_prices( diff --git a/examples/get_market_trades_events.py b/examples/get_market_trades_events.py index 0b2fe73..d412ff4 100644 --- a/examples/get_market_trades_events.py +++ b/examples/get_market_trades_events.py @@ -3,7 +3,7 @@ from py_clob_client.client import ClobClient from py_clob_client.clob_types import ApiCreds from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -16,7 +16,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) print(client.get_market_trades_events("condition_id")) diff --git a/examples/get_markets.py b/examples/get_markets.py index 1ca0a24..46dbdb8 100644 --- a/examples/get_markets.py +++ b/examples/get_markets.py @@ -3,7 +3,7 @@ from py_clob_client.client import ClobClient from py_clob_client.clob_types import ApiCreds from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -16,7 +16,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) print(client.get_markets()) diff --git a/examples/get_mid_market_price.py b/examples/get_mid_market_price.py index 7a0174d..830b09d 100644 --- a/examples/get_mid_market_price.py +++ b/examples/get_mid_market_price.py @@ -3,7 +3,7 @@ from py_clob_client.client import ClobClient from py_clob_client.clob_types import ApiCreds from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -17,7 +17,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) resp = client.get_midpoint( diff --git a/examples/get_mid_markets_prices.py b/examples/get_mid_markets_prices.py index e6f7867..520ef2d 100644 --- a/examples/get_mid_markets_prices.py +++ b/examples/get_mid_markets_prices.py @@ -3,7 +3,7 @@ from py_clob_client.client import ClobClient from py_clob_client.clob_types import ApiCreds, BookParams from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -17,7 +17,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) resp = client.get_midpoints( diff --git a/examples/get_notifications.py b/examples/get_notifications.py index 8288c81..cc4e306 100644 --- a/examples/get_notifications.py +++ b/examples/get_notifications.py @@ -5,7 +5,7 @@ from py_clob_client.clob_types import ApiCreds from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -18,7 +18,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) print(client.get_notifications()) diff --git a/examples/get_order.py b/examples/get_order.py index 800773f..c45ae78 100644 --- a/examples/get_order.py +++ b/examples/get_order.py @@ -3,7 +3,7 @@ from py_clob_client.client import ClobClient from py_clob_client.clob_types import ApiCreds, FilterParams from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -16,7 +16,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) resp = client.get_order( diff --git a/examples/get_orders.py b/examples/get_orders.py index 4f05c3b..5567ae4 100644 --- a/examples/get_orders.py +++ b/examples/get_orders.py @@ -3,7 +3,7 @@ from py_clob_client.client import ClobClient from py_clob_client.clob_types import ApiCreds, FilterParams from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -16,7 +16,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) resp = client.get_orders( diff --git a/examples/get_trades.py b/examples/get_trades.py index 41559eb..80ccfec 100644 --- a/examples/get_trades.py +++ b/examples/get_trades.py @@ -5,7 +5,7 @@ from dotenv import load_dotenv from pprint import pprint -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -18,7 +18,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) resp = client.get_trades( diff --git a/examples/is_order_scoring.py b/examples/is_order_scoring.py index 1017d42..2c2fcd3 100644 --- a/examples/is_order_scoring.py +++ b/examples/is_order_scoring.py @@ -3,7 +3,7 @@ from py_clob_client.client import ClobClient from py_clob_client.clob_types import ApiCreds, OrderScoringParams from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY load_dotenv() @@ -16,7 +16,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) scoring = client.is_order_scoring( diff --git a/examples/order.py b/examples/order.py index 6f314d5..6dbeb74 100644 --- a/examples/order.py +++ b/examples/order.py @@ -3,7 +3,7 @@ from py_clob_client.client import ClobClient from py_clob_client.clob_types import ApiCreds, OrderArgs from dotenv import load_dotenv -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY from py_clob_client.order_builder.constants import BUY @@ -19,7 +19,7 @@ def main(): api_secret=os.getenv("CLOB_SECRET"), api_passphrase=os.getenv("CLOB_PASS_PHRASE"), ) - chain_id = MUMBAI + chain_id = AMOY client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) # Create and sign a limit order buying 100 YES tokens for 0.0005 each diff --git a/py_clob_client/config.py b/py_clob_client/config.py index a5243d9..c51622b 100644 --- a/py_clob_client/config.py +++ b/py_clob_client/config.py @@ -12,10 +12,10 @@ def get_contract_config(chainID: int, neg_risk: bool = False) -> ContractConfig: collateral="0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", conditional_tokens="0x4D97DCd97eC945f40cF65F87097ACe5EA0476045", ), - 80001: ContractConfig( - exchange="0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E", - collateral="0x2E8DCfE708D44ae2e406a1c02DFE2Fa13012f961", - conditional_tokens="0x7D8610E9567d2a6C9FBf66a5A13E9Ba8bb120d43", + 80002: ContractConfig( + exchange="0xdFE02Eb6733538f8Ea35D585af8DE5958AD99E40", + collateral="0x9c4e1703476e875070ee25b56a58b008cfb8fa78", + conditional_tokens="0x69308FB512518e39F9b16112fA8d994F4e2Bf8bB", ), } @@ -25,10 +25,10 @@ def get_contract_config(chainID: int, neg_risk: bool = False) -> ContractConfig: collateral="0x2791bca1f2de4661ed88a30c99a7a9449aa84174", conditional_tokens="0x4D97DCd97eC945f40cF65F87097ACe5EA0476045", ), - 80001: ContractConfig( - exchange="0x87d1A0DdB4C63a6301916F02090A51a7241571e4", - collateral="0x2e8dcfe708d44ae2e406a1c02dfe2fa13012f961", - conditional_tokens="0x7D8610E9567d2a6C9FBf66a5A13E9Ba8bb120d43", + 80002: ContractConfig( + exchange="0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296", + collateral="0x9c4e1703476e875070ee25b56a58b008cfb8fa78", + conditional_tokens="0x69308FB512518e39F9b16112fA8d994F4e2Bf8bB", ), } diff --git a/py_clob_client/constants.py b/py_clob_client/constants.py index 1723688..9bdbe4a 100644 --- a/py_clob_client/constants.py +++ b/py_clob_client/constants.py @@ -16,5 +16,5 @@ ZERO_ADDRESS = "0x0000000000000000000000000000000000000000" -MUMBAI = 80001 +AMOY = 80002 POLYGON = 137 diff --git a/requirements.txt b/requirements.txt index 26ba7cb..a9787f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,7 +31,7 @@ parsimonious==0.8.1 pluggy==1.0.0 protobuf==3.19.4 py==1.11.0 -py-order-utils>=0.2.0 +py-order-utils>=0.3.0 pycryptodome==3.14.0 pyparsing==3.0.7 pyrsistent==0.18.1 diff --git a/setup.py b/setup.py index 84c48a5..0b0c5f3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="py_clob_client", - version="0.14.0", + version="0.15.0", author="Polymarket Engineering", author_email="engineering@polymarket.com", maintainer="Polymarket Engineering", diff --git a/tests/headers/test_headers.py b/tests/headers/test_headers.py index 017dc5b..71196f9 100644 --- a/tests/headers/test_headers.py +++ b/tests/headers/test_headers.py @@ -1,7 +1,7 @@ from datetime import datetime from unittest import TestCase from py_clob_client.clob_types import ApiCreds, RequestArgs -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY from py_clob_client.headers.headers import ( POLY_ADDRESS, POLY_API_KEY, @@ -16,7 +16,7 @@ # publicly known private key private_key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" -chain_id = MUMBAI +chain_id = AMOY signer = Signer(private_key=private_key, chain_id=chain_id) creds = ApiCreds( diff --git a/tests/order_builder/test_builder.py b/tests/order_builder/test_builder.py index d5f06be..b48d90a 100644 --- a/tests/order_builder/test_builder.py +++ b/tests/order_builder/test_builder.py @@ -1,7 +1,7 @@ from unittest import TestCase from py_clob_client.clob_types import OrderArgs, CreateOrderOptions -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY from py_clob_client.order_builder.constants import BUY, SELL from py_clob_client.signer import Signer @@ -11,7 +11,7 @@ # publicly known private key private_key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" -chain_id = MUMBAI +chain_id = AMOY signer = Signer(private_key=private_key, chain_id=chain_id) diff --git a/tests/signing/test_eip712.py b/tests/signing/test_eip712.py index 1b04276..6a3a4a1 100644 --- a/tests/signing/test_eip712.py +++ b/tests/signing/test_eip712.py @@ -1,12 +1,12 @@ from unittest import TestCase -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY from py_clob_client.signer import Signer from py_clob_client.signing.eip712 import sign_clob_auth_message # publicly known private key private_key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" -chain_id = MUMBAI +chain_id = AMOY signer = Signer(private_key=private_key, chain_id=chain_id) diff --git a/tests/test_utilities.py b/tests/test_utilities.py index 89a2b47..add243c 100644 --- a/tests/test_utilities.py +++ b/tests/test_utilities.py @@ -5,7 +5,7 @@ OrderType, CreateOrderOptions, ) -from py_clob_client.constants import MUMBAI +from py_clob_client.constants import AMOY from py_clob_client.order_builder.constants import BUY, SELL from py_clob_client.signer import Signer from py_clob_client.order_builder.builder import OrderBuilder @@ -162,7 +162,7 @@ def test_order_to_json_0_1(self): private_key = ( "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" ) - chain_id = MUMBAI + chain_id = AMOY signer = Signer(private_key=private_key, chain_id=chain_id) owner = "aaa-bbb-ccc" builder = OrderBuilder(signer) @@ -328,7 +328,7 @@ def test_order_to_json_0_01(self): private_key = ( "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" ) - chain_id = MUMBAI + chain_id = AMOY signer = Signer(private_key=private_key, chain_id=chain_id) owner = "aaa-bbb-ccc" builder = OrderBuilder(signer) @@ -494,7 +494,7 @@ def test_order_to_json_0_001(self): private_key = ( "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" ) - chain_id = MUMBAI + chain_id = AMOY signer = Signer(private_key=private_key, chain_id=chain_id) owner = "aaa-bbb-ccc" builder = OrderBuilder(signer) @@ -660,7 +660,7 @@ def test_order_to_json_0_0001(self): private_key = ( "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" ) - chain_id = MUMBAI + chain_id = AMOY signer = Signer(private_key=private_key, chain_id=chain_id) owner = "aaa-bbb-ccc" builder = OrderBuilder(signer) @@ -826,7 +826,7 @@ def test_order_to_json_0_1_neg_risk(self): private_key = ( "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" ) - chain_id = MUMBAI + chain_id = AMOY signer = Signer(private_key=private_key, chain_id=chain_id) owner = "aaa-bbb-ccc" builder = OrderBuilder(signer) @@ -992,7 +992,7 @@ def test_order_to_json_0_01_neg_risk(self): private_key = ( "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" ) - chain_id = MUMBAI + chain_id = AMOY signer = Signer(private_key=private_key, chain_id=chain_id) owner = "aaa-bbb-ccc" builder = OrderBuilder(signer) @@ -1158,7 +1158,7 @@ def test_order_to_json_0_001_neg_risk(self): private_key = ( "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" ) - chain_id = MUMBAI + chain_id = AMOY signer = Signer(private_key=private_key, chain_id=chain_id) owner = "aaa-bbb-ccc" builder = OrderBuilder(signer) @@ -1324,7 +1324,7 @@ def test_order_to_json_0_0001_neg_risk(self): private_key = ( "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" ) - chain_id = MUMBAI + chain_id = AMOY signer = Signer(private_key=private_key, chain_id=chain_id) owner = "aaa-bbb-ccc" builder = OrderBuilder(signer) From bf73bc2aae2ee036f1639b90d4eee730eae84762 Mon Sep 17 00:00:00 2001 From: Rodrigo <95635797+poly-rodr@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:34:49 -0300 Subject: [PATCH 2/2] fixing tests --- tests/signing/test_eip712.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/signing/test_eip712.py b/tests/signing/test_eip712.py index 6a3a4a1..a55d772 100644 --- a/tests/signing/test_eip712.py +++ b/tests/signing/test_eip712.py @@ -16,5 +16,5 @@ def test_sign_clob_auth_message(self): self.assertIsNotNone(signature) self.assertEqual( signature, - "0xd91760ebcb14e814e9e12600b9bc7cd6bf13ebc175f6a28538b4925763f94f90012da34dd71290d441c28bc4f9b2281d3eb9ecfd1c9a63db1ce9ca85c89c914c1b", + "0xf62319a987514da40e57e2f4d7529f7bac38f0355bd88bb5adbb3768d80de6c1682518e0af677d5260366425f4361e7b70c25ae232aff0ab2331e2b164a1aedc1b", )