Project
Allowlist
Step 4 of setup: define what calls can be sponsored
How Allowlists Work
The allowlist specifies which smart contract functions your gas station will sponsor.
Only transactions calling allowlisted contract addresses + function selectors will be approved.
This prevents abuse and controls your gas spending.
Allowlist Entries
Loading allowlist
How to Find Function Selectors
Start tight: allowlist only the exact contract + function you want to sponsor.
Method 1: from contract ABI (recommended)
const iface = new ethers.Interface(ABI);
const selector = iface.getFunction('functionName').selector;
// Returns: "0x12345678"
Method 2: manual calculation
import { keccak256, toUtf8Bytes } from 'ethers';
const signature = 'increment()'; // Function signature
const hash = keccak256(toUtf8Bytes(signature));
const selector = hash.slice(0, 10); // 0x + 8 hex chars
// Example: "0xd09de08a"
Common selectors
| Function | Selector |
|---|---|
transfer(address,uint256) |
0xa9059cbb |
approve(address,uint256) |
0x095ea7b3 |
mint(address,uint256) |
0x40c10f19 |
increment() |
0xd09de08a |