Contract 0x28987563F563d2abcB6d74cdF37BDFB5F566Ea79

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x6e7a4bf7616178e292728f6b59498e81c0c7ada75f5805950c8f280ff6cded3a0x6020614b120227582022-05-14 4:33:54139 days 11 hrs ago0x745748bcfd8f9c2de519a71d789be8a63dd7d66c IN  Create: Vyper_contract0 ETH0.041693533191 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x87e0928c1b00c19d77a1965519f14de1df92086cbaffebae885186f27f104330271204842022-09-28 4:37:282 days 11 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0x87e0928c1b00c19d77a1965519f14de1df92086cbaffebae885186f27f104330271204842022-09-28 4:37:282 days 11 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0xcb9fa66725693b30cb23b5d197f4ee867f76e5dfb93180789d96b557a03dc207271184592022-09-28 4:24:562 days 11 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0xcb9fa66725693b30cb23b5d197f4ee867f76e5dfb93180789d96b557a03dc207271184592022-09-28 4:24:562 days 11 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0xcb9fa66725693b30cb23b5d197f4ee867f76e5dfb93180789d96b557a03dc207271184592022-09-28 4:24:562 days 11 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0xcb9fa66725693b30cb23b5d197f4ee867f76e5dfb93180789d96b557a03dc207271184592022-09-28 4:24:562 days 11 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0xcb9fa66725693b30cb23b5d197f4ee867f76e5dfb93180789d96b557a03dc207271184592022-09-28 4:24:562 days 11 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0xcb9fa66725693b30cb23b5d197f4ee867f76e5dfb93180789d96b557a03dc207271184592022-09-28 4:24:562 days 11 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0xcb9fa66725693b30cb23b5d197f4ee867f76e5dfb93180789d96b557a03dc207271184592022-09-28 4:24:562 days 11 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0xcb9fa66725693b30cb23b5d197f4ee867f76e5dfb93180789d96b557a03dc207271184592022-09-28 4:24:562 days 11 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0xcb9fa66725693b30cb23b5d197f4ee867f76e5dfb93180789d96b557a03dc207271184592022-09-28 4:24:562 days 11 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0xcb9fa66725693b30cb23b5d197f4ee867f76e5dfb93180789d96b557a03dc207271184592022-09-28 4:24:562 days 11 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0xf89aa14f36b3a7e85b9539f9c156764e198cac2cf3ea0dd0e203ff48a89d7e2d271114332022-09-28 3:37:132 days 12 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0xf89aa14f36b3a7e85b9539f9c156764e198cac2cf3ea0dd0e203ff48a89d7e2d271114332022-09-28 3:37:132 days 12 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0xf89aa14f36b3a7e85b9539f9c156764e198cac2cf3ea0dd0e203ff48a89d7e2d271114332022-09-28 3:37:132 days 12 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0xf89aa14f36b3a7e85b9539f9c156764e198cac2cf3ea0dd0e203ff48a89d7e2d271114332022-09-28 3:37:132 days 12 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0xf89aa14f36b3a7e85b9539f9c156764e198cac2cf3ea0dd0e203ff48a89d7e2d271114332022-09-28 3:37:132 days 12 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0xf89aa14f36b3a7e85b9539f9c156764e198cac2cf3ea0dd0e203ff48a89d7e2d271114332022-09-28 3:37:132 days 12 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0xf89aa14f36b3a7e85b9539f9c156764e198cac2cf3ea0dd0e203ff48a89d7e2d271114332022-09-28 3:37:132 days 12 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0xf89aa14f36b3a7e85b9539f9c156764e198cac2cf3ea0dd0e203ff48a89d7e2d271114332022-09-28 3:37:132 days 12 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0x6f21f2591045fa07484fbfb3166f6c4c205b8c1e9bddc7dbf9ff687b82e26dbe271108902022-09-28 3:34:082 days 12 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0x6f21f2591045fa07484fbfb3166f6c4c205b8c1e9bddc7dbf9ff687b82e26dbe271108902022-09-28 3:34:082 days 12 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0x6f21f2591045fa07484fbfb3166f6c4c205b8c1e9bddc7dbf9ff687b82e26dbe271108902022-09-28 3:34:082 days 12 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
0x6f21f2591045fa07484fbfb3166f6c4c205b8c1e9bddc7dbf9ff687b82e26dbe271108902022-09-28 3:34:082 days 12 hrs ago 0x3895064fd74a86542206c4c39eb1bf14bb9af9a6 0x28987563f563d2abcb6d74cdf37bdfb5f566ea790 ETH
0x6f21f2591045fa07484fbfb3166f6c4c205b8c1e9bddc7dbf9ff687b82e26dbe271108902022-09-28 3:34:082 days 12 hrs ago 0x28987563f563d2abcb6d74cdf37bdfb5f566ea79 0x12f407340697ae0b177546e535b91a5be021fbf90 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.3.1

Optimization Enabled:
N/A

Other Settings:
, None license

Contract Source Code (Vyper language format)

# @version 0.3.1
"""
@title Voting Escrow Delegation
@author Curve Finance
@license MIT
@dev Provides test functions only available in test mode (`brownie test`)
"""


interface ERC721Receiver:
    def onERC721Received(
        _operator: address, _from: address, _token_id: uint256, _data: Bytes[4096]
    ) -> bytes32:
        nonpayable

interface VotingEscrow:
    def balanceOf(_account: address) -> int256: view
    def locked(_addr: address) -> (int128, uint256): view


event Approval:
    _owner: indexed(address)
    _approved: indexed(address)
    _token_id: indexed(uint256)

event ApprovalForAll:
    _owner: indexed(address)
    _operator: indexed(address)
    _approved: bool

event Transfer:
    _from: indexed(address)
    _to: indexed(address)
    _token_id: indexed(uint256)

event BurnBoost:
    _delegator: indexed(address)
    _receiver: indexed(address)
    _token_id: indexed(uint256)

event DelegateBoost:
    _delegator: indexed(address)
    _receiver: indexed(address)
    _token_id: indexed(uint256)
    _amount: uint256
    _cancel_time: uint256
    _expire_time: uint256

event ExtendBoost:
    _delegator: indexed(address)
    _receiver: indexed(address)
    _token_id: indexed(uint256)
    _amount: uint256
    _expire_time: uint256
    _cancel_time: uint256

event TransferBoost:
    _from: indexed(address)
    _to: indexed(address)
    _token_id: indexed(uint256)
    _amount: uint256
    _expire_time: uint256

event GreyListUpdated:
    _receiver: indexed(address)
    _delegator: indexed(address)
    _status: bool


struct Boost:
    # [bias uint128][slope int128]
    delegated: uint256
    received: uint256
    # [total active delegations 128][next expiry 128]
    expiry_data: uint256

struct Token:
    # [bias uint128][slope int128]
    data: uint256
    # [delegator pos 128][cancel time 128]
    dinfo: uint256
    # [global 128][local 128]
    position: uint256
    expire_time: uint256

struct Point:
    bias: int256
    slope: int256


IDENTITY_PRECOMPILE: constant(address) = 0x0000000000000000000000000000000000000004
MAX_PCT: constant(uint256) = 10_000
WEEK: constant(uint256) = 86400 * 7
VOTING_ESCROW: constant(address) = 0x12F407340697Ae0b177546E535b91A5be021fBF9


balanceOf: public(HashMap[address, uint256])
getApproved: public(HashMap[uint256, address])
isApprovedForAll: public(HashMap[address, HashMap[address, bool]])
ownerOf: public(HashMap[uint256, address])

name: public(String[32])
symbol: public(String[32])
base_uri: public(String[128])

totalSupply: public(uint256)
# use totalSupply to determine the length
tokenByIndex: public(HashMap[uint256, uint256])
# use balanceOf to determine the length
tokenOfOwnerByIndex: public(HashMap[address, uint256[MAX_UINT256]])

boost: HashMap[address, Boost]
boost_tokens: HashMap[uint256, Token]

token_of_delegator_by_index: public(HashMap[address, uint256[MAX_UINT256]])
total_minted: public(HashMap[address, uint256])
# address => timestamp => # of delegations expiring
account_expiries: public(HashMap[address, HashMap[uint256, uint256]])

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

# The grey list - per-user black and white lists
# users can make this a blacklist or a whitelist - defaults to blacklist
# gray_list[_receiver][_delegator]
# by default is blacklist, with no delegators blacklisted
# if [_receiver][ZERO_ADDRESS] is False = Blacklist, True = Whitelist
# if this is a blacklist, receivers disallow any delegations from _delegator if it is True
# if this is a whitelist, receivers only allow delegations from _delegator if it is True
# Delegation will go through if: not (grey_list[_receiver][ZERO_ADDRESS] ^ grey_list[_receiver][_delegator])
grey_list: public(HashMap[address, HashMap[address, bool]])


@external
def __init__(_name: String[32], _symbol: String[32], _base_uri: String[128]):
    self.name = _name
    self.symbol = _symbol
    self.base_uri = _base_uri

    self.admin = msg.sender


@internal
def _approve(_owner: address, _approved: address, _token_id: uint256):
    self.getApproved[_token_id] = _approved
    log Approval(_owner, _approved, _token_id)


@view
@internal
def _is_approved_or_owner(_spender: address, _token_id: uint256) -> bool:
    owner: address = self.ownerOf[_token_id]
    return (
        _spender == owner
        or _spender == self.getApproved[_token_id]
        or self.isApprovedForAll[owner][_spender]
    )


@internal
def _update_enumeration_data(_from: address, _to: address, _token_id: uint256):
    delegator: address = convert(shift(_token_id, -96), address)
    position_data: uint256 = self.boost_tokens[_token_id].position
    local_pos: uint256 = position_data % 2 ** 128
    global_pos: uint256 = shift(position_data, -128)
    # position in the delegator array of minted tokens
    delegator_pos: uint256 = shift(self.boost_tokens[_token_id].dinfo, -128)

    if _from == ZERO_ADDRESS:
        # minting - This is called before updates to balance and totalSupply
        local_pos = self.balanceOf[_to]
        global_pos = self.totalSupply
        position_data = shift(global_pos, 128) + local_pos
        # this is a new token so we get the index of a new spot
        delegator_pos = self.total_minted[delegator]

        self.tokenByIndex[global_pos] = _token_id
        self.tokenOfOwnerByIndex[_to][local_pos] = _token_id
        self.boost_tokens[_token_id].position = position_data

        # we only mint tokens in the create_boost fn, and this is called
        # before we update the cancel_time so we can just set the value
        # of dinfo to the shifted position
        self.boost_tokens[_token_id].dinfo = shift(delegator_pos, 128)
        self.token_of_delegator_by_index[delegator][delegator_pos] = _token_id
        self.total_minted[delegator] = delegator_pos + 1

    elif _to == ZERO_ADDRESS:
        # burning - This is called after updates to balance and totalSupply
        # we operate on both the global array and local array
        last_global_index: uint256 = self.totalSupply
        last_local_index: uint256 = self.balanceOf[_from]
        last_delegator_pos: uint256 = self.total_minted[delegator] - 1

        if global_pos != last_global_index:
            # swap - set the token we're burnings position to the token in the last index
            last_global_token: uint256 = self.tokenByIndex[last_global_index]
            last_global_token_pos: uint256 = self.boost_tokens[last_global_token].position
            # update the global position of the last global token
            self.boost_tokens[last_global_token].position = shift(global_pos, 128) + (last_global_token_pos % 2 ** 128)
            self.tokenByIndex[global_pos] = last_global_token
        self.tokenByIndex[last_global_index] = 0

        if local_pos != last_local_index:
            # swap - set the token we're burnings position to the token in the last index
            last_local_token: uint256 = self.tokenOfOwnerByIndex[_from][last_local_index]
            last_local_token_pos: uint256 = self.boost_tokens[last_local_token].position
            # update the local position of the last local token
            self.boost_tokens[last_local_token].position = shift(last_local_token_pos / 2 ** 128, 128) + local_pos
            self.tokenOfOwnerByIndex[_from][local_pos] = last_local_token
        self.tokenOfOwnerByIndex[_from][last_local_index] = 0
        self.boost_tokens[_token_id].position = 0

        if delegator_pos != last_delegator_pos:
            last_delegator_token: uint256 = self.token_of_delegator_by_index[delegator][last_delegator_pos]
            last_delegator_token_dinfo: uint256 = self.boost_tokens[last_delegator_token].dinfo
            # update the last tokens position data and maintain the correct cancel time
            self.boost_tokens[last_delegator_token].dinfo = shift(delegator_pos, 128) + (last_delegator_token_dinfo % 2 ** 128)
            self.token_of_delegator_by_index[delegator][delegator_pos] = last_delegator_token
        self.token_of_delegator_by_index[delegator][last_delegator_pos] = 0
        self.boost_tokens[_token_id].dinfo = 0  # we are burning the token so we can just set to 0
        self.total_minted[delegator] = last_delegator_pos

    else:
        # transfering - called between balance updates
        from_last_index: uint256 = self.balanceOf[_from]

        if local_pos != from_last_index:
            # swap - set the token we're burnings position to the token in the last index
            last_local_token: uint256 = self.tokenOfOwnerByIndex[_from][from_last_index]
            last_local_token_pos: uint256 = self.boost_tokens[last_local_token].position
            # update the local position of the last local token
            self.boost_tokens[last_local_token].position = shift(last_local_token_pos / 2 ** 128, 128) + local_pos
            self.tokenOfOwnerByIndex[_from][local_pos] = last_local_token
        self.tokenOfOwnerByIndex[_from][from_last_index] = 0

        # to is simple we just add to the end of the list
        local_pos = self.balanceOf[_to]
        self.tokenOfOwnerByIndex[_to][local_pos] = _token_id
        self.boost_tokens[_token_id].position = shift(global_pos, 128) + local_pos


@internal
def _burn(_token_id: uint256):
    owner: address = self.ownerOf[_token_id]

    self._approve(owner, ZERO_ADDRESS, _token_id)

    self.balanceOf[owner] -= 1
    self.ownerOf[_token_id] = ZERO_ADDRESS
    self.totalSupply -= 1

    self._update_enumeration_data(owner, ZERO_ADDRESS, _token_id)

    log Transfer(owner, ZERO_ADDRESS, _token_id)


@internal
def _mint(_to: address, _token_id: uint256):
    assert _to != ZERO_ADDRESS  # dev: minting to ZERO_ADDRESS disallowed
    assert self.ownerOf[_token_id] == ZERO_ADDRESS  # dev: token exists

    self._update_enumeration_data(ZERO_ADDRESS, _to, _token_id)

    self.balanceOf[_to] += 1
    self.ownerOf[_token_id] = _to
    self.totalSupply += 1

    log Transfer(ZERO_ADDRESS, _to, _token_id)


@internal
def _mint_boost(_token_id: uint256, _delegator: address, _receiver: address, _bias: int256, _slope: int256, _cancel_time: uint256, _expire_time: uint256):
    is_whitelist: uint256 = convert(self.grey_list[_receiver][ZERO_ADDRESS], uint256)
    delegator_status: uint256 = convert(self.grey_list[_receiver][_delegator], uint256)
    assert not convert(bitwise_xor(is_whitelist, delegator_status), bool)  # dev: mint boost not allowed

    data: uint256 = shift(convert(_bias, uint256), 128) + convert(abs(_slope), uint256)
    self.boost[_delegator].delegated += data
    self.boost[_receiver].received += data

    token: Token = self.boost_tokens[_token_id]
    token.data = data
    token.dinfo = token.dinfo + _cancel_time
    token.expire_time = _expire_time
    self.boost_tokens[_token_id] = token


@internal
def _burn_boost(_token_id: uint256, _delegator: address, _receiver: address, _bias: int256, _slope: int256):
    token: Token = self.boost_tokens[_token_id]
    expire_time: uint256 = token.expire_time

    if expire_time == 0:
        return

    self.boost[_delegator].delegated -= token.data
    self.boost[_receiver].received -= token.data

    token.data = 0
    # maintain the same position in the delegator array, but remove the cancel time
    token.dinfo = shift(token.dinfo / 2 ** 128, 128)
    token.expire_time = 0
    self.boost_tokens[_token_id] = token

    # update the next expiry data
    expiry_data: uint256 = self.boost[_delegator].expiry_data
    next_expiry: uint256 = expiry_data % 2 ** 128
    active_delegations: uint256 = shift(expiry_data, -128) - 1

    expiries: uint256 = self.account_expiries[_delegator][expire_time]

    if active_delegations != 0 and expire_time == next_expiry and expiries == 0:
        # Will be passed if
        # active_delegations == 0, no more active boost tokens
        # or
        # expire_time != next_expiry, the cancelled boost token isn't the next expiring boost token
        # or
        # expiries != 0, the cancelled boost token isn't the only one expiring at expire_time
        for i in range(1, 513):  # ~10 years
            # we essentially allow for a boost token be expired for up to 6 years
            # 10 yrs - 4 yrs (max vecRV lock time) = ~ 6 yrs
            if i == 512:
                raise "Failed to find next expiry"
            week_ts: uint256 = expire_time + WEEK * (i + 1)
            if self.account_expiries[_delegator][week_ts] > 0:
                next_expiry = week_ts
                break
    elif active_delegations == 0:
        next_expiry = 0

    self.boost[_delegator].expiry_data = shift(active_delegations, 128) + next_expiry
    self.account_expiries[_delegator][expire_time] = expiries - 1


@internal
def _transfer_boost(_from: address, _to: address, _bias: int256, _slope: int256):
    data: uint256 = shift(convert(_bias, uint256), 128) + convert(abs(_slope), uint256)
    self.boost[_from].received -= data
    self.boost[_to].received += data


@pure
@internal
def _deconstruct_bias_slope(_data: uint256) -> Point:
    return Point({bias: convert(shift(_data, -128), int256), slope: -convert(_data % 2 ** 128, int256)})


@pure
@internal
def _calc_bias_slope(_x: int256, _y: int256, _expire_time: int256) -> Point:
    # SLOPE: (y2 - y1) / (x2 - x1)
    # BIAS: y = mx + b -> y - mx = b
    slope: int256 = -_y / (_expire_time - _x)
    return Point({bias: _y - slope * _x, slope: slope})


@internal
def _transfer(_from: address, _to: address, _token_id: uint256):
    assert self.ownerOf[_token_id] == _from  # dev: _from is not owner
    assert _to != ZERO_ADDRESS  # dev: transfers to ZERO_ADDRESS are disallowed

    delegator: address = convert(shift(_token_id, -96), address)
    is_whitelist: uint256 = convert(self.grey_list[_to][ZERO_ADDRESS], uint256)
    delegator_status: uint256 = convert(self.grey_list[_to][delegator], uint256)
    assert not convert(bitwise_xor(is_whitelist, delegator_status), bool)  # dev: transfer boost not allowed

    # clear previous token approval
    self._approve(_from, ZERO_ADDRESS, _token_id)

    self.balanceOf[_from] -= 1
    self._update_enumeration_data(_from, _to, _token_id)
    self.balanceOf[_to] += 1
    self.ownerOf[_token_id] = _to

    tpoint: Point = self._deconstruct_bias_slope(self.boost_tokens[_token_id].data)
    tvalue: int256 = tpoint.slope * convert(block.timestamp, int256) + tpoint.bias

    # if the boost value is negative, reset the slope and bias
    if tvalue > 0:
        self._transfer_boost(_from, _to, tpoint.bias, tpoint.slope)
        # y = mx + b -> y - b = mx -> (y - b)/m = x -> -b / m = x (x-intercept)
        expiry: uint256 = convert(-tpoint.bias / tpoint.slope, uint256)
        log TransferBoost(_from, _to, _token_id, convert(tvalue, uint256), expiry)
    else:
        self._burn_boost(_token_id, delegator, _from, tpoint.bias, tpoint.slope)
        log BurnBoost(delegator, _from, _token_id)

    log Transfer(_from, _to, _token_id)


@internal
def _cancel_boost(_token_id: uint256, _caller: address):
    receiver: address = self.ownerOf[_token_id]
    assert receiver != ZERO_ADDRESS  # dev: token does not exist
    delegator: address = convert(shift(_token_id, -96), address)

    token: Token = self.boost_tokens[_token_id]
    tpoint: Point = self._deconstruct_bias_slope(token.data)
    tvalue: int256 = tpoint.slope * convert(block.timestamp, int256) + tpoint.bias

    # if not (the owner or operator or the boost value is negative)
    if not (_caller == receiver or self.isApprovedForAll[receiver][_caller] or tvalue <= 0):
        if _caller == delegator or self.isApprovedForAll[delegator][_caller]:
            # if delegator or operator, wait till after cancel time
            assert (token.dinfo % 2 ** 128) <= block.timestamp  # dev: must wait for cancel time
        else:
            # All others are disallowed
            raise "Not allowed!"
    self._burn_boost(_token_id, delegator, receiver, tpoint.bias, tpoint.slope)

    log BurnBoost(delegator, receiver, _token_id)


@internal
def _set_delegation_status(_receiver: address, _delegator: address, _status: bool):
    self.grey_list[_receiver][_delegator] = _status
    log GreyListUpdated(_receiver, _delegator, _status)


@pure
@internal
def _uint_to_string(_value: uint256) -> String[78]:
    # NOTE: Odd that this works with a raw_call inside, despite being marked
    # a pure function
    if _value == 0:
        return "0"

    buffer: Bytes[78] = b""
    digits: uint256 = 78

    for i in range(78):
        # go forward to find the # of digits, and set it
        # only if we have found the last index
        if digits == 78 and _value / 10 ** i == 0:
            digits = i

        value: uint256 = ((_value / 10 ** (77 - i)) % 10) + 48
        char: Bytes[1] = slice(convert(value, bytes32), 31, 1)
        buffer = raw_call(
            IDENTITY_PRECOMPILE,
            concat(buffer, char),
            max_outsize=78,
            is_static_call=True
        )

    return convert(slice(buffer, 78 - digits, digits), String[78])


@external
def approve(_approved: address, _token_id: uint256):
    """
    @notice Change or reaffirm the approved address for an NFT.
    @dev The zero address indicates there is no approved address.
        Throws unless `msg.sender` is the current NFT owner, or an authorized
        operator of the current owner.
    @param _approved The new approved NFT controller.
    @param _token_id The NFT to approve.
    """
    owner: address = self.ownerOf[_token_id]
    assert (
        msg.sender == owner or self.isApprovedForAll[owner][msg.sender]
    )  # dev: must be owner or operator
    self._approve(owner, _approved, _token_id)


@external
def safeTransferFrom(_from: address, _to: address, _token_id: uint256, _data: Bytes[4096] = b""):
    """
    @notice Transfers the ownership of an NFT from one address to another address
    @dev Throws unless `msg.sender` is the current owner, an authorized
        operator, or the approved address for this NFT. Throws if `_from` is
        not the current owner. Throws if `_to` is the zero address. Throws if
        `_tokenId` is not a valid NFT. When transfer is complete, this function
        checks if `_to` is a smart contract (code size > 0). If so, it calls
        `onERC721Received` on `_to` and throws if the return value is not
        `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`.
    @param _from The current owner of the NFT
    @param _to The new owner
    @param _token_id The NFT to transfer
    @param _data Additional data with no specified format, sent in call to `_to`, max length 4096
    """
    assert self._is_approved_or_owner(msg.sender, _token_id)  # dev: neither owner nor approved
    self._transfer(_from, _to, _token_id)

    if _to.is_contract:
        response: bytes32 = ERC721Receiver(_to).onERC721Received(
            msg.sender, _from, _token_id, _data
        )
        assert slice(response, 0, 4) == method_id(
            "onERC721Received(address,address,uint256,bytes)"
        )  # dev: invalid response


@external
def setApprovalForAll(_operator: address, _approved: bool):
    """
    @notice Enable or disable approval for a third party ("operator") to manage
        all of `msg.sender`'s assets.
    @dev Emits the ApprovalForAll event. Multiple operators per account are allowed.
    @param _operator Address to add to the set of authorized operators.
    @param _approved True if the operator is approved, false to revoke approval.
    """
    self.isApprovedForAll[msg.sender][_operator] = _approved
    log ApprovalForAll(msg.sender, _operator, _approved)


@external
def transferFrom(_from: address, _to: address, _token_id: uint256):
    """
    @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
        TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
        THEY MAY BE PERMANENTLY LOST
    @dev Throws unless `msg.sender` is the current owner, an authorized
        operator, or the approved address for this NFT. Throws if `_from` is
        not the current owner. Throws if `_to` is the ZERO_ADDRESS.
    @param _from The current owner of the NFT
    @param _to The new owner
    @param _token_id The NFT to transfer
    """
    assert self._is_approved_or_owner(msg.sender, _token_id)  # dev: neither owner nor approved
    self._transfer(_from, _to, _token_id)


@view
@external
def tokenURI(_token_id: uint256) -> String[256]:
    return concat(self.base_uri, self._uint_to_string(_token_id))


@external
def burn(_token_id: uint256):
    """
    @notice Destroy a token
    @dev Only callable by the token owner, their operator, or an approved account.
        Burning a token with a currently active boost, burns the boost.
    @param _token_id The token to burn
    """
    assert self._is_approved_or_owner(msg.sender, _token_id)  # dev: neither owner nor approved

    tdata: uint256 = self.boost_tokens[_token_id].data
    if tdata != 0:
        tpoint: Point = self._deconstruct_bias_slope(tdata)

        delegator: address = convert(shift(_token_id, -96), address)
        owner: address = self.ownerOf[_token_id]

        self._burn_boost(_token_id, delegator, owner, tpoint.bias, tpoint.slope)

        log BurnBoost(delegator, owner, _token_id)

    self._burn(_token_id)


@external
def create_boost(
    _delegator: address,
    _receiver: address,
    _percentage: int256,
    _cancel_time: uint256,
    _expire_time: uint256,
    _id: uint256,
):
    """
    @notice Create a boost and delegate it to another account.
    @dev Delegated boost can become negative, and requires active management, else
        the adjusted veCRV balance of the delegator's account will decrease until reaching 0
    @param _delegator The account to delegate boost from
    @param _receiver The account to receive the delegated boost
    @param _percentage Since veCRV is a constantly decreasing asset, we use percentage to determine
        the amount of delegator's boost to delegate
    @param _cancel_time A point in time before _expire_time in which the delegator or their operator
        can cancel the delegated boost
    @param _expire_time The point in time, atleast a day in the future, at which the value of the boost
        will reach 0. After which the negative value is deducted from the delegator's account (and the
        receiver's received boost only) until it is cancelled. This value is rounded down to the nearest
        WEEK.
    @param _id The token id, within the range of [0, 2 ** 96). Useful for contracts given operator status
        to have specific ranges.
    """
    assert msg.sender == _delegator or self.isApprovedForAll[_delegator][msg.sender]  # dev: only delegator or operator

    expire_time: uint256 = (_expire_time / WEEK) * WEEK

    expiry_data: uint256 = self.boost[_delegator].expiry_data
    next_expiry: uint256 = expiry_data % 2 ** 128

    if next_expiry == 0:
        next_expiry = MAX_UINT256

    assert block.timestamp < next_expiry  # dev: negative boost token is in circulation
    assert _percentage > 0  # dev: percentage must be greater than 0 bps
    assert _percentage <= MAX_PCT  # dev: percentage must be less than 10_000 bps
    assert _cancel_time <= expire_time  # dev: cancel time is after expiry

    assert expire_time >= block.timestamp + WEEK  # dev: boost duration must be atleast WEEK
    assert expire_time <= VotingEscrow(VOTING_ESCROW).locked(_delegator)[1]  # dev: boost expiration is past voting escrow lock expiry
    assert _id < 2 ** 96  # dev: id out of bounds

    # [delegator address 160][cancel_time uint40][id uint56]
    token_id: uint256 = shift(convert(_delegator, uint256), 96) + _id
    # check if the token exists here before we expend more gas by minting it
    self._mint(_receiver, token_id)

    # delegated slope and bias
    point: Point = self._deconstruct_bias_slope(self.boost[_delegator].delegated)

    time: int256 = convert(block.timestamp, int256)

    # delegated boost will be positive, if any of circulating boosts are negative
    # we have already reverted
    delegated_boost: int256 = point.slope * time + point.bias
    y: int256 = _percentage * (VotingEscrow(VOTING_ESCROW).balanceOf(_delegator) - delegated_boost) / MAX_PCT
    assert y > 0  # dev: no boost

    point = self._calc_bias_slope(time, y, convert(expire_time, int256))
    assert point.slope < 0  # dev: invalid slope

    self._mint_boost(token_id, _delegator, _receiver, point.bias, point.slope, _cancel_time, expire_time)

    # increase the number of expiries for the user
    if expire_time < next_expiry:
        next_expiry = expire_time

    active_delegations: uint256 = shift(expiry_data, -128)
    self.account_expiries[_delegator][expire_time] += 1
    self.boost[_delegator].expiry_data = shift(active_delegations + 1, 128) + next_expiry

    log DelegateBoost(_delegator, _receiver, token_id, convert(y, uint256), _cancel_time, _expire_time)


@external
def extend_boost(_token_id: uint256, _percentage: int256, _expire_time: uint256, _cancel_time: uint256):
    """
    @notice Extend the boost of an existing boost or expired boost
    @dev The extension can not decrease the value of the boost. If there are
        any outstanding negative value boosts which cause the delegable boost
        of an account to be negative this call will revert
    @param _token_id The token to extend the boost of
    @param _percentage The percentage of delegable boost to delegate
        AFTER burning the token's current boost
    @param _expire_time The new time at which the boost value will become
        0, and eventually negative. Must be greater than the previous expiry time,
        and atleast a WEEK from now, and less than the veCRV lock expiry of the
        delegator's account. This value is rounded down to the nearest WEEK.
    """
    delegator: address = convert(shift(_token_id, -96), address)
    receiver: address = self.ownerOf[_token_id]

    assert msg.sender == delegator or self.isApprovedForAll[delegator][msg.sender]  # dev: only delegator or operator
    assert receiver != ZERO_ADDRESS  # dev: boost token does not exist
    assert _percentage > 0  # dev: percentage must be greater than 0 bps
    assert _percentage <= MAX_PCT  # dev: percentage must be less than 10_000 bps

    # timestamp when delegating account's voting escrow ends - also our second point (lock_expiry, 0)
    token: Token = self.boost_tokens[_token_id]

    expire_time: uint256 = (_expire_time / WEEK) * WEEK

    assert _cancel_time <= expire_time  # dev: cancel time is after expiry
    assert expire_time >= block.timestamp + WEEK  # dev: boost duration must be atleast one day
    assert expire_time <= VotingEscrow(VOTING_ESCROW).locked(delegator)[1] # dev: boost expiration is past voting escrow lock expiry

    point: Point = self._deconstruct_bias_slope(token.data)

    time: int256 = convert(block.timestamp, int256)
    tvalue: int256 = point.slope * time + point.bias

    # Can extend a token by increasing it's amount but not it's expiry time
    assert expire_time >= token.expire_time  # dev: new expiration must be greater than old token expiry

    # if we are extending an unexpired boost, the cancel time must the same or greater
    # else we can adjust the cancel time to our preference
    if _cancel_time < (token.dinfo % 2 ** 128):
        assert block.timestamp >= token.expire_time  # dev: cancel time reduction disallowed

    # storage variables have been updated: next_expiry + active_delegations
    self._burn_boost(_token_id, delegator, receiver, point.bias, point.slope)

    expiry_data: uint256 = self.boost[delegator].expiry_data
    next_expiry: uint256 = expiry_data % 2 ** 128

    if next_expiry == 0:
        next_expiry = MAX_UINT256

    assert block.timestamp < next_expiry  # dev: negative outstanding boosts

    # delegated slope and bias
    point = self._deconstruct_bias_slope(self.boost[delegator].delegated)

    # verify delegated boost isn't negative, else it'll inflate out vecrv balance
    delegated_boost: int256 = point.slope * time + point.bias
    y: int256 = _percentage * (VotingEscrow(VOTING_ESCROW).balanceOf(delegator) - delegated_boost) / MAX_PCT
    # a delegator can snipe the exact moment a token expires and create a boost
    # with 10_000 or some percentage of their boost, which is perfectly fine.
    # this check is here so the user can't extend a boost unless they actually
    # have any to give
    assert y > 0  # dev: no boost
    assert y >= tvalue  # dev: cannot reduce value of boost

    point = self._calc_bias_slope(time, y, convert(expire_time, int256))
    assert point.slope < 0  # dev: invalid slope

    self._mint_boost(_token_id, delegator, receiver, point.bias, point.slope, _cancel_time, expire_time)

    # increase the number of expiries for the user
    if expire_time < next_expiry:
        next_expiry = expire_time

    active_delegations: uint256 = shift(expiry_data, -128)
    self.account_expiries[delegator][expire_time] += 1
    self.boost[delegator].expiry_data = shift(active_delegations + 1, 128) + next_expiry

    log ExtendBoost(delegator, receiver, _token_id, convert(y, uint256), expire_time, _cancel_time)


@external
def cancel_boost(_token_id: uint256):
    """
    @notice Cancel an outstanding boost
    @dev This does not burn the token, only the boost it represents. The owner
        of the token or their operator can cancel a boost at any time. The
        delegator or their operator can only cancel a token after the cancel
        time. Anyone can cancel the boost if the value of it is negative.
    @param _token_id The token to cancel
    """
    self._cancel_boost(_token_id, msg.sender)


@external
def batch_cancel_boosts(_token_ids: uint256[256]):
    """
    @notice Cancel many outstanding boosts
    @dev This does not burn the token, only the boost it represents. The owner
        of the token or their operator can cancel a boost at any time. The
        delegator or their operator can only cancel a token after the cancel
        time. Anyone can cancel the boost if the value of it is negative.
    @param _token_ids A list of 256 token ids to nullify. The list must
        be padded with 0 values if less than 256 token ids are provided.
    """

    for _token_id in _token_ids:
        if _token_id == 0:
            break
        self._cancel_boost(_token_id, msg.sender)


@external
def set_delegation_status(_receiver: address, _delegator: address, _status: bool):
    """
    @notice Set or reaffirm the blacklist/whitelist status of a delegator for a receiver.
    @dev Setting delegator as the ZERO_ADDRESS enables users to deactive delegations globally
        and enable the white list. The ability of a delegator to delegate to a receiver
        is determined by ~(grey_list[_receiver][ZERO_ADDRESS] ^ grey_list[_receiver][_delegator]).
    @param _receiver The account which we will be updating it's list
    @param _delegator The account to disallow/allow delegations from
    @param _status Boolean of the status to set the _delegator account to
    """
    assert msg.sender == _receiver or self.isApprovedForAll[_receiver][msg.sender]
    self._set_delegation_status(_receiver, _delegator, _status)


@external
def batch_set_delegation_status(_receiver: address, _delegators: address[256], _status: uint256[256]):
    """
    @notice Set or reaffirm the blacklist/whitelist status of multiple delegators for a receiver.
    @dev Setting delegator as the ZERO_ADDRESS enables users to deactive delegations globally
        and enable the white list. The ability of a delegator to delegate to a receiver
        is determined by ~(grey_list[_receiver][ZERO_ADDRESS] ^ grey_list[_receiver][_delegator]).
    @param _receiver The account which we will be updating it's list
    @param _delegators List of 256 accounts to disallow/allow delegations from
    @param _status List of 256 0s and 1s (booleans) of the status to set the _delegator_i account to.
        if the value is not 0 or 1, execution will break, effectively stopping at the index.

    """
    assert msg.sender == _receiver or self.isApprovedForAll[_receiver][msg.sender]  # dev: only receiver or operator

    for i in range(256):
        if _status[i] > 1:
            break
        self._set_delegation_status(_receiver, _delegators[i], convert(_status[i], bool))


@view
@external
def adjusted_balance_of(_account: address) -> uint256:
    """
    @notice Adjusted veCRV balance after accounting for delegations and boosts
    @dev If boosts/delegations have a negative value, they're effective value is 0
    @param _account The account to query the adjusted balance of
    """
    next_expiry: uint256 = self.boost[_account].expiry_data % 2 ** 128
    if next_expiry != 0 and next_expiry < block.timestamp:
        # if the account has a negative boost in circulation
        # we over penalize by setting their adjusted balance to 0
        # this is because we don't want to iterate to find the real
        # value
        return 0

    adjusted_balance: int256 = VotingEscrow(VOTING_ESCROW).balanceOf(_account)

    boost: Boost = self.boost[_account]
    time: int256 = convert(block.timestamp, int256)

    if boost.delegated != 0:
        dpoint: Point = self._deconstruct_bias_slope(boost.delegated)

        # we take the absolute value, since delegated boost can be negative
        # if any outstanding negative boosts are in circulation
        # this can inflate the vecrv balance of a user
        # taking the absolute value has the effect that it costs
        # a user to negatively impact another's vecrv balance
        adjusted_balance -= abs(dpoint.slope * time + dpoint.bias)

    if boost.received != 0:
        rpoint: Point = self._deconstruct_bias_slope(boost.received)

        # similar to delegated boost, our received boost can be negative
        # if any outstanding negative boosts are in our possession
        # However, unlike delegated boost, we do not negatively impact
        # our adjusted balance due to negative boosts. Instead we take
        # whichever is greater between 0 and the value of our received
        # boosts.
        adjusted_balance += max(rpoint.slope * time + rpoint.bias, empty(int256))

    # since we took the absolute value of our delegated boost, it now instead of
    # becoming negative is positive, and will continue to increase ...
    # meaning if we keep a negative outstanding delegated balance for long
    # enought it will not only decrease our vecrv_balance but also our received
    # boost, however we return the maximum between our adjusted balance and 0
    # when delegating boost, received boost isn't used for determining how
    # much we can delegate.
    return convert(max(adjusted_balance, empty(int256)), uint256)


@view
@external
def delegated_boost(_account: address) -> uint256:
    """
    @notice Query the total effective delegated boost value of an account.
    @dev This value can be greater than the veCRV balance of
        an account if the account has outstanding negative
        value boosts.
    @param _account The account to query
    """
    dpoint: Point = self._deconstruct_bias_slope(self.boost[_account].delegated)
    time: int256 = convert(block.timestamp, int256)
    return convert(abs(dpoint.slope * time + dpoint.bias), uint256)


@view
@external
def received_boost(_account: address) -> uint256:
    """
    @notice Query the total effective received boost value of an account
    @dev This value can be 0, even with delegations which have a large value,
        if the account has any outstanding negative value boosts.
    @param _account The account to query
    """
    rpoint: Point = self._deconstruct_bias_slope(self.boost[_account].received)
    time: int256 = convert(block.timestamp, int256)
    return convert(max(rpoint.slope * time + rpoint.bias, empty(int256)), uint256)


@view
@external
def token_boost(_token_id: uint256) -> int256:
    """
    @notice Query the effective value of a boost
    @dev The effective value of a boost is negative after it's expiration
        date.
    @param _token_id The token id to query
    """
    tpoint: Point = self._deconstruct_bias_slope(self.boost_tokens[_token_id].data)
    time: int256 = convert(block.timestamp, int256)
    return tpoint.slope * time + tpoint.bias


@view
@external
def token_expiry(_token_id: uint256) -> uint256:
    """
    @notice Query the timestamp of a boost token's expiry
    @dev The effective value of a boost is negative after it's expiration
        date.
    @param _token_id The token id to query
    """
    return self.boost_tokens[_token_id].expire_time


@view
@external
def token_cancel_time(_token_id: uint256) -> uint256:
    """
    @notice Query the timestamp of a boost token's cancel time. This is
        the point at which the delegator can nullify the boost. A receiver
        can cancel a token at any point. Anyone can nullify a token's boost
        after it's expiration.
    @param _token_id The token id to query
    """
    return self.boost_tokens[_token_id].dinfo % 2 ** 128


@view
@external
def calc_boost_bias_slope(
    _delegator: address,
    _percentage: int256,
    _expire_time: int256,
    _extend_token_id: uint256 = 0
) -> (int256, int256):
    """
    @notice Calculate the bias and slope for a boost.
    @param _delegator The account to delegate boost from
    @param _percentage The percentage of the _delegator's delegable
        veCRV to delegate.
    @param _expire_time The time at which the boost value of the token
        will reach 0, and subsequently become negative
    @param _extend_token_id OPTIONAL token id, which if set will first nullify
        the boost of the token, before calculating the bias and slope. Useful
        for calculating the new bias and slope when extending a token, or
        determining the bias and slope of a subsequent token after cancelling
        an existing one. Will have no effect if _delegator is not the delegator
        of the token.
    """
    time: int256 = convert(block.timestamp, int256)
    assert _percentage > 0  # dev: percentage must be greater than 0
    assert _percentage <= MAX_PCT  # dev: percentage must be less than or equal to 100%
    assert _expire_time > time + WEEK  # dev: Invalid min expiry time

    lock_expiry: int256 = convert(VotingEscrow(VOTING_ESCROW).locked(_delegator)[1], int256)
    assert _expire_time <= lock_expiry

    ddata: uint256 = self.boost[_delegator].delegated

    if _extend_token_id != 0 and convert(shift(_extend_token_id, -96), address) == _delegator:
        # decrease the delegated bias and slope by the token's bias and slope
        # only if it is the delegator's and it is within the bounds of existence
        ddata -= self.boost_tokens[_extend_token_id].data

    dpoint: Point = self._deconstruct_bias_slope(ddata)

    delegated_boost: int256 = dpoint.slope * time + dpoint.bias
    assert delegated_boost >= 0  # dev: outstanding negative boosts

    y: int256 = _percentage * (VotingEscrow(VOTING_ESCROW).balanceOf(_delegator) - delegated_boost) / MAX_PCT
    assert y > 0  # dev: no boost

    slope: int256 = -y / (_expire_time - time)
    assert slope < 0  # dev: invalid slope

    bias: int256 = y - slope * time

    return bias, slope


@pure
@external
def get_token_id(_delegator: address, _id: uint256) -> uint256:
    """
    @notice Simple method to get the token id's mintable by a delegator
    @param _delegator The address of the delegator
    @param _id The id value, must be less than 2 ** 96
    """
    assert _id < 2 ** 96  # dev: invalid _id
    return shift(convert(_delegator, uint256), 96) + _id


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


@external
def accept_transfer_ownership():
    """
    @notice Accept admin role, only callable by future admin
    """
    future_admin: address = self.future_admin
    assert msg.sender == future_admin
    self.admin = future_admin


@external
def set_base_uri(_base_uri: String[128]):
    assert msg.sender == self.admin
    self.base_uri = _base_uri

Contract ABI

[{"name":"Approval","inputs":[{"name":"_owner","type":"address","indexed":true},{"name":"_approved","type":"address","indexed":true},{"name":"_token_id","type":"uint256","indexed":true}],"anonymous":false,"type":"event"},{"name":"ApprovalForAll","inputs":[{"name":"_owner","type":"address","indexed":true},{"name":"_operator","type":"address","indexed":true},{"name":"_approved","type":"bool","indexed":false}],"anonymous":false,"type":"event"},{"name":"Transfer","inputs":[{"name":"_from","type":"address","indexed":true},{"name":"_to","type":"address","indexed":true},{"name":"_token_id","type":"uint256","indexed":true}],"anonymous":false,"type":"event"},{"name":"BurnBoost","inputs":[{"name":"_delegator","type":"address","indexed":true},{"name":"_receiver","type":"address","indexed":true},{"name":"_token_id","type":"uint256","indexed":true}],"anonymous":false,"type":"event"},{"name":"DelegateBoost","inputs":[{"name":"_delegator","type":"address","indexed":true},{"name":"_receiver","type":"address","indexed":true},{"name":"_token_id","type":"uint256","indexed":true},{"name":"_amount","type":"uint256","indexed":false},{"name":"_cancel_time","type":"uint256","indexed":false},{"name":"_expire_time","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"ExtendBoost","inputs":[{"name":"_delegator","type":"address","indexed":true},{"name":"_receiver","type":"address","indexed":true},{"name":"_token_id","type":"uint256","indexed":true},{"name":"_amount","type":"uint256","indexed":false},{"name":"_expire_time","type":"uint256","indexed":false},{"name":"_cancel_time","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"TransferBoost","inputs":[{"name":"_from","type":"address","indexed":true},{"name":"_to","type":"address","indexed":true},{"name":"_token_id","type":"uint256","indexed":true},{"name":"_amount","type":"uint256","indexed":false},{"name":"_expire_time","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"GreyListUpdated","inputs":[{"name":"_receiver","type":"address","indexed":true},{"name":"_delegator","type":"address","indexed":true},{"name":"_status","type":"bool","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_base_uri","type":"string"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_approved","type":"address"},{"name":"_token_id","type":"uint256"}],"outputs":[],"gas":44267},{"stateMutability":"nonpayable","type":"function","name":"safeTransferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_token_id","type":"uint256"}],"outputs":[],"gas":4174078},{"stateMutability":"nonpayable","type":"function","name":"safeTransferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_token_id","type":"uint256"},{"name":"_data","type":"bytes"}],"outputs":[],"gas":4174078},{"stateMutability":"nonpayable","type":"function","name":"setApprovalForAll","inputs":[{"name":"_operator","type":"address"},{"name":"_approved","type":"bool"}],"outputs":[],"gas":39194},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_token_id","type":"uint256"}],"outputs":[],"gas":4153446},{"stateMutability":"view","type":"function","name":"tokenURI","inputs":[{"name":"_token_id","type":"uint256"}],"outputs":[{"name":"","type":"string"}],"gas":1169111},{"stateMutability":"nonpayable","type":"function","name":"burn","inputs":[{"name":"_token_id","type":"uint256"}],"outputs":[],"gas":4134755},{"stateMutability":"nonpayable","type":"function","name":"create_boost","inputs":[{"name":"_delegator","type":"address"},{"name":"_receiver","type":"address"},{"name":"_percentage","type":"int256"},{"name":"_cancel_time","type":"uint256"},{"name":"_expire_time","type":"uint256"},{"name":"_id","type":"uint256"}],"outputs":[],"gas":812608},{"stateMutability":"nonpayable","type":"function","name":"extend_boost","inputs":[{"name":"_token_id","type":"uint256"},{"name":"_percentage","type":"int256"},{"name":"_expire_time","type":"uint256"},{"name":"_cancel_time","type":"uint256"}],"outputs":[],"gas":3940906},{"stateMutability":"nonpayable","type":"function","name":"cancel_boost","inputs":[{"name":"_token_id","type":"uint256"}],"outputs":[],"gas":3630214},{"stateMutability":"nonpayable","type":"function","name":"batch_cancel_boosts","inputs":[{"name":"_token_ids","type":"uint256[256]"}],"outputs":[],"gas":929242503},{"stateMutability":"nonpayable","type":"function","name":"set_delegation_status","inputs":[{"name":"_receiver","type":"address"},{"name":"_delegator","type":"address"},{"name":"_status","type":"bool"}],"outputs":[],"gas":42272},{"stateMutability":"nonpayable","type":"function","name":"batch_set_delegation_status","inputs":[{"name":"_receiver","type":"address"},{"name":"_delegators","type":"address[256]"},{"name":"_status","type":"uint256[256]"}],"outputs":[],"gas":10044204},{"stateMutability":"view","type":"function","name":"adjusted_balance_of","inputs":[{"name":"_account","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":14922},{"stateMutability":"view","type":"function","name":"delegated_boost","inputs":[{"name":"_account","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3596},{"stateMutability":"view","type":"function","name":"received_boost","inputs":[{"name":"_account","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3632},{"stateMutability":"view","type":"function","name":"token_boost","inputs":[{"name":"_token_id","type":"uint256"}],"outputs":[{"name":"","type":"int256"}],"gas":4008},{"stateMutability":"view","type":"function","name":"token_expiry","inputs":[{"name":"_token_id","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3061},{"stateMutability":"view","type":"function","name":"token_cancel_time","inputs":[{"name":"_token_id","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3121},{"stateMutability":"view","type":"function","name":"calc_boost_bias_slope","inputs":[{"name":"_delegator","type":"address"},{"name":"_percentage","type":"int256"},{"name":"_expire_time","type":"int256"}],"outputs":[{"name":"","type":"int256"},{"name":"","type":"int256"}],"gas":14203},{"stateMutability":"view","type":"function","name":"calc_boost_bias_slope","inputs":[{"name":"_delegator","type":"address"},{"name":"_percentage","type":"int256"},{"name":"_expire_time","type":"int256"},{"name":"_extend_token_id","type":"uint256"}],"outputs":[{"name":"","type":"int256"},{"name":"","type":"int256"}],"gas":14203},{"stateMutability":"pure","type":"function","name":"get_token_id","inputs":[{"name":"_delegator","type":"address"},{"name":"_id","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":1349},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"_addr","type":"address"}],"outputs":[],"gas":38205},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[],"outputs":[],"gas":38099},{"stateMutability":"nonpayable","type":"function","name":"set_base_uri","inputs":[{"name":"_base_uri","type":"string"}],"outputs":[],"gas":182441},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3416},{"stateMutability":"view","type":"function","name":"getApproved","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3295},{"stateMutability":"view","type":"function","name":"isApprovedForAll","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":3742},{"stateMutability":"view","type":"function","name":"ownerOf","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3355},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":11288},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":11318},{"stateMutability":"view","type":"function","name":"base_uri","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":18161},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3360},{"stateMutability":"view","type":"function","name":"tokenByIndex","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3505},{"stateMutability":"view","type":"function","name":"tokenOfOwnerByIndex","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3731},{"stateMutability":"view","type":"function","name":"token_of_delegator_by_index","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3761},{"stateMutability":"view","type":"function","name":"total_minted","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3746},{"stateMutability":"view","type":"function","name":"account_expiries","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3891},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3540},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3570},{"stateMutability":"view","type":"function","name":"grey_list","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":4132}]

6020614b36608039608051614b3601602060208260803960805111614b315780602081608039608051602001808260e03950505060206020614b3601608039608051614b3601602060208260803960805111614b31578060208160803960805160200180826101203950505060206040614b3601608039608051614b3601608060208260803960805111614b31578060208160803960805160200180826101603950505060e0806004602082510160c060006002818352015b8260c05160200211156100ca576100e9565b60c05160200285015160c05185015581516001018083528114156100b8575b505050505050610120806006602082510160c060006002818352015b8260c051602002111561011757610136565b60c05160200285015160c0518501558151600101808352811415610105575b505050505050610160806008602082510160c060006005818352015b8260c051602002111561016457610183565b60c05160200285015160c0518501558151600101808352811415610152575b50505050505033601555614b1956600436101561000d57613079565b60046000601c37600051346149825763095ea7b381186100a0576004358060a01c6149825761014052600360243560a0526080526040608020546101605261016051331861005c57600161007b565b60026101605160a05260805260406080203360a0526080526040608020545b15614982576101605160e05261014051610100526024356101205261009e61307f565b005b6342842e0e81186100cc5760006114e0526114e08051602001806104c0828460045afa905050506100f7565b63b88d4fde8118610283576064356004016110008135116149825780803560200180826104c0375050505b6004358060a01c61498257610480526024358060a01c614982576104a0523360e0526044356101005261012b6115006130c9565b61150051156149825761048051610300526104a0516103205260443561034052610153614106565b60006104a0513b11156102815763150b7a02611520526115408060803382526020820191506104805182526020820191506044358252602082019150808252808301806104c080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f82010390509050905081015050505060206115206110a461153c60006104a0515af1610207573d600060003e3d6000fd5b601f3d11156149825761152051611500526004611620527f150b7a0200000000000000000000000000000000000000000000000000000000611640526116206020015160006004602082066115c001602082840111614982576020806115e08261150060045afa5050818152905090506020015118614982575b005b63a22cb4658118610301576004358060a01c6149825760e0526024358060011c61498257610100526101005160023360a052608052604060802060e05160a05260805260406080205560e051337f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3161010051610120526020610120a3005b6323b872dd811861036a576004358060a01c61498257610480526024358060a01c614982576104a0523360e052604435610100526103406104c06130c9565b6104c051156149825761048051610300526104a0516103205260443561034052610368614106565b005b63c87b56dd811861046d576104a080602080825260006008600181016020836103a00101825460c060006004818352015b8260c05160200211156103ad576103cc565b60c05185015460c051602002850152815160010180835281141561039b575b50505050508054820191505060043560e0526103e9610320614713565b610320604e806020846103a00101826020850160045afa505080518201915050806103a0526103a09050818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050905081019050905090506104a0f35b6342966c688118610575573360e0526004356101005261048e6103006130c9565b610300511561498257601160043560a0526080526040608020546103005260006103005114610564576103005160e0526104c9610360613fbd565b6103608051610320526020810151610340525060043560601c8060a01c6149825761036052600360043560a0526080526040608020546103805260043560e0526103605161010052610380516101205261032051610140526103405161016052610531613bd5565b60043561038051610360517f64ddd743466fd725d437a06c1600041c3a8e6566a51cbfb4b73ee501db94657460006103a0a45b600435610280526105736138ad565b005b63f18124d78118610a21576004358060a01c614982576102c0526024358060a01c614982576102e0526102c05133186105af5760016105ce565b60026102c05160a05260805260406080203360a0526080526040608020545b156149825760843562093a808082049050905062093a80808202821582848304141715614982579050905061030052600260106102c05160a052608052604060802001546103205261032051700100000000000000000000000000000000808206905090506103405261034051610665577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610340525b6103405142101561498257600060443513156149825761271060443513614982576103005160643511614982574262093a8081818301106149825780820190509050610300511061498257602063cbf9fe5f610360526102c051610380526040610360602461037c7312f407340697ae0b177546e535b91a5be021fbf95afa6106f3573d600060003e3d6000fd5b603f3d11156149825761036001516103005111614982576c0100000000000000000000000060a4351015614982576102c05160601b60a43581818301106149825780820190509050610360526102e05161028052610360516102a052610757613981565b60106102c05160a05260805260406080205460e0526107776103c0613fbd565b6103c080516103805260208101516103a0525042600160ff1b811015614982576103c0526103a0516103c051808202600160ff1b821415600019841415171561498257821582848305141715614982579050905061038051808201828112600083121683821215600084121516171561498257905090506103e0526044356370a08231610420526102c051610440526020610420602461043c7312f407340697ae0b177546e535b91a5be021fbf95afa610836573d600060003e3d6000fd5b601f3d111561498257610420516103e05180820382811360008312168382131560008412151617156149825790509050808202600160ff1b821415600019841415171561498257821582848305141715614982579050905061271080820590509050610400526000610400511315614982576103c05160e052610400516101005261030051600160ff1b81101561498257610120526108d661042061402c565b61042080516103805260208101516103a0525060006103a0511215614982576103605160e0526102c051610100526102e0516101205261038051610140526103a0516101605260643561018052610300516101a052610933613a49565b6103405161030051101561094a5761030051610340525b6103205160801c6104205260146102c05160a05260805260406080206103005160a052608052604060802080546001818183011061498257808201905090508155506104205160018181830110614982578082019050905060801b6103405181818301106149825780820190509050600260106102c05160a05260805260406080200155610360516102e0516102c0517f94be29eae3a624a5241431d7a0daf467ac52ecf3071f7a028d5b2adc802b213d6104005160008112614982576104405260643561046052608435610480526060610440a4005b63d47dd2648118610fba5760043560601c8060a01c6149825761030052600360043560a05260805260406080205461032052610300513318610a64576001610a83565b60026103005160a05260805260406080203360a0526080526040608020545b1561498257600061032051146149825760006024351315614982576127106024351361498257601160043560a052608052604060802080546103405260018101546103605260028101546103805260038101546103a0525060443562093a808082049050905062093a8080820282158284830414171561498257905090506103c0526103c05160643511614982574262093a80818183011061498257808201905090506103c0511061498257602063cbf9fe5f6103e052610300516104005260406103e060246103fc7312f407340697ae0b177546e535b91a5be021fbf95afa610b72573d600060003e3d6000fd5b603f3d1115614982576103e001516103c05111614982576103405160e052610b9b610420613fbd565b61042080516103e0526020810151610400525042600160ff1b81101561498257610420526104005161042051808202600160ff1b82141560001984141517156149825782158284830514171561498257905090506103e05180820182811260008312168382121560008412151617156149825790509050610440526103a0516103c051106149825761036051700100000000000000000000000000000000808206905090506064351015610c54576103a0514210614982575b60043560e052610300516101005261032051610120526103e051610140526104005161016052610c82613bd5565b600260106103005160a052608052604060802001546104605261046051700100000000000000000000000000000000808206905090506104805261048051610cea577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610480525b610480514210156149825760106103005160a05260805260406080205460e052610d156104a0613fbd565b6104a080516103e052602081015161040052506104005161042051808202600160ff1b82141560001984141517156149825782158284830514171561498257905090506103e051808201828112600083121683821215600084121516171561498257905090506104a0526024356370a082316104e052610300516105005260206104e060246104fc7312f407340697ae0b177546e535b91a5be021fbf95afa610dc3573d600060003e3d6000fd5b601f3d1115614982576104e0516104a05180820382811360008312168382131560008412151617156149825790509050808202600160ff1b8214156000198414151715614982578215828483051417156149825790509050612710808205905090506104c05260006104c051131561498257610440516104c05112614982576104205160e0526104c051610100526103c051600160ff1b8110156149825761012052610e706104e061402c565b6104e080516103e0526020810151610400525060006104005112156149825760043560e052610300516101005261032051610120526103e051610140526104005161016052606435610180526103c0516101a052610ecc613a49565b610480516103c0511015610ee3576103c051610480525b6104605160801c6104e05260146103005160a05260805260406080206103c05160a052608052604060802080546001818183011061498257808201905090508155506104e05160018181830110614982578082019050905060801b6104805181818301106149825780820190509050600260106103005160a0526080526040608020015560043561032051610300517f3a64a6e1360126485cdd1af7816469a376b21ae1de281a20c42c1d06968552866104c0516000811261498257610500526103c05161052052606435610540526060610500a4005b63a53ae7638118610fdb57600435610300523361032052610fd9614441565b005b63dcd033458118611038576104c06000610100818352015b60206104c05102600401356104a0526104a05161100f57611034565b6104a051610300523361032052611024614441565b8151600101808352811415610ff3575b5050005b630c40519781186110c6576004358060a01c61498257610160526024358060a01c61498257610180526044358060011c614982576101a0526101605133186110815760016110a0565b60026101605160a05260805260406080203360a0526080526040608020545b15614982576101605160e05261018051610100526101a051610120526110c46146b7565b005b6390546fbe8118612183576004358060a01c61498257610160526024358060a01c61498257610180526044358060a01c614982576101a0526064358060a01c614982576101c0526084358060a01c614982576101e05260a4358060a01c614982576102005260c4358060a01c614982576102205260e4358060a01c6149825761024052610104358060a01c6149825761026052610124358060a01c6149825761028052610144358060a01c614982576102a052610164358060a01c614982576102c052610184358060a01c614982576102e0526101a4358060a01c61498257610300526101c4358060a01c61498257610320526101e4358060a01c6149825761034052610204358060a01c6149825761036052610224358060a01c6149825761038052610244358060a01c614982576103a052610264358060a01c614982576103c052610284358060a01c614982576103e0526102a4358060a01c61498257610400526102c4358060a01c61498257610420526102e4358060a01c6149825761044052610304358060a01c6149825761046052610324358060a01c6149825761048052610344358060a01c614982576104a052610364358060a01c614982576104c052610384358060a01c614982576104e0526103a4358060a01c61498257610500526103c4358060a01c61498257610520526103e4358060a01c6149825761054052610404358060a01c6149825761056052610424358060a01c6149825761058052610444358060a01c614982576105a052610464358060a01c614982576105c052610484358060a01c614982576105e0526104a4358060a01c61498257610600526104c4358060a01c61498257610620526104e4358060a01c6149825761064052610504358060a01c6149825761066052610524358060a01c6149825761068052610544358060a01c614982576106a052610564358060a01c614982576106c052610584358060a01c614982576106e0526105a4358060a01c61498257610700526105c4358060a01c61498257610720526105e4358060a01c6149825761074052610604358060a01c6149825761076052610624358060a01c6149825761078052610644358060a01c614982576107a052610664358060a01c614982576107c052610684358060a01c614982576107e0526106a4358060a01c61498257610800526106c4358060a01c61498257610820526106e4358060a01c6149825761084052610704358060a01c6149825761086052610724358060a01c6149825761088052610744358060a01c614982576108a052610764358060a01c614982576108c052610784358060a01c614982576108e0526107a4358060a01c61498257610900526107c4358060a01c61498257610920526107e4358060a01c6149825761094052610804358060a01c6149825761096052610824358060a01c6149825761098052610844358060a01c614982576109a052610864358060a01c614982576109c052610884358060a01c614982576109e0526108a4358060a01c61498257610a00526108c4358060a01c61498257610a20526108e4358060a01c61498257610a4052610904358060a01c61498257610a6052610924358060a01c61498257610a8052610944358060a01c61498257610aa052610964358060a01c61498257610ac052610984358060a01c61498257610ae0526109a4358060a01c61498257610b00526109c4358060a01c61498257610b20526109e4358060a01c61498257610b4052610a04358060a01c61498257610b6052610a24358060a01c61498257610b8052610a44358060a01c61498257610ba052610a64358060a01c61498257610bc052610a84358060a01c61498257610be052610aa4358060a01c61498257610c0052610ac4358060a01c61498257610c2052610ae4358060a01c61498257610c4052610b04358060a01c61498257610c6052610b24358060a01c61498257610c8052610b44358060a01c61498257610ca052610b64358060a01c61498257610cc052610b84358060a01c61498257610ce052610ba4358060a01c61498257610d0052610bc4358060a01c61498257610d2052610be4358060a01c61498257610d4052610c04358060a01c61498257610d6052610c24358060a01c61498257610d8052610c44358060a01c61498257610da052610c64358060a01c61498257610dc052610c84358060a01c61498257610de052610ca4358060a01c61498257610e0052610cc4358060a01c61498257610e2052610ce4358060a01c61498257610e4052610d04358060a01c61498257610e6052610d24358060a01c61498257610e8052610d44358060a01c61498257610ea052610d64358060a01c61498257610ec052610d84358060a01c61498257610ee052610da4358060a01c61498257610f0052610dc4358060a01c61498257610f2052610de4358060a01c61498257610f4052610e04358060a01c61498257610f6052610e24358060a01c61498257610f8052610e44358060a01c61498257610fa052610e64358060a01c61498257610fc052610e84358060a01c61498257610fe052610ea4358060a01c6149825761100052610ec4358060a01c6149825761102052610ee4358060a01c6149825761104052610f04358060a01c6149825761106052610f24358060a01c6149825761108052610f44358060a01c614982576110a052610f64358060a01c614982576110c052610f84358060a01c614982576110e052610fa4358060a01c6149825761110052610fc4358060a01c6149825761112052610fe4358060a01c6149825761114052611004358060a01c6149825761116052611024358060a01c6149825761118052611044358060a01c614982576111a052611064358060a01c614982576111c052611084358060a01c614982576111e0526110a4358060a01c61498257611200526110c4358060a01c61498257611220526110e4358060a01c6149825761124052611104358060a01c6149825761126052611124358060a01c6149825761128052611144358060a01c614982576112a052611164358060a01c614982576112c052611184358060a01c614982576112e0526111a4358060a01c61498257611300526111c4358060a01c61498257611320526111e4358060a01c6149825761134052611204358060a01c6149825761136052611224358060a01c6149825761138052611244358060a01c614982576113a052611264358060a01c614982576113c052611284358060a01c614982576113e0526112a4358060a01c61498257611400526112c4358060a01c61498257611420526112e4358060a01c6149825761144052611304358060a01c6149825761146052611324358060a01c6149825761148052611344358060a01c614982576114a052611364358060a01c614982576114c052611384358060a01c614982576114e0526113a4358060a01c61498257611500526113c4358060a01c61498257611520526113e4358060a01c6149825761154052611404358060a01c6149825761156052611424358060a01c6149825761158052611444358060a01c614982576115a052611464358060a01c614982576115c052611484358060a01c614982576115e0526114a4358060a01c61498257611600526114c4358060a01c61498257611620526114e4358060a01c6149825761164052611504358060a01c6149825761166052611524358060a01c6149825761168052611544358060a01c614982576116a052611564358060a01c614982576116c052611584358060a01c614982576116e0526115a4358060a01c61498257611700526115c4358060a01c61498257611720526115e4358060a01c6149825761174052611604358060a01c6149825761176052611624358060a01c6149825761178052611644358060a01c614982576117a052611664358060a01c614982576117c052611684358060a01c614982576117e0526116a4358060a01c61498257611800526116c4358060a01c61498257611820526116e4358060a01c6149825761184052611704358060a01c6149825761186052611724358060a01c6149825761188052611744358060a01c614982576118a052611764358060a01c614982576118c052611784358060a01c614982576118e0526117a4358060a01c61498257611900526117c4358060a01c61498257611920526117e4358060a01c6149825761194052611804358060a01c6149825761196052611824358060a01c6149825761198052611844358060a01c614982576119a052611864358060a01c614982576119c052611884358060a01c614982576119e0526118a4358060a01c61498257611a00526118c4358060a01c61498257611a20526118e4358060a01c61498257611a4052611904358060a01c61498257611a6052611924358060a01c61498257611a8052611944358060a01c61498257611aa052611964358060a01c61498257611ac052611984358060a01c61498257611ae0526119a4358060a01c61498257611b00526119c4358060a01c61498257611b20526119e4358060a01c61498257611b4052611a04358060a01c61498257611b6052611a24358060a01c61498257611b8052611a44358060a01c61498257611ba052611a64358060a01c61498257611bc052611a84358060a01c61498257611be052611aa4358060a01c61498257611c0052611ac4358060a01c61498257611c2052611ae4358060a01c61498257611c4052611b04358060a01c61498257611c6052611b24358060a01c61498257611c8052611b44358060a01c61498257611ca052611b64358060a01c61498257611cc052611b84358060a01c61498257611ce052611ba4358060a01c61498257611d0052611bc4358060a01c61498257611d2052611be4358060a01c61498257611d4052611c04358060a01c61498257611d6052611c24358060a01c61498257611d8052611c44358060a01c61498257611da052611c64358060a01c61498257611dc052611c84358060a01c61498257611de052611ca4358060a01c61498257611e0052611cc4358060a01c61498257611e2052611ce4358060a01c61498257611e4052611d04358060a01c61498257611e6052611d24358060a01c61498257611e8052611d44358060a01c61498257611ea052611d64358060a01c61498257611ec052611d84358060a01c61498257611ee052611da4358060a01c61498257611f0052611dc4358060a01c61498257611f2052611de4358060a01c61498257611f4052611e04358060a01c61498257611f6052611e24358060a01c61498257611f8052611e44358060a01c61498257611fa052611e64358060a01c61498257611fc052611e84358060a01c61498257611fe052611ea4358060a01c6149825761200052611ec4358060a01c6149825761202052611ee4358060a01c6149825761204052611f04358060a01c6149825761206052611f24358060a01c6149825761208052611f44358060a01c614982576120a052611f64358060a01c614982576120c052611f84358060a01c614982576120e052611fa4358060a01c6149825761210052611fc4358060a01c6149825761212052611fe4358060a01c6149825761214052612004358060a01c61498257612160526101605133186120ea576001612109565b60026101605160a05260805260406080203360a0526080526040608020545b15614982576121806000610100818352015b600160206121805102612024013511156121345761217f565b6101605160e052610180612180516101008110156149825760200201516101005260206121805102612024013515156101205261216f6146b7565b815160010180835281141561211b575b5050005b63bbf7408a8118612442576004358060a01c6149825761010052600260106101005160a05260805260406080200154700100000000000000000000000000000000808206905090506101205260006101205114156121e25760006121e9565b4261012051105b156121fe576000610140526020610140612440565b6370a082316101605261010051610180526020610160602461017c7312f407340697ae0b177546e535b91a5be021fbf95afa61223f573d600060003e3d6000fd5b601f3d111561498257610160516101405260106101005160a052608052604060802080546101605260018101546101805260028101546101a0525042600160ff1b811015614982576101c05260006101605114612355576101605160e0526122a8610220613fbd565b61022080516101e052602081015161020052506101408051610200516101c051808202600160ff1b82141560001984141517156149825782158284830514171561498257905090506101e05180820182811260008312168382121560008412151617156149825790509050600081126123215780612330565b80600003811461498257806000035b9050808203828113600083121683821315600084121516171561498257905090508152505b60006101805114612415576101805160e052612372610220613fbd565b61022080516101e052602081015161020052506101408051610200516101c051808202600160ff1b82141560001984141517156149825782158284830514171561498257905090506101e0518082018281126000831216838212156000841215161715614982579050905060008082126123ec57816123ee565b805b90509050808201828112600083121683821215600084121516171561498257905090508152505b610140516000808212612428578161242a565b805b9050905060008112614982576101e05260206101e05bf35b63c06a5b558118612525576004358060a01c614982576101005260106101005160a05260805260406080205460e05261247c610160613fbd565b6101608051610120526020810151610140525042600160ff1b81101561498257610160526101405161016051808202600160ff1b82141560001984141517156149825782158284830514171561498257905090506101205180820182811260008312168382121560008412151617156149825790509050600081126125015780612510565b80600003811461498257806000035b90506000811261498257610180526020610180f35b63a98b81e08118612601576004358060a01c6149825761010052600160106101005160a0526080526040608020015460e052612562610160613fbd565b6101608051610120526020810151610140525042600160ff1b81101561498257610160526101405161016051808202600160ff1b8214156000198414151715614982578215828483051417156149825790509050610120518082018281126000831216838212156000841215161715614982579050905060008082126125e857816125ea565b805b905090506000811261498257610180526020610180f35b63f01e4f0b81186126ad57601160043560a05260805260406080205460e05261262b610140613fbd565b6101408051610100526020810151610120525042600160ff1b81101561498257610140526101205161014051808202600160ff1b82141560001984141517156149825782158284830514171561498257905090506101005180820182811260008312168382121560008412151617156149825790509050610160526020610160f35b636d1ac9b581186126d5576003601160043560a0526080526040608020015460e052602060e0f35b63f2f60c958118612716576001601160043560a052608052604060802001547001000000000000000000000000000000008082069050905060e052602060e0f35b63058351fb811861272c5760006101205261273f565b63f2f6418f8118612aa057606435610120525b6004358060a01c614982576101005242600160ff1b8110156149825761014052600060243513156149825761271060243513614982576101405162093a8081818301126149825780820190509050604435131561498257602063cbf9fe5f61018052610100516101a0526040610180602461019c7312f407340697ae0b177546e535b91a5be021fbf95afa6127d9573d600060003e3d6000fd5b603f3d1115614982576101800151600160ff1b811015614982576101605261016051604435136149825760106101005160a05260805260406080205461018052600061012051141561282c576000612841565b610100516101205160601c8060a01c61498257145b1561286f57610180805160116101205160a05260805260406080205480821061498257808203905090508152505b6101805160e0526128816101e0613fbd565b6101e080516101a05260208101516101c052506101c05161014051808202600160ff1b82141560001984141517156149825782158284830514171561498257905090506101a051808201828112600083121683821215600084121516171561498257905090506101e05260006101e05112614982576024356370a082316102205261010051610240526020610220602461023c7312f407340697ae0b177546e535b91a5be021fbf95afa61293a573d600060003e3d6000fd5b601f3d111561498257610220516101e05180820382811360008312168382131560008412151617156149825790509050808202600160ff1b82141560001984141517156149825782158284830514171561498257905090506127108082059050905061020052600061020051131561498257610200517f8000000000000000000000000000000000000000000000000000000000000000811315614982576000036044356101405180820382811360008312168382131560008412151617156149825790509050600160ff1b8214156000198214151715614982578080156149825782059050905061022052600061022051121561498257610200516102205161014051808202600160ff1b82141560001984141517156149825782158284830514171561498257905090508082038281136000831216838213156000841215161715614982579050905061024052610240516102605261022051610280526040610260f35b6302a968258118612af4576004358060a01c6149825760e0526c0100000000000000000000000060243510156149825760e05160601b60243581818301106149825780820190509050610100526020610100f35b636b441a408118612b1e576004358060a01c6149825760e05260155433186149825760e051601655005b63e5ea47b88118612b405760165460e05260e05133186149825760e051601555005b63af1c52118118612bbf57600435600401608081351161498257808035602001808260e03750505060155433186149825760e0806008602082510160c060006005818352015b8260c0516020021115612b9857612bb7565b60c05160200285015160c0518501558151600101808352811415612b86575b505050505050005b6370a082318118612bf4576004358060a01c6149825760e052600060e05160a052608052604060802054610100526020610100f35b63081812fc8118612c1957600160043560a05260805260406080205460e052602060e0f35b63e985e9c58118612c6c576004358060a01c6149825760e0526024358060a01c6149825761010052600260e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b636352211e8118612c9157600360043560a05260805260406080205460e052602060e0f35b6306fdde038118612d345760e08060208082528083018060048082602082540160c060006002818352015b8260c0516020021115612cce57612ced565b60c05185015460c0516020028501528151600101808352811415612cbc575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6395d89b418118612dd75760e08060208082528083018060068082602082540160c060006002818352015b8260c0516020021115612d7157612d90565b60c05185015460c0516020028501528151600101808352811415612d5f575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b63786f29108118612e7a5760e08060208082528083018060088082602082540160c060006005818352015b8260c0516020021115612e1457612e33565b60c05185015460c0516020028501528151600101808352811415612e02575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6318160ddd8118612e9157600d5460e052602060e0f35b634f6ccce78118612eb657600e60043560a05260805260406080205460e052602060e0f35b632f745c598118612f1a576004358060a01c6149825760e05260016024357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156149825702600f60e05160a05260805260406080200154610100526020610100f35b6332accbe68118612f7e576004358060a01c6149825760e05260016024357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156149825702601260e05160a05260805260406080200154610100526020610100f35b63e47b270b8118612fb3576004358060a01c6149825760e052601360e05160a052608052604060802054610100526020610100f35b63734e06948118612ff6576004358060a01c6149825760e052601460e05160a052608052604060802060243560a052608052604060802054610100526020610100f35b63f851a440811861300d5760155460e052602060e0f35b6317f7182a81186130245760165460e052602060e0f35b63d91981888118613077576004358060a01c6149825760e0526024358060a01c6149825761010052601760e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b505b60006000fd5b6101005160016101205160a052608052604060802055610120516101005160e0517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256000610140a4565b60036101005160a052608052604060802054610120526101205160e051186130f2576001613134565b60016101005160a05260805260406080205460e05118613113576001613134565b60026101205160a052608052604060802060e05160a0526080526040608020545b815250565b6101205160601c8060a01c6149825761014052600260116101205160a05260805260406080200154610160526101605170010000000000000000000000000000000080820690509050610180526101605160801c6101a052600160116101205160a0526080526040608020015460801c6101c05260e051156137595761010051156133a157600060e05160a0526080526040608020546101e0526101e05161018051146132cd5760016101e0517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156149825702600f60e05160a0526080526040608020015461020052600260116102005160a0526080526040608020015461022052610220517001000000000000000000000000000000008082049050905060801b6101805181818301106149825780820190509050600260116102005160a05260805260406080200155610200516001610180517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156149825702600f60e05160a052608052604060802001555b600060016101e0517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156149825702600f60e05160a0526080526040608020015560006101005160a05260805260406080205461018052610120516001610180517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156149825702600f6101005160a052608052604060802001556101a05160801b6101805181818301106149825780820190509050600260116101205160a052608052604060802001556138ab565b600d546101e052600060e05160a0526080526040608020546102005260136101405160a05260805260406080205460018082106149825780820390509050610220526101e0516101a0511461347f57600e6101e05160a05260805260406080205461024052600260116102405160a05260805260406080200154610260526101a05160801b610260517001000000000000000000000000000000008082069050905081818301106149825780820190509050600260116102405160a0526080526040608020015561024051600e6101a05160a0526080526040608020555b6000600e6101e05160a05260805260406080205561020051610180511461358d576001610200517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156149825702600f60e05160a0526080526040608020015461024052600260116102405160a0526080526040608020015461026052610260517001000000000000000000000000000000008082049050905060801b6101805181818301106149825780820190509050600260116102405160a05260805260406080200155610240516001610180517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156149825702600f60e05160a052608052604060802001555b60006001610200517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156149825702600f60e05160a052608052604060802001556000600260116101205160a05260805260406080200155610220516101c051146136e3576001610220517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811015614982570260126101405160a0526080526040608020015461024052600160116102405160a05260805260406080200154610260526101c05160801b610260517001000000000000000000000000000000008082069050905081818301106149825780820190509050600160116102405160a052608052604060802001556102405160016101c0517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811015614982570260126101405160a052608052604060802001555b60006001610220517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811015614982570260126101405160a052608052604060802001556000600160116101205160a052608052604060802001556102205160136101405160a0526080526040608020556138ab565b60006101005160a05260805260406080205461018052600d546101a0526101a05160801b61018051818183011061498257808201905090506101605260136101405160a0526080526040608020546101c05261012051600e6101a05160a052608052604060802055610120516001610180517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156149825702600f6101005160a0526080526040608020015561016051600260116101205160a052608052604060802001556101c05160801b600160116101205160a052608052604060802001556101205160016101c0517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811015614982570260126101405160a052608052604060802001556101c05160018181830110614982578082019050905060136101405160a0526080526040608020555b565b60036102805160a0526080526040608020546102a0526102a05160e05260006101005261028051610120526138e061307f565b60006102a05160a0526080526040608020805460018082106149825780820390509050815550600060036102805160a052608052604060802055600d8054600180821061498257808203905090508155506102a05160e052600061010052610280516101205261394e613139565b6102805160006102a0517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60006102c0a4565b600061028051146149825760036102a05160a05260805260406080205461498257600060e05261028051610100526102a051610120526139bf613139565b60006102805160a052608052604060802080546001818183011061498257808201905090508155506102805160036102a05160a052608052604060802055600d80546001818183011061498257808201905090508155506102a0516102805160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60006102c0a4565b60176101205160a0526080526040608020600060a0526080526040608020546101c05260176101205160a05260805260406080206101005160a0526080526040608020546101e0526101e0516101c051186149825761014051600081126149825760801b6101605160008112613abf5780613ace565b80600003811461498257806000035b90506000811261498257818183011061498257808201905090506102005260106101005160a052608052604060802080546102005181818301106149825780820190509050815550600160106101205160a05260805260406080200180546102005181818301106149825780820190509050815550601160e05160a0526080526040608020805461022052600181015461024052600281015461026052600381015461028052506102005161022052610240516101805181818301106149825780820190509050610240526101a05161028052601160e05160a052608052604060802061022051815561024051600182015561026051600282015561028051600382015550565b601160e05160a052608052604060802080546101805260018101546101a05260028101546101c05260038101546101e052506101e0516102005261020051613c1c57613f14565b60106101005160a05260805260406080208054610180518082106149825780820390509050815550600160106101205160a05260805260406080200180546101805180821061498257808203905090508155506000610180526101a0517001000000000000000000000000000000008082049050905060801b6101a05260006101e052601160e05160a05260805260406080206101805181556101a05160018201556101c05160028201556101e051600382015550600260106101005160a05260805260406080200154610220526102205170010000000000000000000000000000000080820690509050610240526102205160801c600180821061498257808203905090506102605260146101005160a05260805260406080206102005160a052608052604060802054610280526000610260511415613d5e576000613d78565b610240516102005118613d75576102805115613d78565b60005b613d8f5761026051613eae57600061024052613eae565b6102a06001610200818352015b6102006102a05118613e1f57601a6102c0527f4661696c656420746f2066696e64206e657874206578706972790000000000006102e0526102c0506102c051806102e001818260206001820306601f82010390500336823750506308c379a06102805260206102a0526102c05160206001820306601f820103905060440161029cfd5b6102005162093a806102a0516001818183011061498257808201905090508082028215828483041417156149825790509050818183011061498257808201905090506102c052600060146101005160a05260805260406080206102c05160a0526080526040608020541115613e9b576102c05161024052613eab565b8151600101808352811415613d9c575b50505b6102605160801b6102405181818301106149825780820190509050600260106101005160a05260805260406080200155610280516001808210614982578082039050905060146101005160a05260805260406080206102005160a0526080526040608020555b565b61012051600081126149825760801b6101405160008112613f375780613f46565b80600003811461498257806000035b9050600081126149825781818301106149825780820190509050610160526001601060e05160a0526080526040608020018054610160518082106149825780820390509050815550600160106101005160a05260805260406080200180546101605181818301106149825780820190509050815550565b60e05160801c600160ff1b81101561498257815260e05170010000000000000000000000000000000080820690509050600160ff1b811015614982577f800000000000000000000000000000000000000000000000000000000000000081131561498257600003602082015250565b610100517f8000000000000000000000000000000000000000000000000000000000000000811315614982576000036101205160e05180820382811360008312168382131560008412151617156149825790509050600160ff1b8214156000198214151715614982578080156149825782059050905061014052610100516101405160e051808202600160ff1b821415600019841415171561498257821582848305141715614982579050905080820382811360008312168382131560008412151617156149825790509050815261014051602082015250565b6103005160036103405160a052608052604060802054186149825760006103205114614982576103405160601c8060a01c614982576103605260176103205160a0526080526040608020600060a0526080526040608020546103805260176103205160a05260805260406080206103605160a0526080526040608020546103a0526103a0516103805118614982576103005160e05260006101005261034051610120526141b161307f565b60006103005160a05260805260406080208054600180821061498257808203905090508155506103005160e052610320516101005261034051610120526141f6613139565b60006103205160a052608052604060802080546001818183011061498257808201905090508155506103205160036103405160a05260805260406080205560116103405160a05260805260406080205460e052614254610400613fbd565b61040080516103c05260208101516103e052506103e05142600160ff1b81101561498257808202600160ff1b82141560001984141517156149825782158284830514171561498257905090506103c051808201828112600083121683821215600084121516171561498257905090506104005260006104005113614339576103405160e052610360516101005261030051610120526103c051610140526103e05161016052614301613bd5565b6103405161030051610360517f64ddd743466fd725d437a06c1600041c3a8e6566a51cbfb4b73ee501db9465746000610420a461440c565b6103005160e05261032051610100526103c051610120526103e05161014052614360613f16565b6103c0517f8000000000000000000000000000000000000000000000000000000000000000811315614982576000036103e051600160ff1b821415600019821415171561498257808015614982578205905090506000811261498257610420526103405161032051610300517fd28879082858412c80e7b7b81ccad936afca475871f7ba9d041dec51298e94166104005160008112614982576104405261042051610460526040610440a45b6103405161032051610300517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000610420a4565b60036103005160a0526080526040608020546103405260006103405114614982576103005160601c8060a01c614982576103605260116103005160a052608052604060802080546103805260018101546103a05260028101546103c05260038101546103e052506103805160e0526144ba610440613fbd565b610440805161040052602081015161042052506104205142600160ff1b81101561498257808202600160ff1b8214156000198414151715614982578215828483051417156149825790509050610400518082018281126000831216838212156000841215161715614982579050905061044052610340516103205118614541576001614576565b60026103405160a05260805260406080206103205160a052608052604060802054614573576000610440511315614576565b60015b6146535761036051610320511861458e5760016145b0565b60026103605160a05260805260406080206103205160a0526080526040608020545b61462f57600c610460527f4e6f7420616c6c6f7765642100000000000000000000000000000000000000006104805261046050610460518061048001818260206001820306601f82010390500336823750506308c379a0610420526020610440526104605160206001820306601f820103905060440161043cfd614653565b426103a0517001000000000000000000000000000000008082069050905011614982575b6103005160e0526103605161010052610340516101205261040051610140526104205161016052614682613bd5565b6103005161034051610360517f64ddd743466fd725d437a06c1600041c3a8e6566a51cbfb4b73ee501db9465746000610460a4565b61012051601760e05160a05260805260406080206101005160a0526080526040608020556101005160e0517f80dbbd5de59fe1d8e1586e8b741b335479764458933d96f4272b3003653751a461012051610140526020610140a3565b60e051614760576001610100527f30000000000000000000000000000000000000000000000000000000000000006101205261010080516020018083828460045afa905090505050614980565b600061018052610180805160200180610100828460045afa90505050604e610180526101a06000604e818352015b604e61018051186147c25760e051604e6101a0511015614982576101a051600a0a80801561498257820490509050156147c5565b60005b156147d3576101a051610180525b60e051604e604d6101a0518082106149825780820390509050101561498257604d6101a0518082106149825780820390509050600a0a80801561498257820490509050600a808206905090506030818183011061498257808201905090506101c052601f6001602082066102200160208284011161498257602080610240826101c060045afa5050818152905090508051602001806101e0828460045afa905050506000610100604e806020846102200101826020850160045afa5050805182019150506101e06001806020846102200101826020850160045afa50508051820191505080610220526102205050604e6102c06102205161024060045afa6148e0573d600060003e3d6000fd5b6102a0604e3d8082116148f357816148f5565b805b905090508152805160200180610100828460045afa90505050815160010180835281141561478e575050604e61018051808210614982578082039050905061018051602082066101a001610100518284011161498257604e806101c0826020602088068803016101000160045afa50508181529050905080516020018083828460045afa9050905050505b565b600080fd5b610192614b1903610192600039610192614b19036000f35b600080fd000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001e566f74696e6720457363726f7720426f6f73742044656c65676174696f6e000000000000000000000000000000000000000000000000000000000000000000077665426f6f73740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001e566f74696e6720457363726f7720426f6f73742044656c65676174696f6e000000000000000000000000000000000000000000000000000000000000000000077665426f6f73740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Voting Escrow Boost Delegation
Arg [1] : _symbol (string): veBoost
Arg [2] : _base_uri (string):

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [4] : 566f74696e6720457363726f7720426f6f73742044656c65676174696f6e0000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [6] : 7665426f6f737400000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.