Skip to content

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/Mainnet via Hardhat)

  1. Install deps: npm install
  2. Copy .env.example to .env and fill: PRIVATE_KEY, ALCHEMY_SEPOLIA_URL, ALCHEMY_MAINNET_URL (if mainnet), ETHERSCAN_API_KEY, WHITELIST_REMOVER_OWNER, CORK_CONTROLLER_ADDRESS
  3. Compile (Hardhat): npx hardhat compile
  4. Deploy: npm run deploy:sepolia or npm run deploy:mainnet (prints contract address and constructor args)
  5. Verify (optional, requires ETHERSCAN_API_KEY): npx hardhat verify --network <sepolia|mainnet> <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

 
 
 

Contributors