Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

eth_sendTransaction does not exist/is not available after calling mint_liquidity method.

未关闭
#364 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
api, backend

调研方向

Start with the mint_liquidity call shown in the report and trace how it submits its transaction through Web3. The reported failure is eth_sendTransaction returning method-not-available across RPCs and pairs. Check the transaction submission path and its tests; done when minting liquidity works with a supported RPC or the issue documents the required transaction method and provider setup.

由索引模型根据 Issue 内容生成。

描述

bug

Hello friends !
I'm having trouble interacting with the uniswap liquidity pool using uniswap-python. this is my code :

from web3 import Web3
from uniswap import Uniswap
from web3.middleware import geth_poa_middleware

from contracts import USDT, WMATIC

WALLET_ADDRESS = '...'
PK = '...'
VERSION = 3
PROVIDER = "https://polygon-mainnet.infura.io/v3/" +'INFURA_KEY'

AMOUNT = 0.5

w3 = Web3(Web3.HTTPProvider(PROVIDER))
uniswap = Uniswap(address=WALLET_ADDRESS, private_key=PK, version=VERSION, provider=PROVIDER)
uniswap.w3.middleware_onion.inject(geth_poa_middleware, layer=0)

pool = uniswap.get_pool_instance(token_0=WMATIC.address, token_1=USDT.address)

amount_0 = w3.to_wei(AMOUNT, WMATIC.get_decimal_unit())
amount_1 = uniswap.get_price_input(WMATIC.address, USDT.address, qty=amount_0)

nft = uniswap.mint_liquidity(pool=pool, amount_0=amount_0, amount_1=amount_1, tick_lower=0, tick_upper=887220)

print(nft)

and The error is :
web3.exceptions.MethodNavailable: {'code': -32601, 'message': 'eth_sendTransaction method does not exist/not available'}
I tried other RPCs and other pairs, but the problem still exists.

主要语言
Python
星标
1k
派生
373
平均合并
2 天 6 小时
30 天内合并 PR
6

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

uniswap-python/uniswap-python 的其他 Issue

查看 uniswap-python/uniswap-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。