Transaction Allowlist
Learn how to use the Transaction Allowlist Precompile to control which addresses can submit transactions on your Avalanche L1 blockchain.
The Transaction Allowlist Precompile allows you to control which addresses have permission to submit transactions on your Avalanche L1 blockchain. This is useful for creating a permissioned network where only authorized addresses can perform transactions.
Activating the Precompile
To activate this feature, you need to provide the txAllowListConfig
in the genesis:
By enabling this feature, you can define which addresses are allowed to submit transactions and manage these permissions over time.
Interface and Address
The Transaction Allowlist precompile is located at address 0x0200000000000000000000000000000000000002
and implements the following interface:
The Transaction Allowlist precompile uses the AllowList interface to manage permissions for transaction submission.
Role Permissions
The precompile defines several roles with different permissions:
- Admin (2): Can add or remove any role (Admin, Manager, Enabled, None)
- Manager (3): Can add or remove Enabled addresses
- Enabled (1): Can submit transactions
- None (0): Cannot submit transactions
When an address has no role or is explicitly set to None (0), any transaction from that address will be rejected by the network.
Implementation
You can find the implementation of the Transaction Allowlist precompile in the subnet-evm repository.
Is this guide helpful?