Address Contract Partially Verified
Address
0xe07b8FA0D41800ff5Ef828080c4ED7837495fEd7
Balance
0 ETH
Nonce
1
Code Size
1248 bytes
Creator
0x748765B8...7a15 at tx 0x2ba62086...a26274
Indexed Transactions
0
Contract Bytecode
1248 bytes
0x608060405234801561001057600080fd5b50600436106100625760003560e01c80634ff0876a14610067578063766718081461008457806399eecb3b1461008c578063bb82717b146100bf578063dd7fb65b146100d4578063e78cea92146100f7575b600080fd5b61007162093a8081565b6040519081526020015b60405180910390f35b610071610112565b6100a7732f50d538606fa9edd2b11e2446beb18c9d5846bb81565b6040516001600160a01b03909116815260200161007b565b6100d26100cd366004610350565b610131565b005b6100e76100e2366004610383565b610241565b604051901515815260200161007b565b6100a7732a3dd3eb832af982ec71669e178424b10dca2ede81565b600062093a8061012281426103a5565b61012c91906103c7565b905090565b600061013c83610241565b905060007f22f6277b2efe600733069d522cf5aca244295c74c9337c4b357a6e5619799440848361016b610112565b6040516001600160a01b0390931660248401529015156044830152606482015260840160408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051630481fe6f60e31b81529091506001908190732a3dd3eb832af982ec71669e178424b10dca2ede9063240ff378906000906102079085908a9082908a906004016103f4565b6000604051808303818588803b15801561022057600080fd5b505af1158015610234573d6000803e3d6000fd5b5050505050505050505050565b60405163273c8d1d60e11b81526001600160a01b03821660048201526000908190732f50d538606fa9edd2b11e2446beb18c9d5846bb90634e791a3a90602401602060405180830381865afa15801561029e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c2919061046f565b11801561032e5750816001600160a01b0316639c868ac06040518163ffffffff1660e01b8152600401602060405180830381865afa158015610308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032c9190610488565b155b92915050565b80356001600160a01b038116811461034b57600080fd5b919050565b6000806040838503121561036357600080fd5b61036c83610334565b915061037a60208401610334565b90509250929050565b60006020828403121561039557600080fd5b61039e82610334565b9392505050565b6000826103c257634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156103ef57634e487b7160e01b600052601160045260246000fd5b500290565b63ffffffff851681526000602060018060a01b03861681840152841515604084015260806060840152835180608085015260005b818110156104445785810183015185820160a001528201610428565b8181111561045657600060a083870101525b50601f01601f19169290920160a0019695505050505050565b60006020828403121561048157600080fd5b5051919050565b60006020828403121561049a57600080fd5b8151801515811461039e57600080fdfea2646970667358221220bdb8f48e30f200920f9119070b3e2e20cae6003389ab99c0fa238ed832fd83cd64736f6c634300080a0033
Verified Source Code Partial Match
Compiler: v0.8.10+commit.fc410830
EVM: london
Optimization: Yes (200 runs)
CommitGaugeStatus.sol 43 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "./interfaces/ICurveGauge.sol";
import "./interfaces/IGaugeController.sol";
import "./interfaces/IZkEvmBridge.sol";
contract CommitGaugeStatus {
bytes4 private constant updateSelector = bytes4(keccak256("setGauge(address,bool,uint256)"));
address public constant gaugeController = address(0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB);
address public constant bridge = address(0x2a3DD3EB832aF982ec71669E178424b10Dca2EDe);
uint256 public constant epochDuration = 86400 * 7;
function currentEpoch() public view returns (uint256) {
return block.timestamp/epochDuration*epochDuration;
}
function commit(
address _gauge,
address _contractAddr
) external {
//check killed for status
bool active = isValidGauge(_gauge);
//build data
bytes memory data = abi.encodeWithSelector(updateSelector, _gauge, active, currentEpoch());
//submit to L2
uint32 destinationNetwork = 1;
bool forceUpdateGlobalExitRoot = true;
IZkEvmBridge(bridge).bridgeMessage{value:0}(
destinationNetwork,
_contractAddr,
forceUpdateGlobalExitRoot,
data
);
}
function isValidGauge(address _gauge) public view returns(bool){
return IGaugeController(gaugeController).get_gauge_weight(_gauge) > 0 && !ICurveGauge(_gauge).is_killed();
}
}
ICurveGauge.sol 6 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
interface ICurveGauge {
function is_killed() external view returns(bool);
}
IZkEvmBridge.sol 12 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
interface IZkEvmBridge{
function bridgeMessage(
uint32 destinationNetwork,
address destinationAddress,
bool forceUpdateGlobalExitRoot,
bytes calldata metadata
) external payable;
}
IGaugeController.sol 9 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
interface IGaugeController {
function get_gauge_weight(address _gauge) external view returns(uint256);
function vote_user_slopes(address,address) external view returns(uint256,uint256,uint256);//slope,power,end
function vote_for_gauge_weights(address,uint256) external;
function add_gauge(address,int128,uint256) external;
}
Read Contract
bridge 0xe78cea92 → address
currentEpoch 0x76671808 → uint256
epochDuration 0x4ff0876a → uint256
gaugeController 0x99eecb3b → address
isValidGauge 0xdd7fb65b → bool
Write Contract 1 functions
These functions modify contract state and require a wallet transaction to execute.
commit 0xbb82717b
address _gauge
address _contractAddr
Recent Transactions
No transactions found for this address