Can we call python function in solidity smart contract. If yes, how we can test it please? I'm using remix for the smart contract development.
1 Answer
Python and Solidity are two very different programming languages. There is no standard way to call into Python code from Solidity.
Your best bet will probably be to port the code from Python to Solidity. Or, if you'd like, to Vyper which has much more similar syntax to Python.
P.S. Theoretically you could do some hacks like either writing a Python interpreter in Solidity, or running an existing Python interpreter binary on a MIPS (or otherwise) implementation in Solidity, but you probably don't want to do that.