Contract 0x3ae658656d1c526144db371faef2fff7170654ee 2

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x708835ac2d4fd29b18816bcb97e4d5f194e48cd903ea49a5e1320368f26cdc1aWithdraw288181702022-01-23 12:21:2610 secs ago0x7165689327e57ef89f0d662674b253d020fdb1fc IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.073886418011
0xba6624a7d0a0250496ee3acfe27edcfeb9a469271e0b760422794298d49480aeIncrease_amount288178752022-01-23 12:17:463 mins ago0x01b9bd4b45f1666a1782a1c1c0f6d412113fe1d0 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.099159723016
0x37e19ce32777b46c452be1edc6513e34e93de4a07466c76ad05747e0bf634621Create_lock288176392022-01-23 12:14:506 mins ago0x3238934316238ebbda1ffb229ec9a37bf66c5564 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.1566285756
0xd704e53996cd427e1ce78b6c0059b5860902a8740703051f15fd0a3d16759c93Increase_amount288175342022-01-23 12:13:198 mins ago0x628da590d976dedd4e3b40f01ed5fffd40f8f6e6 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.119817559908
0x957431dba2cff4c22dfccd0d76ef6a3577ffc2b5c777ed6caeee52272cce167dCreate_lock288175092022-01-23 12:13:008 mins ago0xdbd9d3aab4b1eb7788efd53458e688670629674e IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.110653412264
0xfbafb98d4d7da0985ef10ae9a6c95fb88e39cac18980a609dba3f5e2fb6798d1Increase_amount288175022022-01-23 12:12:518 mins ago0xe0014add4b35e33e31b193a390e30902466ebdb6 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.091453150633
0xe706b2ac9a8c14138a08222b6734930a5b7374d8069167a0c8feb8d2e8c54a40Increase_amount288173212022-01-23 12:10:0511 mins ago0x8a11362f294770932b9670936c58b475c1c60272 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.104213634219
0x924fad9f01b210fbed5a188da6e8bc21112d714130a429ae35be5e38d88b5f3aIncrease_amount288171742022-01-23 12:08:0413 mins ago0x7dfc164f390a051f2483532d1756d80b76ea4aa8 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.09291551
0x6e51a6cec2b49537f6516041eb797f9733f7fde3df2ca8f02b7d2c05f8d4aa25Increase_amount288169402022-01-23 12:04:4316 mins ago0xf88163732294f864abc674b795a53ca0a11fca9b IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.120079598132
0x5f95eb6de8e70c4de8ccc2c47ec019f88187f99e6a452d5830cb350b699726b5Create_lock288169002022-01-23 12:04:0917 mins ago0xeb14d2fa38168048e4a2044df44f6c7a257d9217 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.136053315878
0xd044df714548e6f8bee281652afb52518321120b5e2ae619c0c5061309dc242dIncrease_amount288168652022-01-23 12:03:3917 mins ago0xafb7896e3083fa1d93f344a7dbec40b61e4ca49b IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.091482376151
0xf3be9b4fb52e8ac117e8af666b8469d49c365a1619e0baac807129e35e348940Create_lock288168212022-01-23 12:02:4618 mins ago0x8cf42d96a595b39008e4568576e77aff54df8382 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.159131902003
0x163afbb6b5b1e11d76b2e3373eb8e5c5035f59dba63d66cd9966e95c72fbd8a5Create_lock288167932022-01-23 12:02:1519 mins ago0x13b1a5a6786aac63d8875d6600c2b7ded62cecb4 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.157246706227
0x144dcfadb7300693a52e2c936399878938ca0504e2803c4460d0235d2e44a85aIncrease_amount288164662022-01-23 11:56:1525 mins ago0x43ea941ef5ba9887aff462650244588a0f3e1c7f IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.129177269403
0x0826fe3002e2f71b2ee887ebf4ab76f95332fc8c5e8f749f840774cb180e4820Create_lock288164022022-01-23 11:55:0426 mins ago0x7016a3420b512da8196606bc0986a6e87a58fa44 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.15280364928
0x3949446ae1905deeb6f01a4fda86890c448de316f852c253bfe303caca2680b7Increase_amount288163942022-01-23 11:54:5526 mins ago0x3977a17ea19bf3f99f15c199225052593085a031 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.122417005977
0xaa1eee21134941e57c6c8a754d9a7b4f569d45aa0a2681cffd6c647840faf13eIncrease_unlock_...288163082022-01-23 11:53:0728 mins ago0x5d17e1237a8384c91faba5a29200c6d4dd1e7642 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.136115393216
0x83c176fe1b8d90a3f232527efa5a3bee704f8047065e9430dcbd8f251869356cCreate_lock288161522022-01-23 11:50:1431 mins ago0x6e21316ab2344ad95e220c6c14420ac537547b3d IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.17050367959
0xcf5626f74a448b1d0699f7e3a30205e649b7627525323f12c68bc50eb649c30fIncrease_amount288161512022-01-23 11:50:1431 mins ago0x5d17e1237a8384c91faba5a29200c6d4dd1e7642 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.139875511
0x16d576bb68e36acf25d155e858ad327ce93c55cfad259da5c09b53af2f5d9511Increase_unlock_...288161122022-01-23 11:49:2132 mins ago0x2ea2ce595bd68a0cd1fd34b06df98970952fe4d2 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.043673866572
0x65044ccb51773781c8bf614ad0dbd2500baf3d7c387e683d43c808e313821facIncrease_unlock_...288160922022-01-23 11:48:5832 mins ago0x2ea2ce595bd68a0cd1fd34b06df98970952fe4d2 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.13596681728
0xbafa990824f7722b5b12846552e92ddcb93b2136e9ff54c5938d91c45bf57a43Increase_amount288160792022-01-23 11:48:4432 mins ago0x551d5743d293727489826f6c556eb940c471101f IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.13683431102
0xa3b956a4770a4f053552cdb0fe071357390c3e5a157562f90ab7bd26e6979f5bIncrease_unlock_...288160512022-01-23 11:48:1733 mins ago0xf2600daa361b56fda2c230764bdabd8a20e2170e IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.132803870752
0x8a753f3898b237058e08f9a06021e829ca565d56060e82343762b698f3a7856fIncrease_amount288159672022-01-23 11:46:4534 mins ago0x2ea2ce595bd68a0cd1fd34b06df98970952fe4d2 IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.10632668359
0x502e87111a054a2be6bea5b009945ff96b5703b29f50aca2931497ec4e807ff9Increase_amount288158292022-01-23 11:44:1337 mins ago0x4d23bd3776fd9a647410d668d7f00e312ccd007a IN  0x3ae658656d1c526144db371faef2fff7170654ee0 FTM0.17799431696
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x6758cc038414d309f8d175fe6c13246ecab603c63523140424e573f34ee1e173104474942021-06-23 16:12:49213 days 20 hrs ago 0x383ea12347e56932e08638767b8a2b3c18700493  Contract Creation0 FTM
[ Download CSV Export 
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.4
"""
@title Voting Escrow
@author Author
@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`.
"""

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


# 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 Deposit:
    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

# Aragon's view methods for compatibility
controller: public(address)
transfersEnabled: public(bool)

name: public(String[64])
symbol: public(String[32])
version: 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)


@external
def __init__(token_addr: address, _name: String[64], _symbol: String[32], _version: String[32]):
    """
    @notice Contract constructor
    @param token_addr `ERC20` token address
    @param _name Token name
    @param _symbol Token symbol
    @param _version Contract version - required for Aragon compatibility
    """
    self.admin = msg.sender
    self.token = token_addr
    self.point_history[0].blk = block.number
    self.point_history[0].ts = block.timestamp
    self.controller = msg.sender
    self.transfersEnabled = True

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

    self.name = _name
    self.symbol = _symbol
    self.version = _version


@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


@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 5 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(_addr: address, _value: uint256, unlock_time: uint256, locked_balance: LockedBalance, type: int128):
    """
    @notice Deposit and lock tokens for a user
    @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

    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(_addr, self, _value)

    log Deposit(_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(_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 + WEEK, "Voting lock can be 2 weeks min"
    assert unlock_time <= block.timestamp + MAXTIME, "Voting lock can be 2 years max"

    self._deposit_for(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, _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 4 years max"

    self._deposit_for(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]
    assert block.timestamp >= _locked.end, "The lock didn't expire"
    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)

    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 balanceOfAt(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)


@external
def changeController(_newController: address):
    """
    @dev Change controller
    """
    assert msg.sender == self.controller
    self.controller = _newController

Contract Security Audit

Contract ABI

[{"name":"CommitOwnership","inputs":[{"type":"address","name":"admin","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyOwnership","inputs":[{"type":"address","name":"admin","indexed":false}],"anonymous":false,"type":"event"},{"name":"Deposit","inputs":[{"type":"address","name":"provider","indexed":true},{"type":"uint256","name":"value","indexed":false},{"type":"uint256","name":"locktime","indexed":true},{"type":"int128","name":"type","indexed":false},{"type":"uint256","name":"ts","indexed":false}],"anonymous":false,"type":"event"},{"name":"Withdraw","inputs":[{"type":"address","name":"provider","indexed":true},{"type":"uint256","name":"value","indexed":false},{"type":"uint256","name":"ts","indexed":false}],"anonymous":false,"type":"event"},{"name":"Supply","inputs":[{"type":"uint256","name":"prevSupply","indexed":false},{"type":"uint256","name":"supply","indexed":false}],"anonymous":false,"type":"event"},{"outputs":[],"inputs":[{"type":"address","name":"token_addr"},{"type":"string","name":"_name"},{"type":"string","name":"_symbol"},{"type":"string","name":"_version"}],"stateMutability":"nonpayable","type":"constructor"},{"name":"commit_transfer_ownership","outputs":[],"inputs":[{"type":"address","name":"addr"}],"stateMutability":"nonpayable","type":"function","gas":37568},{"name":"apply_transfer_ownership","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":38407},{"name":"commit_smart_wallet_checker","outputs":[],"inputs":[{"type":"address","name":"addr"}],"stateMutability":"nonpayable","type":"function","gas":36278},{"name":"apply_smart_wallet_checker","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":37005},{"name":"get_last_user_slope","outputs":[{"type":"int128","name":""}],"inputs":[{"type":"address","name":"addr"}],"stateMutability":"view","type":"function","gas":2540},{"name":"user_point_history__ts","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_addr"},{"type":"uint256","name":"_idx"}],"stateMutability":"view","type":"function","gas":1643},{"name":"locked__end","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_addr"}],"stateMutability":"view","type":"function","gas":1564},{"name":"checkpoint","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":37118215},{"name":"deposit_for","outputs":[],"inputs":[{"type":"address","name":"_addr"},{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function","gas":74411056},{"name":"create_lock","outputs":[],"inputs":[{"type":"uint256","name":"_value"},{"type":"uint256","name":"_unlock_time"}],"stateMutability":"nonpayable","type":"function","gas":74412561},{"name":"increase_amount","outputs":[],"inputs":[{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function","gas":74411818},{"name":"increase_unlock_time","outputs":[],"inputs":[{"type":"uint256","name":"_unlock_time"}],"stateMutability":"nonpayable","type":"function","gas":74412465},{"name":"withdraw","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":37289006},{"name":"balanceOf","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"addr"}],"stateMutability":"view","type":"function"},{"name":"balanceOf","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"addr"},{"type":"uint256","name":"_t"}],"stateMutability":"view","type":"function"},{"name":"balanceOfAt","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"addr"},{"type":"uint256","name":"_block"}],"stateMutability":"view","type":"function","gas":509566},{"name":"totalSupply","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function"},{"name":"totalSupply","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"t"}],"stateMutability":"view","type":"function"},{"name":"totalSupplyAt","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"_block"}],"stateMutability":"view","type":"function","gas":879507},{"name":"changeController","outputs":[],"inputs":[{"type":"address","name":"_newController"}],"stateMutability":"nonpayable","type":"function","gas":36878},{"name":"token","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1751},{"name":"supply","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1781},{"name":"locked","outputs":[{"type":"int128","name":"amount"},{"type":"uint256","name":"end"}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":3260},{"name":"epoch","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1841},{"name":"point_history","outputs":[{"type":"int128","name":"bias"},{"type":"int128","name":"slope"},{"type":"uint256","name":"ts"},{"type":"uint256","name":"blk"}],"inputs":[{"type":"uint256","name":"arg0"}],"stateMutability":"view","type":"function","gas":5178},{"name":"user_point_history","outputs":[{"type":"int128","name":"bias"},{"type":"int128","name":"slope"},{"type":"uint256","name":"ts"},{"type":"uint256","name":"blk"}],"inputs":[{"type":"address","name":"arg0"},{"type":"uint256","name":"arg1"}],"stateMutability":"view","type":"function","gas":5423},{"name":"user_point_epoch","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":2146},{"name":"slope_changes","outputs":[{"type":"int128","name":""}],"inputs":[{"type":"uint256","name":"arg0"}],"stateMutability":"view","type":"function","gas":2076},{"name":"controller","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1991},{"name":"transfersEnabled","outputs":[{"type":"bool","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2021},{"name":"name","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":8453},{"name":"symbol","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":7506},{"name":"version","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":7536},{"name":"decimals","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2141},{"name":"future_smart_wallet_checker","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2171},{"name":"smart_wallet_checker","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2201},{"name":"admin","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2231},{"name":"future_admin","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2261}]

6f7fffffffffffffffffffffffffffffff6040526080612ff3610140396020612ff360c03960c05160a01c1561003457600080fd5b606060206020612ff30160c03960c051612ff3016101c039604060206020612ff30160c03960c05160040135111561006b57600080fd5b604060206040612ff30160c03960c051612ff30161024039602060206040612ff30160c03960c0516004013511156100a257600080fd5b604060206060612ff30160c03960c051612ff3016102a039602060206060612ff30160c03960c0516004013511156100d957600080fd5b3360105561014051600055436003600460c052602060c02060c052602060c0200155426002600460c052602060c02060c052602060c02001553360085560016009556020610380600463313ce5676103205261033c610140515afa61013d57600080fd5b601f3d1161014a57600080fd5b600050610380516103005260ff61030051111561016657600080fd5b61030051600d556101c080600a60c052602060c020602082510161012060006003818352015b8261012051602002111561019f576101c1565b61012051602002850151610120518501555b815160010180835281141561018c575b50505050505061024080600b60c052602060c020602082510161012060006002818352015b826101205160200211156101f95761021b565b61012051602002850151610120518501555b81516001018083528114156101e6575b5050505050506102a080600c60c052602060c020602082510161012060006002818352015b8261012051602002111561025357610275565b61012051602002850151610120518501555b8151600101808352811415610240575b505050505050612fdb56341561000a57600080fd5b600436101561001857612d55565b600035601c526f7fffffffffffffffffffffffffffffff604052636b441a4060005114156100945760043560a01c1561005057600080fd5b601054331461005e57600080fd5b600435601155600435610140527f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e96020610140a1005b636a1c05ae60005114156100ff5760105433146100b057600080fd5b60115461014052600061014051186100c757600080fd5b6101405160105561014051610160527febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a11891056020610160a1005b6357f901e260005114156101335760043560a01c1561011d57600080fd5b601054331461012b57600080fd5b600435600e55005b638e5b490f600051141561015757601054331461014f57600080fd5b600e54600f55005b600015610241575b61016052610140523261014051181561023b57600f546101805260006101805118156101d1576020610220602463c23697a86101a052610140516101c0526101bc6000610180515af16101b157600080fd5b601f3d116101be57600080fd5b60005061022051156101d05761016051565b5b6308c379a06101a05260206101c05260256101e0527f536d61727420636f6e7472616374206465706f7369746f7273206e6f7420616c610200527f6c6f776564000000000000000000000000000000000000000000000000000000610220526101e05060846101bcfd5b61016051565b637c74a17460005114156102b85760043560a01c1561025f57600080fd5b600660043560e05260c052604060c0205461014052600161014051633b9aca00811061028a57600080fd5b600560043560e05260c052604060c02060c052602060c0200160c052602060c020015460005260206000f350005b63da020a1860005114156103195760043560a01c156102d657600080fd5b6002602435633b9aca0081106102eb57600080fd5b600560043560e05260c052604060c02060c052602060c0200160c052602060c020015460005260206000f350005b63adc63589600051141561035e5760043560a01c1561033757600080fd5b6001600260043560e05260c052604060c02060c052602060c020015460005260206000f350005b600015610be6575b6101e0526101405261016052610180526101a0526101c052610140366102003760035461034052600061014051181561053557426101805111156103b057600061016051136103b3565b60005b1561043c57610160516303c26700808205808060008112156103d157195b607f1c156103de57600080fd5b90509050905061022052610220516101805142808210156103fe57600080fd5b8082039050905060405181111561041457600080fd5b8082028080600081121561042457195b607f1c1561043157600080fd5b905090509050610200525b426101c05111156104535760006101a05113610456565b60005b156104df576101a0516303c267008082058080600081121561047457195b607f1c1561048157600080fd5b9050905090506102a0526102a0516101c05142808210156104a157600080fd5b808203905090506040518111156104b757600080fd5b808202808060008112156104c757195b607f1c156104d457600080fd5b905090509050610280525b60076101805160e05260c052604060c020546103005260006101c051181561053457610180516101c051141561051c576103005161032052610533565b60076101c05160e05260c052604060c02054610320525b5b5b61036060008152600081602001524281604001524381606001525060006103405111156105cc57610360610340516c01431e0fae6d7217caa0000000811061057c57600080fd5b600460c052602060c020018060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c0200154826060015250505b6103a0516103e0526104006103608051825280602001518260200152806040015182604001528060600151826060015250506000610480526103a05142111561067b57670de0b6b3a7640000436103c0518082101561062a57600080fd5b80820390509050808202821582848304141761064557600080fd5b80905090509050426103a0518082101561065e57600080fd5b80820390509050808061067057600080fd5b820490509050610480525b6103e05162093a808082049050905062093a8080820282158284830414176106a257600080fd5b809050905090506104a0526104c0600060ff818352015b6104a0805162093a808181830110156106d157600080fd5b8082019050905081525060006104e052426104a05111156106f657426104a05261070d565b60076104a05160e05260c052604060c020546104e0525b6103608051610380516104a0516103e0518082101561072b57600080fd5b8082039050905060405181111561074157600080fd5b8082028080600081121561075157195b607f1c1561075e57600080fd5b9050905090508082038080600081121561077457195b607f1c1561078157600080fd5b90509050905081525061038080516104e051808201808060008112156107a357195b607f1c156107b057600080fd5b90509050905081525060006103605112156107cc576000610360525b60006103805112156107df576000610380525b6104a0516103e0526104a0516103a05261046051610480516104a051610440518082101561080c57600080fd5b80820390509050808202821582848304141761082757600080fd5b80905090509050670de0b6b3a76400008082049050905081818301101561084d57600080fd5b808201905090506103c0526103408051600181818301101561086e57600080fd5b80820190509050815250426104a051141561089157436103c0526108fa566108e9565b610340516c01431e0fae6d7217caa000000081106108ae57600080fd5b600460c052602060c0200160c052602060c0206103608051825580602001516001830155806040015160028301558060600151600383015550505b5b81516001018083528114156106b9575b50506103405160035560006101405118156109e25761038080516102a051610220518082038080600081121561092c57195b607f1c1561093957600080fd5b9050905090508082018080600081121561094f57195b607f1c1561095c57600080fd5b905090509050815250610360805161028051610200518082038080600081121561098257195b607f1c1561098f57600080fd5b905090509050808201808060008112156109a557195b607f1c156109b257600080fd5b90509050905081525060006103805112156109ce576000610380525b60006103605112156109e1576000610360525b5b610340516c01431e0fae6d7217caa000000081106109ff57600080fd5b600460c052602060c0200160c052602060c0206103608051825580602001516001830155806040015160028301558060600151600383015550506000610140511815610be05742610180511115610ad45761030080516102205180820180806000811215610a6957195b607f1c15610a7657600080fd5b905090509050815250610180516101c0511415610abd5761030080516102a05180820380806000811215610aa657195b607f1c15610ab357600080fd5b9050905090508152505b6103005160076101805160e05260c052604060c020555b426101c0511115610b3457610180516101c0511115610b335761032080516102a05180820380806000811215610b0657195b607f1c15610b1357600080fd5b9050905090508152506103205160076101c05160e05260c052604060c020555b5b60066101405160e05260c052604060c020546001818183011015610b5757600080fd5b808201905090506104c0526104c05160066101405160e05260c052604060c02055426102c052436102e0526104c051633b9aca008110610b9657600080fd5b60056101405160e05260c052604060c02060c052602060c0200160c052602060c0206102808051825580602001516001830155806040015160028301558060600151600383015550505b6101e051565b600015610e8e575b610200526101405261016052610180526101a0526101c0526101e0526102206101a080518252806020015182602001525050600154610260526102605161016051818183011015610c3e57600080fd5b8082019050905060015561028061022080518252806020015182602001525050610220805161016051604051811115610c7657600080fd5b80820180806000811215610c8657195b607f1c15610c9357600080fd5b9050905090508152506000610180511815610cb15761018051610240525b60026101405160e05260c052604060c02060c052602060c020610220805182558060200151600183015550506101405161016051610180516101a0516101c0516101e05161020051610220516102405161026051610280516102a051610140516102c0526102e061028080518252806020015182602001525050610320610220805182528060200151826020015250506103405161032051610300516102e0516102c05160065801610366565b6102a05261028052610260526102405261022052610200526101e0526101c0526101a0526101805261016052610140526000506000610160511815610df357602061038060646323b872dd6102c052610140516102e052306103005261016051610320526102dc60006000545af1610dd557600080fd5b601f3d11610de257600080fd5b60005061038051610df257600080fd5b5b610160516102c0526101e0516102e052426103005261024051610140517f4566dfc29f6f11d13a418c26a02bef7c28bae749d4de47e4e6a7cddea6730d5960606102c0a3610260516102c0526102605161016051818183011015610e5657600080fd5b808201905090506102e0527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c60406102c0a161020051565b63c2c4c5c16000511415610f1e5760403661014037604036610180376101405161016051610180516101a05160006101c0526101e061014080518252806020015182602001525050610220610180805182528060200151826020015250506102405161022051610200516101e0516101c05160065801610366565b6101a052610180526101605261014052600050005b633a46273e60005114156110e65762ffffff5415610f3b57600080fd5b600162ffffff5560043560a01c15610f5257600080fd5b610140600260043560e05260c052604060c0208060c052602060c02054825260018160c052602060c020015482602001525050600060243511610f9457600080fd5b600061014051131515610fe6576308c379a06101805260206101a05260166101c0527f4e6f206578697374696e67206c6f636b20666f756e64000000000000000000006101e0526101c050606461019cfd5b426101605111151561105c576308c379a06101805260206101a05260246101c0527f43616e6e6f742061646420746f2065787069726564206c6f636b2e20576974686101e0527f6472617700000000000000000000000000000000000000000000000000000000610200526101c050608461019cfd5b6101405161016051600435610180526024356101a05260006101c0526101e0600260043560e05260c052604060c0208060c052602060c02054825260018160c052602060c02001548260200152505060006102205261022051610200516101e0516101c0516101a0516101805160065801610bee565b6101605261014052600050600062ffffff55005b6365fc3873600051141561132d5762ffffff541561110357600080fd5b600162ffffff553361014052610140516006580161015f565b60005060243562093a808082049050905062093a80808202821582848304141761114557600080fd5b809050905090506101405261016060023360e05260c052604060c0208060c052602060c02054825260018160c052602060c02001548260200152505060006004351161119057600080fd5b610160511515156111e0576308c379a06101a05260206101c05260196101e0527f5769746864726177206f6c6420746f6b656e7320666972737400000000000000610200526101e05060646101bcfd5b4262093a808181830110156111f457600080fd5b808201905090506101405111151561124b576308c379a06101a05260206101c052601e6101e0527f566f74696e67206c6f636b2063616e2062652032207765656b73206d696e0000610200526101e05060646101bcfd5b426303c2670081818301101561126057600080fd5b8082019050905061014051111515156112b8576308c379a06101a05260206101c052601e6101e0527f566f74696e67206c6f636b2063616e2062652032207965617273206d61780000610200526101e05060646101bcfd5b610140516101605161018051336101a0526004356101c052610140516101e052610200610160805182528060200151826020015250506001610240526102405161022051610200516101e0516101c0516101a05160065801610bee565b610180526101605261014052600050600062ffffff55005b634957677c60005114156114d95762ffffff541561134a57600080fd5b600162ffffff553361014052610140516006580161015f565b60005061014060023360e05260c052604060c0208060c052602060c02054825260018160c052602060c0200154826020015250506000600435116113a657600080fd5b6000610140511315156113f8576308c379a06101805260206101a05260166101c0527f4e6f206578697374696e67206c6f636b20666f756e64000000000000000000006101e0526101c050606461019cfd5b426101605111151561146e576308c379a06101805260206101a05260246101c0527f43616e6e6f742061646420746f2065787069726564206c6f636b2e20576974686101e0527f6472617700000000000000000000000000000000000000000000000000000000610200526101c050608461019cfd5b610140516101605133610180526004356101a05260006101c0526101e06101408051825280602001518260200152505060026102205261022051610200516101e0516101c0516101a0516101805160065801610bee565b6101605261014052600050600062ffffff55005b63eff7a612600051141561174c5762ffffff54156114f657600080fd5b600162ffffff553361014052610140516006580161015f565b60005061014060023360e05260c052604060c0208060c052602060c02054825260018160c052602060c02001548260200152505060043562093a808082049050905062093a80808202821582848304141761156957600080fd5b809050905090506101805242610160511115156115c5576308c379a06101a05260206101c052600c6101e0527f4c6f636b20657870697265640000000000000000000000000000000000000000610200526101e05060646101bcfd5b600061014051131515611617576308c379a06101a05260206101c05260116101e0527f4e6f7468696e67206973206c6f636b6564000000000000000000000000000000610200526101e05060646101bcfd5b610160516101805111151561166b576308c379a06101a05260206101c052601f6101e0527f43616e206f6e6c7920696e637265617365206c6f636b206475726174696f6e00610200526101e05060646101bcfd5b426303c2670081818301101561168057600080fd5b8082019050905061018051111515156116d8576308c379a06101a05260206101c052601e6101e0527f566f74696e67206c6f636b2063616e2062652034207965617273206d61780000610200526101e05060646101bcfd5b610140516101605161018051336101a05260006101c052610180516101e052610200610140805182528060200151826020015250506003610240526102405161022051610200516101e0516101c0516101a05160065801610bee565b610180526101605261014052600050600062ffffff55005b633ccfd60b60005114156119d55762ffffff541561176957600080fd5b600162ffffff5561014060023360e05260c052604060c0208060c052602060c02054825260018160c052602060c0200154826020015250506101605142101515156117f3576308c379a06101805260206101a05260166101c0527f546865206c6f636b206469646e277420657870697265000000000000000000006101e0526101c050606461019cfd5b61014051600081121561180557600080fd5b610180526101a06101408051825280602001518260200152505060006101605260006101405260023360e05260c052604060c02060c052602060c020610140805182558060200151600183015550506001546101e0526101e051610180518082101561187057600080fd5b808203905090506001556101405161016051610180516101a0516101c0516101e05133610200526102206101a08051825280602001518260200152505061026061014080518252806020015182602001525050610280516102605161024051610220516102005160065801610366565b6101e0526101c0526101a05261018052610160526101405260005060206102a0604463a9059cbb610200523361022052610180516102405261021c60006000545af161192b57600080fd5b601f3d1161193857600080fd5b6000506102a05161194857600080fd5b61018051610200524261022052337ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5686040610200a26101e051610200526101e051610180518082101561199a57600080fd5b80820390509050610220527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c6040610200a1600062ffffff55005b600015611aea575b61018052610140526101605260006101a052610160516101c0526101e060006080818352015b6101c0516101a051101515611a1757611ad6565b6101a0516101c051818183011015611a2e57600080fd5b808201905090506001818183011015611a4657600080fd5b8082019050905060028082049050905061020052610140516003610200516c01431e0fae6d7217caa00000008110611a7d57600080fd5b600460c052602060c0200160c052602060c0200154111515611aa657610200516101a052611ac5565b61020051600180821015611ab957600080fd5b808203905090506101c0525b5b8151600101808352811415611a03575b50506101a051600052600051610180515650005b6370a082316000511415611b02574261014052611b27565b62fdd58e6000511415611b1f576020602461014037600050611b27565b600015611c88575b60043560a01c15611b3757600080fd5b600660043560e05260c052604060c0205461016052610160511515611b6657600060005260206000f350611c86565b61018061016051633b9aca008110611b7d57600080fd5b600560043560e05260c052604060c02060c052602060c020018060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c02001548260600152505061018080516101a051610140516101c05180821015611bf857600080fd5b80820390509050604051811115611c0e57600080fd5b80820280806000811215611c1e57195b607f1c15611c2b57600080fd5b90509050905080820380806000811215611c4157195b607f1c15611c4e57600080fd5b9050905090508152506000610180511215611c6a576000610180525b610180516000811215611c7c57600080fd5b60005260206000f3505b005b634ee2cd7e60005114156121615760043560a01c15611ca657600080fd5b436024351115611cb557600080fd5b600061014052600660043560e05260c052604060c020546101605261018060006080818352015b6101605161014051101515611cf057611db3565b6101405161016051818183011015611d0757600080fd5b808201905090506001818183011015611d1f57600080fd5b808201905090506002808204905090506101a05260243560036101a051633b9aca008110611d4c57600080fd5b600560043560e05260c052604060c02060c052602060c0200160c052602060c0200154111515611d83576101a05161014052611da2565b6101a051600180821015611d9657600080fd5b80820390509050610160525b5b8151600101808352811415611cdc575b505061018061014051633b9aca008110611dcc57600080fd5b600560043560e05260c052604060c02060c052602060c020018060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c020015482606001525050600354610200526101405161016051610180516101a0516101c0516101e05161020051610220516024356102405261020051610260526102605161024051600658016119dd565b6102c05261022052610200526101e0526101c0526101a0526101805261016052610140526102c05161022052610240610220516c01431e0fae6d7217caa00000008110611ebc57600080fd5b600460c052602060c020018060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c0200154826060015250506040366102c03761020051610220511015611fec57610300610220516001818183011015611f3857600080fd5b808201905090506c01431e0fae6d7217caa00000008110611f5857600080fd5b600460c052602060c020018060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c020015482606001525050610360516102a05180821015611fbc57600080fd5b808203905090506102c052610340516102805180821015611fdc57600080fd5b808203905090506102e052612027565b436102a05180821015611ffe57600080fd5b808203905090506102c05242610280518082101561201b57600080fd5b808203905090506102e0525b610280516103005260006102c05118156120a95761030080516102e0516024356102a0518082101561205857600080fd5b80820390509050808202821582848304141761207357600080fd5b809050905090506102c051808061208957600080fd5b82049050905081818301101561209e57600080fd5b808201905090508152505b61018080516101a051610300516101c051808210156120c757600080fd5b808203905090506040518111156120dd57600080fd5b808202808060008112156120ed57195b607f1c156120fa57600080fd5b9050905090508082038080600081121561211057195b607f1c1561211d57600080fd5b9050905090508152506000610180511215156121535761018051600081121561214557600080fd5b60005260206000f35061215f565b600060005260206000f3505b005b600015612350575b6101e0526101405261016052610180526101a0526101c0526102006101408051825280602001518260200152806040015182604001528060600151826060015250506102405162093a808082049050905062093a8080820282158284830414176121d257600080fd5b80905090509050610280526102a0600060ff818352015b610280805162093a8081818301101561220157600080fd5b8082019050905081525060006102c0526101c05161028051111561222c576101c05161028052612243565b60076102805160e05260c052604060c020546102c0525b61020080516102205161028051610240518082101561226157600080fd5b8082039050905060405181111561227757600080fd5b8082028080600081121561228757195b607f1c1561229457600080fd5b905090509050808203808060008112156122aa57195b607f1c156122b757600080fd5b9050905090508152506101c0516102805114156122d35761231b565b61022080516102c051808201808060008112156122ec57195b607f1c156122f957600080fd5b90509050905081525061028051610240525b81516001018083528114156121e9575b50506000610200511215612330576000610200525b61020051600081121561234257600080fd5b6000526000516101e0515650005b6318160ddd600051141561236857426101405261238e565b63bd85b039600051141561238657602060046101403760005061238e565b600015612496575b60035461016052610180610160516c01431e0fae6d7217caa000000081106123b557600080fd5b600460c052602060c020018060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c0200154826060015250506101405161016051610180516101a0516101c0516101e0516102006101808051825280602001518260200152806040015182604001528060600151826060015250506101405161028052610280516102605161024051610220516102005160065801612169565b6102e0526101e0526101c0526101a0526101805261016052610140526102e05160005260206000f350005b63981b24d060005114156127d5574360043511156124b357600080fd5b60035461014052610140516101605160043561018052610140516101a0526101a05161018051600658016119dd565b6102005261016052610140526102005161016052610180610160516c01431e0fae6d7217caa0000000811061251657600080fd5b600460c052602060c020018060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c020015482606001525050600061020052610140516101605110156126975761022061016051600181818301101561259157600080fd5b808201905090506c01431e0fae6d7217caa000000081106125b157600080fd5b600460c052602060c020018060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015260038160c052602060c020015482606001525050610280516101e0511815612692576004356101e0518082101561262257600080fd5b80820390509050610260516101c0518082101561263e57600080fd5b80820390509050808202821582848304141761265957600080fd5b80905090509050610280516101e0518082101561267557600080fd5b80820390509050808061268757600080fd5b820490509050610200525b612721565b436101e0511815612720576004356101e051808210156126b657600080fd5b80820390509050426101c051808210156126cf57600080fd5b8082039050905080820282158284830414176126ea57600080fd5b80905090509050436101e0518082101561270357600080fd5b80820390509050808061271557600080fd5b820490509050610200525b5b6101405161016051610180516101a0516101c0516101e051610200516102206101808051825280602001518260200152806040015182604001528060600151826060015250506101c0516102005181818301101561277e57600080fd5b808201905090506102a0526102a0516102805161026051610240516102205160065801612169565b61030052610200526101e0526101c0526101a0526101805261016052610140526103005160005260206000f350005b633cebb82360005114156128095760043560a01c156127f357600080fd5b600854331461280157600080fd5b600435600855005b63fc0c546a60005114156128255760005460005260206000f350005b63047fc9aa60005114156128415760015460005260206000f350005b63cbf9fe5f60005114156128b05760043560a01c1561285f57600080fd5b600260043560e05260c052604060c0206101408080808460c052602060c0205481525050602081019050808060018560c052602060c02001548152505060409050905060c05260c051610140f39050005b63900cf0cf60005114156128cc5760035460005260206000f350005b63d1febfb96000511415612974576004356c01431e0fae6d7217caa000000081106128f657600080fd5b600460c052602060c020016101408080808460c052602060c0205481525050602081019050808060018560c052602060c020015481525050602081019050808060028560c052602060c020015481525050602081019050808060038560c052602060c02001548152505060809050905060c05260c051610140f39050005b6328d09d476000511415612a315760043560a01c1561299257600080fd5b602435633b9aca0081106129a557600080fd5b600560043560e05260c052604060c02060c052602060c020016101408080808460c052602060c0205481525050602081019050808060018560c052602060c020015481525050602081019050808060028560c052602060c020015481525050602081019050808060038560c052602060c02001548152505060809050905060c05260c051610140f39050005b63010ae7576000511415612a6b5760043560a01c15612a4f57600080fd5b600660043560e05260c052604060c0205460005260206000f350005b63711974846000511415612a9557600760043560e05260c052604060c0205460005260206000f350005b63f77c47916000511415612ab15760085460005260206000f350005b63bef97c876000511415612acd5760095460005260206000f350005b6306fdde036000511415612b7657600a8060c052602060c020610180602082540161012060006003818352015b82610120516020021115612b0d57612b2f565b61012051850154610120516020028501525b8151600101808352811415612afa575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b6395d89b416000511415612c1f57600b8060c052602060c020610180602082540161012060006002818352015b82610120516020021115612bb657612bd8565b61012051850154610120516020028501525b8151600101808352811415612ba3575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b6354fd4d506000511415612cc857600c8060c052602060c020610180602082540161012060006002818352015b82610120516020021115612c5f57612c81565b61012051850154610120516020028501525b8151600101808352811415612c4c575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b63313ce5676000511415612ce457600d5460005260206000f350005b638ff36fd16000511415612d0057600e5460005260206000f350005b637175d4f76000511415612d1c57600f5460005260206000f350005b63f851a4406000511415612d385760105460005260206000f350005b6317f7182a6000511415612d545760115460005260206000f350005b5b60006000fd5b610280612fdb03610280600039610280612fdb036000f300000000000000000000000010b620b2dbac4faa7d7ffd71da486f5d44cd86f9000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000005784c5144520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005784c514452000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b784c5144525f312e302e30000000000000000000000000000000000000000000

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

00000000000000000000000010b620b2dbac4faa7d7ffd71da486f5d44cd86f9000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000005784c5144520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005784c514452000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b784c5144525f312e302e30000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : token_addr (address): 0x10b620b2dbac4faa7d7ffd71da486f5d44cd86f9
Arg [1] : _name (string): xLQDR
Arg [2] : _symbol (string): xLQDR
Arg [3] : _version (string): xLQDR_1.0.0

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 00000000000000000000000010b620b2dbac4faa7d7ffd71da486f5d44cd86f9
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 784c514452000000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [7] : 784c514452000000000000000000000000000000000000000000000000000000
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [9] : 784c5144525f312e302e30000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.