Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 15 from a total of 15 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Deploy_gauge | 21169857 | 475 days ago | IN | 0 ETH | 0.00654997 | ||||
| Deploy_gauge | 20840690 | 521 days ago | IN | 0 ETH | 0.00355519 | ||||
| Deploy_gauge | 20378587 | 585 days ago | IN | 0 ETH | 0.00095876 | ||||
| Deploy_gauge | 20378582 | 585 days ago | IN | 0 ETH | 0.000909 | ||||
| Deploy_gauge | 20378578 | 585 days ago | IN | 0 ETH | 0.00092493 | ||||
| Deploy_gauge | 20285307 | 598 days ago | IN | 0 ETH | 0.00153769 | ||||
| Deploy_gauge | 20039310 | 633 days ago | IN | 0 ETH | 0.00337424 | ||||
| Deploy_gauge | 20039303 | 633 days ago | IN | 0 ETH | 0.00373187 | ||||
| Deploy_gauge | 19574425 | 698 days ago | IN | 0 ETH | 0.00561233 | ||||
| Deploy_gauge | 19574422 | 698 days ago | IN | 0 ETH | 0.00634615 | ||||
| Deploy_gauge | 19574418 | 698 days ago | IN | 0 ETH | 0.00603815 | ||||
| Set_management | 19574060 | 698 days ago | IN | 0 ETH | 0.00096388 | ||||
| Set_implementati... | 19574055 | 698 days ago | IN | 0 ETH | 0.00110074 | ||||
| Set_legacy_gauge... | 19574051 | 698 days ago | IN | 0 ETH | 0.00290901 | ||||
| Set_gauge_owner | 19574046 | 698 days ago | IN | 0 ETH | 0.00058677 |
Latest 11 internal transactions
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| 0x602d3d81 | 21169857 | 475 days ago | Contract Creation | 0 ETH | |||
| 0x602d3d81 | 20840690 | 521 days ago | Contract Creation | 0 ETH | |||
| 0x602d3d81 | 20378587 | 585 days ago | Contract Creation | 0 ETH | |||
| 0x602d3d81 | 20378582 | 585 days ago | Contract Creation | 0 ETH | |||
| 0x602d3d81 | 20378578 | 585 days ago | Contract Creation | 0 ETH | |||
| 0x602d3d81 | 20285307 | 598 days ago | Contract Creation | 0 ETH | |||
| 0x602d3d81 | 20039310 | 633 days ago | Contract Creation | 0 ETH | |||
| 0x602d3d81 | 20039303 | 633 days ago | Contract Creation | 0 ETH | |||
| 0x602d3d81 | 19574425 | 698 days ago | Contract Creation | 0 ETH | |||
| 0x602d3d81 | 19574422 | 698 days ago | Contract Creation | 0 ETH | |||
| 0x602d3d81 | 19574418 | 698 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
Gauge factory
Compiler Version
vyper:0.3.10
Contract Source Code (Vyper language format)
# @version 0.3.10
"""
@title Gauge factory
@author Yearn Finance
@license GNU AGPLv3
@notice
Permissionless deployment of gauges.
Gauges are minimal proxies to a gauge implementation contract
"""
interface Gauge:
def initialize(_asset: address, _owner: address, _controller: address, _data: Bytes[1024]): nonpayable
management: public(address)
pending_management: public(address)
version: public(uint256)
implementation: public(address)
gauge_owner: public(address)
controller: public(address)
gauge_versions: public(HashMap[address, uint256])
event GaugeDeployed:
asset: indexed(address)
gauge: address
event SetImplementation:
version: uint256
implementation: address
event SetGaugeOwner:
owner: address
event SetController:
controller: address
event PendingManagement:
management: indexed(address)
event SetManagement:
management: indexed(address)
event SetLegacyGauge:
gauge: address
@external
def __init__(_controller: address):
"""
@notice Constructor
@param _controller Gauge controller
"""
self.management = msg.sender
self.gauge_owner = msg.sender
self.version = 1
self.controller = _controller
@external
def deploy_gauge(_asset: address, _data: Bytes[1024] = b"") -> address:
"""
@notice Deploy a new gauge
@param _asset The underlying asset for the gauge
@param _data Additional data to pass on to the gauge during initialization (unused)
"""
assert _asset != empty(address)
version: uint256 = self.version
assert version > 1
gauge: address = create_minimal_proxy_to(self.implementation)
Gauge(gauge).initialize(_asset, self.gauge_owner, self.controller, _data)
self.gauge_versions[gauge] = version
log GaugeDeployed(_asset, gauge)
return gauge
@external
def set_implementation(_implementation: address) -> uint256:
"""
@notice Set a new gauge implementation contract
@param _implementation Implementation contract address
@return New gauge version number
@dev Only callable by management
"""
assert msg.sender == self.management
assert _implementation != empty(address)
version: uint256 = self.version + 1
self.version = version
self.implementation = _implementation
log SetImplementation(version, _implementation)
return version
@external
def set_gauge_owner(_gauge_owner: address):
"""
@notice Set a new owner for future gauges
@param _gauge_owner New gauge owner
@dev Only callable by management
"""
assert msg.sender == self.management
self.gauge_owner = _gauge_owner
log SetGaugeOwner(_gauge_owner)
@external
def set_controller(_controller: address):
"""
@notice Set a new gauge controller
@param _controller New gauge controller
@dev Only callable by management
"""
assert msg.sender == self.management
assert _controller != empty(address)
self.controller = _controller
log SetController(_controller)
@external
def set_legacy_gauges(_gauges: DynArray[address, 8]):
"""
@notice Mark gauges as legacy
@param _gauges Gauges to be marked
@dev Only callable by management
"""
assert msg.sender == self.management
for gauge in _gauges:
assert self.gauge_versions[gauge] == 0
self.gauge_versions[gauge] = 1
log SetLegacyGauge(gauge)
@external
def set_management(_management: address):
"""
@notice
Set the pending management address.
Needs to be accepted by that account separately to transfer management over
@param _management New pending management address
"""
assert msg.sender == self.management
self.pending_management = _management
log PendingManagement(_management)
@external
def accept_management():
"""
@notice
Accept management role.
Can only be called by account previously marked as pending management by current management
"""
assert msg.sender == self.pending_management
self.pending_management = empty(address)
self.management = msg.sender
log SetManagement(msg.sender)Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"name":"GaugeDeployed","inputs":[{"name":"asset","type":"address","indexed":true},{"name":"gauge","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"SetImplementation","inputs":[{"name":"version","type":"uint256","indexed":false},{"name":"implementation","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"SetGaugeOwner","inputs":[{"name":"owner","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"SetController","inputs":[{"name":"controller","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"PendingManagement","inputs":[{"name":"management","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"name":"SetManagement","inputs":[{"name":"management","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"name":"SetLegacyGauge","inputs":[{"name":"gauge","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_controller","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"deploy_gauge","inputs":[{"name":"_asset","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"nonpayable","type":"function","name":"deploy_gauge","inputs":[{"name":"_asset","type":"address"},{"name":"_data","type":"bytes"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"nonpayable","type":"function","name":"set_implementation","inputs":[{"name":"_implementation","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"set_gauge_owner","inputs":[{"name":"_gauge_owner","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_controller","inputs":[{"name":"_controller","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_legacy_gauges","inputs":[{"name":"_gauges","type":"address[]"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_management","inputs":[{"name":"_management","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"accept_management","inputs":[],"outputs":[]},{"stateMutability":"view","type":"function","name":"management","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"pending_management","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"implementation","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"gauge_owner","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"controller","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"gauge_versions","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]}]Contract Creation Code
3461003c5760206106335f395f518060a01c61003c57604052335f553360045560016002556040516005556105de610040610000396105de610000f35b5f80fd5f3560e01c60026012820660011b6105ba01601e395f51565b6388a8d60281186105b257346105b6575f5460405260206040f36105b2565b63770817ec811861005357346105b65760015460405260206040f35b63759be10c81186105b257346105b65760015433186105b6575f600155335f55337fafe23f9e1f603b288748a507d5a993957e9f14313a5889d5a070851299939d595f6040a2006105b2565b6354fd4d5081186100bb57346105b65760025460405260206040f35b6391b10ffa81186105b2576024361034176105b6576004358060a01c6105b6576040525f5433186105b657604051156105b6576040516005557f4ff638452bbf33c012645d18ae6f05515ff5f2d1dfb0cece8cbf018c60903f7060405160605260206060a1006105b2565b635c60da1b811861014257346105b65760035460405260206040f35b6320a2806f81186105b2576064361034176105b6576024356004016104008135116105b6576020813501808260603750505b6004358060a01c6105b657604052604051156105b6576002546104a05260026104a051106105b6577f602d3d8160093d39f3363d3d373d3d3d363d73000000000000000000000000006104e05260035460601b6104f3527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006105075260366104e05ff080156105b6576104c0526104c05163246581f76104e052608060405161050052600454610520526005546105405280610560528061050001602060605101808282606060045afa50508051806020830101601f825f03163682375050601f19601f82516020010116905081015050803b156105b6575f6104e06104a46104fc5f855af1610286573d5f5f3e3d5ffd5b506104a05160066104c0516020525f5260405f20556040517f84c1e815d16f55e70a8f12eb8017c6b7d2e5818e20c50f2a1ab8dfb499bbef816104c0516104e05260206104e0a260206104c0f36105b2565b633bcc0d6081186105b257346105b65760045460405260206040f36105b2565b63f77c479181186105b257346105b65760055460405260206040f36105b2565b63a0d4b9078118610353576024361034176105b6576004358060a01c6105b65760405260066040516020525f5260405f205460605260206060f35b63db8841f981186105b2576024361034176105b6576004358060a01c6105b6576040525f5433186105b6576040516004557fe7d030fd2f522eab3cc530fbeac1ac5bfca50103f86598e27fd68858b9ec945e60405160605260206060a1006105b2565b6396bebb3481186103d4576024361034176105b6575f606052610174565b63fd066ecc81186105b2576024361034176105b6576004358060a01c6105b6576040525f5433186105b6576040516001556040517fe7b5cc087e6e47e33e86bdfe4720b7e849891938b18ff6e0c3f92299de79e60c5f6060a2006105b2565b634cd69da081186105b2576024361034176105b6576004358060a01c6105b6576040525f5433186105b657604051156105b657600254600181018181106105b65790506060526060516002556040516003557f4fd8aff94c186c46f9cb59b997817eef25192df5239dcd06745f371c72b66d8560605160805260405160a05260406080a160206060f36105b2565b63db50956d81186105b2576044361034176105b65760043560040160088135116105b65780355f81600881116105b657801561051e57905b8060051b6020850101358060a01c6105b6578160051b606001526001018181186104f9575b50508060405250505f5433186105b6575f604051600881116105b65780156105ae57905b8060051b60600151610160526006610160516020525f5260405f20546105b65760016006610160516020525f5260405f20557ff3c0dc6dc3817acb93f08bfd8574aa71a8a74fa39deb4995f798a9c765fff65d61016051610180526020610180a1600101818118610542575b5050005b5f5ffd5b5f80fd05b205b2009f05b2043302f802d80126003705b2001805b203b605b205b2031805b204c1841905de81182400a16576797065728300030a001500000000000000000000000046b38522422d597ddbaa2d6e98d6c9b397028d5b
Deployed Bytecode
0x5f3560e01c60026012820660011b6105ba01601e395f51565b6388a8d60281186105b257346105b6575f5460405260206040f36105b2565b63770817ec811861005357346105b65760015460405260206040f35b63759be10c81186105b257346105b65760015433186105b6575f600155335f55337fafe23f9e1f603b288748a507d5a993957e9f14313a5889d5a070851299939d595f6040a2006105b2565b6354fd4d5081186100bb57346105b65760025460405260206040f35b6391b10ffa81186105b2576024361034176105b6576004358060a01c6105b6576040525f5433186105b657604051156105b6576040516005557f4ff638452bbf33c012645d18ae6f05515ff5f2d1dfb0cece8cbf018c60903f7060405160605260206060a1006105b2565b635c60da1b811861014257346105b65760035460405260206040f35b6320a2806f81186105b2576064361034176105b6576024356004016104008135116105b6576020813501808260603750505b6004358060a01c6105b657604052604051156105b6576002546104a05260026104a051106105b6577f602d3d8160093d39f3363d3d373d3d3d363d73000000000000000000000000006104e05260035460601b6104f3527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006105075260366104e05ff080156105b6576104c0526104c05163246581f76104e052608060405161050052600454610520526005546105405280610560528061050001602060605101808282606060045afa50508051806020830101601f825f03163682375050601f19601f82516020010116905081015050803b156105b6575f6104e06104a46104fc5f855af1610286573d5f5f3e3d5ffd5b506104a05160066104c0516020525f5260405f20556040517f84c1e815d16f55e70a8f12eb8017c6b7d2e5818e20c50f2a1ab8dfb499bbef816104c0516104e05260206104e0a260206104c0f36105b2565b633bcc0d6081186105b257346105b65760045460405260206040f36105b2565b63f77c479181186105b257346105b65760055460405260206040f36105b2565b63a0d4b9078118610353576024361034176105b6576004358060a01c6105b65760405260066040516020525f5260405f205460605260206060f35b63db8841f981186105b2576024361034176105b6576004358060a01c6105b6576040525f5433186105b6576040516004557fe7d030fd2f522eab3cc530fbeac1ac5bfca50103f86598e27fd68858b9ec945e60405160605260206060a1006105b2565b6396bebb3481186103d4576024361034176105b6575f606052610174565b63fd066ecc81186105b2576024361034176105b6576004358060a01c6105b6576040525f5433186105b6576040516001556040517fe7b5cc087e6e47e33e86bdfe4720b7e849891938b18ff6e0c3f92299de79e60c5f6060a2006105b2565b634cd69da081186105b2576024361034176105b6576004358060a01c6105b6576040525f5433186105b657604051156105b657600254600181018181106105b65790506060526060516002556040516003557f4fd8aff94c186c46f9cb59b997817eef25192df5239dcd06745f371c72b66d8560605160805260405160a05260406080a160206060f36105b2565b63db50956d81186105b2576044361034176105b65760043560040160088135116105b65780355f81600881116105b657801561051e57905b8060051b6020850101358060a01c6105b6578160051b606001526001018181186104f9575b50508060405250505f5433186105b6575f604051600881116105b65780156105ae57905b8060051b60600151610160526006610160516020525f5260405f20546105b65760016006610160516020525f5260405f20557ff3c0dc6dc3817acb93f08bfd8574aa71a8a74fa39deb4995f798a9c765fff65d61016051610180526020610180a1600101818118610542575b5050005b5f5ffd5b5f80fd05b205b2009f05b2043302f802d80126003705b2001805b203b605b205b2031805b204c1
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000046b38522422d597ddbaa2d6e98d6c9b397028d5b
-----Decoded View---------------
Arg [0] : _controller (address): 0x46b38522422D597dDbAA2D6E98D6C9b397028d5B
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000046b38522422d597ddbaa2d6e98d6c9b397028d5b
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.