0

I need to call a smart contract from python, but it is not verified. Since this is not my contract, I cannot verify it. How to call the smart contract methods through python in this case? Smart contract: https://explorer.dogechain.dog/address/0x4aE2bD0666c76C7f39311b9B3e39b53C8D7C43Ea/contracts#address-tabs

1
  • You'll need the contract's ABI.
    – Ismael
    Commented Jul 8, 2023 at 13:09

1 Answer 1

1

If you can work out what is being sent you can recraft it and send the raw data with a normal transaction, just steal the function sig and pad your values correctly.

Example raw transfer: raw transfer

In your case you can see they have exactInputSingle(), so you can guess that and other similar Uniswap functions are also in the multicalls, search signatures in the 4byte directory and break the calls down: searching function sig

You could also write your own abi for that function or take from a contract with the same function and arguments. Look up sig/arguments on 4byte directory.

Have done this with an unverified farming contract that was just passing pid, amount and address to withdraw.

Something like: a minimal abi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.