ETH Price: $3,072.27 (+0.63%)
Gas: 8 Gwei

Contract

0x0000000022D53366457F9d5E68Ec105046FC4383
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Get_registry163751482023-01-10 8:15:23465 days ago1673338523IN
Curve Finance: Address Provider
0 ETH0.000414617.72026827
Transfer160790462022-11-29 23:52:47506 days ago1669765967IN
Curve Finance: Address Provider
1 wei0.0002178710.37504678
Transfer160790302022-11-29 23:49:23506 days ago1669765763IN
Curve Finance: Address Provider
1 wei0.0002282410.86890262
Apply_transfer_o...149596272022-06-14 3:34:47675 days ago1655177687IN
Curve Finance: Address Provider
0 ETH0.0026620788.63847913
Set_address146223242022-04-20 13:59:23730 days ago1650463163IN
Curve Finance: Address Provider
0 ETH0.0027560357.04069194
Set_address145769202022-04-13 11:44:51737 days ago1649850291IN
Curve Finance: Address Provider
0 ETH0.0026591355.03510759
Set_address143163912022-03-03 21:18:15777 days ago1646342295IN
Curve Finance: Address Provider
0 ETH0.0023806549.27151165
Set_address142786022022-02-26 0:47:36783 days ago1645836456IN
Curve Finance: Address Provider
0 ETH0.0028200458.36546326
Add_new_id141741822022-02-09 21:02:01799 days ago1644440521IN
Curve Finance: Address Provider
0 ETH0.02074197123.5163382
Set_address139908602022-01-12 13:04:56828 days ago1641992696IN
Curve Finance: Address Provider
0 ETH0.00670817138.83682653
Set_address136716432021-11-23 15:29:33878 days ago1637681373IN
Curve Finance: Address Provider
0 ETH0.00702458145.38540801
Set_address136707272021-11-23 12:07:41878 days ago1637669261IN
Curve Finance: Address Provider
0 ETH0.00515286106.64704034
Set_address136608482021-11-21 22:37:29879 days ago1637534249IN
Curve Finance: Address Provider
0 ETH0.00545267112.85217444
Add_new_id136608042021-11-21 22:27:21879 days ago1637533641IN
Curve Finance: Address Provider
0 ETH0.02584336153.88360816
Set_address134371672021-10-17 18:57:10914 days ago1634497030IN
Curve Finance: Address Provider
0 ETH0.0043283289.58174638
Set_address133869632021-10-09 21:31:59922 days ago1633815119IN
Curve Finance: Address Provider
0 ETH0.00575953108.03040062
Set_address133868392021-10-09 21:02:35922 days ago1633813355IN
Curve Finance: Address Provider
0 ETH0.0046018486.31585455
Set_address132510552021-09-18 17:31:56944 days ago1631986316IN
Curve Finance: Address Provider
0 ETH0.0026956855.79163239
Set_address130184132021-08-13 18:17:18980 days ago1628878638IN
Curve Finance: Address Provider
0 ETH0.0019436940.2280425
Commit_transfer_...130184022021-08-13 18:15:03980 days ago1628878503IN
Curve Finance: Address Provider
0 ETH0.0028854841.39271671
Add_new_id123035142021-04-24 14:34:361091 days ago1619274876IN
Curve Finance: Address Provider
0 ETH0.0088983253
Set_address122012582021-04-08 20:09:241106 days ago1617912564IN
Curve Finance: Address Provider
0 ETH0.00511068106
Get_registry121362022021-03-29 20:08:321116 days ago1617048512IN
Curve Finance: Address Provider
0 ETH0.00404229184
Get_registry121362022021-03-29 20:08:321116 days ago1617048512IN
Curve Finance: Address Provider
0 ETH0.00397638181
Set_address120330242021-03-13 22:50:311132 days ago1615675831IN
Curve Finance: Address Provider
0 ETH0.004581106
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.7

Optimization Enabled:
N/A

Other Settings:
MIT license

Contract Source Code (Vyper language format)

# @version 0.2.7
"""
@title Curve Registry Address Provider
@license MIT
@author Curve.Fi
"""

event NewAddressIdentifier:
    id: indexed(uint256)
    addr: address
    description: String[64]

event AddressModified:
    id: indexed(uint256)
    new_address: address
    version: uint256

event CommitNewAdmin:
    deadline: indexed(uint256)
    admin: indexed(address)

event NewAdmin:
    admin: indexed(address)


struct AddressInfo:
    addr: address
    is_active: bool
    version: uint256
    last_modified: uint256
    description: String[64]


registry: address
admin: public(address)
transfer_ownership_deadline: public(uint256)
future_admin: public(address)

queue_length: uint256
get_id_info: public(HashMap[uint256, AddressInfo])


@external
def __init__(_admin: address):
    self.admin = _admin
    self.queue_length = 1
    self.get_id_info[0].description = "Main Registry"


@view
@external
def get_registry() -> address:
    """
    @notice Get the address of the main registry contract
    @dev This is a gas-efficient way of calling `AddressProvider.get_address(0)`
    @return address main registry contract
    """
    return self.registry


@view
@external
def max_id() -> uint256:
    """
    @notice Get the highest ID set within the address provider
    @return uint256 max ID
    """
    return self.queue_length - 1


@view
@external
def get_address(_id: uint256) -> address:
    """
    @notice Fetch the address associated with `_id`
    @dev Returns ZERO_ADDRESS if `_id` has not been defined, or has been unset
    @param _id Identifier to fetch an address for
    @return Current address associated to `_id`
    """
    return self.get_id_info[_id].addr


@external
def add_new_id(_address: address, _description: String[64]) -> uint256:
    """
    @notice Add a new identifier to the registry
    @dev ID is auto-incremented
    @param _address Initial address to assign to new identifier
    @param _description Human-readable description of the identifier
    @return uint256 identifier
    """
    assert msg.sender == self.admin  # dev: admin-only function
    assert _address.is_contract  # dev: not a contract

    id: uint256 = self.queue_length
    self.get_id_info[id] = AddressInfo({
        addr: _address,
        is_active: True,
        version: 1,
        last_modified: block.timestamp,
        description: _description
    })
    self.queue_length = id + 1

    log NewAddressIdentifier(id, _address, _description)

    return id


@external
def set_address(_id: uint256, _address: address) -> bool:
    """
    @notice Set a new address for an existing identifier
    @param _id Identifier to set the new address for
    @param _address Address to set
    @return bool success
    """
    assert msg.sender == self.admin  # dev: admin-only function
    assert _address.is_contract  # dev: not a contract
    assert self.queue_length > _id  # dev: id does not exist

    version: uint256 = self.get_id_info[_id].version + 1

    self.get_id_info[_id].addr = _address
    self.get_id_info[_id].is_active = True
    self.get_id_info[_id].version = version
    self.get_id_info[_id].last_modified = block.timestamp

    if _id == 0:
        self.registry = _address

    log AddressModified(_id, _address, version)

    return True


@external
def unset_address(_id: uint256) -> bool:
    """
    @notice Unset an existing identifier
    @dev An identifier cannot ever be removed, it can only have the
         address unset so that it returns ZERO_ADDRESS
    @param _id Identifier to unset
    @return bool success
    """
    assert msg.sender == self.admin  # dev: admin-only function
    assert self.get_id_info[_id].is_active  # dev: not active

    self.get_id_info[_id].is_active = False
    self.get_id_info[_id].addr = ZERO_ADDRESS
    self.get_id_info[_id].last_modified = block.timestamp

    if _id == 0:
        self.registry = ZERO_ADDRESS

    log AddressModified(_id, ZERO_ADDRESS, self.get_id_info[_id].version)

    return True


@external
def commit_transfer_ownership(_new_admin: address) -> bool:
    """
    @notice Initiate a transfer of contract ownership
    @dev Once initiated, the actual transfer may be performed three days later
    @param _new_admin Address of the new owner account
    @return bool success
    """
    assert msg.sender == self.admin  # dev: admin-only function
    assert self.transfer_ownership_deadline == 0  # dev: transfer already active

    deadline: uint256 = block.timestamp + 3*86400
    self.transfer_ownership_deadline = deadline
    self.future_admin = _new_admin

    log CommitNewAdmin(deadline, _new_admin)

    return True


@external
def apply_transfer_ownership() -> bool:
    """
    @notice Finalize a transfer of contract ownership
    @dev May only be called by the current owner, three days after a
         call to `commit_transfer_ownership`
    @return bool success
    """
    assert msg.sender == self.admin  # dev: admin-only function
    assert self.transfer_ownership_deadline != 0  # dev: transfer not active
    assert block.timestamp >= self.transfer_ownership_deadline  # dev: now < deadline

    new_admin: address = self.future_admin
    self.admin = new_admin
    self.transfer_ownership_deadline = 0

    log NewAdmin(new_admin)

    return True


@external
def revert_transfer_ownership() -> bool:
    """
    @notice Revert a transfer of contract ownership
    @dev May only be called by the current owner
    @return bool success
    """
    assert msg.sender == self.admin  # dev: admin-only function

    self.transfer_ownership_deadline = 0

    return True

Contract Security Audit

Contract ABI

[{"name":"NewAddressIdentifier","inputs":[{"type":"uint256","name":"id","indexed":true},{"type":"address","name":"addr","indexed":false},{"type":"string","name":"description","indexed":false}],"anonymous":false,"type":"event"},{"name":"AddressModified","inputs":[{"type":"uint256","name":"id","indexed":true},{"type":"address","name":"new_address","indexed":false},{"type":"uint256","name":"version","indexed":false}],"anonymous":false,"type":"event"},{"name":"CommitNewAdmin","inputs":[{"type":"uint256","name":"deadline","indexed":true},{"type":"address","name":"admin","indexed":true}],"anonymous":false,"type":"event"},{"name":"NewAdmin","inputs":[{"type":"address","name":"admin","indexed":true}],"anonymous":false,"type":"event"},{"outputs":[],"inputs":[{"type":"address","name":"_admin"}],"stateMutability":"nonpayable","type":"constructor"},{"name":"get_registry","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1061},{"name":"max_id","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1258},{"name":"get_address","outputs":[{"type":"address","name":""}],"inputs":[{"type":"uint256","name":"_id"}],"stateMutability":"view","type":"function","gas":1308},{"name":"add_new_id","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_address"},{"type":"string","name":"_description"}],"stateMutability":"nonpayable","type":"function","gas":291275},{"name":"set_address","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"uint256","name":"_id"},{"type":"address","name":"_address"}],"stateMutability":"nonpayable","type":"function","gas":182430},{"name":"unset_address","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"uint256","name":"_id"}],"stateMutability":"nonpayable","type":"function","gas":101348},{"name":"commit_transfer_ownership","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_new_admin"}],"stateMutability":"nonpayable","type":"function","gas":74048},{"name":"apply_transfer_ownership","outputs":[{"type":"bool","name":""}],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":60125},{"name":"revert_transfer_ownership","outputs":[{"type":"bool","name":""}],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":21400},{"name":"admin","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1331},{"name":"transfer_ownership_deadline","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1361},{"name":"future_admin","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1391},{"name":"get_id_info","outputs":[{"type":"address","name":"addr"},{"type":"bool","name":"is_active"},{"type":"uint256","name":"version"},{"type":"uint256","name":"last_modified"},{"type":"string","name":"description"}],"inputs":[{"type":"uint256","name":"arg0"}],"stateMutability":"view","type":"function","gas":12168}]

602061089561014039602061089560c03960c05160a01c1561002057600080fd5b610140516001556001600455600d610160527f4d61696e20526567697374727900000000000000000000000000000000000000610180526101608060046005600060e05260c052604060c02060c052602060c0200160c052602060c020602082510161012060006002818352015b826101205160200211156100a1576100c3565b61012051602002850151610120518501555b815160010180835281141561008e575b50505050505061087d56341561000a57600080fd5b6004361015610018576107a9565b600035601c5263a262904b600051141561003a5760005460005260206000f350005b630c6d784f600051141561006c5760045460018082101561005a57600080fd5b8082039050905060005260206000f350005b63493f4f74600051141561009e57600560043560e05260c052604060c02060c052602060c0205460005260206000f350005b63168f957960005114156102735760043560a01c156100bc57600080fd5b60606024356004016101403760406024356004013511156100dc57600080fd5b60015433146100ea57600080fd5b60006004353b116100fa57600080fd5b6004546101c05260056101c05160e05260c052604060c02060c052602060c02060043581556001600182015560016002820155426003820155610140806004830160c052602060c020602082510161012060006003818352015b8261012051602002111561016757610189565b61012051602002850151610120518501555b8151600101808352811415610154575b505050505050506101c05160018181830110156101a557600080fd5b808201905090506004556004356102205260406101e0526101e051610240526101408051602001806101e051610220018284600060045af16101e657600080fd5b50506101e05161022001518060206101e051610220010101818260206001820306601f820103905003368237505060206101e051610220015160206001820306601f82010390506101e05101016101e0526101c0517f5b0f9b31dc08c19adcc0181c1b97ad54a84487faf0a4fdcb88c8681724298af96101e051610220a26101c05160005260206000f350005b636a84cad060005114156103c45760243560a01c1561029157600080fd5b600154331461029f57600080fd5b60006024353b116102af57600080fd5b600435600454116102bf57600080fd5b6002600560043560e05260c052604060c02060c052602060c020015460018181830110156102ec57600080fd5b8082019050905061014052602435600560043560e05260c052604060c02060c052602060c0205560016001600560043560e05260c052604060c02060c052602060c0200155610140516002600560043560e05260c052604060c02060c052602060c0200155426003600560043560e05260c052604060c02060c052602060c0200155600435151561037e576024356000555b6024356101605261014051610180526004357fe7a6334c4f573efdf292d404d59adacec345f4f7c76495a034008edda0acef476040610160a2600160005260206000f350005b635eec0daa60005114156104c75760015433146103e057600080fd5b6001600560043560e05260c052604060c02060c052602060c020015461040557600080fd5b60006001600560043560e05260c052604060c02060c052602060c02001556000600560043560e05260c052604060c02060c052602060c02055426003600560043560e05260c052604060c02060c052602060c0200155600435151561046a5760006000555b6000610140526002600560043560e05260c052604060c02060c052602060c0200154610160526004357fe7a6334c4f573efdf292d404d59adacec345f4f7c76495a034008edda0acef476040610140a2600160005260206000f350005b636b441a4060005114156105665760043560a01c156104e557600080fd5b60015433146104f357600080fd5b6002541561050057600080fd5b426203f48081818301101561051457600080fd5b808201905090506101405261014051600255600435600355600435610140517f181aa3aa17d4cbf99265dd4443eba009433d3cde79d60164fde1d1a192beb93560006000a3600160005260206000f350005b636a1c05ae60005114156105ea57600154331461058257600080fd5b60006002541861059157600080fd5b6002544210156105a057600080fd5b60035461014052610140516001556000600255610140517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c60006000a2600160005260206000f350005b6386fbf193600051141561061857600154331461060657600080fd5b6000600255600160005260206000f350005b63f851a44060005114156106345760015460005260206000f350005b63e0a0b58660005114156106505760025460005260206000f350005b6317f7182a600051141561066c5760035460005260206000f350005b6392668ecb60005114156107a857600560043560e05260c052604060c0206101408060a081808560c052602060c0205481525050602082019150818060018660c052602060c020015481525050602082019150818060028660c052602060c020015481525050602082019150818060038660c052602060c0200154815250506020820191508082528083018060048660c052602060c020018060c052602060c02082602082540161012060006003818352015b8261012051602002111561073257610754565b61012051850154610120516020028501525b815160010180835281141561071f575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190508090509050905060c05260c051610140f39050005b5b60006000fd5b6100ce61087d036100ce6000396100ce61087d036000f30000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a

Deployed Bytecode

0x341561000a57600080fd5b6004361015610018576107a9565b600035601c5263a262904b600051141561003a5760005460005260206000f350005b630c6d784f600051141561006c5760045460018082101561005a57600080fd5b8082039050905060005260206000f350005b63493f4f74600051141561009e57600560043560e05260c052604060c02060c052602060c0205460005260206000f350005b63168f957960005114156102735760043560a01c156100bc57600080fd5b60606024356004016101403760406024356004013511156100dc57600080fd5b60015433146100ea57600080fd5b60006004353b116100fa57600080fd5b6004546101c05260056101c05160e05260c052604060c02060c052602060c02060043581556001600182015560016002820155426003820155610140806004830160c052602060c020602082510161012060006003818352015b8261012051602002111561016757610189565b61012051602002850151610120518501555b8151600101808352811415610154575b505050505050506101c05160018181830110156101a557600080fd5b808201905090506004556004356102205260406101e0526101e051610240526101408051602001806101e051610220018284600060045af16101e657600080fd5b50506101e05161022001518060206101e051610220010101818260206001820306601f820103905003368237505060206101e051610220015160206001820306601f82010390506101e05101016101e0526101c0517f5b0f9b31dc08c19adcc0181c1b97ad54a84487faf0a4fdcb88c8681724298af96101e051610220a26101c05160005260206000f350005b636a84cad060005114156103c45760243560a01c1561029157600080fd5b600154331461029f57600080fd5b60006024353b116102af57600080fd5b600435600454116102bf57600080fd5b6002600560043560e05260c052604060c02060c052602060c020015460018181830110156102ec57600080fd5b8082019050905061014052602435600560043560e05260c052604060c02060c052602060c0205560016001600560043560e05260c052604060c02060c052602060c0200155610140516002600560043560e05260c052604060c02060c052602060c0200155426003600560043560e05260c052604060c02060c052602060c0200155600435151561037e576024356000555b6024356101605261014051610180526004357fe7a6334c4f573efdf292d404d59adacec345f4f7c76495a034008edda0acef476040610160a2600160005260206000f350005b635eec0daa60005114156104c75760015433146103e057600080fd5b6001600560043560e05260c052604060c02060c052602060c020015461040557600080fd5b60006001600560043560e05260c052604060c02060c052602060c02001556000600560043560e05260c052604060c02060c052602060c02055426003600560043560e05260c052604060c02060c052602060c0200155600435151561046a5760006000555b6000610140526002600560043560e05260c052604060c02060c052602060c0200154610160526004357fe7a6334c4f573efdf292d404d59adacec345f4f7c76495a034008edda0acef476040610140a2600160005260206000f350005b636b441a4060005114156105665760043560a01c156104e557600080fd5b60015433146104f357600080fd5b6002541561050057600080fd5b426203f48081818301101561051457600080fd5b808201905090506101405261014051600255600435600355600435610140517f181aa3aa17d4cbf99265dd4443eba009433d3cde79d60164fde1d1a192beb93560006000a3600160005260206000f350005b636a1c05ae60005114156105ea57600154331461058257600080fd5b60006002541861059157600080fd5b6002544210156105a057600080fd5b60035461014052610140516001556000600255610140517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c60006000a2600160005260206000f350005b6386fbf193600051141561061857600154331461060657600080fd5b6000600255600160005260206000f350005b63f851a44060005114156106345760015460005260206000f350005b63e0a0b58660005114156106505760025460005260206000f350005b6317f7182a600051141561066c5760035460005260206000f350005b6392668ecb60005114156107a857600560043560e05260c052604060c0206101408060a081808560c052602060c0205481525050602082019150818060018660c052602060c020015481525050602082019150818060028660c052602060c020015481525050602082019150818060038660c052602060c0200154815250506020820191508082528083018060048660c052602060c020018060c052602060c02082602082540161012060006003818352015b8261012051602002111561073257610754565b61012051850154610120516020028501525b815160010180835281141561071f575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190508090509050905060c05260c051610140f39050005b5b60006000fd

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a

-----Decoded View---------------
Arg [0] : _admin (address): 0x7EeAC6CDdbd1D0B8aF061742D41877D7F707289a

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.