Address Contract Partially Verified
Address
0x3FcDb67f42eC15fFd6207558b2Bf183bBAAFd4d2
Balance
0 ETH
Nonce
1
Code Size
6502 bytes
Creator
0x0aA21DC6...90c2 at tx 0x02d7502d...7d65c4
Indexed Transactions
0
Contract Bytecode
6502 bytes
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c8063543f66a4116100f9578063ae17cf7711610097578063e63ea40811610071578063e63ea408146103df578063ec76f34a146103f2578063f2fde38b14610405578063f324c8eb1461041857600080fd5b8063ae17cf77146103a6578063ccd5ee23146103b9578063e4d1e70e146103cc57600080fd5b80636620a779116100d35780636620a7791461035a5780638d14e1271461036d5780639df3638f14610380578063aa115c3c1461039357600080fd5b8063543f66a414610321578063575a86b21461033457806361e351331461034757600080fd5b806337d15139116101665780634cce992d116101405780634cce992d146102d55780634dfe4477146102e85780634fc3f41a146102fb578063535b19061461030e57600080fd5b806337d15139146102985780633acad59b146102ab57806348b5c5c9146102be57600080fd5b8063115976c4116101a2578063115976c4146102215780631de46a78146102345780631e23645f1461024757806324f6c7761461025a57600080fd5b806306a8f8a2146101c95780630ba84cd2146101f95780630ee457fa1461020e575b600080fd5b6001546101dc906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61020c610207366004611751565b61042b565b005b61020c61021c366004611751565b6104ea565b6000546101dc906001600160a01b031681565b6002546101dc906001600160a01b031681565b61020c61025536600461177a565b61056f565b6102886102683660046117b3565b600460209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016101f0565b61020c6102a636600461177a565b6105f5565b61020c6102b93660046117df565b61067b565b6102c760055481565b6040519081526020016101f0565b61020c6102e3366004611751565b61073b565b61020c6102f63660046117df565b6107c0565b61020c610309366004611751565b61084e565b61020c61031c3660046117df565b6108d3565b61020c61032f36600461177a565b610961565b6003546101dc906001600160a01b031681565b61020c610355366004611751565b6109e7565b61020c610368366004611809565b610a6c565b61020c61037b3660046117df565b610d84565b61020c61038e366004611833565b610e12565b61020c6103a136600461184e565b610e98565b61020c6103b436600461177a565b610f24565b61020c6103c7366004611751565b610faa565b61020c6103da366004611751565b61102f565b61020c6103ed366004611870565b6110b4565b61020c6104003660046117df565b611325565b61020c610413366004611833565b6113b3565b61020c610426366004611751565b611532565b6000546001600160a01b031633148061044e57506001546001600160a01b031633145b8061046357506002546001600160a01b031633145b6104885760405162461bcd60e51b815260040161047f906118ac565b60405180910390fd5b6003546040516305d4266960e11b8152600481018390526001600160a01b0390911690630ba84cd2906024015b600060405180830381600087803b1580156104cf57600080fd5b505af11580156104e3573d6000803e3d6000fd5b5050505050565b6000546001600160a01b031633148061050d57506001546001600160a01b031633145b8061052257506002546001600160a01b031633145b61053e5760405162461bcd60e51b815260040161047f906118ac565b6003546040516307722bfd60e11b8152600481018390526001600160a01b0390911690630ee457fa906024016104b5565b6000546001600160a01b031633148061059257506001546001600160a01b031633145b806105a757506002546001600160a01b031633145b6105c35760405162461bcd60e51b815260040161047f906118ac565b600354604051631e23645f60e01b815282151560048201526001600160a01b0390911690631e23645f906024016104b5565b6000546001600160a01b031633148061061857506001546001600160a01b031633145b8061062d57506002546001600160a01b031633145b6106495760405162461bcd60e51b815260040161047f906118ac565b6003546040516337d1513960e01b815282151560048201526001600160a01b03909116906337d15139906024016104b5565b6000546001600160a01b031633148061069e57506001546001600160a01b031633145b806106b357506002546001600160a01b031633145b6106cf5760405162461bcd60e51b815260040161047f906118ac565b600354604051633acad59b60e01b81526001600160a01b038481166004830152831515602483015290911690633acad59b906044015b600060405180830381600087803b15801561071f57600080fd5b505af1158015610733573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031633148061075e57506001546001600160a01b031633145b8061077357506002546001600160a01b031633145b61078f5760405162461bcd60e51b815260040161047f906118ac565b600354604051634cce992d60e01b8152600481018390526001600160a01b0390911690634cce992d906024016104b5565b6000546001600160a01b03163314806107e357506001546001600160a01b031633145b806107f857506002546001600160a01b031633145b6108145760405162461bcd60e51b815260040161047f906118ac565b600354604051634dfe447760e01b81526001600160a01b038481166004830152831515602483015290911690634dfe447790604401610705565b6000546001600160a01b031633148061087157506001546001600160a01b031633145b8061088657506002546001600160a01b031633145b6108a25760405162461bcd60e51b815260040161047f906118ac565b6003546040516327e1fa0d60e11b8152600481018390526001600160a01b0390911690634fc3f41a906024016104b5565b6000546001600160a01b03163314806108f657506001546001600160a01b031633145b8061090b57506002546001600160a01b031633145b6109275760405162461bcd60e51b815260040161047f906118ac565b6003546040516329ad8c8360e11b81526001600160a01b03848116600483015283151560248301529091169063535b190690604401610705565b6000546001600160a01b031633148061098457506001546001600160a01b031633145b8061099957506002546001600160a01b031633145b6109b55760405162461bcd60e51b815260040161047f906118ac565b60035460405163150fd9a960e21b815282151560048201526001600160a01b039091169063543f66a4906024016104b5565b6000546001600160a01b0316331480610a0a57506001546001600160a01b031633145b80610a1f57506002546001600160a01b031633145b610a3b5760405162461bcd60e51b815260040161047f906118ac565b6003546040516361e3513360e01b8152600481018390526001600160a01b03909116906361e35133906024016104b5565b6000546001600160a01b0316331480610a8f57506001546001600160a01b031633145b80610aa457506002546001600160a01b031633145b610ac05760405162461bcd60e51b815260040161047f906118ac565b60018110158015610ad2575060038111155b610b145760405162461bcd60e51b8152602060048201526013602482015272092dcecc2d8d2c840c2c8dad2dc40d2dcc8caf606b1b604482015260640161047f565b6000546001600160a01b03838116911614801590610b4057506001546001600160a01b03838116911614155b8015610b5a57506002546001600160a01b03838116911614155b610b995760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b2103732bba0b236b4b760811b604482015260640161047f565b6040516a31b430b733b2a0b236b4b760a91b60208201526001600160601b0319606084901b16602b820152603f8101829052600090605f01604051602081830303815290604052805190602001209050610bf2816115b7565b60008181526004602090815260408083203380855290835292819020805460ff19166001179055518381527f4eb2529dfaf5a7847cb1209edb2e7d95cf4c91f833762c3b7234771db8539f9b910160405180910390a2610c5181611646565b60031415610d7f5760408051606081018252600080546001600160a01b03908116835260018054821660208501526002549091169383019390935290918290610c9a90866118e8565b60038110610caa57610caa6118ff565b602002015190508360011415610cda57600080546001600160a01b0319166001600160a01b038716179055610d28565b8360021415610d0357600180546001600160a01b0319166001600160a01b038716179055610d28565b8360031415610d2857600280546001600160a01b0319166001600160a01b0387161790555b610d31836116fb565b604080516001600160a01b038084168252871660208201529081018590527f766be043f7e09e95a2812f6c40555ea1bbaf526780a5412e1db72a3489ad8e739060600160405180910390a150505b505050565b6000546001600160a01b0316331480610da757506001546001600160a01b031633145b80610dbc57506002546001600160a01b031633145b610dd85760405162461bcd60e51b815260040161047f906118ac565b600354604051638d14e12760e01b81526001600160a01b038481166004830152831515602483015290911690638d14e12790604401610705565b6000546001600160a01b0316331480610e3557506001546001600160a01b031633145b80610e4a57506002546001600160a01b031633145b610e665760405162461bcd60e51b815260040161047f906118ac565b600354604051639df3638f60e01b81526001600160a01b03838116600483015290911690639df3638f906024016104b5565b6000546001600160a01b0316331480610ebb57506001546001600160a01b031633145b80610ed057506002546001600160a01b031633145b610eec5760405162461bcd60e51b815260040161047f906118ac565b600354604051632a84570f60e21b815260048101849052602481018390526001600160a01b039091169063aa115c3c90604401610705565b6000546001600160a01b0316331480610f4757506001546001600160a01b031633145b80610f5c57506002546001600160a01b031633145b610f785760405162461bcd60e51b815260040161047f906118ac565b60035460405163ae17cf7760e01b815282151560048201526001600160a01b039091169063ae17cf77906024016104b5565b6000546001600160a01b0316331480610fcd57506001546001600160a01b031633145b80610fe257506002546001600160a01b031633145b610ffe5760405162461bcd60e51b815260040161047f906118ac565b60035460405163ccd5ee2360e01b8152600481018390526001600160a01b039091169063ccd5ee23906024016104b5565b6000546001600160a01b031633148061105257506001546001600160a01b031633145b8061106757506002546001600160a01b031633145b6110835760405162461bcd60e51b815260040161047f906118ac565b600354604051637268f38760e11b8152600481018390526001600160a01b039091169063e4d1e70e906024016104b5565b6000546001600160a01b03163314806110d757506001546001600160a01b031633145b806110ec57506002546001600160a01b031633145b6111085760405162461bcd60e51b815260040161047f906118ac565b6000546001600160a01b038381169116148061113157506001546001600160a01b038381169116145b8061114957506002546001600160a01b038381169116145b61118a5760405162461bcd60e51b8152602060048201526012602482015271496e76616c696420746f206164647265737360701b604482015260640161047f565b60405170656d657267656e6379576974686472617760781b60208201526001600160601b0319606085811b8216603184015284901b166045820152605981018290526000906079016040516020818303038152906040528051906020012090506111f3816115b7565b60008181526004602090815260408083203380855290835292819020805460ff19166001179055518381527f4eb2529dfaf5a7847cb1209edb2e7d95cf4c91f833762c3b7234771db8539f9b910160405180910390a261125281611646565b6002141561131f57600354604051631cc7d48160e31b81526001600160a01b0386811660048301528581166024830152604482018590529091169063e63ea40890606401600060405180830381600087803b1580156112b057600080fd5b505af11580156112c4573d6000803e3d6000fd5b505050506112d1816116fb565b826001600160a01b0316846001600160a01b03167ff24ef89f38eadc1bde50701ad6e4d6d11a2dc24f7cf834a486991f38833285048460405161131691815260200190565b60405180910390a35b50505050565b6000546001600160a01b031633148061134857506001546001600160a01b031633145b8061135d57506002546001600160a01b031633145b6113795760405162461bcd60e51b815260040161047f906118ac565b60035460405163763b79a560e11b81526001600160a01b03848116600483015283151560248301529091169063ec76f34a90604401610705565b6000546001600160a01b03163314806113d657506001546001600160a01b031633145b806113eb57506002546001600160a01b031633145b6114075760405162461bcd60e51b815260040161047f906118ac565b6040517007472616e736665724f776e65727368697607c1b60208201526001600160601b0319606083901b16603182015260009060450160405160208183030381529060405280519060200120905061145f816115b7565b60008181526004602090815260408083203380855290835292819020805460ff19166001179055518381527f4eb2529dfaf5a7847cb1209edb2e7d95cf4c91f833762c3b7234771db8539f9b910160405180910390a26114be81611646565b6002141561152e5760035460405163f2fde38b60e01b81526001600160a01b0384811660048301529091169063f2fde38b90602401600060405180830381600087803b15801561150d57600080fd5b505af1158015611521573d6000803e3d6000fd5b5050505061152e816116fb565b5050565b6000546001600160a01b031633148061155557506001546001600160a01b031633145b8061156a57506002546001600160a01b031633145b6115865760405162461bcd60e51b815260040161047f906118ac565b60035460405163f324c8eb60e01b8152600481018390526001600160a01b039091169063f324c8eb906024016104b5565b60055481141580156115ca575060055415155b156116415760058054600090815260046020818152604080842084546001600160a01b039081168652908352818520805460ff199081169091558654865284845282862060015483168752845282862080548216905586548652938352818520600254909116855290915282208054909116905590555b600555565b600081815260046020908152604080832083546001600160a01b0316845290915281205460ff1615611680578061167c81611915565b9150505b60008281526004602090815260408083206001546001600160a01b0316845290915290205460ff16156116bb57806116b781611915565b9150505b60008281526004602090815260408083206002546001600160a01b0316845290915290205460ff16156116f657806116f281611915565b9150505b919050565b600090815260046020908152604080832083546001600160a01b0390811685529252808320805460ff19908116909155600154831684528184208054821690556002549092168352822080549091169055600555565b60006020828403121561176357600080fd5b5035919050565b803580151581146116f657600080fd5b60006020828403121561178c57600080fd5b6117958261176a565b9392505050565b80356001600160a01b03811681146116f657600080fd5b600080604083850312156117c657600080fd5b823591506117d66020840161179c565b90509250929050565b600080604083850312156117f257600080fd5b6117fb8361179c565b91506117d66020840161176a565b6000806040838503121561181c57600080fd5b6118258361179c565b946020939093013593505050565b60006020828403121561184557600080fd5b6117958261179c565b6000806040838503121561186157600080fd5b50508035926020909101359150565b60008060006060848603121561188557600080fd5b61188e8461179c565b925061189c6020850161179c565b9150604084013590509250925092565b6020808252600c908201526b2737ba1030b71030b236b4b760a11b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156118fa576118fa6118d2565b500390565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611929576119296118d2565b506001019056fea2646970667358221220e96ae1624e04893da930bce195139dc62412c72b06d37e1482b2374124381de464736f6c634300080c0033
Verified Source Code Partial Match
Compiler: v0.8.12+commit.f00d7308
EVM: istanbul
Optimization: Yes (200 runs)
MultiSigManager.sol 217 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "./libs/IMasterChef.sol";
contract MultiSigManager {
address public admin1;
address public admin2;
address public admin3;
IMasterChef public masterChef;
mapping(bytes32 => mapping(address => bool)) public approvals;
bytes32 public currentPendingAction;
event AdminChanged(address oldAdmin, address newAdmin, uint256 adminIndex);
event ActionApproved(bytes32 actionId, address indexed admin);
event EmergencyWithdraw(address indexed token, address indexed to, uint256 amount);
modifier onlyAdmins() {
require(
msg.sender == admin1 || msg.sender == admin2 || msg.sender == admin3,
"Not an admin"
);
_;
}
constructor(address _admin1, address _admin2, address _admin3, address _masterChef) {
masterChef = IMasterChef(_masterChef);
admin1 = _admin1;
admin2 = _admin2;
admin3 = _admin3;
}
function _clearPreviousPendingAction(bytes32 actionId) internal{
if (actionId != currentPendingAction && currentPendingAction != bytes32(0)) {
approvals[currentPendingAction][admin1] = false;
approvals[currentPendingAction][admin2] = false;
approvals[currentPendingAction][admin3] = false;
currentPendingAction = bytes32(0);
}
currentPendingAction = actionId;
}
function _resetPendingAction(bytes32 actionId) internal{
approvals[actionId][admin1] = false;
approvals[actionId][admin2] = false;
approvals[actionId][admin3] = false;
currentPendingAction = bytes32(0);
}
function changeAdmin(address newAdmin, uint256 adminIndex) external onlyAdmins {
require(adminIndex >= 1 && adminIndex <= 3, "Invalid admin index");
require(newAdmin != admin1 && newAdmin != admin2 && newAdmin != admin3, "Invalid newAdmin");
bytes32 actionId = keccak256(abi.encodePacked("changeAdmin", newAdmin, adminIndex));
_clearPreviousPendingAction(actionId);
approvals[actionId][msg.sender] = true;
emit ActionApproved(actionId, msg.sender);
if (_getApprovalCount(actionId) == 3) {
address[3] memory admins = [admin1, admin2, admin3];
address oldAdmin = admins[adminIndex - 1];
if (adminIndex == 1) admin1 = newAdmin;
else if (adminIndex == 2) admin2 = newAdmin;
else if (adminIndex == 3) admin3 = newAdmin;
_resetPendingAction(actionId);
emit AdminChanged(oldAdmin, newAdmin, adminIndex);
}
}
function _getApprovalCount(bytes32 actionId) internal view returns (uint256 count) {
if (approvals[actionId][admin1]) count++;
if (approvals[actionId][admin2]) count++;
if (approvals[actionId][admin3]) count++;
return count;
}
// Emergency withdrawal function
function emergencyWithdraw(address _token, address _to, uint256 _amount) external onlyAdmins {
require(_to == admin1 || _to == admin2 || _to == admin3, "Invalid to address");
bytes32 actionId = keccak256(abi.encodePacked("emergencyWithdraw", _token, _to , _amount));
_clearPreviousPendingAction(actionId);
approvals[actionId][msg.sender] = true;
emit ActionApproved(actionId, msg.sender);
if (_getApprovalCount(actionId) == 2) {
masterChef.emergencyWithdraw(_token, _to, _amount);
_resetPendingAction(actionId);
emit EmergencyWithdraw(_token, _to, _amount);
}
}
// Update the emission rate
function updateEmissionRate(uint256 _daiPerBlock) external onlyAdmins {
masterChef.updateEmissionRate(_daiPerBlock);
}
// Set deposit restriction for an address
function setDepositRestriction(address addr, bool status) external onlyAdmins {
masterChef.setDepositRestriction(addr, status);
}
// Set withdraw restriction for an address
function setWithdrawRestriction(address addr, bool status) external onlyAdmins {
masterChef.setWithdrawRestriction(addr, status);
}
// Set claim restriction for an address
function setClaimRestriction(address addr, bool status) external onlyAdmins {
masterChef.setClaimRestriction(addr, status);
}
// Set charge restriction for an address
function setChargeRestriction(address addr, bool status) external onlyAdmins {
masterChef.setChargeRestriction(addr, status);
}
// Pause or unpause deposits globally
function setDepositPaused(bool status) external onlyAdmins {
masterChef.setDepositPaused(status);
}
// Pause or unpause withdrawals globally
function setWithdrawPaused(bool status) external onlyAdmins {
masterChef.setWithdrawPaused(status);
}
// Pause or unpause claims globally
function setClaimPaused(bool status) external onlyAdmins {
masterChef.setClaimPaused(status);
}
// Set the deposit threshold (in wei)
function setDepositThreshold(uint256 threshold) external onlyAdmins {
masterChef.setDepositThreshold(threshold);
}
// Set the claim threshold (in wei)
function setClaimThreshold(uint256 threshold) external onlyAdmins {
masterChef.setClaimThreshold(threshold);
}
// Set the order locking height (block height)
function setOrderLockingHeight(uint256 height) external onlyAdmins {
masterChef.setOrderLockingHeight(height);
}
// Set the claim charge (percentage)
function setClaimCharge(uint256 charge) external onlyAdmins {
masterChef.setClaimCharge(charge);
}
// Set the commission ratio (percentage)
function setCommissionRatio(uint256 ratio) external onlyAdmins {
masterChef.setCommissionRatio(ratio);
}
// Set the withdrawal charge (percentage)
function setWithdrawalCharge(uint256 charge) external onlyAdmins {
masterChef.setWithdrawalCharge(charge);
}
function setCooldown(uint256 height) external onlyAdmins{
masterChef.setCooldown(height);
}
function setStakingTd(uint level, uint256 threshold) external onlyAdmins{
masterChef.setStakingTd(level, threshold);
}
function setBarkDao(address _barkDao) external onlyAdmins {
masterChef.setBarkDao(_barkDao);
}
function setWhiteListMode(bool _b) external onlyAdmins{
masterChef.setWhiteListMode(_b);
}
function setWhiteList(address _user, bool _b) external onlyAdmins{
masterChef.setWhiteList(_user, _b);
}
// transfer masterChef owner
function transferOwnership(address newOwner) external onlyAdmins {
bytes32 actionId = keccak256(abi.encodePacked("transferOwnership", newOwner));
_clearPreviousPendingAction(actionId);
approvals[actionId][msg.sender] = true;
emit ActionApproved(actionId, msg.sender);
if (_getApprovalCount(actionId) == 2) {
masterChef.transferOwnership(newOwner);
_resetPendingAction(actionId);
}
}
}
IMasterChef.sol 63 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
interface IMasterChef {
// Emergency withdrawal function
function emergencyWithdraw(address _token, address _to, uint256 _amount) external;
// Update the emission rate
function updateEmissionRate(uint256 _daiPerBlock) external;
// Set deposit restriction for an address
function setDepositRestriction(address addr, bool status) external;
// Set withdraw restriction for an address
function setWithdrawRestriction(address addr, bool status) external;
// Set claim restriction for an address
function setClaimRestriction(address addr, bool status) external;
// Set charge restriction for an address
function setChargeRestriction(address addr, bool status) external;
// Pause or unpause deposits globally
function setDepositPaused(bool status) external;
// Pause or unpause withdrawals globally
function setWithdrawPaused(bool status) external;
// Pause or unpause claims globally
function setClaimPaused(bool status) external;
// Set the deposit threshold (in wei)
function setDepositThreshold(uint256 threshold) external;
// Set the claim threshold (in wei)
function setClaimThreshold(uint256 threshold) external;
// Set the order locking height (block height)
function setOrderLockingHeight(uint256 height) external;
// Set the claim charge (percentage)
function setClaimCharge(uint256 charge) external;
// Set the commission ratio (percentage)
function setCommissionRatio(uint256 ratio) external;
// Set the withdrawal charge (percentage)
function setWithdrawalCharge(uint256 charge) external;
// transfer owner
function transferOwnership(address newOwner) external;
function setCooldown(uint256 height) external;
function setStakingTd(uint level, uint256 threshold) external;
function setBarkDao(address _barkDao) external;
function setWhiteListMode(bool _b) external;
function setWhiteList(address _user, bool _b) external;
}
Read Contract
admin1 0x115976c4 → address
admin2 0x06a8f8a2 → address
admin3 0x1de46a78 → address
approvals 0x24f6c776 → bool
currentPendingAction 0x48b5c5c9 → bytes32
masterChef 0x575a86b2 → address
Write Contract 22 functions
These functions modify contract state and require a wallet transaction to execute.
changeAdmin 0x6620a779
address newAdmin
uint256 adminIndex
emergencyWithdraw 0xe63ea408
address _token
address _to
uint256 _amount
setBarkDao 0x9df3638f
address _barkDao
setChargeRestriction 0x4dfe4477
address addr
bool status
setClaimCharge 0x0ee457fa
uint256 charge
setClaimPaused 0xae17cf77
bool status
setClaimRestriction 0x3acad59b
address addr
bool status
setClaimThreshold 0xf324c8eb
uint256 threshold
setCommissionRatio 0xccd5ee23
uint256 ratio
setCooldown 0x4fc3f41a
uint256 height
setDepositPaused 0x543f66a4
bool status
setDepositRestriction 0x535b1906
address addr
bool status
setDepositThreshold 0x4cce992d
uint256 threshold
setOrderLockingHeight 0xe4d1e70e
uint256 height
setStakingTd 0xaa115c3c
uint256 level
uint256 threshold
setWhiteList 0x8d14e127
address _user
bool _b
setWhiteListMode 0x1e23645f
bool _b
setWithdrawPaused 0x37d15139
bool status
setWithdrawRestriction 0xec76f34a
address addr
bool status
setWithdrawalCharge 0x61e35133
uint256 charge
transferOwnership 0xf2fde38b
address newOwner
updateEmissionRate 0x0ba84cd2
uint256 _daiPerBlock
Recent Transactions
No transactions found for this address