Open NotPeopling2day opened 2 years ago
TransactionAPI might be over-specified
: Care to elaborate on this one?
TransactionAPI might be over-specified
: Care to elaborate on this one?
We have max_fee
and max_priority_fee
in the core TransactionAPI
type. Thinking more abstractly, there isn't really a need to have these txn types specify this data directly. Perhaps there is a smarter way where those fields are left out of TransactionAPI
(and end up in their contract classes), and just keep an abstractmethod
like max_total_fee
that returns whatever the concrete implementation considers to be the maximum amount of ETH that would be spent. This is useful for other functions like detecting if a user has enough ETH to send the transaction.
If you want to query base_fee
from the transaction, well that field wouldn't be available in TransactionAPI
, you would have to be certain you are working with DynamicFeeTransaction
concrete classes that implement this field in their data model.
Thank you for adding this info!
I agree, those fields only matter during serialization and can be handled at the implementation level.
Overview
Refactor EcosystemAPI and associated types
Specification
Literal
pydantic trick for indexing purposes https://github.com/ApeWorX/ape/pull/509#discussion_r814461074.type
member more smartly https://github.com/ApeWorX/ape/pull/509#discussion_r814461646Dependencies
509