On 2/8/22, Undiscussed Horrific Abuse, One Victim of Many <gmkarl@gmail.com> wrote:
i downloaded many solc versions and patched upgrades but the 'indexed' field python was complaining about still wasn't generated. it works if it is manually added. be useful to look to see what generates it.
something like this:
import web3 from web3.auto import w3 setrefabi = {'constant': False, 'inputs': [{'name': 'ref', 'type': 'string', 'indexed': False}, {'name': 'hash', 'type': 'string', 'indexed': False}], 'name': 'setRef', 'outputs': [], 'type': 'function'} setreftopic = web3._utils.filters.construct_event_topic_set(setrefabi, pyweb3.w3.codec) w3.eth.get_logs({'topics':[setreftopic],'fromBlock':None,'toBlock':None})
should hopefully get the entire mango commit history, likely fails due to my high mistake rate. i'm not connected to an archive node, so it doesn't work for me atm.
note: this could also be done with the contract constructor, rather than setRef. then repositories without references can be found.