teloscan icon indicating copy to clipboard operation
teloscan copied to clipboard

Decode Trx input to show contract function call

Open Viterbo opened this issue 9 months ago • 0 comments

Description

Currently, we are displaying the input as it comes with no pre-processing. We need to enhance the user experience by providing a readable function declaration (function name and parameters).

The idea is to add three different views for the same data and the user may switch between them.

Original input data:

0x359f130200000000000000000000000004e2516a2c207e84a1839755675dfd8ef6302f0a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001c17d5fef0e5a4e79c63163c43d3f07d7a1567420000000000000000000000000000000000000000000000000000000000000020000000000000000000000000457960b61b8879850115d0f91e1af02fe6a05720

Proccessed input:

Function: mint(address minter,uint256 tokenId,uint256 quantity,address[] rewardsRecipients,bytes minterArguments)

MethodID: 0x359f1302
[0]:  00000000000000000000000004e2516a2c207e84a1839755675dfd8ef6302f0a
[1]:  0000000000000000000000000000000000000000000000000000000000000001
[2]:  0000000000000000000000000000000000000000000000000000000000000001
[3]:  00000000000000000000000000000000000000000000000000000000000000a0
[4]:  00000000000000000000000000000000000000000000000000000000000000e0
[5]:  0000000000000000000000000000000000000000000000000000000000000001
[6]:  0000000000000000000000001c17d5fef0e5a4e79c63163c43d3f07d7a156742
[7]:  0000000000000000000000000000000000000000000000000000000000000020
[8]:  000000000000000000000000457960b61b8879850115d0f91e1af02fe6a05720

Table

# Name Type Data
0 minter address 0x04E2516A2c207E84a1839755675dfd8eF6302F0a
1 tokenId uint256 1
2 quantity uint256 1
3 rewardsRecipients address[] 0x1c17d5FEF0e5A4e79C63163C43D3f07d7a156742
4 minterArguments bytes 0x000000000000000000000000457960b61b8879850115d0f91e1af02fe6a05720

Viterbo avatar May 17 '24 19:05 Viterbo