Contract 0x13dff1809d1e9ddf9ac901f47817b7f45220a846 3

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x6f52a3f7239726160c6bcbd2fa0d2d40755604324adc8bc26864efc6d79bf03b0x61dead6083386412022-03-22 22:05:43195 days 11 hrs ago0x71f718d3e4d1449d1502a6a7595eb84ebccb1683 IN  Create: Vyper_contract0 ETH0.013169254241 ETH
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
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 Liquidity Gauge
@author Curve Finance
@license MIT
@notice Implementation contract for use with Curve Factory
"""
from vyper.interfaces import ERC20

implements: ERC20


interface CRV20:
    def future_epoch_time_write() -> uint256: nonpayable
    def rate() -> uint256: view

interface Controller:
    def checkpoint_gauge(addr: address): nonpayable
    def gauge_relative_weight(addr: address, time: uint256) -> uint256: view

interface ERC20Extended:
    def symbol() -> String[32]: view

interface ERC1271:
    def isValidSignature(_hash: bytes32, _signature: Bytes[65]) -> bytes32: view

interface Factory:
    def admin() -> address: view

interface Minter:
    def minted(user: address, gauge: address) -> uint256: view

interface VotingEscrow:
    def user_point_epoch(addr: address) -> uint256: view
    def user_point_history__ts(addr: address, epoch: uint256) -> uint256: view

interface VotingEscrowBoost:
    def adjusted_balance_of(_account: address) -> uint256: view


event Deposit:
    provider: indexed(address)
    value: uint256

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

event UpdateLiquidityLimit:
    user: indexed(address)
    original_balance: uint256
    original_supply: uint256
    working_balance: uint256
    working_supply: uint256

event CommitOwnership:
    admin: address

event ApplyOwnership:
    admin: address

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

event Approval:
    _owner: indexed(address)
    _spender: indexed(address)
    _value: uint256


struct Reward:
    token: address
    distributor: address
    period_finish: uint256
    rate: uint256
    last_update: uint256
    integral: uint256


CLAIM_FREQUENCY: constant(uint256) = 3600
MAX_REWARDS: constant(uint256) = 8
TOKENLESS_PRODUCTION: constant(uint256) = 40
WEEK: constant(uint256) = 604800

# keccak256("isValidSignature(bytes32,bytes)")[:4] << 224
ERC1271_MAGIC_VAL: constant(bytes32) = 0x1626ba7e00000000000000000000000000000000000000000000000000000000
VERSION: constant(String[8]) = "v5.0.0"

EIP712_TYPEHASH: constant(bytes32) = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)")
PERMIT_TYPEHASH: constant(bytes32) = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)")

CRV: constant(address) = 0xD533a949740bb3306d119CC777fa900bA034cd52
GAUGE_CONTROLLER: constant(address) = 0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB
MINTER: constant(address) = 0xd061D61a4d941c39E5453435B6345Dc261C2fcE0
VEBOOST_PROXY: constant(address) = 0x8E0c00ed546602fD9927DF742bbAbF726D5B0d16
VOTING_ESCROW: constant(address) = 0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2


# ERC20
balanceOf: public(HashMap[address, uint256])
totalSupply: public(uint256)
allowance: public(HashMap[address, HashMap[address, uint256]])

name: public(String[64])
symbol: public(String[40])

# ERC2612
DOMAIN_SEPARATOR: public(bytes32)
nonces: public(HashMap[address, uint256])

# Gauge
factory: public(address)
lp_token: public(address)

is_killed: public(bool)

# [future_epoch_time uint40][inflation_rate uint216]
inflation_params: uint256

# For tracking external rewards
reward_count: public(uint256)
reward_data: public(HashMap[address, Reward])

# claimant -> default reward receiver
rewards_receiver: public(HashMap[address, address])

# reward token -> claiming address -> integral
reward_integral_for: public(HashMap[address, HashMap[address, uint256]])

# user -> [uint128 claimable amount][uint128 claimed amount]
claim_data: HashMap[address, HashMap[address, uint256]]

working_balances: public(HashMap[address, uint256])
working_supply: public(uint256)

# 1e18 * ∫(rate(t) / totalSupply(t) dt) from (last_action) till checkpoint
integrate_inv_supply_of: public(HashMap[address, uint256])
integrate_checkpoint_of: public(HashMap[address, uint256])

# ∫(balance * rate(t) / totalSupply(t) dt) from 0 till checkpoint
# Units: rate * t = already number of coins per address to issue
integrate_fraction: public(HashMap[address, uint256])

# The goal is to be able to calculate ∫(rate * balance / totalSupply dt) from 0 till checkpoint
# All values are kept in units of being multiplied by 1e18
period: public(int128)

# array of reward tokens
reward_tokens: public(address[MAX_REWARDS])

period_timestamp: public(uint256[100000000000000000000000000000])
# 1e18 * ∫(rate(t) / totalSupply(t) dt) from 0 till checkpoint
integrate_inv_supply: public(uint256[100000000000000000000000000000])  # bump epoch when rate() changes


@external
def __init__():
    # prevent initialization of implementation
    self.lp_token = 0x000000000000000000000000000000000000dEaD


# Internal Functions


@internal
def _checkpoint(addr: address):
    """
    @notice Checkpoint for a user
    @dev Updates the CRV emissions a user is entitled to receive
    @param addr User address
    """
    _period: int128 = self.period
    _period_time: uint256 = self.period_timestamp[_period]
    _integrate_inv_supply: uint256 = self.integrate_inv_supply[_period]

    inflation_params: uint256 = self.inflation_params
    rate: uint256 = inflation_params % 2 ** 216
    prev_future_epoch: uint256 = shift(inflation_params, -216)
    new_rate: uint256 = rate

    if prev_future_epoch >= _period_time:
        new_rate = CRV20(CRV).rate()
        self.inflation_params = shift(CRV20(CRV).future_epoch_time_write(), 216) + new_rate

    if self.is_killed:
        # Stop distributing inflation as soon as killed
        rate = 0
        new_rate = 0  # prevent distribution when crossing epochs

    # Update integral of 1/supply
    if block.timestamp > _period_time:
        _working_supply: uint256 = self.working_supply
        Controller(GAUGE_CONTROLLER).checkpoint_gauge(self)
        prev_week_time: uint256 = _period_time
        week_time: uint256 = min((_period_time + WEEK) / WEEK * WEEK, block.timestamp)

        for i in range(500):
            dt: uint256 = week_time - prev_week_time
            w: uint256 = Controller(GAUGE_CONTROLLER).gauge_relative_weight(self, prev_week_time / WEEK * WEEK)

            if _working_supply > 0:
                if prev_future_epoch >= prev_week_time and prev_future_epoch < week_time:
                    # If we went across one or multiple epochs, apply the rate
                    # of the first epoch until it ends, and then the rate of
                    # the last epoch.
                    # If more than one epoch is crossed - the gauge gets less,
                    # but that'd meen it wasn't called for more than 1 year
                    _integrate_inv_supply += rate * w * (prev_future_epoch - prev_week_time) / _working_supply
                    rate = new_rate
                    _integrate_inv_supply += rate * w * (week_time - prev_future_epoch) / _working_supply
                else:
                    _integrate_inv_supply += rate * w * dt / _working_supply
                # On precisions of the calculation
                # rate ~= 10e18
                # last_weight > 0.01 * 1e18 = 1e16 (if pool weight is 1%)
                # _working_supply ~= TVL * 1e18 ~= 1e26 ($100M for example)
                # The largest loss is at dt = 1
                # Loss is 1e-9 - acceptable

            if week_time == block.timestamp:
                break
            prev_week_time = week_time
            week_time = min(week_time + WEEK, block.timestamp)

    _period += 1
    self.period = _period
    self.period_timestamp[_period] = block.timestamp
    self.integrate_inv_supply[_period] = _integrate_inv_supply

    # Update user-specific integrals
    _working_balance: uint256 = self.working_balances[addr]
    self.integrate_fraction[addr] += _working_balance * (_integrate_inv_supply - self.integrate_inv_supply_of[addr]) / 10 ** 18
    self.integrate_inv_supply_of[addr] = _integrate_inv_supply
    self.integrate_checkpoint_of[addr] = block.timestamp


@internal
def _checkpoint_rewards(_user: address, _total_supply: uint256, _claim: bool, _receiver: address):
    """
    @notice Claim pending rewards and checkpoint rewards for a user
    """
    user_balance: uint256 = 0
    receiver: address = _receiver
    if _user != ZERO_ADDRESS:
        user_balance = self.balanceOf[_user]
        if _claim and _receiver == ZERO_ADDRESS:
            # if receiver is not explicitly declared, check if a default receiver is set
            receiver = self.rewards_receiver[_user]
            if receiver == ZERO_ADDRESS:
                # if no default receiver is set, direct claims to the user
                receiver = _user

    reward_count: uint256 = self.reward_count
    for i in range(MAX_REWARDS):
        if i == reward_count:
            break
        token: address = self.reward_tokens[i]

        integral: uint256 = self.reward_data[token].integral
        last_update: uint256 = min(block.timestamp, self.reward_data[token].period_finish)
        duration: uint256 = last_update - self.reward_data[token].last_update
        if duration != 0:
            self.reward_data[token].last_update = last_update
            if _total_supply != 0:
                integral += duration * self.reward_data[token].rate * 10**18 / _total_supply
                self.reward_data[token].integral = integral

        if _user != ZERO_ADDRESS:
            integral_for: uint256 = self.reward_integral_for[token][_user]
            new_claimable: uint256 = 0

            if integral_for < integral:
                self.reward_integral_for[token][_user] = integral
                new_claimable = user_balance * (integral - integral_for) / 10**18

            claim_data: uint256 = self.claim_data[_user][token]
            total_claimable: uint256 = shift(claim_data, -128) + new_claimable
            if total_claimable > 0:
                total_claimed: uint256 = claim_data % 2**128
                if _claim:
                    response: Bytes[32] = raw_call(
                        token,
                        _abi_encode(
                            receiver,
                            total_claimable,
                            method_id=method_id("transfer(address,uint256)")
                        ),
                        max_outsize=32,
                    )
                    if len(response) != 0:
                        assert convert(response, bool)
                    self.claim_data[_user][token] = total_claimed + total_claimable
                elif new_claimable > 0:
                    self.claim_data[_user][token] = total_claimed + shift(total_claimable, 128)


@internal
def _update_liquidity_limit(addr: address, l: uint256, L: uint256):
    """
    @notice Calculate limits which depend on the amount of CRV token per-user.
            Effectively it calculates working balances to apply amplification
            of CRV production by CRV
    @param addr User address
    @param l User's amount of liquidity (LP tokens)
    @param L Total amount of liquidity (LP tokens)
    """
    # To be called after totalSupply is updated
    voting_balance: uint256 = VotingEscrowBoost(VEBOOST_PROXY).adjusted_balance_of(addr)
    voting_total: uint256 = ERC20(VOTING_ESCROW).totalSupply()

    lim: uint256 = l * TOKENLESS_PRODUCTION / 100
    if voting_total > 0:
        lim += L * voting_balance / voting_total * (100 - TOKENLESS_PRODUCTION) / 100

    lim = min(l, lim)
    old_bal: uint256 = self.working_balances[addr]
    self.working_balances[addr] = lim
    _working_supply: uint256 = self.working_supply + lim - old_bal
    self.working_supply = _working_supply

    log UpdateLiquidityLimit(addr, l, L, lim, _working_supply)


@internal
def _transfer(_from: address, _to: address, _value: uint256):
    """
    @notice Transfer tokens as well as checkpoint users
    """
    self._checkpoint(_from)
    self._checkpoint(_to)

    if _value != 0:
        total_supply: uint256 = self.totalSupply
        is_rewards: bool = self.reward_count != 0
        if is_rewards:
            self._checkpoint_rewards(_from, total_supply, False, ZERO_ADDRESS)
        new_balance: uint256 = self.balanceOf[_from] - _value
        self.balanceOf[_from] = new_balance
        self._update_liquidity_limit(_from, new_balance, total_supply)

        if is_rewards:
            self._checkpoint_rewards(_to, total_supply, False, ZERO_ADDRESS)
        new_balance = self.balanceOf[_to] + _value
        self.balanceOf[_to] = new_balance
        self._update_liquidity_limit(_to, new_balance, total_supply)

    log Transfer(_from, _to, _value)


# External User Facing Functions


@external
@nonreentrant('lock')
def deposit(_value: uint256, _addr: address = msg.sender, _claim_rewards: bool = False):
    """
    @notice Deposit `_value` LP tokens
    @dev Depositting also claims pending reward tokens
    @param _value Number of tokens to deposit
    @param _addr Address to deposit for
    """

    self._checkpoint(_addr)

    if _value != 0:
        is_rewards: bool = self.reward_count != 0
        total_supply: uint256 = self.totalSupply
        if is_rewards:
            self._checkpoint_rewards(_addr, total_supply, _claim_rewards, ZERO_ADDRESS)

        total_supply += _value
        new_balance: uint256 = self.balanceOf[_addr] + _value
        self.balanceOf[_addr] = new_balance
        self.totalSupply = total_supply

        self._update_liquidity_limit(_addr, new_balance, total_supply)

        ERC20(self.lp_token).transferFrom(msg.sender, self, _value)

    log Deposit(_addr, _value)
    log Transfer(ZERO_ADDRESS, _addr, _value)


@external
@nonreentrant('lock')
def withdraw(_value: uint256, _claim_rewards: bool = False):
    """
    @notice Withdraw `_value` LP tokens
    @dev Withdrawing also claims pending reward tokens
    @param _value Number of tokens to withdraw
    """
    self._checkpoint(msg.sender)

    if _value != 0:
        is_rewards: bool = self.reward_count != 0
        total_supply: uint256 = self.totalSupply
        if is_rewards:
            self._checkpoint_rewards(msg.sender, total_supply, _claim_rewards, ZERO_ADDRESS)

        total_supply -= _value
        new_balance: uint256 = self.balanceOf[msg.sender] - _value
        self.balanceOf[msg.sender] = new_balance
        self.totalSupply = total_supply

        self._update_liquidity_limit(msg.sender, new_balance, total_supply)

        ERC20(self.lp_token).transfer(msg.sender, _value)

    log Withdraw(msg.sender, _value)
    log Transfer(msg.sender, ZERO_ADDRESS, _value)


@external
@nonreentrant('lock')
def claim_rewards(_addr: address = msg.sender, _receiver: address = ZERO_ADDRESS):
    """
    @notice Claim available reward tokens for `_addr`
    @param _addr Address to claim for
    @param _receiver Address to transfer rewards to - if set to
                     ZERO_ADDRESS, uses the default reward receiver
                     for the caller
    """
    if _receiver != ZERO_ADDRESS:
        assert _addr == msg.sender  # dev: cannot redirect when claiming for another user
    self._checkpoint_rewards(_addr, self.totalSupply, True, _receiver)


@external
@nonreentrant('lock')
def transferFrom(_from: address, _to :address, _value: uint256) -> bool:
    """
     @notice Transfer tokens from one address to another.
     @dev Transferring claims pending reward tokens for the sender and receiver
     @param _from address The address which you want to send tokens from
     @param _to address The address which you want to transfer to
     @param _value uint256 the amount of tokens to be transferred
    """
    _allowance: uint256 = self.allowance[_from][msg.sender]
    if _allowance != MAX_UINT256:
        self.allowance[_from][msg.sender] = _allowance - _value

    self._transfer(_from, _to, _value)

    return True


@external
@nonreentrant('lock')
def transfer(_to: address, _value: uint256) -> bool:
    """
    @notice Transfer token for a specified address
    @dev Transferring claims pending reward tokens for the sender and receiver
    @param _to The address to transfer to.
    @param _value The amount to be transferred.
    """
    self._transfer(msg.sender, _to, _value)

    return True


@external
def approve(_spender : address, _value : uint256) -> bool:
    """
    @notice Approve the passed address to transfer the specified amount of
            tokens on behalf of msg.sender
    @dev Beware that changing an allowance via this method brings the risk
         that someone may use both the old and new allowance by unfortunate
         transaction ordering. This may be mitigated with the use of
         {incraseAllowance} and {decreaseAllowance}.
         https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
    @param _spender The address which will transfer the funds
    @param _value The amount of tokens that may be transferred
    @return bool success
    """
    self.allowance[msg.sender][_spender] = _value
    log Approval(msg.sender, _spender, _value)

    return True


@external
def permit(
    _owner: address,
    _spender: address,
    _value: uint256,
    _deadline: uint256,
    _v: uint8,
    _r: bytes32,
    _s: bytes32
) -> bool:
    """
    @notice Approves spender by owner's signature to expend owner's tokens.
        See https://eips.ethereum.org/EIPS/eip-2612.
    @dev Inspired by https://github.com/yearn/yearn-vaults/blob/main/contracts/Vault.vy#L753-L793
    @dev Supports smart contract wallets which implement ERC1271
        https://eips.ethereum.org/EIPS/eip-1271
    @param _owner The address which is a source of funds and has signed the Permit.
    @param _spender The address which is allowed to spend the funds.
    @param _value The amount of tokens to be spent.
    @param _deadline The timestamp after which the Permit is no longer valid.
    @param _v The bytes[64] of the valid secp256k1 signature of permit by owner
    @param _r The bytes[0:32] of the valid secp256k1 signature of permit by owner
    @param _s The bytes[32:64] of the valid secp256k1 signature of permit by owner
    @return True, if transaction completes successfully
    """
    assert _owner != ZERO_ADDRESS
    assert block.timestamp <= _deadline

    nonce: uint256 = self.nonces[_owner]
    digest: bytes32 = keccak256(
        concat(
            b"\x19\x01",
            self.DOMAIN_SEPARATOR,
            keccak256(_abi_encode(PERMIT_TYPEHASH, _owner, _spender, _value, nonce, _deadline))
        )
    )

    if _owner.is_contract:
        sig: Bytes[65] = concat(_abi_encode(_r, _s), slice(convert(_v, bytes32), 31, 1))
        # reentrancy not a concern since this is a staticcall
        assert ERC1271(_owner).isValidSignature(digest, sig) == ERC1271_MAGIC_VAL
    else:
        assert ecrecover(digest, convert(_v, uint256), convert(_r, uint256), convert(_s, uint256)) == _owner

    self.allowance[_owner][_spender] = _value
    self.nonces[_owner] = nonce + 1

    log Approval(_owner, _spender, _value)
    return True


@external
def increaseAllowance(_spender: address, _added_value: uint256) -> bool:
    """
    @notice Increase the allowance granted to `_spender` by the caller
    @dev This is alternative to {approve} that can be used as a mitigation for
         the potential race condition
    @param _spender The address which will transfer the funds
    @param _added_value The amount of to increase the allowance
    @return bool success
    """
    allowance: uint256 = self.allowance[msg.sender][_spender] + _added_value
    self.allowance[msg.sender][_spender] = allowance

    log Approval(msg.sender, _spender, allowance)

    return True


@external
def decreaseAllowance(_spender: address, _subtracted_value: uint256) -> bool:
    """
    @notice Decrease the allowance granted to `_spender` by the caller
    @dev This is alternative to {approve} that can be used as a mitigation for
         the potential race condition
    @param _spender The address which will transfer the funds
    @param _subtracted_value The amount of to decrease the allowance
    @return bool success
    """
    allowance: uint256 = self.allowance[msg.sender][_spender] - _subtracted_value
    self.allowance[msg.sender][_spender] = allowance

    log Approval(msg.sender, _spender, allowance)

    return True


@external
def user_checkpoint(addr: address) -> bool:
    """
    @notice Record a checkpoint for `addr`
    @param addr User address
    @return bool success
    """
    assert msg.sender in [addr, MINTER]  # dev: unauthorized
    self._checkpoint(addr)
    self._update_liquidity_limit(addr, self.balanceOf[addr], self.totalSupply)
    return True


@external
def set_rewards_receiver(_receiver: address):
    """
    @notice Set the default reward receiver for the caller.
    @dev When set to ZERO_ADDRESS, rewards are sent to the caller
    @param _receiver Receiver address for any rewards claimed via `claim_rewards`
    """
    self.rewards_receiver[msg.sender] = _receiver


@external
def kick(addr: address):
    """
    @notice Kick `addr` for abusing their boost
    @dev Only if either they had another voting event, or their voting escrow lock expired
    @param addr Address to kick
    """
    t_last: uint256 = self.integrate_checkpoint_of[addr]
    t_ve: uint256 = VotingEscrow(VOTING_ESCROW).user_point_history__ts(
        addr, VotingEscrow(VOTING_ESCROW).user_point_epoch(addr)
    )
    _balance: uint256 = self.balanceOf[addr]

    assert ERC20(VOTING_ESCROW).balanceOf(addr) == 0 or t_ve > t_last # dev: kick not allowed
    assert self.working_balances[addr] > _balance * TOKENLESS_PRODUCTION / 100  # dev: kick not needed

    self._checkpoint(addr)
    self._update_liquidity_limit(addr, self.balanceOf[addr], self.totalSupply)


# Administrative Functions


@external
@nonreentrant("lock")
def deposit_reward_token(_reward_token: address, _amount: uint256):
    """
    @notice Deposit a reward token for distribution
    @param _reward_token The reward token being deposited
    @param _amount The amount of `_reward_token` being deposited
    """
    assert msg.sender == self.reward_data[_reward_token].distributor

    self._checkpoint_rewards(ZERO_ADDRESS, self.totalSupply, False, ZERO_ADDRESS)

    response: Bytes[32] = raw_call(
        _reward_token,
        _abi_encode(
            msg.sender, self, _amount, method_id=method_id("transferFrom(address,address,uint256)")
        ),
        max_outsize=32,
    )
    if len(response) != 0:
        assert convert(response, bool)

    period_finish: uint256 = self.reward_data[_reward_token].period_finish
    if block.timestamp >= period_finish:
        self.reward_data[_reward_token].rate = _amount / WEEK
    else:
        remaining: uint256 = period_finish - block.timestamp
        leftover: uint256 = remaining * self.reward_data[_reward_token].rate
        self.reward_data[_reward_token].rate = (_amount + leftover) / WEEK

    self.reward_data[_reward_token].last_update = block.timestamp
    self.reward_data[_reward_token].period_finish = block.timestamp + WEEK


@external
def add_reward(_reward_token: address, _distributor: address):
    """
    @notice Add additional rewards to be distributed to stakers
    @param _reward_token The token to add as an additional reward
    @param _distributor Address permitted to fund this contract with the reward token
    """
    assert msg.sender == Factory(self.factory).admin()  # dev: only owner

    reward_count: uint256 = self.reward_count
    assert reward_count < MAX_REWARDS
    assert self.reward_data[_reward_token].distributor == ZERO_ADDRESS

    self.reward_data[_reward_token].distributor = _distributor
    self.reward_tokens[reward_count] = _reward_token
    self.reward_count = reward_count + 1


@external
def set_reward_distributor(_reward_token: address, _distributor: address):
    """
    @notice Reassign the reward distributor for a reward token
    @param _reward_token The reward token to reassign distribution rights to
    @param _distributor The address of the new distributor
    """
    current_distributor: address = self.reward_data[_reward_token].distributor

    assert msg.sender == current_distributor or msg.sender == Factory(self.factory).admin()
    assert current_distributor != ZERO_ADDRESS
    assert _distributor != ZERO_ADDRESS

    self.reward_data[_reward_token].distributor = _distributor


@external
def set_killed(_is_killed: bool):
    """
    @notice Set the killed status for this contract
    @dev When killed, the gauge always yields a rate of 0 and so cannot mint CRV
    @param _is_killed Killed status to set
    """
    assert msg.sender == Factory(self.factory).admin()  # dev: only owner

    self.is_killed = _is_killed


# View Methods


@view
@external
def claimed_reward(_addr: address, _token: address) -> uint256:
    """
    @notice Get the number of already-claimed reward tokens for a user
    @param _addr Account to get reward amount for
    @param _token Token to get reward amount for
    @return uint256 Total amount of `_token` already claimed by `_addr`
    """
    return self.claim_data[_addr][_token] % 2**128


@view
@external
def claimable_reward(_user: address, _reward_token: address) -> uint256:
    """
    @notice Get the number of claimable reward tokens for a user
    @param _user Account to get reward amount for
    @param _reward_token Token to get reward amount for
    @return uint256 Claimable reward token amount
    """
    integral: uint256 = self.reward_data[_reward_token].integral
    total_supply: uint256 = self.totalSupply
    if total_supply != 0:
        last_update: uint256 = min(block.timestamp, self.reward_data[_reward_token].period_finish)
        duration: uint256 = last_update - self.reward_data[_reward_token].last_update
        integral += (duration * self.reward_data[_reward_token].rate * 10**18 / total_supply)

    integral_for: uint256 = self.reward_integral_for[_reward_token][_user]
    new_claimable: uint256 = self.balanceOf[_user] * (integral - integral_for) / 10**18

    return shift(self.claim_data[_user][_reward_token], -128) + new_claimable


@external
def claimable_tokens(addr: address) -> uint256:
    """
    @notice Get the number of claimable tokens per user
    @dev This function should be manually changed to "view" in the ABI
    @return uint256 number of claimable tokens per user
    """
    self._checkpoint(addr)
    return self.integrate_fraction[addr] - Minter(MINTER).minted(addr, self)


@view
@external
def integrate_checkpoint() -> uint256:
    """
    @notice Get the timestamp of the last checkpoint
    """
    return self.period_timestamp[self.period]


@view
@external
def future_epoch_time() -> uint256:
    """
    @notice Get the locally stored CRV future epoch start time
    """
    return shift(self.inflation_params, -216)


@view
@external
def inflation_rate() -> uint256:
    """
    @notice Get the locally stored CRV inflation rate
    """
    return self.inflation_params % 2 ** 216


@view
@external
def decimals() -> uint256:
    """
    @notice Get the number of decimals for this token
    @dev Implemented as a view method to reduce gas costs
    @return uint256 decimal places
    """
    return 18


@view
@external
def version() -> String[8]:
    """
    @notice Get the version of this gauge contract
    """
    return VERSION


# Initializer


@external
def initialize(_lp_token: address):
    """
    @notice Contract constructor
    @param _lp_token Liquidity Pool contract address
    """
    assert self.lp_token == ZERO_ADDRESS

    self.lp_token = _lp_token
    self.factory = msg.sender

    symbol: String[32] = ERC20Extended(_lp_token).symbol()
    name: String[64] = concat("Curve.fi ", symbol, " Gauge Deposit")

    self.name = name
    self.symbol = concat(symbol, "-gauge")

    self.DOMAIN_SEPARATOR = keccak256(
        _abi_encode(EIP712_TYPEHASH, keccak256(name), keccak256(VERSION), chain.id, self)
    )

    self.period_timestamp[0] = block.timestamp
    self.inflation_params = shift(CRV20(CRV).future_epoch_time_write(), 216) + CRV20(CRV).rate()

Contract ABI

[{"name":"Deposit","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Withdraw","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"UpdateLiquidityLimit","inputs":[{"name":"user","type":"address","indexed":true},{"name":"original_balance","type":"uint256","indexed":false},{"name":"original_supply","type":"uint256","indexed":false},{"name":"working_balance","type":"uint256","indexed":false},{"name":"working_supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"CommitOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"Transfer","inputs":[{"name":"_from","type":"address","indexed":true},{"name":"_to","type":"address","indexed":true},{"name":"_value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Approval","inputs":[{"name":"_owner","type":"address","indexed":true},{"name":"_spender","type":"address","indexed":true},{"name":"_value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"deposit","inputs":[{"name":"_value","type":"uint256"}],"outputs":[],"gas":4221717},{"stateMutability":"nonpayable","type":"function","name":"deposit","inputs":[{"name":"_value","type":"uint256"},{"name":"_addr","type":"address"}],"outputs":[],"gas":4221717},{"stateMutability":"nonpayable","type":"function","name":"deposit","inputs":[{"name":"_value","type":"uint256"},{"name":"_addr","type":"address"},{"name":"_claim_rewards","type":"bool"}],"outputs":[],"gas":4221717},{"stateMutability":"nonpayable","type":"function","name":"withdraw","inputs":[{"name":"_value","type":"uint256"}],"outputs":[],"gas":4221322},{"stateMutability":"nonpayable","type":"function","name":"withdraw","inputs":[{"name":"_value","type":"uint256"},{"name":"_claim_rewards","type":"bool"}],"outputs":[],"gas":4221322},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[],"outputs":[],"gas":1374701},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[{"name":"_addr","type":"address"}],"outputs":[],"gas":1374701},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[{"name":"_addr","type":"address"},{"name":"_receiver","type":"address"}],"outputs":[],"gas":1374701},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":8330946},{"stateMutability":"nonpayable","type":"function","name":"transfer","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":8293026},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":39241},{"stateMutability":"nonpayable","type":"function","name":"permit","inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_deadline","type":"uint256"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"}],"outputs":[{"name":"","type":"bool"}],"gas":102311},{"stateMutability":"nonpayable","type":"function","name":"increaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_added_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":41801},{"stateMutability":"nonpayable","type":"function","name":"decreaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_subtracted_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":41827},{"stateMutability":"nonpayable","type":"function","name":"user_checkpoint","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":2767499},{"stateMutability":"nonpayable","type":"function","name":"set_rewards_receiver","inputs":[{"name":"_receiver","type":"address"}],"outputs":[],"gas":35820},{"stateMutability":"nonpayable","type":"function","name":"kick","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":2781198},{"stateMutability":"nonpayable","type":"function","name":"deposit_reward_token","inputs":[{"name":"_reward_token","type":"address"},{"name":"_amount","type":"uint256"}],"outputs":[],"gas":1492175},{"stateMutability":"nonpayable","type":"function","name":"add_reward","inputs":[{"name":"_reward_token","type":"address"},{"name":"_distributor","type":"address"}],"outputs":[],"gas":115333},{"stateMutability":"nonpayable","type":"function","name":"set_reward_distributor","inputs":[{"name":"_reward_token","type":"address"},{"name":"_distributor","type":"address"}],"outputs":[],"gas":43078},{"stateMutability":"nonpayable","type":"function","name":"set_killed","inputs":[{"name":"_is_killed","type":"bool"}],"outputs":[],"gas":40381},{"stateMutability":"view","type":"function","name":"claimed_reward","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3502},{"stateMutability":"view","type":"function","name":"claimable_reward","inputs":[{"name":"_user","type":"address"},{"name":"_reward_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":20471},{"stateMutability":"nonpayable","type":"function","name":"claimable_tokens","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":2683603},{"stateMutability":"view","type":"function","name":"integrate_checkpoint","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":5172},{"stateMutability":"view","type":"function","name":"future_epoch_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3066},{"stateMutability":"view","type":"function","name":"inflation_rate","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3120},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":1020},{"stateMutability":"view","type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":6677},{"stateMutability":"nonpayable","type":"function","name":"initialize","inputs":[{"name":"_lp_token","type":"address"}],"outputs":[],"gas":412936},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3476},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3240},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3802},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":13589},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":13619},{"stateMutability":"view","type":"function","name":"DOMAIN_SEPARATOR","inputs":[],"outputs":[{"name":"","type":"bytes32"}],"gas":3360},{"stateMutability":"view","type":"function","name":"nonces","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3656},{"stateMutability":"view","type":"function","name":"factory","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3420},{"stateMutability":"view","type":"function","name":"lp_token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3450},{"stateMutability":"view","type":"function","name":"is_killed","inputs":[],"outputs":[{"name":"","type":"bool"}],"gas":3480},{"stateMutability":"view","type":"function","name":"reward_count","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3510},{"stateMutability":"view","type":"function","name":"reward_data","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"token","type":"address"},{"name":"distributor","type":"address"},{"name":"period_finish","type":"uint256"},{"name":"rate","type":"uint256"},{"name":"last_update","type":"uint256"},{"name":"integral","type":"uint256"}]}],"gas":14427},{"stateMutability":"view","type":"function","name":"rewards_receiver","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"address"}],"gas":3836},{"stateMutability":"view","type":"function","name":"reward_integral_for","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":4132},{"stateMutability":"view","type":"function","name":"working_balances","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3896},{"stateMutability":"view","type":"function","name":"working_supply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3660},{"stateMutability":"view","type":"function","name":"integrate_inv_supply_of","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3956},{"stateMutability":"view","type":"function","name":"integrate_checkpoint_of","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3986},{"stateMutability":"view","type":"function","name":"integrate_fraction","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":4016},{"stateMutability":"view","type":"function","name":"period","inputs":[],"outputs":[{"name":"","type":"int128"}],"gas":3780},{"stateMutability":"view","type":"function","name":"reward_tokens","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3855},{"stateMutability":"view","type":"function","name":"period_timestamp","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3885},{"stateMutability":"view","type":"function","name":"integrate_inv_supply","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3915}]

61dead600d55612c1356600436101561000d57611e7f565b60046000601c3760005134612c045763b6b55f258118610037573361040052600061042052610086565b636e553f65811861005c576024358060a01c612c045761040052600061042052610086565b6383df67478118610220576024358060a01c612c0457610400526044358060011c612c0457610420525b600054612c045760016000556104005160e0526100a1611e85565b6000600435146101b35760006010541415610440526002546104605261044051156100eb576104005160e052610460516101005261042051610120526000610140526100eb612453565b61046080516004358181830110612c04578082019050905081525060016104005160a0526080526040608020546004358181830110612c045780820190509050610480526104805160016104005160a052608052604060802055610460516002556104005160e0526104805161010052610460516101205261016b612880565b6323b872dd6104a052336104c052306104e0526004356105005260206104a060646104bc6000600d545af16101a5573d600060003e3d6000fd5b601f3d1115612c04576104a0505b610400517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c600435610440526020610440a26104005160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600435610440526020610440a36000600055005b632e1a7d4d811861023657600061040052610251565b6338d0743681186103cd576024358060011c612c0457610400525b600054612c045760016000553360e052610269611e85565b6000600435146103665760006010541415610420526002546104405261042051156102b0573360e052610440516101005261040051610120526000610140526102b0612453565b6104408051600435808210612c04578082039050905081525060013360a052608052604060802054600435808210612c045780820390509050610460526104605160013360a052608052604060802055610440516002553360e05261046051610100526104405161012052610323612880565b63a9059cbb61048052336104a0526004356104c0526020610480604461049c6000600d545af1610358573d600060003e3d6000fd5b601f3d1115612c0457610480505b337f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364600435610420526020610420a26000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600435610420526020610420a36000600055005b63e6f1daf281186103e8573361040052600061042052610437565b6384e9bd7e811861040d576004358060a01c612c045761040052600061042052610437565b639faceb1b8118610484576004358060a01c612c0457610400526024358060a01c612c0457610420525b600054612c045760016000556000610420511461045957336104005118612c04575b6104005160e05260025461010052600161012052610420516101405261047d612453565b6000600055005b6323b872dd811861056a576004358060a01c612c04576104c0526024358060a01c612c04576104e052600054612c0457600160005560036104c05160a05260805260406080203360a052608052604060802054610500527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61050051146105395761050051604435808210612c04578082039050905060036104c05160a05260805260406080203360a0526080526040608020555b6104c051610400526104e0516104205260443561044052610558612a7c565b60016105205260206105206000600055f35b63a9059cbb81186105be576004358060a01c612c04576104c052600054612c0457600160005533610400526104c05161042052602435610440526105ac612a7c565b60016104e05260206104e06000600055f35b63095ea7b38118610636576004358060a01c612c045760e05260243560033360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602435610100526020610100a36001610100526020610100f35b63d505accf81186109a3576004358060a01c612c045760e0526024358060a01c612c0457610100526084358060081c612c045761012052600060e05114612c04576064354211612c0457600b60e05160a0526080526040608020546101405260006002610400527f1901000000000000000000000000000000000000000000000000000000000000610420526104006002806020846106000101826020850160045afa505080518201915050600a546020826106000101526020810190507f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96105405260e0516105605261010051610580526044356105a052610140516105c0526064356105e05260c0610520526105208051602082012090506020826106000101526020810190508061060052610600905080516020820120905061016052600060e0513b116107b75760e0516101605161018052610120516101a052604060a46101c03760206080608061018060015afa5060805118612c0457610917565b600060a4356102205260c435610240526040610200526102006040806020846102c00101826020850160045afa505080518201915050601f60016020820661026001602082840111612c04576020806102808261012060045afa5050818152905090506001806020846102c00101826020850160045afa505080518201915050806102c0526102c09050805160200180610180828460045afa905050507f1626ba7e00000000000000000000000000000000000000000000000000000000631626ba7e610200526102208060406101605182526020820191508082528083018061018080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810150505050602061020060c461021c60e0515afa610904573d600060003e3d6000fd5b601f3d1115612c04576102005118612c04575b604435600360e05160a05260805260406080206101005160a0526080526040608020556101405160018181830110612c045780820190509050600b60e05160a0526080526040608020556101005160e0517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925604435610180526020610180a36001610180526020610180f35b63395093518118610a51576004358060a01c612c045760e05260033360a052608052604060802060e05160a0526080526040608020546024358181830110612c045780820190509050610100526101005160033360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561010051610120526020610120a36001610120526020610120f35b63a457c2d78118610afd576004358060a01c612c045760e05260033360a052608052604060802060e05160a052608052604060802054602435808210612c045780820390509050610100526101005160033360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561010051610120526020610120a36001610120526020610120f35b634b8200938118610bca576004358060a01c612c045761030052610300516103405273d061d61a4d941c39e5453435b6345dc261c2fce06103605260006103205261032060c060006002818352015b60c05160200261034001513318610b665760018352610b76565b8151600101808352811415610b4c575b5050506103205115612c04576103005160e052610b91611e85565b6103005160e05260016103005160a0526080526040608020546101005260025461012052610bbd612880565b6001610320526020610320f35b63bdf981168118610bf7576004358060a01c612c045760e05260e05160123360a052608052604060802055005b6396c551758118610dc2576004358060a01c612c04576103005260186103005160a0526080526040608020546103205263da020a186103a052610300516103c05263010ae7576103605261030051610380526020610360602461037c735f3b5dfeb7b28cdbd7faba78963ee202a494e2a25afa610c79573d600060003e3d6000fd5b601f3d1115612c0457610360516103e05260206103a060446103bc735f3b5dfeb7b28cdbd7faba78963ee202a494e2a25afa610cba573d600060003e3d6000fd5b601f3d1115612c04576103a0516103405260016103005160a052608052604060802054610360526370a082316103c052610300516103e05260206103c060246103dc735f3b5dfeb7b28cdbd7faba78963ee202a494e2a25afa610d22573d600060003e3d6000fd5b601f3d1115612c04576103c05115610d4257610320516103405111610d45565b60015b15612c0457610360516028808202821582848304141715612c04579050905060648082049050905060156103005160a0526080526040608020541115612c04576103005160e052610d94611e85565b6103005160e05260016103005160a0526080526040608020546101005260025461012052610dc0612880565b005b6393f7aa678118610fd4576004358060a01c612c045761040052600054612c04576001600055600160116104005160a052608052604060802001543318612c0457600060e05260025461010052600061012052600061014052610e23612453565b6323b872dd6104645260043361048452306104a4526024356104c45260600161046052610460506020610520610460516104806000610400515af1610e6d573d600060003e3d6000fd5b61050060203d808211610e805781610e82565b805b905090508152805160200180610420828460045afa9050505060006104205114610ec157610440516104205181816020036008021c9050905015612c04575b600260116104005160a052608052604060802001546104605261046051421015610f69576104605142808210612c0457808203905090506104805261048051600360116104005160a05260805260406080200154808202821582848304141715612c0457905090506104a0526024356104a0518181830110612c04578082019050905062093a8080820490509050600360116104005160a05260805260406080200155610f8d565b60243562093a8080820490509050600360116104005160a052608052604060802001555b42600460116104005160a052608052604060802001554262093a808181830110612c045780820190509050600260116104005160a052608052604060802001556000600055005b63e8de0d4d81186110ab576004358060a01c612c045760e0526024358060a01c612c04576101005263f851a440610120526020610120600461013c600c545afa611023573d600060003e3d6000fd5b601f3d1115612c0457610120513318612c0457601054610120526008610120511015612c04576001601160e05160a05260805260406080200154612c0457610100516001601160e05160a0526080526040608020015560e0516001610120516008811015612c045702601b01556101205160018181830110612c045780820190509050601055005b63058a3a248118611168576004358060a01c612c045760e0526024358060a01c612c0457610100526001601160e05160a05260805260406080200154610120526101205133186110fc576001611133565b63f851a440610180526020610180600461019c600c545afa611123573d600060003e3d6000fd5b601f3d1115612c04576101805133145b15612c045760006101205114612c045760006101005114612c0457610100516001601160e05160a05260805260406080200155005b6390b2299781186111c3576004358060011c612c045760e05263f851a440610100526020610100600461011c600c545afa6111a8573d600060003e3d6000fd5b601f3d1115612c0457610100513318612c045760e051600e55005b63e77e7437811861122f576004358060a01c612c045760e0526024358060a01c612c045761010052601460e05160a05260805260406080206101005160a05260805260406080205470010000000000000000000000000000000080820690509050610120526020610120f35b6333fd6f748118611403576004358060a01c612c045760e0526024358060a01c612c045761010052600560116101005160a0526080526040608020015461012052600254610140526000610140511461134e5742600260116101005160a052608052604060802001548082116112a557816112a7565b805b905090506101605261016051600460116101005160a05260805260406080200154808210612c04578082039050905061018052610120805161018051600360116101005160a05260805260406080200154808202821582848304141715612c045790509050670de0b6b3a7640000808202821582848304141715612c04579050905061014051808015612c04578204905090508181830110612c0457808201905090508152505b60136101005160a052608052604060802060e05160a05260805260406080205461016052600160e05160a0526080526040608020546101205161016051808210612c045780820390509050808202821582848304141715612c045790509050670de0b6b3a76400008082049050905061018052601460e05160a05260805260406080206101005160a05260805260406080205460801c610180518181830110612c0457808201905090506101a05260206101a0f35b633313458381186114aa576004358060a01c612c0457610300526103005160e05261142c611e85565b60196103005160a052608052604060802054638b752bb061032052610300516103405230610360526020610320604461033c73d061d61a4d941c39e5453435b6345dc261c2fce05afa611484573d600060003e3d6000fd5b601f3d1115612c045761032051808210612c045780820390509050610380526020610380f35b63d31f3f6d81186114dd576001601a546c01431e0fae6d7217caa0000000811015612c0457026023015460e052602060e0f35b63be5d1be981186114f757600f5460d81c60e052602060e0f35b63180692d0811861153257600f547b010000000000000000000000000000000000000000000000000000008082069050905060e052602060e0f35b63313ce567811861154857601260e052602060e0f35b6354fd4d5081186115e257610120806020808252600660e0527f76352e302e3000000000000000000000000000000000000000000000000000006101005260e0818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f82010390509050905090508101905090509050610120f35b63c4d66de88118611969576004358060a01c612c045760e052600d54612c045760e051600d5533600c556395d89b41610140526060610140600461015c60e0515afa611633573d600060003e3d6000fd5b603f3d1115612c045761014051610140016020815111612c045780805160200180610100828460045afa905090505050600060096101a0527f43757276652e66692000000000000000000000000000000000000000000000006101c0526101a06009806020846102200101826020850160045afa5050805182019150506101006020806020846102200101826020850160045afa505080518201915050600e6101e0527f204761756765204465706f736974000000000000000000000000000000000000610200526101e0600e806020846102200101826020850160045afa50508051820191505080610220526102209050805160200180610140828460045afa90505050610140806004602082510160c060006003818352015b8260c05160200211156117605761177f565b60c05160200285015160c051850155815160010180835281141561174e575b50505050505060006101006020806020846101e00101826020850160045afa50508051820191505060066101a0527f2d676175676500000000000000000000000000000000000000000000000000006101c0526101a06006806020846101e00101826020850160045afa505080518201915050806101e0526101e09050806007602082510160c060006003818352015b8260c051602002111561182157611840565b60c05160200285015160c051850155815160010180835281141561180f575b5050505050507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f610280526101408051602082012090506102a0527f572f01d824885a118d5d21c74542f263b131d2897955c62a721594f1d7c3b2e26102c052466102e052306103005260a061026052610260805160208201209050600a554260235563b26b238e6101a05260206101a060046101bc600073d533a949740bb3306d119cc777fa900ba034cd525af16118fe573d600060003e3d6000fd5b601f3d1115612c04576101a05160d81b632c4e722e6101e05260206101e060046101fc73d533a949740bb3306d119cc777fa900ba034cd525afa611947573d600060003e3d6000fd5b601f3d1115612c04576101e0518181830110612c045780820190509050600f55005b6370a08231811861199e576004358060a01c612c045760e052600160e05160a052608052604060802054610100526020610100f35b6318160ddd81186119b55760025460e052602060e0f35b63dd62ed3e8118611a08576004358060a01c612c045760e0526024358060a01c612c045761010052600360e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b6306fdde038118611aab5760e08060208082528083018060048082602082540160c060006003818352015b8260c0516020021115611a4557611a64565b60c05185015460c0516020028501528151600101808352811415611a33575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6395d89b418118611b4e5760e08060208082528083018060078082602082540160c060006003818352015b8260c0516020021115611ae857611b07565b60c05185015460c0516020028501528151600101808352811415611ad6575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b633644e5158118611b6557600a5460e052602060e0f35b637ecebe008118611b9a576004358060a01c612c045760e052600b60e05160a052608052604060802054610100526020610100f35b63c45a01558118611bb157600c5460e052602060e0f35b6382c630668118611bc857600d5460e052602060e0f35b639c868ac08118611bdf57600e5460e052602060e0f35b63963c94b98118611bf65760105460e052602060e0f35b6348e9c65e8118611c5a576004358060a01c612c045760e052601160e05160a052608052604060802080546101005260018101546101205260028101546101405260038101546101605260048101546101805260058101546101a0525060c0610100f35b6301ddabf18118611c8f576004358060a01c612c045760e052601260e05160a052608052604060802054610100526020610100f35b63f05cc0588118611ce2576004358060a01c612c045760e0526024358060a01c612c045761010052601360e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b6313ecb1ca8118611d17576004358060a01c612c045760e052601560e05160a052608052604060802054610100526020610100f35b6317e280898118611d2e5760165460e052602060e0f35b63de263bfa8118611d63576004358060a01c612c045760e052601760e05160a052608052604060802054610100526020610100f35b639bd324f28118611d98576004358060a01c612c045760e052601860e05160a052608052604060802054610100526020610100f35b63094007078118611dcd576004358060a01c612c045760e052601960e05160a052608052604060802054610100526020610100f35b63ef78d4fd8118611de457601a5460e052602060e0f35b6354c49fe98118611e0b5760016004356008811015612c045702601b015460e052602060e0f35b637598108c8118611e3e5760016004356c01431e0fae6d7217caa0000000811015612c0457026023015460e052602060e0f35b63fec8ee0c8118611e7d5760016004356c01431e0fae6d7217caa0000000811015612c0457026c01431e0fae6d72100000000023015460e052602060e0f35b505b60006000fd5b601a54610100526001610100516c01431e0fae6d7217caa0000000811015612c04570260230154610120526001610100516c01431e0fae6d7217caa0000000811015612c0457026c01431e0fae6d72100000000023015461014052600f5461016052610160517b0100000000000000000000000000000000000000000000000000000080820690509050610180526101605160d81c6101a052610180516101c052610120516101a05110611fe057632c4e722e6101e05260206101e060046101fc73d533a949740bb3306d119cc777fa900ba034cd525afa611f6c573d600060003e3d6000fd5b601f3d1115612c04576101e0516101c05263b26b238e6101e05260206101e060046101fc600073d533a949740bb3306d119cc777fa900ba034cd525af1611fb8573d600060003e3d6000fd5b601f3d1115612c04576101e05160d81b6101c0518181830110612c045780820190509050600f555b600e5415611ff55760006101805260006101c0525b6101205142111561232f576016546101e05263615e5237610200523061022052732f50d538606fa9edd2b11e2446beb18c9d5846bb3b15612c045760006000602461021c6000732f50d538606fa9edd2b11e2446beb18c9d5846bb5af1612061573d600060003e3d6000fd5b61012051610200526101205162093a808181830110612c04578082019050905062093a808082049050905062093a80808202821582848304141715612c045790509050428082116120b257816120b4565b805b905090506102205261024060006101f4818352015b6102205161020051808210612c0457808203905090506102605263d3078c946102a052306102c0526102005162093a808082049050905062093a80808202821582848304141715612c0457905090506102e05260206102a060446102bc732f50d538606fa9edd2b11e2446beb18c9d5846bb5afa61214c573d600060003e3d6000fd5b601f3d1115612c04576102a0516102805260006101e05111156122d557610200516101a051101561217e576000612188565b610220516101a051105b6121ee5761014080516101805161028051808202821582848304141715612c04579050905061026051808202821582848304141715612c0457905090506101e051808015612c04578204905090508181830110612c0457808201905090508152506122d5565b61014080516101805161028051808202821582848304141715612c0457905090506101a05161020051808210612c045780820390509050808202821582848304141715612c0457905090506101e051808015612c04578204905090508181830110612c0457808201905090508152506101c0516101805261014080516101805161028051808202821582848304141715612c045790509050610220516101a051808210612c045780820390509050808202821582848304141715612c0457905090506101e051808015612c04578204905090508181830110612c0457808201905090508152505b4261022051186122e45761232c565b61022051610200526102205162093a808181830110612c045780820190509050428082116123125781612314565b805b905090506102205281516001018083528114156120c9575b50505b610100805160018082018060801d81607f1d18612c04579050905081525061010051601a55426001610100516c01431e0fae6d7217caa0000000811015612c04570260230155610140516001610100516c01431e0fae6d7217caa0000000811015612c0457026c01431e0fae6d721000000000230155601560e05160a0526080526040608020546101e052601960e05160a052608052604060802080546101e05161014051601760e05160a052608052604060802054808210612c045780820390509050808202821582848304141715612c045790509050670de0b6b3a7640000808204905090508181830110612c04578082019050905081555061014051601760e05160a05260805260406080205542601860e05160a052608052604060802055565b6000610160526101405161018052600060e051146124bf57600160e05160a052608052604060802054610160526101205161248f576000612495565b61014051155b156124bf57601260e05160a05260805260406080205461018052610180516124bf5760e051610180525b6010546101a0526101c060006008818352015b6101a0516101c051186124e45761287c565b60016101c0516008811015612c045702601b01546101e052600560116101e05160a052608052604060802001546102005242600260116101e05160a05260805260406080200154808211612538578161253a565b805b905090506102205261022051600460116101e05160a05260805260406080200154808210612c04578082039050905061024052600061024051146126295761022051600460116101e05160a052608052604060802001556000610100511461262957610200805161024051600360116101e05160a05260805260406080200154808202821582848304141715612c045790509050670de0b6b3a7640000808202821582848304141715612c04579050905061010051808015612c04578204905090508181830110612c04578082019050905081525061020051600560116101e05160a052608052604060802001555b600060e0511461286c5760136101e05160a052608052604060802060e05160a05260805260406080205461026052600061028052610200516102605110156126d2576102005160136101e05160a052608052604060802060e05160a052608052604060802055610160516102005161026051808210612c045780820390509050808202821582848304141715612c045790509050670de0b6b3a764000080820490509050610280525b601460e05160a05260805260406080206101e05160a0526080526040608020546102a0526102a05160801c610280518181830110612c0457808201905090506102c05260006102c051111561286c576102a051700100000000000000000000000000000000808206905090506102e0526101205161279657600061028051111561286c576102e0516102c05160801b8181830110612c045780820190509050601460e05160a05260805260406080206101e05160a05260805260406080205561286c565b63a9059cbb61034452600461018051610364526102c05161038452604001610340526103405060206103e06103405161036060006101e0515af16127df573d600060003e3d6000fd5b6103c060203d8082116127f257816127f4565b805b905090508152805160200180610300828460045afa905050506000610300511461283357610320516103005181816020036008021c9050905015612c04575b6102e0516102c0518181830110612c045780820190509050601460e05160a05260805260406080206101e05160a0526080526040608020555b81516001018083528114156124d2575b5050565b63bbf7408a6101605260e051610180526020610160602461017c738e0c00ed546602fd9927df742bbabf726d5b0d165afa6128c0573d600060003e3d6000fd5b601f3d1115612c045761016051610140526318160ddd610180526020610180600461019c735f3b5dfeb7b28cdbd7faba78963ee202a494e2a25afa61290a573d600060003e3d6000fd5b601f3d1115612c04576101805161016052610100516028808202821582848304141715612c0457905090506064808204905090506101805260006101605111156129b35761018080516101205161014051808202821582848304141715612c04579050905061016051808015612c0457820490509050603c808202821582848304141715612c0457905090506064808204905090508181830110612c0457808201905090508152505b61010051610180518082116129c857816129ca565b805b9050905061018052601560e05160a0526080526040608020546101a05261018051601560e05160a052608052604060802055601654610180518181830110612c0457808201905090506101a051808210612c0457808203905090506101c0526101c05160165560e0517f7ecd84343f76a23d2227290e0288da3251b045541698e575a5515af4f04197a3610100516101e052610120516102005261018051610220526101c0516102405260806101e0a2565b6104005160e052612a8b611e85565b6104205160e052612a9a611e85565b60006104405114612bcb576002546104605260006010541415610480526104805115612ae3576104005160e0526104605161010052600061012052600061014052612ae3612453565b60016104005160a05260805260406080205461044051808210612c0457808203905090506104a0526104a05160016104005160a0526080526040608020556104005160e0526104a051610100526104605161012052612b40612880565b6104805115612b6c576104205160e0526104605161010052600061012052600061014052612b6c612453565b60016104205160a052608052604060802054610440518181830110612c0457808201905090506104a0526104a05160016104205160a0526080526040608020556104205160e0526104a051610100526104605161012052612bcb612880565b61042051610400517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61044051610460526020610460a3565b600080fd5b61000a612c130361000a60003961000a612c13036000f3

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.