Contract 0x41b953164995c11c81da73d212ed8af25741b7ac 8

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xe8ffee8416ffb7839940cb2e20231c0966125f6da05f93105e1244db436acfd30x6020612097569682022-04-13 19:26:43681 days 18 hrs ago0x3d64fb8a2ffd08c186e8060aa57c8011d8b999cc IN  Create: Vyper_contract0 ETH0.01327310908 ETH0.465916162
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x694a56424cf4446342b9dafb00e84c1cc7de2c111ba55c66287ead16c24206d6720859152023-03-21 10:15:42340 days 3 hrs ago 0x5b6776cd9c51768fc915cad7a7e8f5c4a6331131 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xf01f5111bde946db67e872ac69987d87bc4a06855c1544423f40f2398725e1c2720848552023-03-21 10:11:20340 days 3 hrs ago 0x5b6776cd9c51768fc915cad7a7e8f5c4a6331131 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xafe9c249a561d9da1917717d41d4ff920d0b437e23ab62d81d3a76c58db83aa9720825572023-03-21 10:01:47340 days 3 hrs ago 0x5b6776cd9c51768fc915cad7a7e8f5c4a6331131 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xcb22b0a688cb3df6d3d98e07f059dd0afc76c6a86b37173b9dcd486f42b517f3720749152023-03-21 9:30:19340 days 4 hrs ago 0x5b6776cd9c51768fc915cad7a7e8f5c4a6331131 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xea1b970b88eebd70760554bbfa82fe56ff3801aa7cb57805dafd8a1c38fe0282720705732023-03-21 9:12:32340 days 4 hrs ago 0x5b6776cd9c51768fc915cad7a7e8f5c4a6331131 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xea1b970b88eebd70760554bbfa82fe56ff3801aa7cb57805dafd8a1c38fe0282720705732023-03-21 9:12:32340 days 4 hrs ago 0x5b6776cd9c51768fc915cad7a7e8f5c4a6331131 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xc99ff0d2c6ad133cd5ee3fcf1e7f038d17f54bc7eab84e51c6d4b8faa6bb6683720662102023-03-21 8:54:43340 days 4 hrs ago 0x251e51b25afa40f2b6b9f05aaf1bc7eaa0551771 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xc99ff0d2c6ad133cd5ee3fcf1e7f038d17f54bc7eab84e51c6d4b8faa6bb6683720662102023-03-21 8:54:43340 days 4 hrs ago 0x251e51b25afa40f2b6b9f05aaf1bc7eaa0551771 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x9c6c03e69a4c7e9b62812c0a0786af7c5c6d4201c5afb33578a8d38d907f8684720651412023-03-21 8:50:15340 days 4 hrs ago 0x251e51b25afa40f2b6b9f05aaf1bc7eaa0551771 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x078297900ac2fcbaaa09c81b0b5ac045ecf09034950d3523d0a30bf8de54e268720596502023-03-21 8:27:52340 days 5 hrs ago 0x5b6776cd9c51768fc915cad7a7e8f5c4a6331131 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xe6dcce986e9bf8b7fc2c1fac51cb4226a15c320f75240f8c1e8d6f8fca3f7e6e720571742023-03-21 8:17:41340 days 5 hrs ago 0x251e51b25afa40f2b6b9f05aaf1bc7eaa0551771 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xe6dcce986e9bf8b7fc2c1fac51cb4226a15c320f75240f8c1e8d6f8fca3f7e6e720571742023-03-21 8:17:41340 days 5 hrs ago 0x251e51b25afa40f2b6b9f05aaf1bc7eaa0551771 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xe6dcce986e9bf8b7fc2c1fac51cb4226a15c320f75240f8c1e8d6f8fca3f7e6e720571742023-03-21 8:17:41340 days 5 hrs ago 0x251e51b25afa40f2b6b9f05aaf1bc7eaa0551771 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x6648669adeab855751271fc65e2688083944fbd1950360b7aadca5d60e3ef6fb720533382023-03-21 8:02:02340 days 5 hrs ago 0x104f1459a2ffea528121759b238bb609034c2f01 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x6648669adeab855751271fc65e2688083944fbd1950360b7aadca5d60e3ef6fb720533382023-03-21 8:02:02340 days 5 hrs ago 0x104f1459a2ffea528121759b238bb609034c2f01 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x6648669adeab855751271fc65e2688083944fbd1950360b7aadca5d60e3ef6fb720533382023-03-21 8:02:02340 days 5 hrs ago 0x104f1459a2ffea528121759b238bb609034c2f01 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x6648669adeab855751271fc65e2688083944fbd1950360b7aadca5d60e3ef6fb720533382023-03-21 8:02:02340 days 5 hrs ago 0x104f1459a2ffea528121759b238bb609034c2f01 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x138a48018ffb586203a99f630ec73dd64559ca01b8e8df0f5a9367a3055aeab3720502002023-03-21 7:49:07340 days 5 hrs ago 0x66f75a6cc73eafa09c11891ab39d8686923ec892 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xcfd785a15f9720251b181f621f652a4a7c654ad83dd340c2f165fc3da24ae517720486742023-03-21 7:42:52340 days 5 hrs ago 0x66f75a6cc73eafa09c11891ab39d8686923ec892 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x6e0278b4f921440e7d3dd8346856f4846a660726c64f77c47fd641d38973521d720470022023-03-21 7:35:58340 days 6 hrs ago 0x104f1459a2ffea528121759b238bb609034c2f01 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x6e0278b4f921440e7d3dd8346856f4846a660726c64f77c47fd641d38973521d720470022023-03-21 7:35:58340 days 6 hrs ago 0x104f1459a2ffea528121759b238bb609034c2f01 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x82f9d1a4a09df2cd795c203dcda54d93fba8c6d66c2ab6f324f9cff59fa52689720469462023-03-21 7:35:44340 days 6 hrs ago 0x5b6776cd9c51768fc915cad7a7e8f5c4a6331131 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x82f9d1a4a09df2cd795c203dcda54d93fba8c6d66c2ab6f324f9cff59fa52689720469462023-03-21 7:35:44340 days 6 hrs ago 0x5b6776cd9c51768fc915cad7a7e8f5c4a6331131 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0x82f9d1a4a09df2cd795c203dcda54d93fba8c6d66c2ab6f324f9cff59fa52689720469462023-03-21 7:35:44340 days 6 hrs ago 0x5b6776cd9c51768fc915cad7a7e8f5c4a6331131 0x41b953164995c11c81da73d212ed8af25741b7ac0 ETH
0xd95f51bff748dee20b981ffdca70b3d89f0234b04b81361171cbdf979bf1e771720462282023-03-21 7:32:44340 days 6 hrs ago 0x5b6776cd9c51768fc915cad7a7e8f5c4a6331131 0x41b953164995c11c81da73d212ed8af25741b7ac0 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:
, MIT license

Contract Source Code (Vyper language format)

# @version 0.3.1
"""
@title Rewards-Only Gauge
@author Curve Finance
@license MIT
@notice Distribution of third-party rewards without CRV
"""

from vyper.interfaces import ERC20

implements: ERC20

struct RewardToken:
    distributor: address
    period_finish: uint256
    rate: uint256
    duration: uint256
    received: uint256
    paid: uint256

interface Streamer:
    def reward_data(_token: address) -> RewardToken: view
    def last_update_time() -> uint256: view

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

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

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

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

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

MAX_REWARDS: constant(uint256) = 8
CLAIM_FREQUENCY: constant(uint256) = 3600

# keccak256("isValidSignature(bytes32,bytes)")[:4] << 224
ERC1271_MAGIC_VAL: constant(bytes32) = 0x1626ba7e00000000000000000000000000000000000000000000000000000000
VERSION: constant(String[8]) = "v1.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)")

BAL_TOKEN: immutable(address)
BAL_VAULT: immutable(address)
AUTHORIZER_ADAPTOR: immutable(address)

lp_token: public(address)

balanceOf: public(HashMap[address, uint256])
totalSupply: public(uint256)
_allowance: HashMap[address, HashMap[address, uint256]]

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

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

# For tracking external rewards
_reward_data: uint256
reward_tokens: public(address[MAX_REWARDS])
reward_balances: public(HashMap[address, uint256])
# claimant -> default reward receiver
rewards_receiver: public(HashMap[address, address])

claim_sig: public(Bytes[4])

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

# 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]]


@external
def __init__(_bal_token: address, _vault: address, _authorizerAdaptor: address):
    """
    @notice Contract constructor
    @param _vault Balancer Vault contract address
    """

    BAL_TOKEN = _bal_token
    BAL_VAULT = _vault
    AUTHORIZER_ADAPTOR = _authorizerAdaptor

    # prevent initialization of implementation
    self.lp_token = 0x000000000000000000000000000000000000dEaD

@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

@view
@internal
def _get_allowance(owner: address, spender: address) -> uint256:
    """
     @dev Override to grant the Vault infinite allowance, causing for Gauge Tokens to not require approval.
     This is sound as the Vault already provides authorization mechanisms when initiating token transfers, which this
     contract inherits.
    """
    if (spender == BAL_VAULT):
        return MAX_UINT256
    return self._allowance[owner][spender]

@internal
def _checkpoint_rewards(_user: address, _total_supply: uint256, _claim: bool, _receiver: address):
    """
    @notice Claim pending rewards and checkpoint rewards for a user
    """
    # claim from reward contract

    reward_data: uint256 = self._reward_data
    if _total_supply != 0 and reward_data != 0 and block.timestamp > shift(reward_data, -160) + CLAIM_FREQUENCY:
        reward_contract: address = convert(reward_data % 2**160, address)
        raw_call(reward_contract, self.claim_sig)  # dev: bad claim sig
        self._reward_data = convert(reward_contract, uint256) + shift(block.timestamp, 160)

    receiver: address = _receiver
    if _claim and receiver == ZERO_ADDRESS:
        # if receiver is not explicitly declared, check for default receiver
        receiver = self.rewards_receiver[_user]
        if receiver == ZERO_ADDRESS:
            # direct claims to user if no default receiver is set
            receiver = _user

    # calculate new user reward integral and transfer any owed rewards
    user_balance: uint256 = self.balanceOf[_user]
    for i in range(MAX_REWARDS):
        token: address = self.reward_tokens[i]
        if token == ZERO_ADDRESS:
            break
        dI: uint256 = 0
        if _total_supply != 0:
            token_balance: uint256 = ERC20(token).balanceOf(self)
            dI = 10**18 * (token_balance - self.reward_balances[token]) / _total_supply
            self.reward_balances[token] = token_balance
            if _user == ZERO_ADDRESS:
                if dI != 0:
                    self.reward_integral[token] += dI
                continue

        integral: uint256 = self.reward_integral[token] + dI
        if dI != 0:
            self.reward_integral[token] = integral

        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,
                    concat(
                        method_id("transfer(address,uint256)"),
                        convert(receiver, bytes32),
                        convert(total_claimable, bytes32),
                    ),
                    max_outsize=32,
                )
                if len(response) != 0:
                    assert convert(response, bool)
                self.reward_balances[token] -= total_claimable
                # update amount claimed (lower order bytes)
                self.claim_data[_user][token] = total_claimed + total_claimable
            elif new_claimable > 0:
                # update total_claimable (higher order bytes)
                self.claim_data[_user][token] = total_claimed + shift(total_claimable, 128)


@view
@external
def reward_contract() -> address:
    """
    @notice Address of the reward contract providing non-CRV incentives for this gauge
    @dev Returns `ZERO_ADDRESS` if there is no reward contract active
    """
    return convert(self._reward_data % 2**160, address)


@view
@external
def last_claim() -> uint256:
    """
    @notice Epoch timestamp of the last call to claim from `reward_contract`
    @dev Rewards are claimed at most once per hour in order to reduce gas costs
    """
    return shift(self._reward_data, -160)


@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(_addr: address, _token: address) -> uint256:
    """
    @notice Get the number of claimable reward tokens for a user
    @dev This call does not consider pending claimable amount in `reward_contract`.
         Off-chain callers should instead use `claimable_rewards_write` as a
         view method.
    @param _addr Account to get reward amount for
    @param _token Token to get reward amount for
    @return uint256 Claimable reward token amount
    """
    return shift(self.claim_data[_addr][_token], -128)

@view
@external
def reward_data(_token: address) -> Reward:
    reward_contract: address = convert(self._reward_data % 2**160, address)
    reward_token: RewardToken = Streamer(reward_contract).reward_data(_token)
    last_update_time: uint256 = Streamer(reward_contract).last_update_time()
    return Reward({
        token: _token,
        distributor: reward_token.distributor,
        period_finish: reward_token.period_finish,
        rate: reward_token.rate,
        last_update: last_update_time,
        integral: self.reward_integral[_token]
    })


@external
@nonreentrant('lock')
def claimable_reward_write(_addr: address, _token: address) -> uint256:
    """
    @notice Get the number of claimable reward tokens for a user
    @dev This function should be manually changed to "view" in the ABI
         Calling it via a transaction will claim available reward tokens
    @param _addr Account to get reward amount for
    @param _token Token to get reward amount for
    @return uint256 Claimable reward token amount
    """
    if self.reward_tokens[0] != ZERO_ADDRESS:
        self._checkpoint_rewards(_addr, self.totalSupply, False, ZERO_ADDRESS)
    return shift(self.claim_data[_addr][_token], -128)


@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
@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 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
    """
    if _value != 0:
        reward_contract: address = convert(self._reward_data % 2**160, address)
        total_supply: uint256 = self.totalSupply

        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

        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
    """
    if _value != 0:
        reward_contract: address = convert(self._reward_data % 2**160, address)
        total_supply: uint256 = self.totalSupply

        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

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

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


@internal
def _transfer(_from: address, _to: address, _value: uint256):
    reward_contract: address = convert(self._reward_data % 2**160, address)

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

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

    log Transfer(_from, _to, _value)


@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
@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._get_allowance(_from, msg.sender)
    if _allowance != MAX_UINT256:
        self._allowance[_from][msg.sender] = _allowance - _value

    self._transfer(_from, _to, _value)

    return True

@view
@external
def allowance(owner: address, spender: address) -> uint256:
    """
     @notice Get `spender`'s current allowance from `owner` 
    """
    return self._get_allowance(owner, spender)

@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._get_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._get_allowance(msg.sender, _spender) - _subtracted_value
    self._allowance[msg.sender][_spender] = allowance

    log Approval(msg.sender, _spender, allowance)

    return True

@internal
def _set_rewards(_reward_contract: address, _claim_sig: bytes32, _reward_tokens: address[MAX_REWARDS]):
    """
    @notice Set the active reward contract
    @dev A reward contract cannot be set while this contract has no deposits
    @param _reward_contract Reward contract address. Set to ZERO_ADDRESS to
                            disable staking.
    @param _claim_sig Four byte selectors for staking, withdrawing and claiming,
                 left padded with zero bytes. If the reward contract can
                 be claimed from but does not require staking, the staking
                 and withdraw selectors should be set to 0x00
    @param _reward_tokens List of claimable reward tokens. New reward tokens
                          may be added but they cannot be removed. When calling
                          this function to unset or modify a reward contract,
                          this array must begin with the already-set reward
                          token addresses.
    """
    lp_token: address = self.lp_token
    current_reward_contract: address = convert(self._reward_data % 2**160, address)
    total_supply: uint256 = self.totalSupply
    self._checkpoint_rewards(ZERO_ADDRESS, total_supply, False, ZERO_ADDRESS)

    if _reward_contract != ZERO_ADDRESS:
        assert _reward_tokens[0] != ZERO_ADDRESS  # dev: no reward token
        assert _reward_contract.is_contract  # dev: not a contract

    self._reward_data = convert(_reward_contract, uint256)
    self.claim_sig = slice(_claim_sig, 28, 4)
    for i in range(MAX_REWARDS):
        current_token: address = self.reward_tokens[i]
        new_token: address = _reward_tokens[i]
        if current_token != ZERO_ADDRESS:
            assert current_token == new_token  # dev: cannot modify existing reward token
        elif new_token != ZERO_ADDRESS:
            self.reward_tokens[i] = new_token
        else:
            break

    if _reward_contract != ZERO_ADDRESS:
        # do an initial checkpoint to verify that claims are working
        self._checkpoint_rewards(ZERO_ADDRESS, total_supply, False, ZERO_ADDRESS)

@external
@nonreentrant('lock')
def set_rewards(_reward_contract: address, _claim_sig: bytes32, _reward_tokens: address[MAX_REWARDS]):
    """
    @notice Set the active reward contract
    @dev A reward contract cannot be set while this contract has no deposits
    @param _reward_contract Reward contract address. Set to ZERO_ADDRESS to
                            disable staking.
    @param _claim_sig Four byte selectors for staking, withdrawing and claiming,
                 left padded with zero bytes. If the reward contract can
                 be claimed from but does not require staking, the staking
                 and withdraw selectors should be set to 0x00
    @param _reward_tokens List of claimable reward tokens. New reward tokens
                          may be added but they cannot be removed. When calling
                          this function to unset or modify a reward contract,
                          this array must begin with the already-set reward
                          token addresses.
    """
    assert msg.sender == AUTHORIZER_ADAPTOR  # dev: only owner
    self._set_rewards(_reward_contract, _claim_sig, _reward_tokens)

# Initializer

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

    self.lp_token = _lp_token

    symbol: String[32] = ERC20Extended(_lp_token).symbol()
    name: String[64] = concat("Balancer ", symbol, " RewardGauge Deposit")

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

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

    # Initialise connection to ChildChainStreamer contract
    reward_tokens: address[MAX_REWARDS] = empty(address[MAX_REWARDS])
    reward_tokens[0] = BAL_TOKEN
    self._set_rewards(_reward_contract, _claim_sig, reward_tokens)

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":"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":[{"name":"_bal_token","type":"address"},{"name":"_vault","type":"address"},{"name":"_authorizerAdaptor","type":"address"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"reward_contract","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"last_claim","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"claimed_reward","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"claimable_reward","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"reward_data","inputs":[{"name":"_token","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"}]}]},{"stateMutability":"nonpayable","type":"function","name":"claimable_reward_write","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"set_rewards_receiver","inputs":[{"name":"_receiver","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[{"name":"_addr","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[{"name":"_addr","type":"address"},{"name":"_receiver","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"deposit","inputs":[{"name":"_value","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"deposit","inputs":[{"name":"_value","type":"uint256"},{"name":"_addr","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"deposit","inputs":[{"name":"_value","type":"uint256"},{"name":"_addr","type":"address"},{"name":"_claim_rewards","type":"bool"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"withdraw","inputs":[{"name":"_value","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"withdraw","inputs":[{"name":"_value","type":"uint256"},{"name":"_claim_rewards","type":"bool"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"transfer","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"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"}]},{"stateMutability":"nonpayable","type":"function","name":"increaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_added_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"decreaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_subtracted_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"set_rewards","inputs":[{"name":"_reward_contract","type":"address"},{"name":"_claim_sig","type":"bytes32"},{"name":"_reward_tokens","type":"address[8]"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"initialize","inputs":[{"name":"_lp_token","type":"address"},{"name":"_reward_contract","type":"address"},{"name":"_claim_sig","type":"bytes32"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"lp_token","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"DOMAIN_SEPARATOR","inputs":[],"outputs":[{"name":"","type":"bytes32"}]},{"stateMutability":"view","type":"function","name":"nonces","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"reward_tokens","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"reward_balances","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"rewards_receiver","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"claim_sig","inputs":[],"outputs":[{"name":"","type":"bytes"}]},{"stateMutability":"view","type":"function","name":"reward_integral","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"reward_integral_for","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}]}]

60206120dd6080396080518060a01c6120d85760e052602060206120dd016080396080518060a01c6120d85761010052602060406120dd016080396080518060a01c6120d8576101205260e051610140526101005161016052610120516101805261dead60015561209c56600436101561000d57611714565b60046000601c376000513461202c5763313ce567811861003257601260e052602060e0f35b6354fd4d5081186100cc57610120806020808252600660e0527f76312e302e3000000000000000000000000000000000000000000000000000006101005260e0818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f82010390509050905090508101905090509050610120f35b63bf88a6ff811861010857600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c5760e052602060e0f35b633488bd19811861012257600d5460a01c60e052602060e0f35b63e77e7437811861018e576004358060a01c61202c5760e0526024358060a01c61202c5761010052601c60e05160a05260805260406080206101005160a05260805260406080205470010000000000000000000000000000000080820690509050610120526020610120f35b6333fd6f7481186101e4576004358060a01c61202c5760e0526024358060a01c61202c5761010052601c60e05160a05260805260406080206101005160a05260805260406080205460801c610120526020610120f35b6348e9c65e811861031c576004358060a01c61202c5760e052600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c57610100526348e9c65e6101e05260e0516102005260c06101e060246101fc610100515afa610258573d600060003e3d6000fd5b60bf3d111561202c576101e080518060a01c61202c576101205260208101516101405260408101516101605260608101516101805260808101516101a05260a08101516101c0525063629d46c2610200526020610200600461021c610100515afa6102c8573d600060003e3d6000fd5b601f3d111561202c57610200516101e05260e051610200526101205161022052610140516102405261016051610260526101e05161028052601a60e05160a0526080526040608020546102a05260c0610200f35b6359b7e40981186103b1576004358060a01c61202c57610420526024358060a01c61202c576104405260005461202c5760016000556000600e541461037d576104205160e0526003546101005260006101205260006101405261037d61177e565b601c6104205160a05260805260406080206104405160a05260805260406080205460801c6104605260206104606000600055f35b63bdf9811681186103de576004358060a01c61202c5760e05260e05160173360a052608052604060802055005b63e6f1daf281186103f9573361042052600061044052610448565b6384e9bd7e811861041e576004358060a01c61202c5761042052600061044052610448565b639faceb1b8118610495576004358060a01c61202c57610420526024358060a01c61202c57610440525b60005461202c5760016000556000610440511461046a5733610420511861202c575b6104205160e05260035461010052600161012052610440516101405261048e61177e565b6000600055005b63b6b55f2581186104b05733610420526000610440526104ff565b636e553f6581186104d5576024358060a01c61202c57610420526000610440526104ff565b6383df67478118610683576024358060a01c61202c57610420526044358060011c61202c57610440525b60005461202c57600160005560006004351461061657600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c5761046052600354610480526104205160e0526104805161010052610440516101205260006101405261056d61177e565b6104808051600435818183011061202c578082019050905081525060026104205160a052608052604060802054600435818183011061202c57808201905090506104a0526104a05160026104205160a052608052604060802055610480516003556323b872dd6104c052336104e05230610500526004356105205260206104c060646104dc60006001545af1610608573d600060003e3d6000fd5b601f3d111561202c576104c0505b610420517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c600435610460526020610460a26104205160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600435610460526020610460a36000600055005b632e1a7d4d8118610699576000610420526106b4565b6338d074368118610820576024358060011c61202c57610420525b60005461202c5760016000556000600435146107b957600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c5761044052600354610460523360e0526104605161010052610420516101205260006101405261071f61177e565b610460805160043580821061202c578082039050905081525060023360a05260805260406080205460043580821061202c5780820390509050610480526104805160023360a0526080526040608020556104605160035563a9059cbb6104a052336104c0526004356104e05260206104a060446104bc60006001545af16107ab573d600060003e3d6000fd5b601f3d111561202c576104a0505b337f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364600435610440526020610440a26000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600435610440526020610440a36000600055005b63a9059cbb8118610874576004358060a01c61202c576104e05260005461202c57600160005533610420526104e0516104405260243561046052610862611d2a565b60016105005260206105006000600055f35b6323b872dd8118610957576004358060a01c61202c576104e0526024358060a01c61202c576105005260005461202c5760016000556104e05160e05233610100526108c061054061171a565b61054051610520527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6105205114610926576105205160443580821061202c578082039050905060046104e05160a05260805260406080203360a0526080526040608020555b6104e05161042052610500516104405260443561046052610945611d2a565b60016105405260206105406000600055f35b63dd62ed3e81186109a9576004358060a01c61202c57610120526024358060a01c61202c57610140526101205160e052610140516101005261099a61016061171a565b61016051610180526020610180f35b63095ea7b38118610a21576004358060a01c61202c5760e05260243560043360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602435610100526020610100a36001610100526020610100f35b63d505accf8118610d8e576004358060a01c61202c5760e0526024358060a01c61202c57610100526084358060081c61202c5761012052600060e0511461202c57606435421161202c57600c60e05160a0526080526040608020546101405260006002610400527f1901000000000000000000000000000000000000000000000000000000000000610420526104006002806020846106000101826020850160045afa505080518201915050600b546020826106000101526020810190507f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96105405260e0516105605261010051610580526044356105a052610140516105c0526064356105e05260c0610520526105208051602082012090506020826106000101526020810190508061060052610600905080516020820120905061016052600060e0513b11610ba25760e0516101605161018052610120516101a052604060a46101c03760206080608061018060015afa506080511861202c57610d02565b600060a4356102205260c435610240526040610200526102006040806020846102c00101826020850160045afa505080518201915050601f6001602082066102600160208284011161202c576020806102808261012060045afa5050818152905090506001806020846102c00101826020850160045afa505080518201915050806102c0526102c09050805160200180610180828460045afa905050507f1626ba7e00000000000000000000000000000000000000000000000000000000631626ba7e610200526102208060406101605182526020820191508082528083018061018080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810150505050602061020060c461021c60e0515afa610cef573d600060003e3d6000fd5b601f3d111561202c57610200511861202c575b604435600460e05160a05260805260406080206101005160a052608052604060802055610140516001818183011061202c5780820190509050600c60e05160a0526080526040608020556101005160e0517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925604435610180526020610180a36001610180526020610180f35b63395093518118610e3d576004358060a01c61202c57610120523360e0526101205161010052610dbf61016061171a565b61016051602435818183011061202c5780820190509050610140526101405160043360a05260805260406080206101205160a05260805260406080205561012051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561014051610160526020610160a36001610160526020610160f35b63a457c2d78118610eea576004358060a01c61202c57610120523360e0526101205161010052610e6e61016061171a565b6101605160243580821061202c5780820390509050610140526101405160043360a05260805260406080206101205160a05260805260406080205561012051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561014051610160526020610160a36001610160526020610160f35b6347d2d5d38118610ffa576004358060a01c61202c57610620526044358060a01c61202c57610640526064358060a01c61202c57610660526084358060a01c61202c576106805260a4358060a01c61202c576106a05260c4358060a01c61202c576106c05260e4358060a01c61202c576106e052610104358060a01c61202c5761070052610124358060a01c61202c576107205260005461202c576001600055602060203803608039608051331861202c5761062051610420526024356104405261064051610460526106605161048052610680516104a0526106a0516104c0526106c0516104e0526106e0516105005261070051610520526107205161054052610ff3611e66565b6000600055005b636133f9858118611361576004358060a01c61202c57610620526024358060a01c61202c576106405260015461202c576000610620511461202c57610620516001556395d89b416106a05260606106a060046106bc610620515afa611064573d600060003e3d6000fd5b603f3d111561202c576106a0516106a001601a81511161202c5780805160200180610660828460045afa90509050505060006009610700527f42616c616e636572200000000000000000000000000000000000000000000000610720526107006009806020846107800101826020850160045afa5050805182019150506106606020806020846107800101826020850160045afa5050805182019150506014610740527f205265776172644761756765204465706f736974000000000000000000000000610760526107406014806020846107800101826020850160045afa505080518201915050806107805261078090508051602001806106a0828460045afa905050506106a0806005602082510160c060006003818352015b8260c0516020021115611191576111b0565b60c05160200285015160c051850155815160010180835281141561117f575b50505050505060006106606020806020846107400101826020850160045afa5050805182019150506006610700527f2d67617567650000000000000000000000000000000000000000000000000000610720526107006006806020846107400101826020850160045afa50508051820191505080610740526107409050806008602082510160c060006003818352015b8260c051602002111561125257611271565b60c05160200285015160c0518501558151600101808352811415611240575b5050505050507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6107e0526106a0805160208201209050610800527f15124d26d1272f8d4d5266a24ca397811f414b8cd05a53b26b745f63af5ae2fc610820524661084052306108605260a06107c0526107c0805160208201209050600b5561010036610700376020606038036080396080516107005261064051610420526044356104405261070051610460526107205161048052610740516104a052610760516104c052610780516104e0526107a051610500526107c051610520526107e0516105405261135f611e66565b005b6382c6306681186113785760015460e052602060e0f35b6370a0823181186113ad576004358060a01c61202c5760e052600260e05160a052608052604060802054610100526020610100f35b6318160ddd81186113c45760035460e052602060e0f35b6306fdde0381186114675760e08060208082528083018060058082602082540160c060006003818352015b8260c051602002111561140157611420565b60c05185015460c05160200285015281516001018083528114156113ef575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6395d89b41811861150a5760e08060208082528083018060088082602082540160c060006003818352015b8260c05160200211156114a4576114c3565b60c05185015460c0516020028501528151600101808352811415611492575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b633644e515811861152157600b5460e052602060e0f35b637ecebe008118611556576004358060a01c61202c5760e052600c60e05160a052608052604060802054610100526020610100f35b6354c49fe9811861157d576001600435600881101561202c5702600e015460e052602060e0f35b63fe9e217881186115b2576004358060a01c61202c5760e052601660e05160a052608052604060802054610100526020610100f35b6301ddabf181186115e7576004358060a01c61202c5760e052601760e05160a052608052604060802054610100526020610100f35b63b7aca568811861168a5760e08060208082528083018060188082602082540160c060006002818352015b8260c051602002111561162457611643565b60c05185015460c0516020028501528151600101808352811415611612575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6373861fb381186116bf576004358060a01c61202c5760e052601a60e05160a052608052604060802054610100526020610100f35b63f05cc0588118611712576004358060a01c61202c5760e0526024358060a01c61202c5761010052601b60e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b505b60006000fd5b6020604038036080396080516101005118611758577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81525061177c565b600460e05160a05260805260406080206101005160a0526080526040608020548152505b565b600d546101605260006101005114156117985760006117c8565b60006101605114156117ab5760006117c8565b6101605160a01c610e10818183011061202c578082019050905042115b15611889576101605174010000000000000000000000000000000000000000808206905090508060a01c61202c57610180526018806101a0602082540160c060006002818352015b8260c051602002111561182257611841565b60c05185015460c0516020028501528151600101808352811415611810575b5050505050506101a050600060006101a0516101c06000610180515af161186d573d600060003e3d6000fd5b610180514260a01b818183011061202c5780820190509050600d555b6101405161018052610120516118a05760006118a6565b61018051155b156118d057601760e05160a05260805260406080205461018052610180516118d05760e051610180525b600260e05160a0526080526040608020546101a0526101c060006008818352015b60016101c051600881101561202c5702600e01546101e0526101e05161191657611d26565b60006102005260006101005114611a12576370a082316102405230610260526020610240602461025c6101e0515afa611954573d600060003e3d6000fd5b601f3d111561202c576102405161022052670de0b6b3a76400006102205160166101e05160a05260805260406080205480821061202c578082039050905080820282158284830414171561202c57905090506101005180801561202c57820490509050610200526102205160166101e05160a05260805260406080205560e051611a125760006102005114611d1657601a6101e05160a0526080526040608020805461020051818183011061202c5780820190509050815550611d16565b601a6101e05160a05260805260406080205461020051818183011061202c57808201905090506102205260006102005114611a5e5761022051601a6101e05160a0526080526040608020555b601b6101e05160a052608052604060802060e05160a0526080526040608020546102405260006102605261022051610240511015611afd5761022051601b6101e05160a052608052604060802060e05160a0526080526040608020556101a051610220516102405180821061202c578082039050905080820282158284830414171561202c5790509050670de0b6b3a764000080820490509050610260525b601c60e05160a05260805260406080206101e05160a052608052604060802054610280526102805160801c61026051818183011061202c57808201905090506102a05260006102a0511115611d165761028051700100000000000000000000000000000000808206905090506102c05261012051611bc1576000610260511115611d16576102c0516102a05160801b818183011061202c5780820190509050601c60e05160a05260805260406080206101e05160a052608052604060802055611d16565b60006004610320527fa9059cbb00000000000000000000000000000000000000000000000000000000610340526103206004806020846103600101826020850160045afa505080518201915050610180516020826103600101526020810190506102a0516020826103600101526020810190508061036052610360505060206104006103605161038060006101e0515af1611c61573d600060003e3d6000fd5b6103e060203d808211611c745781611c76565b805b9050905081528051602001806102e0828460045afa9050505060006102e05114611cb557610300516102e05181816020036008021c905090501561202c575b60166101e05160a052608052604060802080546102a05180821061202c57808203905090508155506102c0516102a051818183011061202c5780820190509050601c60e05160a05260805260406080206101e05160a0526080526040608020555b81516001018083528114156118f1575b5050565b600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c576104805260006104605114611e2d576003546104a0526104205160e0526104a05161010052600061012052600061014052611d8b61177e565b60026104205160a0526080526040608020546104605180821061202c57808203905090506104c0526104c05160026104205160a0526080526040608020556104405160e0526104a05161010052600061012052600061014052611dec61177e565b60026104405160a05260805260406080205461046051818183011061202c57808201905090506104c0526104c05160026104405160a0526080526040608020555b61044051610420517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef610460516104a05260206104a0a3565b60015461056052600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c57610580526003546105a052600060e0526105a05161010052600061012052600061014052611ec161177e565b60006104205114611ee5576000610460511461202c576000610420513b111561202c575b61042051600d55601c6004602082066105c00160208284011161202c576020806105e08261044060045afa505081815290509050806018602082510160c060006002818352015b8260c0516020021115611f3e57611f5d565b60c05160200285015160c0518501558151600101808352811415611f2c575b5050505050506105c060006008818352015b60016105c051600881101561202c5702600e01546105e0526104606105c051600881101561202c5760200201516106005260006105e0511415611fde576000610600511415611fc157611ffc56611fec565b6106005160016105c051600881101561202c5702600e0155611fec565b610600516105e0511861202c575b8151600101808352811415611f6f575b50506000610420511461202a57600060e0526105a0516101005260006101205260006101405261202a61177e565b565b600080fd5b61006b61209c0361006b6101a03961006b61209c0361014051816101a0015261016051816101c0015261018051816101e00152806060016101a0f35b600080fd000000000000000000000000040d1edc9569d4bab2d15287dc5a4f10f56a56b8000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c80000000000000000000000000f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e

Deployed Bytecode

0x600436101561000d57611714565b60046000601c376000513461202c5763313ce567811861003257601260e052602060e0f35b6354fd4d5081186100cc57610120806020808252600660e0527f76312e302e3000000000000000000000000000000000000000000000000000006101005260e0818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f82010390509050905090508101905090509050610120f35b63bf88a6ff811861010857600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c5760e052602060e0f35b633488bd19811861012257600d5460a01c60e052602060e0f35b63e77e7437811861018e576004358060a01c61202c5760e0526024358060a01c61202c5761010052601c60e05160a05260805260406080206101005160a05260805260406080205470010000000000000000000000000000000080820690509050610120526020610120f35b6333fd6f7481186101e4576004358060a01c61202c5760e0526024358060a01c61202c5761010052601c60e05160a05260805260406080206101005160a05260805260406080205460801c610120526020610120f35b6348e9c65e811861031c576004358060a01c61202c5760e052600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c57610100526348e9c65e6101e05260e0516102005260c06101e060246101fc610100515afa610258573d600060003e3d6000fd5b60bf3d111561202c576101e080518060a01c61202c576101205260208101516101405260408101516101605260608101516101805260808101516101a05260a08101516101c0525063629d46c2610200526020610200600461021c610100515afa6102c8573d600060003e3d6000fd5b601f3d111561202c57610200516101e05260e051610200526101205161022052610140516102405261016051610260526101e05161028052601a60e05160a0526080526040608020546102a05260c0610200f35b6359b7e40981186103b1576004358060a01c61202c57610420526024358060a01c61202c576104405260005461202c5760016000556000600e541461037d576104205160e0526003546101005260006101205260006101405261037d61177e565b601c6104205160a05260805260406080206104405160a05260805260406080205460801c6104605260206104606000600055f35b63bdf9811681186103de576004358060a01c61202c5760e05260e05160173360a052608052604060802055005b63e6f1daf281186103f9573361042052600061044052610448565b6384e9bd7e811861041e576004358060a01c61202c5761042052600061044052610448565b639faceb1b8118610495576004358060a01c61202c57610420526024358060a01c61202c57610440525b60005461202c5760016000556000610440511461046a5733610420511861202c575b6104205160e05260035461010052600161012052610440516101405261048e61177e565b6000600055005b63b6b55f2581186104b05733610420526000610440526104ff565b636e553f6581186104d5576024358060a01c61202c57610420526000610440526104ff565b6383df67478118610683576024358060a01c61202c57610420526044358060011c61202c57610440525b60005461202c57600160005560006004351461061657600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c5761046052600354610480526104205160e0526104805161010052610440516101205260006101405261056d61177e565b6104808051600435818183011061202c578082019050905081525060026104205160a052608052604060802054600435818183011061202c57808201905090506104a0526104a05160026104205160a052608052604060802055610480516003556323b872dd6104c052336104e05230610500526004356105205260206104c060646104dc60006001545af1610608573d600060003e3d6000fd5b601f3d111561202c576104c0505b610420517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c600435610460526020610460a26104205160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600435610460526020610460a36000600055005b632e1a7d4d8118610699576000610420526106b4565b6338d074368118610820576024358060011c61202c57610420525b60005461202c5760016000556000600435146107b957600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c5761044052600354610460523360e0526104605161010052610420516101205260006101405261071f61177e565b610460805160043580821061202c578082039050905081525060023360a05260805260406080205460043580821061202c5780820390509050610480526104805160023360a0526080526040608020556104605160035563a9059cbb6104a052336104c0526004356104e05260206104a060446104bc60006001545af16107ab573d600060003e3d6000fd5b601f3d111561202c576104a0505b337f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364600435610440526020610440a26000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600435610440526020610440a36000600055005b63a9059cbb8118610874576004358060a01c61202c576104e05260005461202c57600160005533610420526104e0516104405260243561046052610862611d2a565b60016105005260206105006000600055f35b6323b872dd8118610957576004358060a01c61202c576104e0526024358060a01c61202c576105005260005461202c5760016000556104e05160e05233610100526108c061054061171a565b61054051610520527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6105205114610926576105205160443580821061202c578082039050905060046104e05160a05260805260406080203360a0526080526040608020555b6104e05161042052610500516104405260443561046052610945611d2a565b60016105405260206105406000600055f35b63dd62ed3e81186109a9576004358060a01c61202c57610120526024358060a01c61202c57610140526101205160e052610140516101005261099a61016061171a565b61016051610180526020610180f35b63095ea7b38118610a21576004358060a01c61202c5760e05260243560043360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602435610100526020610100a36001610100526020610100f35b63d505accf8118610d8e576004358060a01c61202c5760e0526024358060a01c61202c57610100526084358060081c61202c5761012052600060e0511461202c57606435421161202c57600c60e05160a0526080526040608020546101405260006002610400527f1901000000000000000000000000000000000000000000000000000000000000610420526104006002806020846106000101826020850160045afa505080518201915050600b546020826106000101526020810190507f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96105405260e0516105605261010051610580526044356105a052610140516105c0526064356105e05260c0610520526105208051602082012090506020826106000101526020810190508061060052610600905080516020820120905061016052600060e0513b11610ba25760e0516101605161018052610120516101a052604060a46101c03760206080608061018060015afa506080511861202c57610d02565b600060a4356102205260c435610240526040610200526102006040806020846102c00101826020850160045afa505080518201915050601f6001602082066102600160208284011161202c576020806102808261012060045afa5050818152905090506001806020846102c00101826020850160045afa505080518201915050806102c0526102c09050805160200180610180828460045afa905050507f1626ba7e00000000000000000000000000000000000000000000000000000000631626ba7e610200526102208060406101605182526020820191508082528083018061018080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810150505050602061020060c461021c60e0515afa610cef573d600060003e3d6000fd5b601f3d111561202c57610200511861202c575b604435600460e05160a05260805260406080206101005160a052608052604060802055610140516001818183011061202c5780820190509050600c60e05160a0526080526040608020556101005160e0517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925604435610180526020610180a36001610180526020610180f35b63395093518118610e3d576004358060a01c61202c57610120523360e0526101205161010052610dbf61016061171a565b61016051602435818183011061202c5780820190509050610140526101405160043360a05260805260406080206101205160a05260805260406080205561012051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561014051610160526020610160a36001610160526020610160f35b63a457c2d78118610eea576004358060a01c61202c57610120523360e0526101205161010052610e6e61016061171a565b6101605160243580821061202c5780820390509050610140526101405160043360a05260805260406080206101205160a05260805260406080205561012051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561014051610160526020610160a36001610160526020610160f35b6347d2d5d38118610ffa576004358060a01c61202c57610620526044358060a01c61202c57610640526064358060a01c61202c57610660526084358060a01c61202c576106805260a4358060a01c61202c576106a05260c4358060a01c61202c576106c05260e4358060a01c61202c576106e052610104358060a01c61202c5761070052610124358060a01c61202c576107205260005461202c576001600055602060203803608039608051331861202c5761062051610420526024356104405261064051610460526106605161048052610680516104a0526106a0516104c0526106c0516104e0526106e0516105005261070051610520526107205161054052610ff3611e66565b6000600055005b636133f9858118611361576004358060a01c61202c57610620526024358060a01c61202c576106405260015461202c576000610620511461202c57610620516001556395d89b416106a05260606106a060046106bc610620515afa611064573d600060003e3d6000fd5b603f3d111561202c576106a0516106a001601a81511161202c5780805160200180610660828460045afa90509050505060006009610700527f42616c616e636572200000000000000000000000000000000000000000000000610720526107006009806020846107800101826020850160045afa5050805182019150506106606020806020846107800101826020850160045afa5050805182019150506014610740527f205265776172644761756765204465706f736974000000000000000000000000610760526107406014806020846107800101826020850160045afa505080518201915050806107805261078090508051602001806106a0828460045afa905050506106a0806005602082510160c060006003818352015b8260c0516020021115611191576111b0565b60c05160200285015160c051850155815160010180835281141561117f575b50505050505060006106606020806020846107400101826020850160045afa5050805182019150506006610700527f2d67617567650000000000000000000000000000000000000000000000000000610720526107006006806020846107400101826020850160045afa50508051820191505080610740526107409050806008602082510160c060006003818352015b8260c051602002111561125257611271565b60c05160200285015160c0518501558151600101808352811415611240575b5050505050507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6107e0526106a0805160208201209050610800527f15124d26d1272f8d4d5266a24ca397811f414b8cd05a53b26b745f63af5ae2fc610820524661084052306108605260a06107c0526107c0805160208201209050600b5561010036610700376020606038036080396080516107005261064051610420526044356104405261070051610460526107205161048052610740516104a052610760516104c052610780516104e0526107a051610500526107c051610520526107e0516105405261135f611e66565b005b6382c6306681186113785760015460e052602060e0f35b6370a0823181186113ad576004358060a01c61202c5760e052600260e05160a052608052604060802054610100526020610100f35b6318160ddd81186113c45760035460e052602060e0f35b6306fdde0381186114675760e08060208082528083018060058082602082540160c060006003818352015b8260c051602002111561140157611420565b60c05185015460c05160200285015281516001018083528114156113ef575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6395d89b41811861150a5760e08060208082528083018060088082602082540160c060006003818352015b8260c05160200211156114a4576114c3565b60c05185015460c0516020028501528151600101808352811415611492575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b633644e515811861152157600b5460e052602060e0f35b637ecebe008118611556576004358060a01c61202c5760e052600c60e05160a052608052604060802054610100526020610100f35b6354c49fe9811861157d576001600435600881101561202c5702600e015460e052602060e0f35b63fe9e217881186115b2576004358060a01c61202c5760e052601660e05160a052608052604060802054610100526020610100f35b6301ddabf181186115e7576004358060a01c61202c5760e052601760e05160a052608052604060802054610100526020610100f35b63b7aca568811861168a5760e08060208082528083018060188082602082540160c060006002818352015b8260c051602002111561162457611643565b60c05185015460c0516020028501528151600101808352811415611612575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6373861fb381186116bf576004358060a01c61202c5760e052601a60e05160a052608052604060802054610100526020610100f35b63f05cc0588118611712576004358060a01c61202c5760e0526024358060a01c61202c5761010052601b60e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b505b60006000fd5b6020604038036080396080516101005118611758577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81525061177c565b600460e05160a05260805260406080206101005160a0526080526040608020548152505b565b600d546101605260006101005114156117985760006117c8565b60006101605114156117ab5760006117c8565b6101605160a01c610e10818183011061202c578082019050905042115b15611889576101605174010000000000000000000000000000000000000000808206905090508060a01c61202c57610180526018806101a0602082540160c060006002818352015b8260c051602002111561182257611841565b60c05185015460c0516020028501528151600101808352811415611810575b5050505050506101a050600060006101a0516101c06000610180515af161186d573d600060003e3d6000fd5b610180514260a01b818183011061202c5780820190509050600d555b6101405161018052610120516118a05760006118a6565b61018051155b156118d057601760e05160a05260805260406080205461018052610180516118d05760e051610180525b600260e05160a0526080526040608020546101a0526101c060006008818352015b60016101c051600881101561202c5702600e01546101e0526101e05161191657611d26565b60006102005260006101005114611a12576370a082316102405230610260526020610240602461025c6101e0515afa611954573d600060003e3d6000fd5b601f3d111561202c576102405161022052670de0b6b3a76400006102205160166101e05160a05260805260406080205480821061202c578082039050905080820282158284830414171561202c57905090506101005180801561202c57820490509050610200526102205160166101e05160a05260805260406080205560e051611a125760006102005114611d1657601a6101e05160a0526080526040608020805461020051818183011061202c5780820190509050815550611d16565b601a6101e05160a05260805260406080205461020051818183011061202c57808201905090506102205260006102005114611a5e5761022051601a6101e05160a0526080526040608020555b601b6101e05160a052608052604060802060e05160a0526080526040608020546102405260006102605261022051610240511015611afd5761022051601b6101e05160a052608052604060802060e05160a0526080526040608020556101a051610220516102405180821061202c578082039050905080820282158284830414171561202c5790509050670de0b6b3a764000080820490509050610260525b601c60e05160a05260805260406080206101e05160a052608052604060802054610280526102805160801c61026051818183011061202c57808201905090506102a05260006102a0511115611d165761028051700100000000000000000000000000000000808206905090506102c05261012051611bc1576000610260511115611d16576102c0516102a05160801b818183011061202c5780820190509050601c60e05160a05260805260406080206101e05160a052608052604060802055611d16565b60006004610320527fa9059cbb00000000000000000000000000000000000000000000000000000000610340526103206004806020846103600101826020850160045afa505080518201915050610180516020826103600101526020810190506102a0516020826103600101526020810190508061036052610360505060206104006103605161038060006101e0515af1611c61573d600060003e3d6000fd5b6103e060203d808211611c745781611c76565b805b9050905081528051602001806102e0828460045afa9050505060006102e05114611cb557610300516102e05181816020036008021c905090501561202c575b60166101e05160a052608052604060802080546102a05180821061202c57808203905090508155506102c0516102a051818183011061202c5780820190509050601c60e05160a05260805260406080206101e05160a0526080526040608020555b81516001018083528114156118f1575b5050565b600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c576104805260006104605114611e2d576003546104a0526104205160e0526104a05161010052600061012052600061014052611d8b61177e565b60026104205160a0526080526040608020546104605180821061202c57808203905090506104c0526104c05160026104205160a0526080526040608020556104405160e0526104a05161010052600061012052600061014052611dec61177e565b60026104405160a05260805260406080205461046051818183011061202c57808201905090506104c0526104c05160026104405160a0526080526040608020555b61044051610420517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef610460516104a05260206104a0a3565b60015461056052600d5474010000000000000000000000000000000000000000808206905090508060a01c61202c57610580526003546105a052600060e0526105a05161010052600061012052600061014052611ec161177e565b60006104205114611ee5576000610460511461202c576000610420513b111561202c575b61042051600d55601c6004602082066105c00160208284011161202c576020806105e08261044060045afa505081815290509050806018602082510160c060006002818352015b8260c0516020021115611f3e57611f5d565b60c05160200285015160c0518501558151600101808352811415611f2c575b5050505050506105c060006008818352015b60016105c051600881101561202c5702600e01546105e0526104606105c051600881101561202c5760200201516106005260006105e0511415611fde576000610600511415611fc157611ffc56611fec565b6106005160016105c051600881101561202c5702600e0155611fec565b610600516105e0511861202c575b8151600101808352811415611f6f575b50506000610420511461202a57600060e0526105a0516101005260006101205260006101405261202a61177e565b565b600080fd000000000000000000000000040d1edc9569d4bab2d15287dc5a4f10f56a56b8000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c80000000000000000000000000f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e

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

000000000000000000000000040d1edc9569d4bab2d15287dc5a4f10f56a56b8000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c80000000000000000000000000f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e

-----Decoded View---------------
Arg [0] : _bal_token (address): 0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8
Arg [1] : _vault (address): 0xBA12222222228d8Ba445958a75a0704d566BF2C8
Arg [2] : _authorizerAdaptor (address): 0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000040d1edc9569d4bab2d15287dc5a4f10f56a56b8
Arg [1] : 000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8
Arg [2] : 0000000000000000000000000f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e


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.