Update hooksAddressesAllowlist.ts - #1397
Conversation
Add whitelist buy hook address to BSC chain allowlist in hooksAddressesAllowlist.ts - Hook: WhitelistBuyHook (BSC mainnet) - Purpose: Restrict swaps to whitelisted addresses
|
Hi @Ponx 👋 Thank you so much! |
|
Hi @Ponx |
|
Hi @Ponx Hook Logic (What I'm trying to do)My hook is a "whitelist buy gate":
The Problematic CodeIn _beforeSwap, I need to get the real user address (not the router address). address swapper;
try IMsgSender(sender).msgSender() returns (address res) {
swapper = res;
} catch {
revert("Router does not implement msgSender()"); // ← Problem here
}The IssueWhen the Quoter calls swap() during routing simulation, it does NOT implement My QuestionWhat is the correct way to handle this? Specifically:
Context
I want to make sure I follow the official recommended pattern before redeploying. |
Summary
Add whitelist buy hook address to BSC chain allowlist in hooksAddressesAllowlist.ts, per Uniswap hook intake requirements.
Hook Details
Related
Testing