[SOLVED] Python SDK and Polygon

I have read the complete documentation of Moralis’s Python SDK.
The SDK can be used to interact with smart contracts deployed on Polygon Blockchain but I was only able to find it for read-only functions.
Is there a way to call functions that change the state of the smart contracts deployed on Polygon using Moralis’s python SDK?

We don’t have that functionality to send a transaction on chain. You can use ethers directly in python to send a transaction on chain. You will need a hardcoded private key for that.

Yes its completely fine for me to hard-code my private key,
Can you suggest a resource by which I can send a transaction on chain to a smart contract (FOR POLYGON ONLY) using ethers?

you will also need a RPC node url for that

it looks like it could be easier to use web3 in python
you can start by reading here for example


you can try to search on google too

1 Like

I have tried searching a lot on Python but I haven’t found any library/SDK to connect with smart contracts on Polygon.
Can you suggest something for Polygon cause all these resources available on google are for Ethereum?

there is no big difference between polygon or eth, you only need a RPC url specific to polygon

okay, i will try it… thank you!