Contract 0xf7D5DcE55E6D47852F054697BAB6A1B48A00ddbd 4

Contract Overview

Balance:
0 xDAI

xDAI Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x975ea9f6640276685c6cf2c95bde33f946bd343e8a153c36f6dca68877810543Claim Rewards Fr...282412322023-06-01 20:52:057 days 17 hrs ago0xdfddc02728e02a9bc952d86e5c7042161f318e45 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000793690569
0xe573d578231a0dc64c455312d6b0086c191ade6598bfcfc926c1601837b70aceClaim Rewards Fr...282340912023-06-01 10:32:008 days 3 hrs ago0xfdbbfb0fe2986672af97eca0e797d76a0bbf35c9 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.00021879126
0x769990352613ee41f30a0eb95541aff04c2e59ba7297ff61662c55e88c9df895Claim Rewards Fr...281645532023-05-28 3:44:4012 days 10 hrs ago0x1c85d6ae1336d0e4e3f165bbfa9641bfa04cedb1 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000164610656
0x107ec64bd1ce20c0f552a2177157e02c6c6376b43b1d74cf0474124c280bc2b4Claim Rewards Fr...281344642023-05-26 7:04:1014 days 7 hrs ago0xb8adfee40e1defbb8314d3fec3c622be2f624901 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.00523554843
0x025b657e58527d2b617d9b0e18b432add28f555fca694e4414b6056a4e0af05dClaim Rewards Fr...281319262023-05-26 3:24:0014 days 10 hrs ago0x1424210ca7209ed35b7f4416f2e614800b2c7524 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.002967868739
0xf0ec34d5a4f2ce02d34856c28410bcc8b2c8541c3de04cb725a08210996a810cClaim Rewards Fr...281259702023-05-25 18:48:0514 days 19 hrs ago0x2772364d6f1863d3d3ab1ac6816c4e6e3cbd2870 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000361121416
0xf03d3180415bb368df97975960bf3493f8b0b5b95e11c43379523338bd56d2faClaim Rewards Fr...281173652023-05-25 6:24:1015 days 7 hrs ago0x54f4a1a17e077aa6f3c6651e47925fb52bbfd888 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.0001691685
0x501ded7a210b5b421df372c6ffc052f670f6b53312ef3e72eb280dc2b8c09d63Claim Rewards Fr...280751412023-05-22 17:19:4517 days 20 hrs ago0x98c1265c08c81bee4a59e63e474c7e083ec74e15 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.001266532259
0xcfd6a1d0f6e51b189b05f6ddae9c743abedf24bdc51024cb0d55475b59c3b9bdClaim Rewards Fr...280751402023-05-22 17:19:4017 days 20 hrs ago0x98c1265c08c81bee4a59e63e474c7e083ec74e15 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.001415159927
0xceb01fcd810513f51c04ac3d66193d317c9144da59e3101badf6bae81a66a759Claim Rewards Fr...280749902023-05-22 17:06:4017 days 21 hrs ago0x851ef0a28922435675c77d505601e625f65ff088 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.001333678
0x7fe5123bcf82f7d650ca2076588c1aedd54fe38a0b38cb20913472fb6658297eClaim Rewards Fr...280452662023-05-20 22:17:5019 days 15 hrs ago0xe457ab4c290026002595fdd59fcaf5dd2eac22f2 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.00036882595
0x53a8148a61f4ad5a603bf4661ff41c53865ca7ad0bf815f85b5b31d10d0dcdc3Claim Rewards Fr...280452612023-05-20 22:17:2019 days 15 hrs ago0xe457ab4c290026002595fdd59fcaf5dd2eac22f2 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000450234432
0xd772c7c0fa3b4bdfd5c40f7e85021014455649b0d639a68e8cd6bfcc978f4c4cClaim Rewards Fr...280071282023-05-18 15:11:4521 days 23 hrs ago0x11062fa052373c3ed70a318e8e47457b7b001950 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.002594764799
0x0ddd6d7b3482ad67439d8b5340a5691f436a41940838d362a1372ecf9a42030cClaim Rewards Fr...280063002023-05-18 13:59:3022 days 13 mins ago0x7c818d46acef870ea88137bf553594f4803872ca IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000362676
0x83a9e323766945514eaec965aefd139c7e6de3169c40d90694733a0c0ab3c845Claim Rewards Fr...279966722023-05-18 0:02:5522 days 14 hrs ago0xa1771ce265f7d7b3df2eb536769c27b581696db9 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000115972
0x2efa3aca5dd13b77e7107ac5edaacec5dd8b219d9b470c9dac13d7fc4993d762Claim Rewards Fr...279943732023-05-17 20:43:3022 days 17 hrs ago0x2670375dabe2ac3e92baff16bc0ac5c93139ec9e IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.00075569126
0x4877fe0b69e8deea71d3e823b8161ae0c9c04e63cce6b63660280a6222a20b93Claim Rewards Fr...279943292023-05-17 20:39:3522 days 17 hrs ago0xa417ad64075d4cf7e7d3d766fe065ab34e2e0197 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000906438192
0xb83b95dac822f45c5adba43895d3e4524a011d9fd9a3f4c5cf805b0772ae4365Claim Rewards Fr...279931512023-05-17 18:56:4022 days 19 hrs ago0xed0f0c4de6150b7e3262e537d9691fc750b2ba23 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000311376
0xc97ae232b4bf71b216e68c9db436e476932cba608f1eb8025b590146cb6a5de0Claim Rewards Fr...279596992023-05-15 18:20:0524 days 19 hrs ago0x315dbdb51418bc2a87ddfa8e47d2ee2fc938efe9 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000399216
0x08885c9ad3d766d45dbe46b943bdbb3ddbd3050ea834085deac749dffb527963Claim Rewards Fr...279437962023-05-14 19:14:1025 days 18 hrs ago0xb02a2e83b9231bfc92d2d66c4ebbdbca8c540443 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000544014
0xcfe7c7b73889762c453aa22d976948e2050cf2fc01e80fece8ddbe50ed6533d0Claim Rewards Fr...279037302023-05-12 9:18:2528 days 4 hrs ago0x8e900cf9bd655e34bb610f0ef365d8d476fd7337 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.0004110328
0x3edddcf0a50e002d00ef33299bef1b0fe9cdc9cddba23d87950cc8d34f61e83bClaim Rewards Fr...278927542023-05-11 17:17:2528 days 20 hrs ago0xf039e5291859d1a0b1095a2840631e8ebc00ce14 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000192445481
0x1fdc4ef107adcebfcf5941da039365ef328f057e4996fb30feb100bfb4f841afClaim Rewards Fr...278927542023-05-11 17:17:2528 days 20 hrs ago0xf039e5291859d1a0b1095a2840631e8ebc00ce14 IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.000224155037
0xef3946655c1e8e65a2cedb4a49c58c127fa9dbed305be2a524582f355704cdf5Claim Rewards Fr...278898712023-05-11 13:03:5029 days 1 hr ago0x78e87757861185ec5e8c0ef6bf0c69fa7832df6c IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.00069852016
0x93ebf4cb153171018c4e16a4fdee89139fc08d7fad366521e04173981ec3713dClaim Rewards Fr...278898692023-05-11 13:03:4029 days 1 hr ago0x78e87757861185ec5e8c0ef6bf0c69fa7832df6c IN  0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd0 xDAI0.00081360316
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ChildChainGaugeRewardHelper

Compiler Version
v0.7.1+commit.f4a555be

Optimization Enabled:
Yes with 9999 runs

Other Settings:
default evmVersion
File 1 of 5 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 2 of 5 : IRewardTokenDistributor.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;

import "../solidity-utils/openzeppelin/IERC20.sol";

// For compatibility, we're keeping the same function names as in the original Curve code, including the mixed-case
// naming convention.
// solhint-disable func-name-mixedcase, var-name-mixedcase

interface IRewardTokenDistributor {
    struct Reward {
        IERC20 token;
        address distributor;
        uint256 period_finish;
        uint256 rate;
        uint256 last_update;
        uint256 integral;
    }

    function reward_tokens(uint256 index) external view returns (IERC20);

    function reward_data(IERC20 token) external view returns (Reward memory);

    function claim_rewards(address user) external;

    function add_reward(IERC20 rewardToken, address distributor) external;

    function set_reward_distributor(IERC20 rewardToken, address distributor) external;

    function deposit_reward_token(IERC20 rewardToken, uint256 amount) external;

    function claimable_reward(address rewardToken, address user) external view returns (uint256);

    function claimable_reward_write(address rewardToken, address user) external returns (uint256);
}

File 3 of 5 : IChildChainStreamer.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

pragma solidity ^0.7.0;

import "../solidity-utils/openzeppelin/IERC20.sol";

// For compatibility, we're keeping the same function names as in the original Curve code, including the mixed-case
// naming convention.
// solhint-disable func-name-mixedcase

interface IChildChainStreamer {
    function initialize(address gauge) external;

    function get_reward() external;

    function reward_tokens(uint256 index) external view returns (IERC20);

    function add_reward(
        IERC20 rewardToken,
        address distributor,
        uint256 duration
    ) external;
}

File 4 of 5 : IRewardsOnlyGauge.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

pragma solidity ^0.7.0;

import "./IChildChainStreamer.sol";
import "./IRewardTokenDistributor.sol";

// For compatibility, we're keeping the same function names as in the original Curve code, including the mixed-case
// naming convention.
// solhint-disable func-name-mixedcase

interface IRewardsOnlyGauge is IRewardTokenDistributor {
    function initialize(
        address pool,
        address streamer,
        bytes32 claimSignature
    ) external;

    // solhint-disable-next-line func-name-mixedcase
    function lp_token() external view returns (IERC20);

    function reward_contract() external view returns (IChildChainStreamer);

    function set_rewards(
        address childChainStreamer,
        bytes32 claimSig,
        address[8] calldata rewardTokens
    ) external;

    function last_claim() external view returns (uint256);
}

File 5 of 5 : ChildChainGaugeRewardHelper.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;

import "@balancer-labs/v2-interfaces/contracts/liquidity-mining/IRewardsOnlyGauge.sol";
import "@balancer-labs/v2-interfaces/contracts/liquidity-mining/IChildChainStreamer.sol";

/**
 * @title ChildChainGaugeRewardHelper
 * @author Balancer Labs
 * @notice Helper contract which allows claiming rewards from many RewardsOnlyGauges in a single transaction.
 * This contract manually triggers an update to the gauges' streamers as a workaround for the gauge .
 */
contract ChildChainGaugeRewardHelper {
    uint256 public constant CLAIM_FREQUENCY = 3600;

    /**
     * @notice Returns the amount of ERC20 token `token` on RewardsOnlyGauge `gauge` claimable by address `user`.
     * @dev This function cannot be marked `view` as it updates the gauge's state (not possible in a view context).
     * Offchain users attempting to read from this function should manually perform a static call or modify the abi.
     * @param gauge - The address of the RewardsOnlyGauge for which to query.
     * @param user - The address of the user for which to query.
     * @param token - The address of the reward token for which to query.
     */
    function getPendingRewards(
        IRewardsOnlyGauge gauge,
        address user,
        address token
    ) external returns (uint256) {
        gauge.reward_contract().get_reward();
        return gauge.claimable_reward_write(user, token);
    }

    /**
     * @notice Claims pending rewards on RewardsOnlyGauge `gauge` for account `user`.
     * @param gauge - The address of the RewardsOnlyGauge from which to claim rewards.
     * @param user - The address of the user for which to claim rewards.
     */
    function claimRewardsFromGauge(IRewardsOnlyGauge gauge, address user) external {
        _claimRewardsFromGauge(gauge, user);
    }

    /**
     * @notice Claims pending rewards on a list of RewardsOnlyGauges `gauges` for account `user`.
     * @param gauges - An array of address of RewardsOnlyGauges from which to claim rewards.
     * @param user - The address of the user for which to claim rewards.
     */
    function claimRewardsFromGauges(IRewardsOnlyGauge[] calldata gauges, address user) external {
        for (uint256 i = 0; i < gauges.length; i++) {
            _claimRewardsFromGauge(gauges[i], user);
        }
    }

    // Internal functions

    function _claimRewardsFromGauge(IRewardsOnlyGauge gauge, address user) internal {
        // Force rewards from the streamer onto the gauge.
        gauge.reward_contract().get_reward();
        gauge.claim_rewards(user);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 9999
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[],"name":"CLAIM_FREQUENCY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IRewardsOnlyGauge","name":"gauge","type":"address"},{"internalType":"address","name":"user","type":"address"}],"name":"claimRewardsFromGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRewardsOnlyGauge[]","name":"gauges","type":"address[]"},{"internalType":"address","name":"user","type":"address"}],"name":"claimRewardsFromGauges","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRewardsOnlyGauge","name":"gauge","type":"address"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"getPendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506105ed806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635db749491461005157806371d5065c1461007a578063c2ec33b51461008f578063ff98f88d146100a2575b600080fd5b61006461005f3660046104ea565b6100aa565b6040516100719190610589565b60405180910390f35b61008d6100883660046104b2565b610237565b005b61008d61009d3660046103f3565b610245565b610064610288565b60008373ffffffffffffffffffffffffffffffffffffffff1663bf88a6ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156100f257600080fd5b505afa158015610106573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061012a9190610473565b73ffffffffffffffffffffffffffffffffffffffff16631afe22a66040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561017157600080fd5b505af1158015610185573d6000803e3d6000fd5b50506040517f59b7e40900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871692506359b7e40991506101dd9086908690600401610562565b602060405180830381600087803b1580156101f757600080fd5b505af115801561020b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022f9190610529565b949350505050565b610241828261028e565b5050565b60005b828110156102825761027a84848381811061025f57fe5b90506020020160208101906102749190610496565b8361028e565b600101610248565b50505050565b610e1081565b8173ffffffffffffffffffffffffffffffffffffffff1663bf88a6ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102d457600080fd5b505afa1580156102e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030c9190610473565b73ffffffffffffffffffffffffffffffffffffffff16631afe22a66040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561035357600080fd5b505af1158015610367573d6000803e3d6000fd5b50506040517f84e9bd7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851692506384e9bd7e91506103bd908490600401610541565b600060405180830381600087803b1580156103d757600080fd5b505af11580156103eb573d6000803e3d6000fd5b505050505050565b600080600060408486031215610407578283fd5b833567ffffffffffffffff8082111561041e578485fd5b818601915086601f830112610431578485fd5b81358181111561043f578586fd5b8760208083028501011115610452578586fd5b6020928301955093505084013561046881610592565b809150509250925092565b600060208284031215610484578081fd5b815161048f81610592565b9392505050565b6000602082840312156104a7578081fd5b813561048f81610592565b600080604083850312156104c4578182fd5b82356104cf81610592565b915060208301356104df81610592565b809150509250929050565b6000806000606084860312156104fe578283fd5b833561050981610592565b9250602084013561051981610592565b9150604084013561046881610592565b60006020828403121561053a578081fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b90815260200190565b73ffffffffffffffffffffffffffffffffffffffff811681146105b457600080fd5b5056fea2646970667358221220618a016f9f5f617a2dc22c26b5f542fba6f244a263be60b7ec1b49e36bce326564736f6c63430007010033

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.