Closed bout3fiddy closed 2 years ago
This is specific to ethpm-types
. Every ABI object has a back reference to the contract type it came from but it is not actually part of the model during serialization.
You say it is returning the whole ABI but if you look closer at what you posted, you see the the whole ABI is under the key contract_type
(along with other data related to the contract type).
It is not actually part of the model but just a property on the class.
Is this causing problems for you? Is this really a bug? I don't quite understand the problem.
Let me know if this is actually causing problems if I can close this as working-as-intended
.
This PR "fixes" it: https://github.com/ApeWorX/ethpm-types/pull/42
Now, the contract_type
will be hidden from the repr and hopefully causes less confusion.
Thank you.
I think that PR will help, it should not be representing the back-refs like that
Thanks! I think it was just a dev experience issue for me. I didn't want my terminal to clutter up. It causes issues when you're trying to use rich console for displaying exceptions with the state (state is huge because of that full dump that eth-pm gives).
Thanks for looking into it! I'll let you know if this helps! :)
Environment information
ape
and plugin versions:macOS python 3.10.4
ape-config.yaml
(NOTE: do not post anything private like RPC urls or secrets!):What went wrong?
Please include information like:
say i do the following:
this returns the following:
Now, it looks like it just dumps the entire contract abi instead of just the abi for
AddLiquidity
event. I assume that when one doescontract.EventName.abi
the returned output should only be for that event and not the whole contract.Interestingly, it seems to return a shorter event abi if I do the following:
Not sure if this is a bug, but I decided to report this any way.
How can it be fixed?
Fill this in if you have ideas on how the bug could be fixed.