Skip to content

A helper contract designed to batch tx coming from HN in order to automate whitelist removal in Cork protocol

Notifications You must be signed in to change notification settings

Certora/CorkWhitelistRemover

Repository files navigation

WhitelistRemover

Owner-controlled helper contract for batching whitelist removals across the Cork protocol, supporting global, market-specific, or combined removal modes.

API

function removeFromWhitelist(
    WhitelistType whitelistType,
    address[] calldata addressToRemoveFromWhitelist,
    MarketId[] calldata marketIds
) external onlyOwner

WhitelistType:

  • Global — Remove from global whitelist only
  • Market — Remove from market-specific whitelists only
  • GlobalAndMarket — Remove from both

Installation & Building

forge install
forge build
FOUNDRY_PROFILE=optimized forge build  # For production

Testing

forge test

Deployment (Sepolia via Hardhat)

  1. Install deps: npm install
  2. Copy .env.example to .env and fill: PRIVATE_KEY, ALCHEMY_SEPOLIA_URL, ETHERSCAN_API_KEY, WHITELIST_REMOVER_OWNER, CORK_CONTROLLER_ADDRESS
  3. Compile (Hardhat): npx hardhat compile
  4. Deploy: npm run deploy:sepolia (prints contract address and constructor args)
  5. Verify: npx hardhat verify --network sepolia <DEPLOYED_ADDRESS> $WHITELIST_REMOVER_OWNER $CORK_CONTROLLER_ADDRESS

Security

  • Owner-only access via onlyOwner modifier
  • Immutable references to OWNER and CONTROLLER prevent modifications

About

A helper contract designed to batch tx coming from HN in order to automate whitelist removal in Cork protocol

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •