Skip to content

Error in simple decoding #101

@johnBlockchain9688

Description

@johnBlockchain9688

Hi dev running this simple script with version 2.0

from uniswap_universal_router_decoder import RouterCodec
def decode(trx_input):

codec = RouterCodec(rpc_endpoint="https://Yourlinkhere")
decoded_trx_input = codec.decode.function_input(trx_input)
print(decoded_trx_input)

trx_input = "0xb8338f24a98c9699ac4060c630dc8678be8894c16d3f86d5be3bd52ec8f8b170" # the trx input to decode

decode(trx_input)

Return this stack trace.
File "/home/test/PythonBot/test.py", line 21, in
decode(trx_input)
File "/home/test/PythonBot/test.py", line 15, in decode
decoded_trx_input = codec.decode.function_input(trx_input)
File "/usr/local/lib/python3.10/dist-packages/uniswap_universal_router_decoder/_decoder.py", line 94, in function_input
.......
ValueError: Could not find any function with matching selector

Can you help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions