// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2023 Kiln <contact@kiln.fi>
//
// ██╗ ██╗██╗██╗ ███╗ ██╗
// ██║ ██╔╝██║██║ ████╗ ██║
// █████╔╝ ██║██║ ██╔██╗ ██║
// ██╔═██╗ ██║██║ ██║╚██╗██║
// ██║ ██╗██║███████╗██║ ╚████║
// ╚═╝ ╚═╝╚═╝╚══════╝╚═╝ ╚═══╝
//
pragma solidity 0.8.17;
/// @title Exit Request Contract
/// @author pwnh4 @ Kiln
/// @notice ExitRequestContract helps stakers notice their node operator to exit their validators
contract ExitRequestContract {
/// @notice Thrown when a wallet is requesting an exit of a validator
/// @param caller wallet requesting the validator exit
/// @param pubkey public key of the validator to exit
event ExitRequest(address caller, bytes pubkey);
/// @notice Request exit for one or many validators
/// @param validators_ list of validator pubkeys to request exit for
function requestExit(bytes[] calldata validators_) external {
for (uint256 i = 0; i < validators_.length; ) {
emit ExitRequest(msg.sender, validators_[i]);
unchecked {
++i;
}
}
}
}
{
"compilationTarget": {
"ExitRequestContract.sol": "ExitRequestContract"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"bytes","name":"pubkey","type":"bytes"}],"name":"ExitRequest","type":"event"},{"inputs":[{"internalType":"bytes[]","name":"validators_","type":"bytes[]"}],"name":"requestExit","outputs":[],"stateMutability":"nonpayable","type":"function"}]