English 中文(简体)
Uniswap V3交易对密码的投入留下了数据属性。
原标题:decode input from Uniswap V3 transaction left data attribute undecoded

I m 试图读到与UniswapV3号公司有关的待决交易,使用该代码作为同文。

address_router = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
with open("abiRouterUniswapV3.json", "r") as myFile:
data = myFile.read()
abiRouter = json.loads(data)

contractRouter = w3.eth.contract(address=address_router, abi=abiRouter)

block_filter = w3.eth.filter( pending )

def handle_event(event):
try:
    tx = w3.eth.getTransaction(event)
    tx_to = tx.to
except Exception:
    pass
else:
    if tx_to == "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45": #filtering only UniswapV3 
        input_decoded = contractRouter.decode_function_input(tx.input)
        print("hash: ", tx.hash.hex())
        print(input_decoded)

然而,Im利用UniswapV3航道公司ABI制造合同路子,使解密成为可能。 当功能是多功能时,它没有将数据编码在投入中。 举例来说,当职能是多种调动时,它就产生了这一结果。

hash: 0x907b4c17bc525786960c4b2373c1b60cafc3f287e95cf5948432e4e71b25dd00 (<Function multicall(uint256,bytes[])>, { deadline : 1663819751, data : [b G+Cxf3x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x1ckxf5&4x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x029xc5x0fx85cxf09@5xf5x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x80x00x00x00x00x00x00x00x00x00x00x00x00x0fxfbxc9xc2xa8x8dx98;xa1xe3xe6(x11Yxe9x98xa4xc9x1aCx00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x02x00x00x00x00x00x00x00x00x00x00x00x00xc0*xaa9xb2#xfex8d x0eO xeaxd9x08<ulxc2x00x00x00x00x00x00x00x00x00x00x00x00x12xeexc9x13"x95xc1xfd|xabx0b,xfdxe6zx15xaax94Wxd7 ]})

您可以看到数据为t decode

我的法典中有什么错误,或我所失踪的是什么? 我将真正赞赏你能够向我提供的任何帮助或指导。

问题回答

因此,你指的是从数据中获取大麻。 当你想获得数据编码时,你应当从一夫一妻或你需要检查接口的某个地方发现事件,并且你可以使用像这种(g)swap这样的事件合同。

tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
pairContract = w3.eth.contract(address = pairAddress, abi = pairAbi)
swap = pairContract.events.Swap()
events = swap.processReceipt(tx_receipt, errors=DISCARD)
amount0_out = events[-1]["args"]["amount0Out"]
amount1_out = events[-1]["args"]["amount1Out"]




相关问题
How do I reset or override IE CSS filters?

I m using the proprietry MS filter property to try and create a non ugly equivalent to css3 text-shadow and box-shadow; I was actually doing really well until I hit this problem. It looks like when ...

PHP filter string input, cut off all newlines, 1 chars

I m writing in PHP! There s a user string input, and I want to cut off all newlines,1 chars that are more than 1 in a row (avoid <br /><br />...). example: I am a SPaMmEr! would ...

The Fastest DataStructure to Filter with in C#

Currently we are filtering and sorting data with a datatable. /// <summary> /// Filters the data table and returns a new data table with only the filtered rows. /// </summary>...

How to dynamically update a ListView on Android [closed]

On Android, how can I a ListView that filters based on user input, where the items shown are updated dynamically based on the TextView value? I m looking for something like this: -------------------...

Handling no results for docmd.applyfilter

I have an Access app where I use search functionality. I have a TextBox and a Search Button on the form, and it does a wildcard search of whatever the user enters in the TextBox, and displays the ...

Best method to scale DropShadows in AS3?

I m creating a flash application that makes use of both the dropShadow filter and scaling of various sprites. And therein lies the problem: This filter supports Stage scaling. However, it does ...

热门标签