Address
0x9325008ee3b5982c10010c8f12b6cd4943f48fa6Current Holdings
$0.00
TXs sent
0
First Active
2025-08-15
block 24,246,414
Last Active
today
block 27,520,121
Net worth historyi
5,000 snapshots · to block 27,521,420partial
exact matchValidatorFeeDepositorsolc 0.8.20+commit.a1b79de6runtime exact · creation not verified
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import {Vouch} from "./Vouch.sol";
import {DaoDistributor} from "./DaoDistributor.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./Utilities.sol";
contract ValidatorFeeDepositor is ReentrancyGuard {
INetworkProposal public networkProposal;
Vouch public vouch;
uint256 public distributeThreshold = 200_000e18;
modifier onlyAdmin() {
require(networkProposal.isAdmin(msg.sender), "Caller must be admin");
_;
}
constructor() {
networkProposal = INetworkProposal(0x7783D7040423f75aeF82a3Ec32ed366ca460Fa6c);
}
function depositToDistributor() external nonReentrant {
if (address(this).balance >= distributeThreshold) {
DaoDistributor(vouch.distributor()).depositFromValidators{value: address(this).balance}();
}
}
function setDistributeThreshold(uint256 _distributeThreshold) external onlyAdmin {
distributeThreshold = _distributeThreshold;
}
function setVouchAddress(address _vouchAddress) external {
require(_vouchAddress != address(0), "invalid address");
if (address(vouch) != address(0)) {
require(networkProposal.isAdmin(msg.sender), "Caller must be admin");
}
vouch = Vouch(payable(_vouchAddress));
}
receive() external payable {
}
}