Use UV for better package management
This commit is contained in:
@@ -8,7 +8,7 @@ from py_clob_client.constants import POLYGON
|
||||
|
||||
# Web3 libraries for blockchain interaction
|
||||
from web3 import Web3
|
||||
from web3.middleware import geth_poa_middleware
|
||||
from web3.middleware import ExtraDataToPOAMiddleware
|
||||
from eth_account import Account
|
||||
|
||||
import requests # HTTP requests
|
||||
@@ -54,7 +54,7 @@ class PolymarketClient:
|
||||
# Don't print sensitive wallet information
|
||||
print("Initializing Polymarket client...")
|
||||
chain_id=POLYGON
|
||||
self.browser_wallet=Web3.toChecksumAddress(browser_address)
|
||||
self.browser_wallet=Web3.to_checksum_address(browser_address)
|
||||
|
||||
# Initialize the Polymarket API client
|
||||
self.client = ClobClient(
|
||||
@@ -71,7 +71,7 @@ class PolymarketClient:
|
||||
|
||||
# Initialize Web3 connection to Polygon
|
||||
web3 = Web3(Web3.HTTPProvider("https://polygon-rpc.com"))
|
||||
web3.middleware_onion.inject(geth_poa_middleware, layer=0)
|
||||
web3.middleware_onion.inject(ExtraDataToPOAMiddleware, layer=0)
|
||||
|
||||
# Set up USDC contract for balance checks
|
||||
self.usdc_contract = web3.eth.contract(
|
||||
|
||||
Reference in New Issue
Block a user