Fetching contract ABI in Python + Web3?

I’d like to make a simple interface that lets me paste a contract code and specify an amount of BNB to buy of the coin, but it seems to interact with any smart contracts I would need the ABI. This is available on BSCScan and something like Pancakeswap does not require the user to provide it to purchase tokens from a deployed contract, however I cannot find any easy way of fetching this automatically within the python script. Any ideas? Is it possible to interact with a smart contract from Python + Web3 without manually pasting in the ABI for every token you buy? Surely there must be some way to automate this?

I feel like I must be missing something critically obvious.

What do you think?

10 Points
Upvote Downvote

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

One Comment

Weekly update. We want to thank all of our investors… | by EncryptoTel

Inflation – buying stocks now or wait?