web3py

How to get event log Web3.py?

元气小坏坏 提交于 2020-12-13 03:37:50
问题 I am using solidity 0.7.4, web3.py 5.12.2, and python 3.7. I am working with Windows 10. My goal is to emit an event inside a solidity function, in order to retrieve the log after the function is executed. This is my event event logString(string arg); And this is how I emit the event emit logString("example string"); On Remix it works, and I am able to retrieve the string I emit, in the log of the transaction. When I try it on Python, it doesn't work. This is my Python code: web3_instance =

How to get event log Web3.py?

杀马特。学长 韩版系。学妹 提交于 2020-12-13 03:37:37
问题 I am using solidity 0.7.4, web3.py 5.12.2, and python 3.7. I am working with Windows 10. My goal is to emit an event inside a solidity function, in order to retrieve the log after the function is executed. This is my event event logString(string arg); And this is how I emit the event emit logString("example string"); On Remix it works, and I am able to retrieve the string I emit, in the log of the transaction. When I try it on Python, it doesn't work. This is my Python code: web3_instance =