Conversation
|
📊 Tempo Precompiles CoverageprecompilesCoverage: 5634/7729 lines (72.89%) File details
contractsCoverage: 1/226 lines (0.44%) File details
Total: 5635/7955 lines (70.84%) |
| amount: U256::from(amount), | ||
| }, | ||
| )?; | ||
| fn transfer_from(&mut self, token: Address, sender: Address, amount: u128) -> Result<()> { |
There was a problem hiding this comment.
should we create this fn as a new TIP20 helper (i.e transfer_from_internal(&mut self, caller: Address, from: Address, amount: U256) which routes based on AddressRegistry::is_implicitly_approved()?
it would ensure that impl and registry are always aligned + that to is always the caller precompile
| /// Precompiles on this list are authorized to call | ||
| /// [`crate::tip20::TIP20Token::system_transfer_from`], pulling TIP-20 tokens from a user without a | ||
| /// prior `approve()`. The list is gated on `TempoHardfork::T5`; before activation it is empty. | ||
| pub const IMPLICIT_APPROVAL_LIST: &[Address] = &[TIP_FEE_MANAGER_ADDRESS, STABLECOIN_DEX_ADDRESS]; |
There was a problem hiding this comment.
Can we also add TIP_20_ESCROW_PRECOMPILE to this, ig it also needs to be updated in the TIP itself.
CC: @danrobinson
There was a problem hiding this comment.
we don't yet have this const defined so i'd suggest we do it in scope of TIP-1034
Closes CHAIN-1144
Adds
isImplicitlyApprovedmethod toAddressRegistryand changes stablecoind DEX to usesystem_transfer_frompost-T5.