Skip to content
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
6 changes: 3 additions & 3 deletions py_order_utils/abi/Exchange.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@
{
"indexed": false,
"internalType": "uint256",
"name": "filled",
"name": "makerAmountFilled",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "remaining",
"name": "takerAmountFilled",
"type": "uint256"
},
{
Expand Down Expand Up @@ -1848,4 +1848,4 @@
"stateMutability": "view",
"type": "function"
}
]
]
4 changes: 2 additions & 2 deletions py_order_utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions tests/test_order_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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"])
Expand Down