A 1inch approval is permission from a particular token owner to a particular spender on a particular chain. A globally cached “1inch approved” flag loses all three relationships.
The v6.1 approval-spender endpoint provides spender discovery within a chain-specific path. Keep that discovery separate from the allowance value held by a user's token contract.
Use two different cache keys
A deployment cache can be keyed by provider, API version and chain. An allowance observation additionally needs token, owner, spender and the block context of the read. Reusing one account's observation for another account is incorrect even when both use the same router.
Set a reviewed refresh policy for deployment data. If a discovered spender changes unexpectedly, stop the approval path until the change has been checked against documented deployments. Do not silently transfer an existing approval flag to the new address.
Check the required amount
Compare integer allowance with the spend bound required by the current trade. A prior permission may be sufficient, insufficient or no longer relevant after the amount or execution mode changes.
After approval confirmation, read the allowance again. A transaction receipt establishes that a transaction executed; the subsequent read establishes the permission your next operation will use.
Keep transaction construction independent
Do not assume that the approval spender must equal every returned execution destination. Validate each according to its documented role. Native currency also needs an explicit branch because an ERC-20 allowance workflow does not apply to an asset without that token interface.
Test account switching, chain switching, a spender deployment update and a trade amount above the old permission. Each should invalidate only the relevant cached evidence while preserving historical approval receipts.
Sources & verification (1)
Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.
- Classic Swap approve spender
Chain-scoped spender endpoint
https://business.1inch.com/portal/documentation/apis/swap/classic-swap/methods/v6.1/chainId/approve/spender/method/get