I am try close my opened uniswap v3 positions with.close_position() method, but get this error: ValueError: {'code': -32000, 'message': 'unknown account'} So it find my position id 1547621 but crashing on close_position why this can happen and how to fix? this is script: from uniswap import Uniswapfrom web3 import Web3from web3.middleware import geth_poa_middlewareprovider = "https://polygon-rpc.com" # can also be set through the environment variable `PROVIDER`web3 = Web3(Web3.HTTPProvider(provider))web3.middleware_onion.inject(geth_poa_middleware, layer=0)address = "0x2017b2ad2e3f25F1F9354981Fd9a06341d178De5" # or None if you're not going to make transactionsprivate_key = "xxx" # or None if you're not going to make transactionsversion = 3 # specify which version of Uniswap to useuniswap = Uniswap(address=address, private_key=private_key, version=version, provider=provider, web3 = web3)# Some token addresses we'll be using later in this guide#eth = "0x0000000000000000000000000000000000000000"#bat = "0x0D8775F648430679A709E98d2b0Cb6250d2887EF"#dai = "0x6B175474E89094C44Da98b954EedeAC495271d0F"usdce = Web3.to_checksum_address("0x2791bca1f2de4661ed88a30c99a7a9449aa84174")wbtc = Web3.to_checksum_address("0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6")nfpm_contract_address = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"print(uniswap.get_price_input(wbtc, usdce, 10**8))print(uniswap.get_liquidity_positions())for p in uniswap.get_liquidity_positions(): #uniswap.approve(p) print(p) print(uniswap.close_position(p))#uniswap.close_position()
|