MultiversX Tracker is Live!

Is it possible to check which data types are present in a function?

Etherum Reddit

More / Etherum Reddit 4 Views

Basically, let's say that I know the function selector and I know the data types present in the function.

How can I validate whether these data types are actually correct? I mean what if the data types aren't correct? How can I check that?

I mean I don't think this would work:

Encoding values based on the data type I think is present in the function and then simulating the transaction so that I don't spend money.

This could work to some extent if the data types don't share similar encoding rules. For example if the function is buyWETHwithUSDC(address, uint256, uint256, address)

and I think that these data types are present buyWETHwithUSDC(uint256, uint256, address, address)

then I would parse an value of a token where the contract expects an address. But if I prarse an address where it expects an uint256, there isn't an issue as the parsed address can represent an number in uint256.

Any ideas?

submitted by /u/Weary-Bell-4541
[link] [comments]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments