Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

make_trade_output #309

Unanswered
crypto-chen asked this question in Q&A
Jan 3, 2023 · 1 comments · 3 replies
Discussion options

Could not identify the intended function with name quoteExactOutputSingle, positional argument(s) of type (<class 'str'>, <class 'str'>, <class 'int'>, <class 'float'>, <class 'int'>) and keyword argument(s) of type {}.
Found 1 function(s) with the name quoteExactOutputSingle: ['quoteExactOutputSingle(address,address,uint24,uint256,uint160)']
Function invocation failed due to no matching argument types.

You must be logged in to vote

Replies: 1 comment · 3 replies

Comment options

uniswap = Uniswap(address=address, private_key=private_key, version=version, provider=provider)

Some token addresses we'll be using later in this guide

eth = Web3.toChecksumAddress("0x0000000000000000000000000000000000000000")
usdc = Web3.toChecksumAddress("0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8")
usdt = Web3.toChecksumAddress("0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9")

a = uniswap.make_trade_output(eth, usdc, 0.5*10**18)

print(a)

You must be logged in to vote
3 replies
@crypto-chen
Comment options

web3.exceptions.ContractLogicError: execution reverted: Unexpected error

@ErikBjare
Comment options

Your amount needs to be an int.

@crypto-chen
Comment options

ValueError: {'code': -32601, 'message': 'the method eth_feeHistory does not exist/is not available', 'data': None}
This is my make for optimal blockchain transactions_ Error report generated by trade method

eth = Web3.toChecksumAddress("0x0000000000000000000000000000000000000000")
usdc = Web3.toChecksumAddress("0x7F5c764cBc14f9669B88837ca1490cCa17c31607")
susd = web3.toChecksumAddress("0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9")
usdc_susd_amout = uniswap.get_price_output(susd, usdc, 21, fee=3000)
print(usdc_susd_amout)

tx_hash = uniswap.make_trade(usdc, susd, usdc_susd_amout, fee=3000)
tx_has_sh = tx_hash.hex()
print(tx_has_sh)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.