ETH Price: $3,772.68 (+5.70%)

Contract

0x19854C9A5fFa8116f48f984bDF946fB9CEa9B5f7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw213514622024-12-07 15:19:113 days ago1733584751IN
0x19854C9A...9CEa9B5f7
0 ETH0.0032083713.82590652
Withdraw213461502024-12-06 21:29:234 days ago1733520563IN
0x19854C9A...9CEa9B5f7
0 ETH0.0056157324.2
Withdraw213356872024-12-05 10:26:116 days ago1733394371IN
0x19854C9A...9CEa9B5f7
0 ETH0.0061448618.99205528
Withdraw213043522024-12-01 1:23:4710 days ago1733016227IN
0x19854C9A...9CEa9B5f7
0 ETH0.0028535913.27529659
Withdraw212998492024-11-30 10:18:2311 days ago1732961903IN
0x19854C9A...9CEa9B5f7
0 ETH0.001376965.93378675
Withdraw212925132024-11-29 9:39:3512 days ago1732873175IN
0x19854C9A...9CEa9B5f7
0 ETH0.001702597.3370492
Withdraw212850212024-11-28 8:31:3513 days ago1732782695IN
0x19854C9A...9CEa9B5f7
0 ETH0.002448717.9906117
Withdraw212645042024-11-25 11:34:1116 days ago1732534451IN
0x19854C9A...9CEa9B5f7
0 ETH0.0032356615.05276867
Withdraw212071492024-11-17 11:32:2324 days ago1731843143IN
0x19854C9A...9CEa9B5f7
0 ETH0.001808347.79274502
Withdraw211648332024-11-11 13:46:5930 days ago1731332819IN
0x19854C9A...9CEa9B5f7
0 ETH0.004550819.61087618
Withdraw211647352024-11-11 13:27:1130 days ago1731331631IN
0x19854C9A...9CEa9B5f7
0 ETH0.004076818.96584231
Withdraw211493542024-11-09 9:59:1132 days ago1731146351IN
0x19854C9A...9CEa9B5f7
0 ETH0.0024124810.39617173
Withdraw211230292024-11-05 17:46:1135 days ago1730828771IN
0x19854C9A...9CEa9B5f7
0 ETH0.0030979213.34994731
Withdraw211092232024-11-03 19:32:1137 days ago1730662331IN
0x19854C9A...9CEa9B5f7
0 ETH0.001131594.87639763
Withdraw211083122024-11-03 16:29:1137 days ago1730651351IN
0x19854C9A...9CEa9B5f7
0 ETH0.001616786.96725049
Withdraw210451282024-10-25 20:49:4746 days ago1729889387IN
0x19854C9A...9CEa9B5f7
0 ETH0.001278145.98790992
Withdraw210221502024-10-22 15:55:2349 days ago1729612523IN
0x19854C9A...9CEa9B5f7
0 ETH0.0039194317
Withdraw210061942024-10-20 10:28:3552 days ago1729420115IN
0x19854C9A...9CEa9B5f7
0 ETH0.001712717.38062901
Withdraw210026012024-10-19 22:27:3552 days ago1729376855IN
0x19854C9A...9CEa9B5f7
0 ETH0.001605356.91798614
Withdraw209816182024-10-17 0:11:3555 days ago1729123895IN
0x19854C9A...9CEa9B5f7
0 ETH0.0048947815.97258068
Create_lock209662732024-10-14 20:44:4757 days ago1728938687IN
0x19854C9A...9CEa9B5f7
0 ETH0.0055159715.9315425
Withdraw209092102024-10-06 21:30:2365 days ago1728250223IN
0x19854C9A...9CEa9B5f7
0 ETH0.002131996.62009824
Withdraw208369112024-09-26 19:33:4775 days ago1727379227IN
0x19854C9A...9CEa9B5f7
0 ETH0.0045508219.61098728
Withdraw208285732024-09-25 15:40:2376 days ago1727278823IN
0x19854C9A...9CEa9B5f7
0 ETH0.0051052122
Withdraw207761672024-09-18 8:04:1184 days ago1726646651IN
0x19854C9A...9CEa9B5f7
0 ETH0.002078416.42379939
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.3.1

Optimization Enabled:
N/A

Other Settings:
default evmVersion, MIT license

Contract Source Code (Vyper language format)

# @version 0.3.1
"""
@title Voting Escrow
@author Curve Finance
@license MIT
@notice Votes have a weight depending on time, so that users are
        committed to the future of (whatever they are voting for)
@dev Vote weight decays linearly over time. Lock time cannot be
     more than `MAXTIME` (2 years).
"""

# Voting escrow to have time-weighted votes
# Votes have a weight depending on time, so that users are committed
# to the future of (whatever they are voting for).
# The weight in this implementation is linear, and lock cannot be more than maxtime:
# w ^
# 1 +        /
#   |      /
#   |    /
#   |  /
#   |/
# 0 +--------+------> time
#       maxtime (2 years?)

struct Point:
    bias: int128
    slope: int128  # - dweight / dt
    ts: uint256
    blk: uint256  # block
# We cannot really do block numbers per se b/c slope is per time, not per block
# and per block could be fairly bad b/c Ethereum changes blocktimes.
# What we can do is to extrapolate ***At functions

struct LockedBalance:
    amount: int128
    end: uint256


interface ERC20:
    def decimals() -> uint256: view
    def name() -> String[64]: view
    def symbol() -> String[32]: view
    def transfer(to: address, amount: uint256) -> bool: nonpayable
    def transferFrom(spender: address, to: address, amount: uint256) -> bool: nonpayable
    def approve(spender: address, amount: uint256) -> bool: nonpayable


interface IVeRBNRewards:
    def updateReward(_account: address) -> bool: nonpayable
    def donate(_amount: uint256) -> bool: nonpayable

# Interface for checking whether address belongs to a whitelisted
# type of a smart wallet.
# When new types are added - the whole contract is changed
# The check() method is modifying to be able to use caching
# for individual wallet addresses
interface SmartWalletChecker:
    def check(addr: address) -> bool: nonpayable

DEPOSIT_FOR_TYPE: constant(int128) = 0
CREATE_LOCK_TYPE: constant(int128) = 1
INCREASE_LOCK_AMOUNT: constant(int128) = 2
INCREASE_UNLOCK_TIME: constant(int128) = 3


event CommitOwnership:
    admin: address

event ApplyOwnership:
    admin: address

event FundsUnlocked:
    funds_unlocked: bool

event Deposit:
    deposit_from: indexed(address)
    provider: indexed(address)
    value: uint256
    locktime: indexed(uint256)
    type: int128
    ts: uint256

event Withdraw:
    provider: indexed(address)
    value: uint256
    ts: uint256

event Supply:
    prevSupply: uint256
    supply: uint256


WEEK: constant(uint256) = 7 * 86400  # all future times are rounded by week
MAXTIME: constant(uint256) = 2 * 365 * 86400  # 2 years
MULTIPLIER: constant(uint256) = 10 ** 18

token: public(address)
supply: public(uint256)

locked: public(HashMap[address, LockedBalance])

epoch: public(uint256)
point_history: public(Point[100000000000000000000000000000])  # epoch -> unsigned point
user_point_history: public(HashMap[address, Point[1000000000]])  # user -> Point[user_epoch]
user_point_epoch: public(HashMap[address, uint256])
slope_changes: public(HashMap[uint256, int128])  # time -> signed slope change

name: public(String[64])
symbol: public(String[32])
decimals: public(uint256)

# Checker for whitelisted (smart contract) wallets which are allowed to deposit
# The goal is to prevent tokenizing the escrow
future_smart_wallet_checker: public(address)
smart_wallet_checker: public(address)

admin: public(address)  # Can and will be a smart contract
future_admin: public(address)

is_unlocked: public(bool)

reward_pool: public(address)

@external
def __init__(token_addr: address, _name: String[64], _symbol: String[32], _admin: address):
    """
    @notice Contract constructor
    @param token_addr `ERC20CRV` token address
    @param _name Token name
    @param _symbol Token symbol
    @param _admin Admin for contract
    """
    self.admin = _admin
    self.token = token_addr
    self.point_history[0].blk = block.number
    self.point_history[0].ts = block.timestamp

    _decimals: uint256 = ERC20(token_addr).decimals()
    assert _decimals <= 255
    self.decimals = _decimals

    self.name = _name
    self.symbol = _symbol

@external
def set_reward_pool(addr: address):
  assert msg.sender == self.admin or self.reward_pool == ZERO_ADDRESS # dev: admin only
  assert addr != ZERO_ADDRESS
  self.reward_pool = addr

@external
def commit_transfer_ownership(addr: address):
    """
    @notice Transfer ownership of VotingEscrow contract to `addr`
    @param addr Address to have ownership transferred to
    """
    assert msg.sender == self.admin  # dev: admin only
    self.future_admin = addr
    log CommitOwnership(addr)


@external
def apply_transfer_ownership():
    """
    @notice Apply ownership transfer
    """
    assert msg.sender == self.admin  # dev: admin only
    _admin: address = self.future_admin
    assert _admin != ZERO_ADDRESS  # dev: admin not set
    self.admin = _admin
    log ApplyOwnership(_admin)


@external
def commit_smart_wallet_checker(addr: address):
    """
    @notice Set an external contract to check for approved smart contract wallets
    @param addr Address of Smart contract checker
    """
    assert msg.sender == self.admin
    self.future_smart_wallet_checker = addr


@external
def apply_smart_wallet_checker():
    """
    @notice Apply setting external contract to check approved smart contract wallets
    """
    assert msg.sender == self.admin
    self.smart_wallet_checker = self.future_smart_wallet_checker

@external
def set_funds_unlocked(_funds_unlocked: bool):
  """
  @notice Toggle fund lock
  """
  assert msg.sender == self.admin  # dev: admin only
  self.is_unlocked = _funds_unlocked
  log FundsUnlocked(_funds_unlocked)

@internal
def assert_not_contract(addr: address):
    """
    @notice Check if the call is from a whitelisted smart contract, revert if not
    @param addr Address to be checked
    """
    if addr != tx.origin:
        checker: address = self.smart_wallet_checker
        if checker != ZERO_ADDRESS:
            if SmartWalletChecker(checker).check(addr):
                return
        raise "Smart contract depositors not allowed"


@external
@view
def get_last_user_slope(addr: address) -> int128:
    """
    @notice Get the most recently recorded rate of voting power decrease for `addr`
    @param addr Address of the user wallet
    @return Value of the slope
    """
    uepoch: uint256 = self.user_point_epoch[addr]
    return self.user_point_history[addr][uepoch].slope


@external
@view
def user_point_history__ts(_addr: address, _idx: uint256) -> uint256:
    """
    @notice Get the timestamp for checkpoint `_idx` for `_addr`
    @param _addr User wallet address
    @param _idx User epoch number
    @return Epoch time of the checkpoint
    """
    return self.user_point_history[_addr][_idx].ts


@external
@view
def locked__end(_addr: address) -> uint256:
    """
    @notice Get timestamp when `_addr`'s lock finishes
    @param _addr User wallet
    @return Epoch time of the lock end
    """
    return self.locked[_addr].end


@internal
def _checkpoint(addr: address, old_locked: LockedBalance, new_locked: LockedBalance):
    """
    @notice Record global and per-user data to checkpoint
    @param addr User's wallet address. No user checkpoint if 0x0
    @param old_locked Pevious locked amount / end lock time for the user
    @param new_locked New locked amount / end lock time for the user
    """
    u_old: Point = empty(Point)
    u_new: Point = empty(Point)
    old_dslope: int128 = 0
    new_dslope: int128 = 0
    _epoch: uint256 = self.epoch

    if addr != ZERO_ADDRESS:
        # Calculate slopes and biases
        # Kept at zero when they have to
        if old_locked.end > block.timestamp and old_locked.amount > 0:
            u_old.slope = old_locked.amount / MAXTIME
            u_old.bias = u_old.slope * convert(old_locked.end - block.timestamp, int128)
        if new_locked.end > block.timestamp and new_locked.amount > 0:
            u_new.slope = new_locked.amount / MAXTIME
            u_new.bias = u_new.slope * convert(new_locked.end - block.timestamp, int128)

        # Read values of scheduled changes in the slope
        # old_locked.end can be in the past and in the future
        # new_locked.end can ONLY by in the FUTURE unless everything expired: than zeros
        old_dslope = self.slope_changes[old_locked.end]
        if new_locked.end != 0:
            if new_locked.end == old_locked.end:
                new_dslope = old_dslope
            else:
                new_dslope = self.slope_changes[new_locked.end]

    last_point: Point = Point({bias: 0, slope: 0, ts: block.timestamp, blk: block.number})
    if _epoch > 0:
        last_point = self.point_history[_epoch]
    last_checkpoint: uint256 = last_point.ts
    # initial_last_point is used for extrapolation to calculate block number
    # (approximately, for *At methods) and save them
    # as we cannot figure that out exactly from inside the contract
    initial_last_point: Point = last_point
    block_slope: uint256 = 0  # dblock/dt
    if block.timestamp > last_point.ts:
        block_slope = MULTIPLIER * (block.number - last_point.blk) / (block.timestamp - last_point.ts)
    # If last point is already recorded in this block, slope=0
    # But that's ok b/c we know the block in such case

    # Go over weeks to fill history and calculate what the current point is
    t_i: uint256 = (last_checkpoint / WEEK) * WEEK
    for i in range(255):
        # Hopefully it won't happen that this won't get used in 3 years!
        # If it does, users will be able to withdraw but vote weight will be broken
        t_i += WEEK
        d_slope: int128 = 0
        if t_i > block.timestamp:
            t_i = block.timestamp
        else:
            d_slope = self.slope_changes[t_i]
        last_point.bias -= last_point.slope * convert(t_i - last_checkpoint, int128)
        last_point.slope += d_slope
        if last_point.bias < 0:  # This can happen
            last_point.bias = 0
        if last_point.slope < 0:  # This cannot happen - just in case
            last_point.slope = 0
        last_checkpoint = t_i
        last_point.ts = t_i
        last_point.blk = initial_last_point.blk + block_slope * (t_i - initial_last_point.ts) / MULTIPLIER
        _epoch += 1
        if t_i == block.timestamp:
            last_point.blk = block.number
            break
        else:
            self.point_history[_epoch] = last_point

    self.epoch = _epoch
    # Now point_history is filled until t=now

    if addr != ZERO_ADDRESS:
        # If last point was in this block, the slope change has been applied already
        # But in such case we have 0 slope(s)
        last_point.slope += (u_new.slope - u_old.slope)
        last_point.bias += (u_new.bias - u_old.bias)
        if last_point.slope < 0:
            last_point.slope = 0
        if last_point.bias < 0:
            last_point.bias = 0

    # Record the changed point into history
    self.point_history[_epoch] = last_point

    if addr != ZERO_ADDRESS:
        # Schedule the slope changes (slope is going down)
        # We subtract new_user_slope from [new_locked.end]
        # and add old_user_slope to [old_locked.end]
        if old_locked.end > block.timestamp:
            # old_dslope was <something> - u_old.slope, so we cancel that
            old_dslope += u_old.slope
            if new_locked.end == old_locked.end:
                old_dslope -= u_new.slope  # It was a new deposit, not extension
            self.slope_changes[old_locked.end] = old_dslope

        if new_locked.end > block.timestamp:
            if new_locked.end > old_locked.end:
                new_dslope -= u_new.slope  # old slope disappeared at this point
                self.slope_changes[new_locked.end] = new_dslope
            # else: we recorded it already in old_dslope

        # Now handle user history
        user_epoch: uint256 = self.user_point_epoch[addr] + 1

        self.user_point_epoch[addr] = user_epoch
        u_new.ts = block.timestamp
        u_new.blk = block.number
        self.user_point_history[addr][user_epoch] = u_new


@internal
def _deposit_for(_from: address, _addr: address, _value: uint256, unlock_time: uint256, locked_balance: LockedBalance, type: int128):
    """
    @notice Deposit and lock tokens for a user
    @param _from Address to take funds from
    @param _addr User's wallet address
    @param _value Amount to deposit
    @param unlock_time New time when to unlock the tokens, or 0 if unchanged
    @param locked_balance Previous locked amount / timestamp
    """
    _locked: LockedBalance = locked_balance
    supply_before: uint256 = self.supply
    IVeRBNRewards(self.reward_pool).updateReward(_addr) # Reward pool snapshot

    self.supply = supply_before + _value
    old_locked: LockedBalance = _locked
    # Adding to existing lock, or if a lock is expired - creating a new one
    _locked.amount += convert(_value, int128)
    if unlock_time != 0:
        _locked.end = unlock_time
    self.locked[_addr] = _locked

    # Possibilities:
    # Both old_locked.end could be current or expired (>/< block.timestamp)
    # value == 0 (extend lock) or value > 0 (add to lock or extend lock)
    # _locked.end > block.timestamp (always)
    self._checkpoint(_addr, old_locked, _locked)

    if _value != 0:
        assert ERC20(self.token).transferFrom(_from, self, _value)

    log Deposit(_from, _addr, _value, _locked.end, type, block.timestamp)
    log Supply(supply_before, supply_before + _value)

@external
def checkpoint():
    """
    @notice Record global data to checkpoint
    """
    self._checkpoint(ZERO_ADDRESS, empty(LockedBalance), empty(LockedBalance))

@external
@nonreentrant('lock')
def deposit_for(_addr: address, _value: uint256):
    """
    @notice Deposit `_value` tokens for `_addr` and add to the lock
    @dev Anyone (even a smart contract) can deposit for someone else, but
         cannot extend their locktime and deposit for a brand new user
    @param _addr User's wallet address
    @param _value Amount to add to user's lock
    """
    _locked: LockedBalance = self.locked[_addr]

    assert _value > 0  # dev: need non-zero value
    assert _locked.amount > 0, "No existing lock found"
    assert _locked.end > block.timestamp, "Cannot add to expired lock. Withdraw"

    self._deposit_for(msg.sender, _addr, _value, 0, self.locked[_addr], DEPOSIT_FOR_TYPE)

@external
@nonreentrant('lock')
def create_lock(_value: uint256, _unlock_time: uint256):
    """
    @notice Deposit `_value` tokens for `msg.sender` and lock until `_unlock_time`
    @param _value Amount to deposit
    @param _unlock_time Epoch time when tokens unlock, rounded down to whole weeks
    """
    self.assert_not_contract(msg.sender)
    unlock_time: uint256 = (_unlock_time / WEEK) * WEEK  # Locktime is rounded down to weeks
    _locked: LockedBalance = self.locked[msg.sender]

    assert _value > 0  # dev: need non-zero value
    assert _locked.amount == 0, "Withdraw old tokens first"
    assert unlock_time > block.timestamp, "Can only lock until time in the future"
    assert unlock_time <= block.timestamp + MAXTIME, "Voting lock can be 2 years max"

    self._deposit_for(msg.sender, msg.sender, _value, unlock_time, _locked, CREATE_LOCK_TYPE)


@external
@nonreentrant('lock')
def increase_amount(_value: uint256):
    """
    @notice Deposit `_value` additional tokens for `msg.sender`
            without modifying the unlock time
    @param _value Amount of tokens to deposit and add to the lock
    """
    self.assert_not_contract(msg.sender)
    _locked: LockedBalance = self.locked[msg.sender]

    assert _value > 0  # dev: need non-zero value
    assert _locked.amount > 0, "No existing lock found"
    assert _locked.end > block.timestamp, "Cannot add to expired lock. Withdraw"

    self._deposit_for(msg.sender, msg.sender, _value, 0, _locked, INCREASE_LOCK_AMOUNT)


@external
@nonreentrant('lock')
def increase_unlock_time(_unlock_time: uint256):
    """
    @notice Extend the unlock time for `msg.sender` to `_unlock_time`
    @param _unlock_time New epoch time for unlocking
    """
    self.assert_not_contract(msg.sender)
    _locked: LockedBalance = self.locked[msg.sender]
    unlock_time: uint256 = (_unlock_time / WEEK) * WEEK  # Locktime is rounded down to weeks

    assert _locked.end > block.timestamp, "Lock expired"
    assert _locked.amount > 0, "Nothing is locked"
    assert unlock_time > _locked.end, "Can only increase lock duration"
    assert unlock_time <= block.timestamp + MAXTIME, "Voting lock can be 2 years max"

    self._deposit_for(msg.sender, msg.sender, 0, unlock_time, _locked, INCREASE_UNLOCK_TIME)


@external
@nonreentrant('lock')
def withdraw():
    """
    @notice Withdraw all tokens for `msg.sender`
    @dev Only possible if the lock has expired
    """
    _locked: LockedBalance = self.locked[msg.sender]
    _unlocked: bool = self.is_unlocked
    assert block.timestamp >= _locked.end or _unlocked, "The lock didn't expire and funds are not unlocked"
    value: uint256 = convert(_locked.amount, uint256)

    old_locked: LockedBalance = _locked
    _locked.end = 0
    _locked.amount = 0
    self.locked[msg.sender] = _locked
    supply_before: uint256 = self.supply
    self.supply = supply_before - value

    # old_locked can have either expired <= timestamp or zero end
    # _locked has only 0 end
    # Both can have >= 0 amount
    self._checkpoint(msg.sender, old_locked, _locked)

    assert ERC20(self.token).transfer(msg.sender, value)

    if not _unlocked:
      IVeRBNRewards(self.reward_pool).updateReward(msg.sender) # Reward pool snapshot

    log Withdraw(msg.sender, value, block.timestamp)
    log Supply(supply_before, supply_before - value)

@external
@nonreentrant('lock')
def force_withdraw():
  """
  @notice Withdraw all tokens for `msg.sender`
  @dev Will pay a penalty based on time.
  With a 2 years lock on withdraw, you pay 75% penalty during the first 6 months.
  penalty decrease linearly to zero starting when time left is under 1.5 years.
  """
  assert(self.is_unlocked == False)
  _locked: LockedBalance = self.locked[msg.sender]
  assert block.timestamp < _locked.end, "lock expired"

  time_left: uint256 = _locked.end - block.timestamp
  penalty_ratio: uint256 = min(MULTIPLIER * 3 / 4,  MULTIPLIER * time_left / MAXTIME)
  value: uint256 = convert(_locked.amount, uint256)
  IVeRBNRewards(self.reward_pool).updateReward(msg.sender) # Reward pool snapshot
  old_locked: LockedBalance = _locked
  _locked.end = 0
  _locked.amount = 0
  self.locked[msg.sender] = _locked
  supply_before: uint256 = self.supply
  self.supply = supply_before - value
  # old_locked can have either expired <= timestamp or zero end
  # _locked has only 0 end
  # Both can have >= 0 amount
  self._checkpoint(msg.sender, old_locked, _locked)

  penalty: uint256 = value * penalty_ratio / MULTIPLIER
  assert ERC20(self.token).transfer(msg.sender, value - penalty)
  if penalty != 0:
      assert ERC20(self.token).approve(self.reward_pool, penalty)
      IVeRBNRewards(self.reward_pool).donate(penalty)
  log Withdraw(msg.sender, value, block.timestamp)
  log Supply(supply_before, supply_before - value)

# The following ERC20/minime-compatible methods are not real balanceOf and supply!
# They measure the weights for the purpose of voting, so they don't represent
# real coins.

@internal
@view
def find_block_epoch(_block: uint256, max_epoch: uint256) -> uint256:
    """
    @notice Binary search to estimate timestamp for block number
    @param _block Block to find
    @param max_epoch Don't go beyond this epoch
    @return Approximate timestamp for block
    """
    # Binary search
    _min: uint256 = 0
    _max: uint256 = max_epoch
    for i in range(128):  # Will be always enough for 128-bit numbers
        if _min >= _max:
            break
        _mid: uint256 = (_min + _max + 1) / 2
        if self.point_history[_mid].blk <= _block:
            _min = _mid
        else:
            _max = _mid - 1
    return _min


@external
@view
def balanceOf(addr: address, _t: uint256 = block.timestamp) -> uint256:
    """
    @notice Get the current voting power for `msg.sender`
    @dev Adheres to the ERC20 `balanceOf` interface for Aragon compatibility
    @param addr User wallet address
    @param _t Epoch time to return voting power at
    @return User voting power
    """
    _epoch: uint256 = self.user_point_epoch[addr]
    if _epoch == 0:
        return 0
    else:
        last_point: Point = self.user_point_history[addr][_epoch]
        last_point.bias -= last_point.slope * convert(_t - last_point.ts, int128)
        if last_point.bias < 0:
            last_point.bias = 0
        return convert(last_point.bias, uint256)


@external
@view
def getPriorVotes(addr: address, _block: uint256) -> uint256:
    """
    @notice Measure voting power of `addr` at block height `_block`
    @dev Adheres to MiniMe `balanceOfAt` interface: https://github.com/Giveth/minime
    @param addr User's wallet address
    @param _block Block to calculate the voting power at
    @return Voting power
    """
    # Copying and pasting totalSupply code because Vyper cannot pass by
    # reference yet
    assert _block <= block.number

    # Binary search
    _min: uint256 = 0
    _max: uint256 = self.user_point_epoch[addr]
    for i in range(128):  # Will be always enough for 128-bit numbers
        if _min >= _max:
            break
        _mid: uint256 = (_min + _max + 1) / 2
        if self.user_point_history[addr][_mid].blk <= _block:
            _min = _mid
        else:
            _max = _mid - 1

    upoint: Point = self.user_point_history[addr][_min]

    max_epoch: uint256 = self.epoch
    _epoch: uint256 = self.find_block_epoch(_block, max_epoch)
    point_0: Point = self.point_history[_epoch]
    d_block: uint256 = 0
    d_t: uint256 = 0
    if _epoch < max_epoch:
        point_1: Point = self.point_history[_epoch + 1]
        d_block = point_1.blk - point_0.blk
        d_t = point_1.ts - point_0.ts
    else:
        d_block = block.number - point_0.blk
        d_t = block.timestamp - point_0.ts
    block_time: uint256 = point_0.ts
    if d_block != 0:
        block_time += d_t * (_block - point_0.blk) / d_block

    upoint.bias -= upoint.slope * convert(block_time - upoint.ts, int128)
    if upoint.bias >= 0:
        return convert(upoint.bias, uint256)
    else:
        return 0


@internal
@view
def supply_at(point: Point, t: uint256) -> uint256:
    """
    @notice Calculate total voting power at some point in the past
    @param point The point (bias/slope) to start search from
    @param t Time to calculate the total voting power at
    @return Total voting power at that time
    """
    last_point: Point = point
    t_i: uint256 = (last_point.ts / WEEK) * WEEK
    for i in range(255):
        t_i += WEEK
        d_slope: int128 = 0
        if t_i > t:
            t_i = t
        else:
            d_slope = self.slope_changes[t_i]
        last_point.bias -= last_point.slope * convert(t_i - last_point.ts, int128)
        if t_i == t:
            break
        last_point.slope += d_slope
        last_point.ts = t_i

    if last_point.bias < 0:
        last_point.bias = 0
    return convert(last_point.bias, uint256)


@external
@view
def totalSupply(t: uint256 = block.timestamp) -> uint256:
    """
    @notice Calculate total voting power
    @dev Adheres to the ERC20 `totalSupply` interface for Aragon compatibility
    @return Total voting power
    """
    _epoch: uint256 = self.epoch
    last_point: Point = self.point_history[_epoch]
    return self.supply_at(last_point, t)


@external
@view
def totalSupplyAt(_block: uint256) -> uint256:
    """
    @notice Calculate total voting power at some point in the past
    @param _block Block to calculate the total voting power at
    @return Total voting power at `_block`
    """
    assert _block <= block.number
    _epoch: uint256 = self.epoch
    target_epoch: uint256 = self.find_block_epoch(_block, _epoch)

    point: Point = self.point_history[target_epoch]
    dt: uint256 = 0
    if target_epoch < _epoch:
        point_next: Point = self.point_history[target_epoch + 1]
        if point.blk != point_next.blk:
            dt = (_block - point.blk) * (point_next.ts - point.ts) / (point_next.blk - point.blk)
    else:
        if point.blk != block.number:
            dt = (_block - point.blk) * (block.timestamp - point.ts) / (block.number - point.blk)
    # Now dt contains info on how far are we beyond point

    return self.supply_at(point, point.ts + dt)

Contract Security Audit

Contract ABI

[{"name":"CommitOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"FundsUnlocked","inputs":[{"name":"funds_unlocked","type":"bool","indexed":false}],"anonymous":false,"type":"event"},{"name":"Deposit","inputs":[{"name":"deposit_from","type":"address","indexed":true},{"name":"provider","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false},{"name":"locktime","type":"uint256","indexed":true},{"name":"type","type":"int128","indexed":false},{"name":"ts","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Withdraw","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false},{"name":"ts","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Supply","inputs":[{"name":"prevSupply","type":"uint256","indexed":false},{"name":"supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"token_addr","type":"address"},{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_admin","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_reward_pool","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":39816},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":39475},{"stateMutability":"nonpayable","type":"function","name":"apply_transfer_ownership","inputs":[],"outputs":[],"gas":41566},{"stateMutability":"nonpayable","type":"function","name":"commit_smart_wallet_checker","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":37695},{"stateMutability":"nonpayable","type":"function","name":"apply_smart_wallet_checker","inputs":[],"outputs":[],"gas":39671},{"stateMutability":"nonpayable","type":"function","name":"set_funds_unlocked","inputs":[{"name":"_funds_unlocked","type":"bool"}],"outputs":[],"gas":39595},{"stateMutability":"view","type":"function","name":"get_last_user_slope","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"int128"}],"gas":5184},{"stateMutability":"view","type":"function","name":"user_point_history__ts","inputs":[{"name":"_addr","type":"address"},{"name":"_idx","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":2987},{"stateMutability":"view","type":"function","name":"locked__end","inputs":[{"name":"_addr","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":2972},{"stateMutability":"nonpayable","type":"function","name":"checkpoint","inputs":[],"outputs":[],"gas":37283370},{"stateMutability":"nonpayable","type":"function","name":"deposit_for","inputs":[{"name":"_addr","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[],"gas":37481203},{"stateMutability":"nonpayable","type":"function","name":"create_lock","inputs":[{"name":"_value","type":"uint256"},{"name":"_unlock_time","type":"uint256"}],"outputs":[],"gas":37489081},{"stateMutability":"nonpayable","type":"function","name":"increase_amount","inputs":[{"name":"_value","type":"uint256"}],"outputs":[],"gas":37485303},{"stateMutability":"nonpayable","type":"function","name":"increase_unlock_time","inputs":[{"name":"_unlock_time","type":"uint256"}],"outputs":[],"gas":37492457},{"stateMutability":"nonpayable","type":"function","name":"withdraw","inputs":[],"outputs":[],"gas":37472579},{"stateMutability":"nonpayable","type":"function","name":"force_withdraw","inputs":[],"outputs":[],"gas":37484659},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":12750},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"addr","type":"address"},{"name":"_t","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":12750},{"stateMutability":"view","type":"function","name":"getPriorVotes","inputs":[{"name":"addr","type":"address"},{"name":"_block","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":793090},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":905206},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[{"name":"t","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":905206},{"stateMutability":"view","type":"function","name":"totalSupplyAt","inputs":[{"name":"_block","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":1287758},{"stateMutability":"view","type":"function","name":"token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3060},{"stateMutability":"view","type":"function","name":"supply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3090},{"stateMutability":"view","type":"function","name":"locked","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"amount","type":"int128"},{"name":"end","type":"uint256"}]}],"gas":5543},{"stateMutability":"view","type":"function","name":"epoch","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3150},{"stateMutability":"view","type":"function","name":"point_history","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"bias","type":"int128"},{"name":"slope","type":"int128"},{"name":"ts","type":"uint256"},{"name":"blk","type":"uint256"}]}],"gas":9614},{"stateMutability":"view","type":"function","name":"user_point_history","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"uint256"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"bias","type":"int128"},{"name":"slope","type":"int128"},{"name":"ts","type":"uint256"},{"name":"blk","type":"uint256"}]}],"gas":9910},{"stateMutability":"view","type":"function","name":"user_point_epoch","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3506},{"stateMutability":"view","type":"function","name":"slope_changes","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"int128"}],"gas":3385},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":13589},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":11348},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3360},{"stateMutability":"view","type":"function","name":"future_smart_wallet_checker","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3390},{"stateMutability":"view","type":"function","name":"smart_wallet_checker","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3420},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3450},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3480},{"stateMutability":"view","type":"function","name":"is_unlocked","inputs":[],"outputs":[{"name":"","type":"bool"}],"gas":3510},{"stateMutability":"view","type":"function","name":"reward_pool","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3540}]

6020612cb46080396080518060a01c612caf5760e05260206020612cb401608039608051612cb401604060208260803960805111612caf578060208160803960805160200180826101003950505060206040612cb401608039608051612cb401602060208260803960805111612caf578060208160803960805160200180826101603950505060206060612cb4016080396080518060a01c612caf576101a0526101a0516c050c783eb9b5c84000000000105560e051600155436008554260075563313ce5676101e05260206101e060046101fc60e0515afa6100e7573d600060003e3d6000fd5b601f3d1115612caf576101e0516101c05260ff6101c05111612caf576101c0516c050c783eb9b5c840000000000d55610100806c050c783eb9b5c8400000000008602082510160c060006003818352015b8260c051602002111561014a57610169565b60c05160200285015160c0518501558151600101808352811415610138575b505050505050610160806c050c783eb9b5c840000000000b602082510160c060006002818352015b8260c05160200211156101a3576101c2565b60c05160200285015160c0518501558151600101808352811415610191575b505050505050612c9756600436101561000d57611e75565b60046000601c3760005134612ac557637952889f8118610085576004358060a01c612ac55760e0526c050c783eb9b5c8400000000010543318610051576001610062565b6c050c783eb9b5c840000000001354155b15612ac557600060e05114612ac55760e0516c050c783eb9b5c840000000001355005b636b441a4081186100f5576004358060a01c612ac55760e0526c050c783eb9b5c8400000000010543318612ac55760e0516c050c783eb9b5c8400000000011557f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e960e051610100526020610100a1005b636a1c05ae8118610173576c050c783eb9b5c8400000000010543318612ac5576c050c783eb9b5c84000000000115460e052600060e05114612ac55760e0516c050c783eb9b5c8400000000010557febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a118910560e051610100526020610100a1005b6357f901e281186101b5576004358060a01c612ac55760e0526c050c783eb9b5c8400000000010543318612ac55760e0516c050c783eb9b5c840000000000e55005b638e5b490f81186101f5576c050c783eb9b5c8400000000010543318612ac5576c050c783eb9b5c840000000000e546c050c783eb9b5c840000000000f55005b638847b5748118610265576004358060011c612ac55760e0526c050c783eb9b5c8400000000010543318612ac55760e0516c050c783eb9b5c8400000000012557f6f9c7879220530d66ede8422a83c8aabeac4631a7269cbdf3bf8f47f74e5269760e051610100526020610100a1005b637c74a17481186102de576004358060a01c612ac55760e0526c050c783eb9b5c840000000000660e05160a052608052604060802054610100526001600461010051633b9aca00811015612ac557026c050c783eb9b5c840000000000560e05160a0526080526040608020010154610120526020610120f35b63da020a188118610335576004358060a01c612ac55760e05260026004602435633b9aca00811015612ac557026c050c783eb9b5c840000000000560e05160a0526080526040608020010154610100526020610100f35b63adc63589811861036d576004358060a01c612ac55760e0526001600360e05160a05260805260406080200154610100526020610100f35b63c2c4c5c1811861039557600060e0526040366101003760403661014037610393611f86565b005b633a46273e811861055f576004358060a01c612ac55761068052600054612ac557600160005560036106805160a052608052604060802080546106a05260018101546106c0525060006024351115612ac55760006106a051136104695760166106e0527f4e6f206578697374696e67206c6f636b20666f756e6400000000000000000000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b426106c0511161050f5760246106e0527f43616e6e6f742061646420746f2065787069726564206c6f636b2e2057697468610700527f6472617700000000000000000000000000000000000000000000000000000000610720526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b3361048052610680516104a0526024356104c05260006104e05260036106805160a052608052604060802080546105005260018101546105205250600061054052610558612675565b6000600055005b6365fc387381186107d057600054612ac55760016000553360e052610582611e7b565b60243562093a808082049050905062093a80808202821582848304141715612ac557905090506106805260033360a052608052604060802080546106a05260018101546106c0525060006004351115612ac5576106a051156106555760196106e0527f5769746864726177206f6c6420746f6b656e7320666972737400000000000000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b4261068051116106fb5760266106e0527f43616e206f6e6c79206c6f636b20756e74696c2074696d6520696e2074686520610700527f6675747572650000000000000000000000000000000000000000000000000000610720526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b426303c267008181830110612ac5578082019050905061068051111561079257601e6106e0527f566f74696e67206c6f636b2063616e2062652032207965617273206d61780000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b3361048052336104a0526004356104c052610680516104e0526106a051610500526106c051610520526001610540526107c9612675565b6000600055005b634957677c811861098057600054612ac55760016000553360e0526107f3611e7b565b60033360a052608052604060802080546106805260018101546106a0525060006004351115612ac5576000610680511361089e5760166106c0527f4e6f206578697374696e67206c6f636b20666f756e64000000000000000000006106e0526106c0506106c051806106e001818260206001820306601f82010390500336823750506308c379a06106805260206106a0526106c05160206001820306601f820103905060440161069cfd5b426106a051116109445760246106c0527f43616e6e6f742061646420746f2065787069726564206c6f636b2e20576974686106e0527f6472617700000000000000000000000000000000000000000000000000000000610700526106c0506106c051806106e001818260206001820306601f82010390500336823750506308c379a06106805260206106a0526106c05160206001820306601f820103905060440161069cfd5b3361048052336104a0526004356104c05260006104e05261068051610500526106a05161052052600261054052610979612675565b6000600055005b63eff7a6128118610c4657600054612ac55760016000553360e0526109a3611e7b565b60033360a052608052604060802080546106805260018101546106a0525060043562093a808082049050905062093a80808202821582848304141715612ac557905090506106c052426106a05111610a6c57600c6106e0527f4c6f636b20657870697265640000000000000000000000000000000000000000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b60006106805113610aee5760116106e0527f4e6f7468696e67206973206c6f636b6564000000000000000000000000000000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b6106a0516106c05111610b7257601f6106e0527f43616e206f6e6c7920696e637265617365206c6f636b206475726174696f6e00610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b426303c267008181830110612ac557808201905090506106c0511115610c0957601e6106e0527f566f74696e67206c6f636b2063616e2062652032207965617273206d61780000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b3361048052336104a05260006104c0526106c0516104e05261068051610500526106a05161052052600361054052610c3f612675565b6000600055005b633ccfd60b8118610ef857600054612ac557600160005560033360a052608052604060802080546104805260018101546104a052506c050c783eb9b5c8400000000012546104c0526104a051421015610ca2576104c051610ca5565b60015b610d455760316104e0527f546865206c6f636b206469646e27742065787069726520616e642066756e6473610500527f20617265206e6f7420756e6c6f636b6564000000000000000000000000000000610520526104e0506104e0518061050001818260206001820306601f82010390500336823750506308c379a06104a05260206104c0526104e05160206001820306601f82010390506044016104bcfd5b6104805160008112612ac5576104e05261048051610500526104a0516105205260006104a05260006104805260033360a05260805260406080206104805181556104a05160018201555060025461054052610540516104e051808210612ac557808203905090506002553360e0526105005161010052610520516101205261048051610140526104a05161016052610ddb611f86565b63a9059cbb6105605233610580526104e0516105a0526020610560604461057c60006001545af1610e11573d600060003e3d6000fd5b601f3d1115612ac5576105605115612ac5576104c051610e735763632447c96105605233610580526020610560602461057c60006c050c783eb9b5c8400000000013545af1610e65573d600060003e3d6000fd5b601f3d1115612ac557610560505b337ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5686104e0516105605242610580526040610560a27f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c6105405161056052610540516104e051808210612ac55780820390509050610580526040610560a16000600055005b63a81f20ad81186112bd57600054612ac55760016000556c050c783eb9b5c840000000001254612ac55760033360a052608052604060802080546104805260018101546104a052506104a0514210610fc157600c6104c0527f6c6f636b206578706972656400000000000000000000000000000000000000006104e0526104c0506104c051806104e001818260206001820306601f82010390500336823750506308c379a06104805260206104a0526104c05160206001820306601f820103905060440161049cfd5b6104a05142808210612ac557808203905090506104c052670a688906bd8b0000670de0b6b3a76400006104c051808202821582848304141715612ac557905090506303c267008082049050905080821161101b578161101d565b805b905090506104e0526104805160008112612ac5576105005263632447c96105205233610540526020610520602461053c60006c050c783eb9b5c8400000000013545af161106f573d600060003e3d6000fd5b601f3d1115612ac5576105205061048051610520526104a0516105405260006104a05260006104805260033360a05260805260406080206104805181556104a051600182015550600254610560526105605161050051808210612ac557808203905090506002553360e0526105205161010052610540516101205261048051610140526104a05161016052611102611f86565b610500516104e051808202821582848304141715612ac55790509050670de0b6b3a7640000808204905090506105805263a9059cbb6105a052336105c0526105005161058051808210612ac557808203905090506105e05260206105a060446105bc60006001545af161117a573d600060003e3d6000fd5b601f3d1115612ac5576105a05115612ac557600061058051146112385763095ea7b36105a0526c050c783eb9b5c8400000000013546105c052610580516105e05260206105a060446105bc60006001545af16111db573d600060003e3d6000fd5b601f3d1115612ac5576105a05115612ac55763f14faf6f6105a052610580516105c05260206105a060246105bc60006c050c783eb9b5c8400000000013545af161122a573d600060003e3d6000fd5b601f3d1115612ac5576105a0505b337ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568610500516105a052426105c05260406105a0a27f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c610560516105a0526105605161050051808210612ac557808203905090506105c05260406105a0a16000600055005b6370a0823181186112d25742610100526112e4565b62fdd58e811861140357602435610100525b6004358060a01c612ac55760e0526c050c783eb9b5c840000000000660e05160a0526080526040608020546101205261012051156113f157600461012051633b9aca00811015612ac557026c050c783eb9b5c840000000000560e05160a05260805260406080200180546101405260018101546101605260028101546101805260038101546101a052506101408051610160516101005161018051808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac557905090508082038060801d81607f1d18612ac5579050905081525060006101405112156113d3576000610140525b6101405160008112612ac5576101c05260206101c061140156611401565b6000610140526020610140611401565bf35b63782d6fe1811861179c576004358060a01c612ac5576101a0524360243511612ac55760006101c0526c050c783eb9b5c84000000000066101a05160a0526080526040608020546101e05261020060006080818352015b6101e0516101c0511061146c57611517565b6101c0516101e0518181830110612ac5578082019050905060018181830110612ac55780820190509050600280820490509050610220526024356003600461022051633b9aca00811015612ac557026c050c783eb9b5c84000000000056101a05160a052608052604060802001015411156114fe57610220516001808210612ac557808203905090506101e052611507565b610220516101c0525b815160010180835281141561145a575b505060046101c051633b9aca00811015612ac557026c050c783eb9b5c84000000000056101a05160a052608052604060802001805461020052600181015461022052600281015461024052600381015461026052506004546102805260243560e052610280516101005261158c6102c061287e565b6102c0516102a05260046102a0516c01431e0fae6d7217caa0000000811015612ac5570260050180546102c05260018101546102e0526002810154610300526003810154610320525060403661034037610280516102a0511061161c574361032051808210612ac55780820390509050610340524261030051808210612ac55780820390509050610360526116a4565b60046102a05160018181830110612ac557808201905090506c01431e0fae6d7217caa0000000811015612ac5570260050180546103805260018101546103a05260028101546103c05260038101546103e052506103e05161032051808210612ac55780820390509050610340526103c05161030051808210612ac55780820390509050610360525b61030051610380526000610340511461170e5761038080516103605160243561032051808210612ac55780820390509050808202821582848304141715612ac5579050905061034051808015612ac5578204905090508181830110612ac557808201905090508152505b6102008051610220516103805161024051808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac557905090508082038060801d81607f1d18612ac5579050905081525060006102005112156117805760006103a05260206103a061179a5661179a565b6102005160008112612ac5576103a05260206103a061179a565bf35b6318160ddd81186117b15742610260526117c4565b63bd85b039811861184d57600435610260525b600454610280526004610280516c01431e0fae6d7217caa0000000811015612ac5570260050180546102a05260018101546102c05260028101546102e052600381015461030052506102a05160e0526102c051610100526102e051610120526103005161014052610260516101605261183e61032061294e565b61032051610340526020610340f35b63981b24d08118611a68574360043511612ac5576004546102605260043560e05261026051610100526118816102a061287e565b6102a051610280526004610280516c01431e0fae6d7217caa0000000811015612ac5570260050180546102a05260018101546102c05260028101546102e0526003810154610300525060006103205261026051610280511061194c57436103005114611a135760043561030051808210612ac55780820390509050426102e051808210612ac55780820390509050808202821582848304141715612ac557905090504361030051808210612ac55780820390509050808015612ac55782049050905061032052611a13565b60046102805160018181830110612ac557808201905090506c01431e0fae6d7217caa0000000811015612ac5570260050180546103405260018101546103605260028101546103805260038101546103a052506103a0516103005114611a135760043561030051808210612ac55780820390509050610380516102e051808210612ac55780820390509050808202821582848304141715612ac557905090506103a05161030051808210612ac55780820390509050808015612ac557820490509050610320525b6102a05160e0526102c051610100526102e0516101205261030051610140526102e051610320518181830110612ac5578082019050905061016052611a5961034061294e565b61034051610360526020610360f35b63fc0c546a8118611a7f5760015460e052602060e0f35b63047fc9aa8118611a965760025460e052602060e0f35b63cbf9fe5f8118611ad6576004358060a01c612ac55760e052600360e05160a0526080526040608020805461010052600181015461012052506040610100f35b63900cf0cf8118611aed5760045460e052602060e0f35b63d1febfb98118611b3d5760046004356c01431e0fae6d7217caa0000000811015612ac55702600501805460e05260018101546101005260028101546101205260038101546101405250608060e0f35b6328d09d478118611bae576004358060a01c612ac55760e0526004602435633b9aca00811015612ac557026c050c783eb9b5c840000000000560e05160a052608052604060802001805461010052600181015461012052600281015461014052600381015461016052506080610100f35b63010ae7578118611bef576004358060a01c612ac55760e0526c050c783eb9b5c840000000000660e05160a052608052604060802054610100526020610100f35b63711974848118611c20576c050c783eb9b5c840000000000760043560a05260805260406080205460e052602060e0f35b6306fdde038118611ccf5760e0806020808252808301806c050c783eb9b5c84000000000088082602082540160c060006003818352015b8260c0516020021115611c6957611c88565b60c05185015460c0516020028501528151600101808352811415611c57575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6395d89b418118611d7e5760e0806020808252808301806c050c783eb9b5c840000000000b8082602082540160c060006002818352015b8260c0516020021115611d1857611d37565b60c05185015460c0516020028501528151600101808352811415611d06575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b63313ce5678118611da1576c050c783eb9b5c840000000000d5460e052602060e0f35b638ff36fd18118611dc4576c050c783eb9b5c840000000000e5460e052602060e0f35b637175d4f78118611de7576c050c783eb9b5c840000000000f5460e052602060e0f35b63f851a4408118611e0a576c050c783eb9b5c84000000000105460e052602060e0f35b6317f7182a8118611e2d576c050c783eb9b5c84000000000115460e052602060e0f35b6381565a948118611e50576c050c783eb9b5c84000000000125460e052602060e0f35b6316bfdd568118611e73576c050c783eb9b5c84000000000135460e052602060e0f35b505b60006000fd5b3260e05114611f84576c050c783eb9b5c840000000000f546101005260006101005114611eea5763c23697a86101205260e051610140526020610120602461013c6000610100515af1611ed3573d600060003e3d6000fd5b601f3d1115612ac5576101205115611eea57611f84565b6025610120527f536d61727420636f6e7472616374206465706f7369746f7273206e6f7420616c610140527f6c6f7765640000000000000000000000000000000000000000000000000000006101605261012050610120518061014001818260206001820306601f82010390500336823750506308c379a060e0526020610100526101205160206001820306601f820103905060440160fcfd5b565b61014036610180376004546102c052600060e051146120f757426101205111611fb0576000611fb8565b600061010051135b1561201657610100516303c267008082058060801d81607f1d18612ac557905090506101a0526101a0516101205142808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac55790509050610180525b42610160511161202757600061202f565b600061014051135b1561208d57610140516303c267008082058060801d81607f1d18612ac5579050905061022052610220516101605142808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac55790509050610200525b6c050c783eb9b5c84000000000076101205160a05260805260406080205461028052600061016051146120f7576101205161016051186120d457610280516102a0526120f7565b6c050c783eb9b5c84000000000076101605160a0526080526040608020546102a0525b6040366102e0374261032052436103405260006102c05111156121565760046102c0516c01431e0fae6d7217caa0000000811015612ac5570260050180546102e052600181015461030052600281015461032052600381015461034052505b61032051610360526102e05161038052610300516103a052610320516103c052610340516103e052600061040052610320514211156121e457670de0b6b3a76400004361034051808210612ac55780820390509050808202821582848304141715612ac557905090504261032051808210612ac55780820390509050808015612ac557820490509050610400525b6103605162093a808082049050905062093a80808202821582848304141715612ac5579050905061042052610440600060ff818352015b610420805162093a808181830110612ac5578082019050905081525060006104605242610420511161226e576c050c783eb9b5c84000000000076104205160a05260805260406080205461046052612274565b42610420525b6102e08051610300516104205161036051808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac557905090508082038060801d81607f1d18612ac557905090508152506103008051610460518082018060801d81607f1d18612ac5579050905081525060006102e05112156122f95760006102e0525b600061030051121561230c576000610300525b610420516103605261042051610320526103e05161040051610420516103c051808210612ac55780820390509050808202821582848304141715612ac55790509050670de0b6b3a7640000808204905090508181830110612ac55780820190509050610340526102c0805160018181830110612ac557808201905090508152504261042051186123a45743610340526123f6566123e6565b60046102c0516c01431e0fae6d7217caa0000000811015612ac557026005016102e0518155610300516001820155610320516002820155610340516003820155505b815160010180835281141561221b575b50506102c051600455600060e0511461249f576103008051610220516101a0518082038060801d81607f1d18612ac557905090508082018060801d81607f1d18612ac557905090508152506102e0805161020051610180518082038060801d81607f1d18612ac557905090508082018060801d81607f1d18612ac55790509050815250600061030051121561248c576000610300525b60006102e051121561249f5760006102e0525b60046102c0516c01431e0fae6d7217caa0000000811015612ac557026005016102e051815561030051600182015561032051600282015561034051600382015550600060e0511461267357426101205111156125665761028080516101a0518082018060801d81607f1d18612ac55790509050815250610120516101605118612543576102808051610220518082038060801d81607f1d18612ac557905090508152505b610280516c050c783eb9b5c84000000000076101205160a0526080526040608020555b426101605111156125c257610120516101605111156125c2576102a08051610220518082038060801d81607f1d18612ac557905090508152506102a0516c050c783eb9b5c84000000000076101605160a0526080526040608020555b6c050c783eb9b5c840000000000660e05160a05260805260406080205460018181830110612ac5578082019050905061044052610440516c050c783eb9b5c840000000000660e05160a05260805260406080205542610240524361026052600461044051633b9aca00811015612ac557026c050c783eb9b5c840000000000560e05160a052608052604060802001610200518155610220516001820155610240516002820155610260516003820155505b565b610500516105605261052051610580526002546105a05263632447c96105c0526104a0516105e05260206105c060246105dc60006c050c783eb9b5c8400000000013545af16126c9573d600060003e3d6000fd5b601f3d1115612ac5576105c0506105a0516104c0518181830110612ac55780820190509050600255610560516105c052610580516105e05261056080516104c05180607f1c612ac5578082018060801d81607f1d18612ac5579050905081525060006104e0511461273d576104e051610580525b60036104a05160a0526080526040608020610560518155610580516001820155506104a05160e0526105c051610100526105e051610120526105605161014052610580516101605261278d611f86565b60006104c051146127e9576323b872dd61060052610480516106205230610640526104c051610660526020610600606461061c60006001545af16127d6573d600060003e3d6000fd5b601f3d1115612ac5576106005115612ac5575b610580516104a051610480517f4ace3cb811d903eba44ce1721d1a1d79232246711977f44236000551f8c11cc16104c05161060052610540516106205242610640526060610600a47f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c6105a051610600526105a0516104c0518181830110612ac55780820190509050610620526040610600a1565b600061012052610100516101405261016060006080818352015b6101405161012051106128aa57612943565b61012051610140518181830110612ac5578082019050905060018181830110612ac557808201905090506002808204905090506101805260e05160036004610180516c01431e0fae6d7217caa0000000811015612ac557026005010154111561292a57610180516001808210612ac5578082039050905061014052612933565b61018051610120525b8151600101808352811415612898575b505061012051815250565b60e05161018052610100516101a052610120516101c052610140516101e0526101c05162093a808082049050905062093a80808202821582848304141715612ac5579050905061020052610220600060ff818352015b610200805162093a808181830110612ac557808201905090508152506000610240526101605161020051116129fa576c050c783eb9b5c84000000000076102005160a05260805260406080205461024052612a03565b61016051610200525b61018080516101a051610200516101c051808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac557905090508082038060801d81607f1d18612ac55790509050815250610160516102005118612a6757612a9f565b6101a08051610240518082018060801d81607f1d18612ac55790509050815250610200516101c05281516001018083528114156129a4575b50506000610180511215612ab4576000610180525b6101805160008112612ac557815250565b600080fd5b6101cd612c97036101cd6000396101cd612c97036000f35b600080fd0000000000000000000000006123b0049f904d730db3c36a31167d9d4121fa6b000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000077da011d5314d80be59e939c2f7ec2f702e1dcc40000000000000000000000000000000000000000000000000000000000000011566f74652d657363726f7765642052424e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005766552424e000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x600436101561000d57611e75565b60046000601c3760005134612ac557637952889f8118610085576004358060a01c612ac55760e0526c050c783eb9b5c8400000000010543318610051576001610062565b6c050c783eb9b5c840000000001354155b15612ac557600060e05114612ac55760e0516c050c783eb9b5c840000000001355005b636b441a4081186100f5576004358060a01c612ac55760e0526c050c783eb9b5c8400000000010543318612ac55760e0516c050c783eb9b5c8400000000011557f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e960e051610100526020610100a1005b636a1c05ae8118610173576c050c783eb9b5c8400000000010543318612ac5576c050c783eb9b5c84000000000115460e052600060e05114612ac55760e0516c050c783eb9b5c8400000000010557febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a118910560e051610100526020610100a1005b6357f901e281186101b5576004358060a01c612ac55760e0526c050c783eb9b5c8400000000010543318612ac55760e0516c050c783eb9b5c840000000000e55005b638e5b490f81186101f5576c050c783eb9b5c8400000000010543318612ac5576c050c783eb9b5c840000000000e546c050c783eb9b5c840000000000f55005b638847b5748118610265576004358060011c612ac55760e0526c050c783eb9b5c8400000000010543318612ac55760e0516c050c783eb9b5c8400000000012557f6f9c7879220530d66ede8422a83c8aabeac4631a7269cbdf3bf8f47f74e5269760e051610100526020610100a1005b637c74a17481186102de576004358060a01c612ac55760e0526c050c783eb9b5c840000000000660e05160a052608052604060802054610100526001600461010051633b9aca00811015612ac557026c050c783eb9b5c840000000000560e05160a0526080526040608020010154610120526020610120f35b63da020a188118610335576004358060a01c612ac55760e05260026004602435633b9aca00811015612ac557026c050c783eb9b5c840000000000560e05160a0526080526040608020010154610100526020610100f35b63adc63589811861036d576004358060a01c612ac55760e0526001600360e05160a05260805260406080200154610100526020610100f35b63c2c4c5c1811861039557600060e0526040366101003760403661014037610393611f86565b005b633a46273e811861055f576004358060a01c612ac55761068052600054612ac557600160005560036106805160a052608052604060802080546106a05260018101546106c0525060006024351115612ac55760006106a051136104695760166106e0527f4e6f206578697374696e67206c6f636b20666f756e6400000000000000000000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b426106c0511161050f5760246106e0527f43616e6e6f742061646420746f2065787069726564206c6f636b2e2057697468610700527f6472617700000000000000000000000000000000000000000000000000000000610720526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b3361048052610680516104a0526024356104c05260006104e05260036106805160a052608052604060802080546105005260018101546105205250600061054052610558612675565b6000600055005b6365fc387381186107d057600054612ac55760016000553360e052610582611e7b565b60243562093a808082049050905062093a80808202821582848304141715612ac557905090506106805260033360a052608052604060802080546106a05260018101546106c0525060006004351115612ac5576106a051156106555760196106e0527f5769746864726177206f6c6420746f6b656e7320666972737400000000000000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b4261068051116106fb5760266106e0527f43616e206f6e6c79206c6f636b20756e74696c2074696d6520696e2074686520610700527f6675747572650000000000000000000000000000000000000000000000000000610720526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b426303c267008181830110612ac5578082019050905061068051111561079257601e6106e0527f566f74696e67206c6f636b2063616e2062652032207965617273206d61780000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b3361048052336104a0526004356104c052610680516104e0526106a051610500526106c051610520526001610540526107c9612675565b6000600055005b634957677c811861098057600054612ac55760016000553360e0526107f3611e7b565b60033360a052608052604060802080546106805260018101546106a0525060006004351115612ac5576000610680511361089e5760166106c0527f4e6f206578697374696e67206c6f636b20666f756e64000000000000000000006106e0526106c0506106c051806106e001818260206001820306601f82010390500336823750506308c379a06106805260206106a0526106c05160206001820306601f820103905060440161069cfd5b426106a051116109445760246106c0527f43616e6e6f742061646420746f2065787069726564206c6f636b2e20576974686106e0527f6472617700000000000000000000000000000000000000000000000000000000610700526106c0506106c051806106e001818260206001820306601f82010390500336823750506308c379a06106805260206106a0526106c05160206001820306601f820103905060440161069cfd5b3361048052336104a0526004356104c05260006104e05261068051610500526106a05161052052600261054052610979612675565b6000600055005b63eff7a6128118610c4657600054612ac55760016000553360e0526109a3611e7b565b60033360a052608052604060802080546106805260018101546106a0525060043562093a808082049050905062093a80808202821582848304141715612ac557905090506106c052426106a05111610a6c57600c6106e0527f4c6f636b20657870697265640000000000000000000000000000000000000000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b60006106805113610aee5760116106e0527f4e6f7468696e67206973206c6f636b6564000000000000000000000000000000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b6106a0516106c05111610b7257601f6106e0527f43616e206f6e6c7920696e637265617365206c6f636b206475726174696f6e00610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b426303c267008181830110612ac557808201905090506106c0511115610c0957601e6106e0527f566f74696e67206c6f636b2063616e2062652032207965617273206d61780000610700526106e0506106e0518061070001818260206001820306601f82010390500336823750506308c379a06106a05260206106c0526106e05160206001820306601f82010390506044016106bcfd5b3361048052336104a05260006104c0526106c0516104e05261068051610500526106a05161052052600361054052610c3f612675565b6000600055005b633ccfd60b8118610ef857600054612ac557600160005560033360a052608052604060802080546104805260018101546104a052506c050c783eb9b5c8400000000012546104c0526104a051421015610ca2576104c051610ca5565b60015b610d455760316104e0527f546865206c6f636b206469646e27742065787069726520616e642066756e6473610500527f20617265206e6f7420756e6c6f636b6564000000000000000000000000000000610520526104e0506104e0518061050001818260206001820306601f82010390500336823750506308c379a06104a05260206104c0526104e05160206001820306601f82010390506044016104bcfd5b6104805160008112612ac5576104e05261048051610500526104a0516105205260006104a05260006104805260033360a05260805260406080206104805181556104a05160018201555060025461054052610540516104e051808210612ac557808203905090506002553360e0526105005161010052610520516101205261048051610140526104a05161016052610ddb611f86565b63a9059cbb6105605233610580526104e0516105a0526020610560604461057c60006001545af1610e11573d600060003e3d6000fd5b601f3d1115612ac5576105605115612ac5576104c051610e735763632447c96105605233610580526020610560602461057c60006c050c783eb9b5c8400000000013545af1610e65573d600060003e3d6000fd5b601f3d1115612ac557610560505b337ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5686104e0516105605242610580526040610560a27f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c6105405161056052610540516104e051808210612ac55780820390509050610580526040610560a16000600055005b63a81f20ad81186112bd57600054612ac55760016000556c050c783eb9b5c840000000001254612ac55760033360a052608052604060802080546104805260018101546104a052506104a0514210610fc157600c6104c0527f6c6f636b206578706972656400000000000000000000000000000000000000006104e0526104c0506104c051806104e001818260206001820306601f82010390500336823750506308c379a06104805260206104a0526104c05160206001820306601f820103905060440161049cfd5b6104a05142808210612ac557808203905090506104c052670a688906bd8b0000670de0b6b3a76400006104c051808202821582848304141715612ac557905090506303c267008082049050905080821161101b578161101d565b805b905090506104e0526104805160008112612ac5576105005263632447c96105205233610540526020610520602461053c60006c050c783eb9b5c8400000000013545af161106f573d600060003e3d6000fd5b601f3d1115612ac5576105205061048051610520526104a0516105405260006104a05260006104805260033360a05260805260406080206104805181556104a051600182015550600254610560526105605161050051808210612ac557808203905090506002553360e0526105205161010052610540516101205261048051610140526104a05161016052611102611f86565b610500516104e051808202821582848304141715612ac55790509050670de0b6b3a7640000808204905090506105805263a9059cbb6105a052336105c0526105005161058051808210612ac557808203905090506105e05260206105a060446105bc60006001545af161117a573d600060003e3d6000fd5b601f3d1115612ac5576105a05115612ac557600061058051146112385763095ea7b36105a0526c050c783eb9b5c8400000000013546105c052610580516105e05260206105a060446105bc60006001545af16111db573d600060003e3d6000fd5b601f3d1115612ac5576105a05115612ac55763f14faf6f6105a052610580516105c05260206105a060246105bc60006c050c783eb9b5c8400000000013545af161122a573d600060003e3d6000fd5b601f3d1115612ac5576105a0505b337ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568610500516105a052426105c05260406105a0a27f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c610560516105a0526105605161050051808210612ac557808203905090506105c05260406105a0a16000600055005b6370a0823181186112d25742610100526112e4565b62fdd58e811861140357602435610100525b6004358060a01c612ac55760e0526c050c783eb9b5c840000000000660e05160a0526080526040608020546101205261012051156113f157600461012051633b9aca00811015612ac557026c050c783eb9b5c840000000000560e05160a05260805260406080200180546101405260018101546101605260028101546101805260038101546101a052506101408051610160516101005161018051808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac557905090508082038060801d81607f1d18612ac5579050905081525060006101405112156113d3576000610140525b6101405160008112612ac5576101c05260206101c061140156611401565b6000610140526020610140611401565bf35b63782d6fe1811861179c576004358060a01c612ac5576101a0524360243511612ac55760006101c0526c050c783eb9b5c84000000000066101a05160a0526080526040608020546101e05261020060006080818352015b6101e0516101c0511061146c57611517565b6101c0516101e0518181830110612ac5578082019050905060018181830110612ac55780820190509050600280820490509050610220526024356003600461022051633b9aca00811015612ac557026c050c783eb9b5c84000000000056101a05160a052608052604060802001015411156114fe57610220516001808210612ac557808203905090506101e052611507565b610220516101c0525b815160010180835281141561145a575b505060046101c051633b9aca00811015612ac557026c050c783eb9b5c84000000000056101a05160a052608052604060802001805461020052600181015461022052600281015461024052600381015461026052506004546102805260243560e052610280516101005261158c6102c061287e565b6102c0516102a05260046102a0516c01431e0fae6d7217caa0000000811015612ac5570260050180546102c05260018101546102e0526002810154610300526003810154610320525060403661034037610280516102a0511061161c574361032051808210612ac55780820390509050610340524261030051808210612ac55780820390509050610360526116a4565b60046102a05160018181830110612ac557808201905090506c01431e0fae6d7217caa0000000811015612ac5570260050180546103805260018101546103a05260028101546103c05260038101546103e052506103e05161032051808210612ac55780820390509050610340526103c05161030051808210612ac55780820390509050610360525b61030051610380526000610340511461170e5761038080516103605160243561032051808210612ac55780820390509050808202821582848304141715612ac5579050905061034051808015612ac5578204905090508181830110612ac557808201905090508152505b6102008051610220516103805161024051808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac557905090508082038060801d81607f1d18612ac5579050905081525060006102005112156117805760006103a05260206103a061179a5661179a565b6102005160008112612ac5576103a05260206103a061179a565bf35b6318160ddd81186117b15742610260526117c4565b63bd85b039811861184d57600435610260525b600454610280526004610280516c01431e0fae6d7217caa0000000811015612ac5570260050180546102a05260018101546102c05260028101546102e052600381015461030052506102a05160e0526102c051610100526102e051610120526103005161014052610260516101605261183e61032061294e565b61032051610340526020610340f35b63981b24d08118611a68574360043511612ac5576004546102605260043560e05261026051610100526118816102a061287e565b6102a051610280526004610280516c01431e0fae6d7217caa0000000811015612ac5570260050180546102a05260018101546102c05260028101546102e0526003810154610300525060006103205261026051610280511061194c57436103005114611a135760043561030051808210612ac55780820390509050426102e051808210612ac55780820390509050808202821582848304141715612ac557905090504361030051808210612ac55780820390509050808015612ac55782049050905061032052611a13565b60046102805160018181830110612ac557808201905090506c01431e0fae6d7217caa0000000811015612ac5570260050180546103405260018101546103605260028101546103805260038101546103a052506103a0516103005114611a135760043561030051808210612ac55780820390509050610380516102e051808210612ac55780820390509050808202821582848304141715612ac557905090506103a05161030051808210612ac55780820390509050808015612ac557820490509050610320525b6102a05160e0526102c051610100526102e0516101205261030051610140526102e051610320518181830110612ac5578082019050905061016052611a5961034061294e565b61034051610360526020610360f35b63fc0c546a8118611a7f5760015460e052602060e0f35b63047fc9aa8118611a965760025460e052602060e0f35b63cbf9fe5f8118611ad6576004358060a01c612ac55760e052600360e05160a0526080526040608020805461010052600181015461012052506040610100f35b63900cf0cf8118611aed5760045460e052602060e0f35b63d1febfb98118611b3d5760046004356c01431e0fae6d7217caa0000000811015612ac55702600501805460e05260018101546101005260028101546101205260038101546101405250608060e0f35b6328d09d478118611bae576004358060a01c612ac55760e0526004602435633b9aca00811015612ac557026c050c783eb9b5c840000000000560e05160a052608052604060802001805461010052600181015461012052600281015461014052600381015461016052506080610100f35b63010ae7578118611bef576004358060a01c612ac55760e0526c050c783eb9b5c840000000000660e05160a052608052604060802054610100526020610100f35b63711974848118611c20576c050c783eb9b5c840000000000760043560a05260805260406080205460e052602060e0f35b6306fdde038118611ccf5760e0806020808252808301806c050c783eb9b5c84000000000088082602082540160c060006003818352015b8260c0516020021115611c6957611c88565b60c05185015460c0516020028501528151600101808352811415611c57575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6395d89b418118611d7e5760e0806020808252808301806c050c783eb9b5c840000000000b8082602082540160c060006002818352015b8260c0516020021115611d1857611d37565b60c05185015460c0516020028501528151600101808352811415611d06575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b63313ce5678118611da1576c050c783eb9b5c840000000000d5460e052602060e0f35b638ff36fd18118611dc4576c050c783eb9b5c840000000000e5460e052602060e0f35b637175d4f78118611de7576c050c783eb9b5c840000000000f5460e052602060e0f35b63f851a4408118611e0a576c050c783eb9b5c84000000000105460e052602060e0f35b6317f7182a8118611e2d576c050c783eb9b5c84000000000115460e052602060e0f35b6381565a948118611e50576c050c783eb9b5c84000000000125460e052602060e0f35b6316bfdd568118611e73576c050c783eb9b5c84000000000135460e052602060e0f35b505b60006000fd5b3260e05114611f84576c050c783eb9b5c840000000000f546101005260006101005114611eea5763c23697a86101205260e051610140526020610120602461013c6000610100515af1611ed3573d600060003e3d6000fd5b601f3d1115612ac5576101205115611eea57611f84565b6025610120527f536d61727420636f6e7472616374206465706f7369746f7273206e6f7420616c610140527f6c6f7765640000000000000000000000000000000000000000000000000000006101605261012050610120518061014001818260206001820306601f82010390500336823750506308c379a060e0526020610100526101205160206001820306601f820103905060440160fcfd5b565b61014036610180376004546102c052600060e051146120f757426101205111611fb0576000611fb8565b600061010051135b1561201657610100516303c267008082058060801d81607f1d18612ac557905090506101a0526101a0516101205142808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac55790509050610180525b42610160511161202757600061202f565b600061014051135b1561208d57610140516303c267008082058060801d81607f1d18612ac5579050905061022052610220516101605142808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac55790509050610200525b6c050c783eb9b5c84000000000076101205160a05260805260406080205461028052600061016051146120f7576101205161016051186120d457610280516102a0526120f7565b6c050c783eb9b5c84000000000076101605160a0526080526040608020546102a0525b6040366102e0374261032052436103405260006102c05111156121565760046102c0516c01431e0fae6d7217caa0000000811015612ac5570260050180546102e052600181015461030052600281015461032052600381015461034052505b61032051610360526102e05161038052610300516103a052610320516103c052610340516103e052600061040052610320514211156121e457670de0b6b3a76400004361034051808210612ac55780820390509050808202821582848304141715612ac557905090504261032051808210612ac55780820390509050808015612ac557820490509050610400525b6103605162093a808082049050905062093a80808202821582848304141715612ac5579050905061042052610440600060ff818352015b610420805162093a808181830110612ac5578082019050905081525060006104605242610420511161226e576c050c783eb9b5c84000000000076104205160a05260805260406080205461046052612274565b42610420525b6102e08051610300516104205161036051808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac557905090508082038060801d81607f1d18612ac557905090508152506103008051610460518082018060801d81607f1d18612ac5579050905081525060006102e05112156122f95760006102e0525b600061030051121561230c576000610300525b610420516103605261042051610320526103e05161040051610420516103c051808210612ac55780820390509050808202821582848304141715612ac55790509050670de0b6b3a7640000808204905090508181830110612ac55780820190509050610340526102c0805160018181830110612ac557808201905090508152504261042051186123a45743610340526123f6566123e6565b60046102c0516c01431e0fae6d7217caa0000000811015612ac557026005016102e0518155610300516001820155610320516002820155610340516003820155505b815160010180835281141561221b575b50506102c051600455600060e0511461249f576103008051610220516101a0518082038060801d81607f1d18612ac557905090508082018060801d81607f1d18612ac557905090508152506102e0805161020051610180518082038060801d81607f1d18612ac557905090508082018060801d81607f1d18612ac55790509050815250600061030051121561248c576000610300525b60006102e051121561249f5760006102e0525b60046102c0516c01431e0fae6d7217caa0000000811015612ac557026005016102e051815561030051600182015561032051600282015561034051600382015550600060e0511461267357426101205111156125665761028080516101a0518082018060801d81607f1d18612ac55790509050815250610120516101605118612543576102808051610220518082038060801d81607f1d18612ac557905090508152505b610280516c050c783eb9b5c84000000000076101205160a0526080526040608020555b426101605111156125c257610120516101605111156125c2576102a08051610220518082038060801d81607f1d18612ac557905090508152506102a0516c050c783eb9b5c84000000000076101605160a0526080526040608020555b6c050c783eb9b5c840000000000660e05160a05260805260406080205460018181830110612ac5578082019050905061044052610440516c050c783eb9b5c840000000000660e05160a05260805260406080205542610240524361026052600461044051633b9aca00811015612ac557026c050c783eb9b5c840000000000560e05160a052608052604060802001610200518155610220516001820155610240516002820155610260516003820155505b565b610500516105605261052051610580526002546105a05263632447c96105c0526104a0516105e05260206105c060246105dc60006c050c783eb9b5c8400000000013545af16126c9573d600060003e3d6000fd5b601f3d1115612ac5576105c0506105a0516104c0518181830110612ac55780820190509050600255610560516105c052610580516105e05261056080516104c05180607f1c612ac5578082018060801d81607f1d18612ac5579050905081525060006104e0511461273d576104e051610580525b60036104a05160a0526080526040608020610560518155610580516001820155506104a05160e0526105c051610100526105e051610120526105605161014052610580516101605261278d611f86565b60006104c051146127e9576323b872dd61060052610480516106205230610640526104c051610660526020610600606461061c60006001545af16127d6573d600060003e3d6000fd5b601f3d1115612ac5576106005115612ac5575b610580516104a051610480517f4ace3cb811d903eba44ce1721d1a1d79232246711977f44236000551f8c11cc16104c05161060052610540516106205242610640526060610600a47f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c6105a051610600526105a0516104c0518181830110612ac55780820190509050610620526040610600a1565b600061012052610100516101405261016060006080818352015b6101405161012051106128aa57612943565b61012051610140518181830110612ac5578082019050905060018181830110612ac557808201905090506002808204905090506101805260e05160036004610180516c01431e0fae6d7217caa0000000811015612ac557026005010154111561292a57610180516001808210612ac5578082039050905061014052612933565b61018051610120525b8151600101808352811415612898575b505061012051815250565b60e05161018052610100516101a052610120516101c052610140516101e0526101c05162093a808082049050905062093a80808202821582848304141715612ac5579050905061020052610220600060ff818352015b610200805162093a808181830110612ac557808201905090508152506000610240526101605161020051116129fa576c050c783eb9b5c84000000000076102005160a05260805260406080205461024052612a03565b61016051610200525b61018080516101a051610200516101c051808210612ac5578082039050905080607f1c612ac5578082028060801d81607f1d18612ac557905090508082038060801d81607f1d18612ac55790509050815250610160516102005118612a6757612a9f565b6101a08051610240518082018060801d81607f1d18612ac55790509050815250610200516101c05281516001018083528114156129a4575b50506000610180511215612ab4576000610180525b6101805160008112612ac557815250565b600080fd

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

0000000000000000000000006123b0049f904d730db3c36a31167d9d4121fa6b000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000077da011d5314d80be59e939c2f7ec2f702e1dcc40000000000000000000000000000000000000000000000000000000000000011566f74652d657363726f7765642052424e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005766552424e000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : token_addr (address): 0x6123B0049F904d730dB3C36a31167D9d4121fA6B
Arg [1] : _name (string): Vote-escrowed RBN
Arg [2] : _symbol (string): veRBN
Arg [3] : _admin (address): 0x77DA011d5314D80BE59e939c2f7EC2F702E1DCC4

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000006123b0049f904d730db3c36a31167d9d4121fa6b
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 00000000000000000000000077da011d5314d80be59e939c2f7ec2f702e1dcc4
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000011
Arg [5] : 566f74652d657363726f7765642052424e000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [7] : 766552424e000000000000000000000000000000000000000000000000000000


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
Loading...
Loading
[ 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.