Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: filter withdrawals by configured filters #13

Merged
merged 6 commits into from
Dec 12, 2023
Merged

Conversation

bendanzhentan
Copy link
Contributor

@bendanzhentan bendanzhentan commented Nov 28, 2023

This PR introduces 3 kinds of withdrawal filters, to filter out malicious withdrawals:

// WhitelistL2TokenList is the list of L2 tokens to whitelist for the L2StandardBridgeBot contract.
//
// L2StandardBridgeBot contract doesn't limit the L2 tokens to be bridged, but this off-chain bot
// process only whitelists the tokens in this list and ignore tokens not in this list.
//
// **IMPORTANT: If this list is unset (by default), all L2 tokens are whitelisted.**
WhitelistL2TokenList *[]string `toml:"whitelist-l2-token-list"`

// UpperMinGasLimit is the upper limit of the minimum gas limit of the L2StandardBridgeBot contract.
//
// **IMPORTANT: If this value is unset (by default), the L2StandardBridgeBot contract doesn't limit the minimum gas limit.**
UpperMinGasLimit *uint32 `toml:"upper-min-gas-limit"`

// UpperExtraDataSize is the upper limit of the extra data size of the L2StandardBridgeBot contract.
//
// **IMPORTANT: If this value is unset (by default), the L2StandardBridgeBot contract doesn't limit the extra data size.**
UpperExtraDataSize *uint32 `toml:"upper-extra-data-size"`

core/processor.go Outdated Show resolved Hide resolved
core/processor.go Outdated Show resolved Hide resolved
core/processor.go Outdated Show resolved Hide resolved
Base automatically changed from avoid-l2-reorg-impact to develop December 8, 2023 03:25
@bendanzhentan bendanzhentan force-pushed the bot-filters branch 2 times, most recently from 558e51b to ce747f6 Compare December 8, 2023 06:32
core/config.go Outdated Show resolved Hide resolved
@bendanzhentan bendanzhentan merged commit c85d604 into develop Dec 12, 2023
2 checks passed
@bendanzhentan bendanzhentan deleted the bot-filters branch December 12, 2023 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants