Overview
S Balance
0 S
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Gauge Type Oracle
Compiler Version
vyper:0.3.10
Contract Source Code (Vyper language format)
# @version 0.3.10 """ @title Gauge Type Oracle @license MIT @author Curve Finance """ event SetGaugeType: gauge: indexed(address) type: uint256 event SetVerifier: verifier: address event TransferOwnership: owner: indexed(address) gauge_type: HashMap[address, uint256] # a value of 0 signifies the account is not a valid gauge verifier: public(address) owner: public(address) future_owner: public(address) @external def __init__(): self.owner = msg.sender log TransferOwnership(msg.sender) @view @external def get_gauge_type(_gauge: address) -> uint256: """ @notice Get the gauge type of an account @dev This method will revert if the gauge type has not been set yet """ return self.gauge_type[_gauge] - 1 @external def set_gauge_type(_gauge: address, _type: uint256): """ @notice Set the gauge type of an account @dev This method will increment the value of `_type` by 1 prior to storing, since a value of 0 signifies an invalid gauge. """ assert msg.sender in [self.owner, self.verifier] # dev: only owner self.gauge_type[_gauge] = _type + 1 log SetGaugeType(_gauge, _type) @external def set_verifier(_verifier: address): """ @notice Set the account with verifier permissions. """ assert msg.sender == self.owner self.verifier = _verifier log SetVerifier(_verifier) @external def commit_transfer_ownership(_future_owner: address): """ @notice Transfer ownership to `_future_owner` @param _future_owner The account to commit as the future owner """ assert msg.sender == self.owner # dev: only owner self.future_owner = _future_owner @external def accept_transfer_ownership(): """ @notice Accept the transfer of ownership @dev Only the committed future owner can call this function """ assert msg.sender == self.future_owner # dev: only future owner self.owner = msg.sender log TransferOwnership(msg.sender)
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"name":"SetGaugeType","inputs":[{"name":"gauge","type":"address","indexed":true},{"name":"type","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"SetVerifier","inputs":[{"name":"verifier","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"TransferOwnership","inputs":[{"name":"owner","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[],"outputs":[]},{"stateMutability":"view","type":"function","name":"get_gauge_type","inputs":[{"name":"_gauge","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"set_gauge_type","inputs":[{"name":"_gauge","type":"address"},{"name":"_type","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_verifier","inputs":[{"name":"_verifier","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"_future_owner","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[],"outputs":[]},{"stateMutability":"view","type":"function","name":"verifier","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"future_owner","inputs":[],"outputs":[{"name":"","type":"address"}]}]
Contract Creation Code
346100405733600255337fcfaaa26691e16e66e73290fc725eee1a6b4e0e693a1640484937aac25ffb55a45f6040a261024b6100446100003961024b610000f35b5f80fd5f3560e01c60026007820660011b61023d01601e395f51565b632b7ac3f3811861023557346102395760015460405260206040f3610235565b638da5cb5b811861023557346102395760025460405260206040f3610235565b631ec0cdc1811861023557346102395760035460405260206040f3610235565b6325fa5d13811861023557602436103417610239576004358060a01c610239576040525f6040516020525f5260405f20546001810381811161023957905060605260206060f3610235565b63c56b04f3811861015457604436103417610239576004358060a01c610239576040523360025481186100f75760016100fe565b6001548118155b90501561023957602435600181018181106102395790505f6040516020525f5260405f20556040517f41daf0121324e37f4b92bd81b8e3b205709804a47cf55fff8b91f33d6482b8e460243560605260206060a2005b636b441a40811861023557602436103417610239576004358060a01c6102395760405260025433186102395760405160035500610235565b63e37c66d1811861023557602436103417610239576004358060a01c610239576040526002543318610239576040516001557ff7b3610989c397edaf17df30d264c265ec3cf32c46bcc3ccd0acb8e32bdd1c3660405160605260206060a100610235565b63e5ea47b8811861023557346102395760035433186102395733600255337fcfaaa26691e16e66e73290fc725eee1a6b4e0e693a1640484937aac25ffb55a45f6040a2005b5f5ffd5b5f80fd018c0018003801f0007800c300588419024b810e00a16576797065728300030a0014
Deployed Bytecode
0x5f3560e01c60026007820660011b61023d01601e395f51565b632b7ac3f3811861023557346102395760015460405260206040f3610235565b638da5cb5b811861023557346102395760025460405260206040f3610235565b631ec0cdc1811861023557346102395760035460405260206040f3610235565b6325fa5d13811861023557602436103417610239576004358060a01c610239576040525f6040516020525f5260405f20546001810381811161023957905060605260206060f3610235565b63c56b04f3811861015457604436103417610239576004358060a01c610239576040523360025481186100f75760016100fe565b6001548118155b90501561023957602435600181018181106102395790505f6040516020525f5260405f20556040517f41daf0121324e37f4b92bd81b8e3b205709804a47cf55fff8b91f33d6482b8e460243560605260206060a2005b636b441a40811861023557602436103417610239576004358060a01c6102395760405260025433186102395760405160035500610235565b63e37c66d1811861023557602436103417610239576004358060a01c610239576040526002543318610239576040516001557ff7b3610989c397edaf17df30d264c265ec3cf32c46bcc3ccd0acb8e32bdd1c3660405160605260206060a100610235565b63e5ea47b8811861023557346102395760035433186102395733600255337fcfaaa26691e16e66e73290fc725eee1a6b4e0e693a1640484937aac25ffb55a45f6040a2005b5f5ffd5b5f80fd018c0018003801f0007800c30058
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.