This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //! Custom AccountProvider implementation that uses separate storage for EVM nonces. | |
| //! | |
| //! If an account has no entry in EvmNonces (or it is zero), we treat this as "not migrated yet" | |
| //! and fall back to the frame system nonce. On increment, we initialize EvmNonces from the | |
| //! frame system nonce + 1, ensuring compatibility without performing an on-chain migration. | |
| use frame_support::traits::IsType; | |
| use hydradx_traits::evm::InspectEvmAccounts; | |
| use pallet_evm::{AccountProvider, FrameSystemAccountProvider}; | |
| use pallet_evm_accounts::EvmNonces; |