From ceb492aaae4176b612669f8cfcc5f058ad3d1c59 Mon Sep 17 00:00:00 2001 From: JonathanAmenechi <7217608+JonathanAmenechi@users.noreply.github.com> Date: Mon, 26 Sep 2022 18:01:42 -0400 Subject: [PATCH] fix: updated addresses, abi --- py_order_utils/abi/Exchange.json | 6 +++--- py_order_utils/config.py | 4 ++-- setup.py | 2 +- tests/test_order_builder.py | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/py_order_utils/abi/Exchange.json b/py_order_utils/abi/Exchange.json index 93e5b86..8797d6e 100644 --- a/py_order_utils/abi/Exchange.json +++ b/py_order_utils/abi/Exchange.json @@ -222,13 +222,13 @@ { "indexed": false, "internalType": "uint256", - "name": "filled", + "name": "makerAmountFilled", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "remaining", + "name": "takerAmountFilled", "type": "uint256" }, { @@ -1848,4 +1848,4 @@ "stateMutability": "view", "type": "function" } -] +] \ No newline at end of file diff --git a/py_order_utils/config.py b/py_order_utils/config.py index 49309f2..9de89ba 100644 --- a/py_order_utils/config.py +++ b/py_order_utils/config.py @@ -24,13 +24,13 @@ def get_contract_config(chainID: int) -> ContractConfig: """ CONFIG = { 137: ContractConfig( - exchange="0xfffd6f0dB1ec30A58884B23546B4F1bB333f818f", + exchange="0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E", executor="0xb2a29463Df393a4CAef36541544715e6B48b80B7", collateral="0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", conditional="0x4D97DCd97eC945f40cF65F87097ACe5EA0476045", ), 80001: ContractConfig( - exchange="0xfffd6f0dB1ec30A58884B23546B4F1bB333f818f", + exchange="0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E", executor="0xb2a29463Df393a4CAef36541544715e6B48b80B7", collateral="0x2E8DCfE708D44ae2e406a1c02DFE2Fa13012f961", conditional="0x7D8610E9567d2a6C9FBf66a5A13E9Ba8bb120d43", diff --git a/setup.py b/setup.py index 6def7fe..394ffa6 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="py_order_utils", - version="0.1.0", + version="0.1.1", author="Polymarket Engineering", author_email="engineering@polymarket.com", maintainer="Polymarket Engineering", diff --git a/tests/test_order_builder.py b/tests/test_order_builder.py index bb3f1d9..d02ce47 100644 --- a/tests/test_order_builder.py +++ b/tests/test_order_builder.py @@ -112,12 +112,12 @@ def test_build_prder_signature(self): # Ensure struct hash is expected(generated via ethers) expected_struct_hash = ( - "0x41ae598a16959ad2f14e9a610f7861948ad502479ca7a49d1c744de310f7be88" + "0xbf58957703791db2ab057528d03d1cff5375d9a475b14a9073bb7d892398dc96" ) struct_hash = builder._create_struct_hash(_order) self.assertEqual(expected_struct_hash, struct_hash.hex()) - expected_signature = "0x748008725feeb87db204b2b237869f09176a756abfcb03f9b66e833e80effbcf22c1564cbf18bf8daa88db2ea95eeb6057938bf6bdee7e3708655aa34842db3d1c" + expected_signature = "0x3874d2cfe79c0e82577f4f76ec58d950522ee5923a6f08441927d382c8178a5a2190fd4d5c49705e94d75999a58ec843f94a432e87ebc15cdb2186d315b3cc201b" sig = builder.build_order_signature(_order) self.assertEqual(expected_signature, sig) @@ -128,7 +128,7 @@ def test_build_signed_order(self): signed_order = builder.build_signed_order(self.generate_data()) - expected_signature = "0x748008725feeb87db204b2b237869f09176a756abfcb03f9b66e833e80effbcf22c1564cbf18bf8daa88db2ea95eeb6057938bf6bdee7e3708655aa34842db3d1c" + expected_signature = "0x3874d2cfe79c0e82577f4f76ec58d950522ee5923a6f08441927d382c8178a5a2190fd4d5c49705e94d75999a58ec843f94a432e87ebc15cdb2186d315b3cc201b" self.assertEqual(expected_signature, signed_order.signature) self.assertTrue(isinstance(signed_order.order["salt"], int)) self.assertEqual(salt, signed_order.order["salt"])