Contract 0xbf5041fc07e1c866d15c749156657b8eed0fb649 5

 

Contract Overview

Arbitrum: L2 Base Fee
Balance:
1.24552476465 ETH

ETH Value:
$4,436.95 (@ $3,562.31/ETH)

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x521763948f3322cf18129e3afea1193ca7aa3356102f5b99f93f4027a3fbb880Distribute Rewar...2222780152024-06-16 0:00:0811 hrs 16 mins ago0x3900be0ccff05c2087cf8ac0be531d51ff576ce6 IN  Arbitrum: L2 Base Fee0 ETH0.00000072 0.01
0xc159b4e4f4821b55ba95c58433e3049e0366f443dc448777ef9b0f09f6cba98cDistribute Rewar...2198591472024-06-09 0:00:097 days 11 hrs ago0x3900be0ccff05c2087cf8ac0be531d51ff576ce6 IN  Arbitrum: L2 Base Fee0 ETH0.00000087 0.01
0xa3fde8ebb9fe7c57e24dde77112b2b4fc96afeecd45ae62fcb63e93b8368711aDistribute Rewar...2174482772024-06-02 0:00:0914 days 11 hrs ago0x3900be0ccff05c2087cf8ac0be531d51ff576ce6 IN  Arbitrum: L2 Base Fee0 ETH0.00000085 0.01
0x7286f014a6aa2a01b92c79e62496d9f6a1959609865d06b8145368c7acf8a4b3Distribute Rewar...2150463302024-05-26 0:00:0921 days 11 hrs ago0x3900be0ccff05c2087cf8ac0be531d51ff576ce6 IN  Arbitrum: L2 Base Fee0 ETH0.00000061 0.01
0xaadd3ff0efc3eebab7cbc2b87cb805059dc02f363adcd890ddd3aee594bd4539Distribute Rewar...2126813652024-05-19 0:00:0928 days 11 hrs ago0x3900be0ccff05c2087cf8ac0be531d51ff576ce6 IN  Arbitrum: L2 Base Fee0 ETH0.00000057 0.01
0x9f57a824c324e9dca1a850bc724b9ba45389def53aebcd780a79985c0e0e66b8Distribute Rewar...2103146602024-05-12 0:00:0835 days 11 hrs ago0x3900be0ccff05c2087cf8ac0be531d51ff576ce6 IN  Arbitrum: L2 Base Fee0 ETH0.00000059 0.01
0xa44e0e6f3bfb7609f6d15f983df270bb818016b8c8ea5141960ba82d404f3dacDistribute Rewar...2079107012024-05-05 0:00:0942 days 11 hrs ago0x3900be0ccff05c2087cf8ac0be531d51ff576ce6 IN  Arbitrum: L2 Base Fee0 ETH0.00000063 0.01
0xaffc8e0aaa4cb4f212431990132e0e45cfbe9ceebfac1c8f63972fc1f1717445Distribute Rewar...2055167622024-04-28 0:00:0849 days 11 hrs ago0x3900be0ccff05c2087cf8ac0be531d51ff576ce6 IN  Arbitrum: L2 Base Fee0 ETH0.00000063 0.01
0x3af445978eaac560620f9afdb87ec897a08afc8074e7f12d402a03390989c13fDistribute Rewar...1647098732023-12-28 19:39:44170 days 15 hrs ago0x1e37ace759df68e5ad2fd258bd030fcdba9f7838 IN  Arbitrum: L2 Base Fee0 ETH0.00007973 0.1
0x5a0065c18634d00752df3f6a562b83a664bbff2d6d0951ba12a01df1d958496eDistribute Rewar...1504671982023-11-14 22:49:17214 days 12 hrs ago0xbf9bdb93599750355d3648ab23ae8e81ef55fba4 IN  Arbitrum: L2 Base Fee0 ETH0.00009388 0.1
0xe7571413fed4ef9ab82f9d2d4a2fe085518834e7803fd29f6d7ec074e6703b63Distribute Rewar...1504381952023-11-14 20:36:49214 days 14 hrs ago0xbf9bdb93599750355d3648ab23ae8e81ef55fba4 IN  Arbitrum: L2 Base Fee0 ETH0.00016258 0.1
0xb763eb7210f1e23b88841c2c0b12158e7a22a67d30248c41bfc58491ed2d3b21Distribute Rewar...890851172023-05-10 0:31:59403 days 10 hrs ago0x50adf7a75d7cd6132acc0a2fb21c019011286635 IN  Arbitrum: L2 Base Fee0 ETH0.00021142 0.1
0x9e5da3df2d4c7978edf1f788e11fd5046ce6a4106fd423859e2f190937400236Transfer Ownersh...704833382023-03-16 17:58:13457 days 17 hrs agoArbitrum Foundation: Deployer IN  Arbitrum: L2 Base Fee0 ETH0.000044290.1
0x8b0f48f645b45d64ae906384157a204643f0190fe0aa120ca19f09e6677fcee70x60806040704833102023-03-16 17:58:06457 days 17 hrs agoArbitrum Foundation: Deployer IN  Create: RewardDistributor0 ETH0.000799870.1
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xa49c8611f6b8fed0a97d58f963e218112da9180b8c3742e7ae3b8a23d929cda82224398062024-06-16 11:13:393 mins ago 0xd297fa914353c44b2e33ebe05f21846f1048cfeb Arbitrum: L2 Base Fee0.00002 ETH
0x3be675e98a794c9e27dc1edf8fb15ca5a419735ab7c90ff5173a7841210bbdd02224398052024-06-16 11:13:393 mins ago Aliased L1 ERC20 Gateway Arbitrum: L2 Base Fee0.000003 ETH
0xffd9b20942312bc910a4b869dd2dd6794102f0eea9e05e348873fb9dce0f477b2224382952024-06-16 11:07:249 mins ago Aliased L1 ERC20 Gateway Arbitrum: L2 Base Fee0.00000125296 ETH
0xc7939e8dc7dffe18f1fb1c9edfd3f8181a319b0ae92b3f1c2d89e37e087e2f772224382942024-06-16 11:07:249 mins ago Aliased L1 ERC20 Gateway Arbitrum: L2 Base Fee0.00000125078 ETH
0x362604ee80dd6a221926893c37c9ad5c246c001688d517a202fdd2662e1ef32e2224367302024-06-16 11:00:5415 mins ago Aliased L1 ERC20 Gateway Arbitrum: L2 Base Fee0.00000124969 ETH
0xbdbe35e07d1b1e0f680eaeea941a336775f32df08ac2a2784ddf2bf0006506602224367292024-06-16 11:00:5415 mins ago 0x2342deb6f5749ef6ce6943a275a1d3e7486f5fbf Arbitrum: L2 Base Fee0.00000021768 ETH
0x7a445c12680acc96eb76c10e059f93b395083a52d74aa0dd1c766cf4d4d05eed2224321012024-06-16 10:41:3935 mins ago Arbitrum One: Bridge Executor 2 Arbitrum: L2 Base Fee0.00000275 ETH
0xe372fb71f3ae38bf3100e2a297a83debec6ae103e411f655f0d6e96e571115f22224320912024-06-16 10:41:3835 mins ago 0xe7fd4d637ad7c1f13dbac11d7851e6d1747f78fe Arbitrum: L2 Base Fee0.00000021032 ETH
0xcf1d3b55722f0e0d9792e3044a55aa543e9955f053e405076fbb2aeae9b64e1f2224305912024-06-16 10:35:2341 mins ago 0x2342deb6f5749ef6ce6943a275a1d3e7486f5fbf Arbitrum: L2 Base Fee0.00000021768 ETH
0xc2656dfd80269eaa30ab5f82a3a855221767701675f75e67ef5874c7607e17d32224275232024-06-16 10:22:3854 mins ago Aliased L1 ERC20 Gateway Arbitrum: L2 Base Fee0.00000125078 ETH
0x311585b58c64c319eb2bdc6f7999a3aa4f4eb573f0ecf43cba58d72acc2428142224243902024-06-16 10:09:381 hr 7 mins ago Aliased L1 ERC20 Gateway Arbitrum: L2 Base Fee0.00000125047 ETH
0xa920fd3ef9c16819a6cd30e23537a67ded73db8cbcc9b9748f9cc5bb76e2f2172224228892024-06-16 10:03:231 hr 13 mins ago 0xd297fa914353c44b2e33ebe05f21846f1048cfeb Arbitrum: L2 Base Fee0.00002 ETH
0x19338812bed260a21f54d2690b39a5f888803bacd680652ad30667498e2c44532224213232024-06-16 9:56:531 hr 19 mins ago 0x2342deb6f5749ef6ce6943a275a1d3e7486f5fbf Arbitrum: L2 Base Fee0.00000021768 ETH
0x56d5624f3c1948829c7632e4e0a263fa93998d2c50a8cc2d01d2649cf22ad3d22224198162024-06-16 9:50:381 hr 26 mins ago 0x2342deb6f5749ef6ce6943a275a1d3e7486f5fbf Arbitrum: L2 Base Fee0.00000021768 ETH
0x636294fa69053e5c48416b036fcf515647c2d5126420c700f81348f3a94098622224183182024-06-16 9:44:231 hr 32 mins ago 0x2342deb6f5749ef6ce6943a275a1d3e7486f5fbf Arbitrum: L2 Base Fee0.00000021768 ETH
0xe1ca45696eb22036e38f67165cb7fdabcd3a45f96e552e3973be0fc6bce9880f2224183152024-06-16 9:44:231 hr 32 mins ago Aliased L1 ERC20 Gateway Arbitrum: L2 Base Fee0.00000125078 ETH
0xdb41127e9386ffdcf2ff0c1c81f5120ffd657127dde83683138b98255af50ba72224166892024-06-16 9:37:381 hr 39 mins ago Aliased L1 ERC20 Gateway Arbitrum: L2 Base Fee0.00000125078 ETH
0x35805f15629b2b50752896086f10c1e55f41e44c14aec93dd6ae66d422bda6922224166862024-06-16 9:37:381 hr 39 mins ago Arbitrum One: Bridge Executor Arbitrum: L2 Base Fee0.00000156215 ETH
0xe28ed8efb05b5e6543e16fc83b6b31e8073e219b7e539d6df8c05fa378f3a7212224136142024-06-16 9:24:531 hr 51 mins ago Aliased L1 ERC20 Gateway Arbitrum: L2 Base Fee0.00000125015 ETH
0xdcba3f6c0ca9419e23aeac0be09ca125a204154c571843bc01dbc686e6a42b5b2224121152024-06-16 9:18:381 hr 58 mins ago Aliased L1 ERC20 Gateway Arbitrum: L2 Base Fee0.00000125078 ETH
0xe2c51a0ff13aeb0179052ccf98c6f2c1fe52b30f4f59d45737f8cb9255444d482224089872024-06-16 9:05:372 hrs 11 mins ago Aliased L1 ERC20 Gateway Arbitrum: L2 Base Fee0.00000078905 ETH
0xbdcd824d21925d6e070833298b7a3d3b2bb0cc816b26e9d0ecd4c6e8508bb2632224075482024-06-16 8:59:382 hrs 17 mins ago Arbitrum One: Bridge Executor 2 Arbitrum: L2 Base Fee0.00000275 ETH
0x6dbdbd7a91f395332964770c48b5e0f8016020011cb3bd56190ffdbf6ea05e5a2224059162024-06-16 8:52:522 hrs 23 mins ago 0xd297fa914353c44b2e33ebe05f21846f1048cfeb Arbitrum: L2 Base Fee0.00002 ETH
0x742208c1fb67e585abe217bd57c5f4738b4bdaa161dcf1a11c36d71c6f876ae22224059102024-06-16 8:52:522 hrs 23 mins ago Arbitrum One: Bridge Executor 2 Arbitrum: L2 Base Fee0.00000275 ETH
0xaa54254d4844c6c207e3d42b067c7078656e39920b65bc5536aca1a101ad7b782224044152024-06-16 8:46:372 hrs 30 mins ago Arbitrum One: Bridge Executor 2 Arbitrum: L2 Base Fee0.00000275 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RewardDistributor

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 2 of 4 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 3 of 4 : RewardDistributor.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import {BASIS_POINTS, hashAddresses, hashWeights, uncheckedInc} from "./Util.sol";
import "openzeppelin-contracts/contracts/access/Ownable.sol";

error TooManyRecipients();
error EmptyRecipients();
error InvalidRecipientGroup(bytes32 currentRecipientGroup, bytes32 providedRecipientGroup);
error InvalidRecipientWeights(bytes32 currentRecipientWeights, bytes32 providedRecipientWeights);
error OwnerFailedRecieve(address owner, address recipient, uint256 value);
error NoFundsToDistribute();
error InputLengthMismatch();
error InvalidTotalWeight(uint256 totalWeight);

/// @title A distributor of ether
/// @notice You can use this contract to distribute ether according to defined weights between a group of participants managed by an owner.
/// @dev If a particular recipient is not able to recieve funds at their address, the payment will fallback to the owner.
contract RewardDistributor is Ownable {
    /// @notice Amount of gas forwarded to each transfer call.
    /// @dev The recipient group is assumed to be a known group of contracts that won't consume more than this amount.
    uint256 public constant PER_RECIPIENT_GAS = 100_000;

    /// @notice The maximum number of addresses that may be recipients.
    /// @dev This ensures that all sends may always happen within a block.
    uint64 public constant MAX_RECIPIENTS = 64;

    /// @notice Hash of concat'ed recipient group.
    bytes32 public currentRecipientGroup;
    /// @notice Hash of concat'ed recipient weights.
    bytes32 public currentRecipientWeights;

    /// @notice The recipient couldn't receive rewards, so fallback to owner was triggered.
    event OwnerRecieved(address indexed owner, address indexed recipient, uint256 value);

    /// @notice Address successfully received rewards.
    event RecipientRecieved(address indexed recipient, uint256 value);

    /// @notice New recipients have been set
    event RecipientsUpdated(bytes32 recipientGroup, address[] recipients, bytes32 recipientWeights, uint256[] weights);

    /// @notice It is assumed that all recipients are able to receive eth when called with value but no data
    /// @param recipients Addresses to receive rewards.
    /// @param weights Weights of each recipient in basis points.
    constructor(address[] memory recipients, uint256[] memory weights) Ownable() {
        setRecipients(recipients, weights);
    }

    /// @notice allows eth to be deposited into this contract
    /// @dev this contract is expected to handle ether appearing in its balance as well as an explicit deposit
    receive() external payable {}

    /**
     * @notice Distributes previous rewards then updates the recipients to a new group.
     * @param currentRecipients Group of addresses that will receive their final rewards.
     * @param currentWeights Weights of the final rewards.
     * @param newRecipients Group of addresses that will receive future rewards.
     * @param newWeights Weights of the future rewards.
     */
    function distributeAndUpdateRecipients(
        address[] memory currentRecipients,
        uint256[] memory currentWeights,
        address[] memory newRecipients,
        uint256[] memory newWeights
    ) external onlyOwner {
        distributeRewards(currentRecipients, currentWeights);
        setRecipients(newRecipients, newWeights);
    }

    /**
     * @notice Sends rewards to the current group of recipients.
     * @dev The remainder will be kept in the contract.
     * @param recipients Group of addresses to receive rewards.
     * @param weights Weights of each recipient in basis points.
     */
    function distributeRewards(address[] memory recipients, uint256[] memory weights) public {
        if (recipients.length == 0) {
            revert EmptyRecipients();
        }

        if (recipients.length != weights.length) {
            revert InputLengthMismatch();
        }

        bytes32 recipientGroup = hashAddresses(recipients);
        if (recipientGroup != currentRecipientGroup) {
            revert InvalidRecipientGroup(currentRecipientGroup, recipientGroup);
        }

        bytes32 recipientWeights = hashWeights(weights);
        if (recipientWeights != currentRecipientWeights) {
            revert InvalidRecipientWeights(currentRecipientWeights, recipientWeights);
        }

        // calculate individual reward
        uint256 rewards = address(this).balance;
        // the reminder will be kept in the contract
        uint256 rewardPerBps = rewards / BASIS_POINTS;
        if (rewardPerBps == 0) {
            revert NoFundsToDistribute();
        }
        for (uint256 r; r < recipients.length; r = uncheckedInc(r)) {
            uint256 individualRewards;
            unchecked {
                // we know weights <= BASIS_POINTS
                individualRewards = rewardPerBps * weights[r];
            }
            // send the funds
            // if the recipient reentry to steal funds, the contract will not have sufficient
            // funds and revert when trying to send fund to the next recipient
            // if the recipient is the last, it doesn't matter since there are no extra fund to steal
            (bool success,) = recipients[r].call{value: individualRewards, gas: PER_RECIPIENT_GAS}("");

            // if the funds failed to send we send them to the owner for safe keeping
            // then the owner will have the opportunity to distribute them out of band
            if (success) {
                emit RecipientRecieved(recipients[r], individualRewards);
            } else {
                // cache owner in memory
                address _owner = owner();
                (bool ownerSuccess,) = _owner.call{value: individualRewards}("");
                // if this is the case then revert and sort it out
                // it's important that this fail in order to preserve the accounting in this contract.
                // if we dont fail here we enable a re-entrancy attack
                if (!ownerSuccess) {
                    revert OwnerFailedRecieve(_owner, recipients[r], individualRewards);
                }
                emit OwnerRecieved(_owner, recipients[r], individualRewards);
            }
        }
    }

    /**
     * @notice Validates and sets the group of recipient addresses. It is assumed that all recipients are able to receive eth
     * @dev We enforce a max number of recipients to ensure the distribution of rewards fits within a block.
     * @param recipients Group of addresses that will receive future rewards.
     * @param weights Weights of each recipient in basis points.
     */
    function setRecipients(address[] memory recipients, uint256[] memory weights) private {
        if (recipients.length == 0) {
            revert EmptyRecipients();
        }
        if (recipients.length != weights.length) {
            revert InputLengthMismatch();
        }
        if (recipients.length > MAX_RECIPIENTS) {
            // it is expected that all sends may happen within the block gas limit
            revert TooManyRecipients();
        }

        // validate that the total weight is 100%
        uint256 totalWeight = 0;
        for (uint256 i; i < weights.length; i = uncheckedInc(i)) {
            totalWeight += weights[i];
        }
        if (totalWeight != BASIS_POINTS) {
            revert InvalidTotalWeight(totalWeight);
        }

        // create a committment to the recipient group and update current
        bytes32 recipientGroup = hashAddresses(recipients);
        currentRecipientGroup = recipientGroup;

        // create a committment to the recipient weights and update current
        bytes32 recipientWeights = hashWeights(weights);
        currentRecipientWeights = recipientWeights;

        emit RecipientsUpdated(recipientGroup, recipients, recipientWeights, weights);
    }
}

File 4 of 4 : Util.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

uint256 constant BASIS_POINTS = 10000;

// utility free functions

/// @notice sequentially hashes an array of addresses
/// @param addresses array of addresses to be hashed
function hashAddresses(address[] memory addresses) pure returns (bytes32 res) {
    assembly ("memory-safe") {
        // same as keccak256(abi.encodePacked(addresses))
        // save gas since the array is already in the memory
        // we skip the first 32 bytes (length) and hash the next length * 32 bytes
        res := keccak256(add(addresses, 32), mul(mload(addresses), 32))
    }
}

/// @notice sequentially hashes an array of weights
/// @param weights array of weights to be hashed
function hashWeights(uint256[] memory weights) pure returns (bytes32 res) {
    assembly ("memory-safe") {
        // same as keccak256(abi.encodePacked(weights))
        // save gas since the array is already in the memory
        // we skip the first 32 bytes (length) and hash the next length * 32 bytes
        res := keccak256(add(weights, 32), mul(mload(weights), 32))
    }
}

/// @notice increments an integer without checking for overflows
/// @dev from https://github.com/ethereum/solidity/issues/11721#issuecomment-890917517
function uncheckedInc(uint256 x) pure returns (uint256) {
    unchecked {
        return x + 1;
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"weights","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EmptyRecipients","type":"error"},{"inputs":[],"name":"InputLengthMismatch","type":"error"},{"inputs":[{"internalType":"bytes32","name":"currentRecipientGroup","type":"bytes32"},{"internalType":"bytes32","name":"providedRecipientGroup","type":"bytes32"}],"name":"InvalidRecipientGroup","type":"error"},{"inputs":[{"internalType":"bytes32","name":"currentRecipientWeights","type":"bytes32"},{"internalType":"bytes32","name":"providedRecipientWeights","type":"bytes32"}],"name":"InvalidRecipientWeights","type":"error"},{"inputs":[{"internalType":"uint256","name":"totalWeight","type":"uint256"}],"name":"InvalidTotalWeight","type":"error"},{"inputs":[],"name":"NoFundsToDistribute","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"OwnerFailedRecieve","type":"error"},{"inputs":[],"name":"TooManyRecipients","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"OwnerRecieved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"RecipientRecieved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"recipientGroup","type":"bytes32"},{"indexed":false,"internalType":"address[]","name":"recipients","type":"address[]"},{"indexed":false,"internalType":"bytes32","name":"recipientWeights","type":"bytes32"},{"indexed":false,"internalType":"uint256[]","name":"weights","type":"uint256[]"}],"name":"RecipientsUpdated","type":"event"},{"inputs":[],"name":"MAX_RECIPIENTS","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PER_RECIPIENT_GAS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRecipientGroup","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRecipientWeights","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"currentRecipients","type":"address[]"},{"internalType":"uint256[]","name":"currentWeights","type":"uint256[]"},{"internalType":"address[]","name":"newRecipients","type":"address[]"},{"internalType":"uint256[]","name":"newWeights","type":"uint256[]"}],"name":"distributeAndUpdateRecipients","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"weights","type":"uint256[]"}],"name":"distributeRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405162000fe238038062000fe28339810160408190526200003491620002db565b6200003f3362000053565b6200004b8282620000a3565b505062000492565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8151600003620000c657604051632a67cf2360e01b815260040160405180910390fd5b8051825114620000e95760405163aaad13f760e01b815260040160405180910390fd5b8151604010156200010d57604051635531b49560e01b815260040160405180910390fd5b6000805b82518110156200015057828181518110620001305762000130620003b9565b602002602001015182620001459190620003cf565b915060010162000111565b5061271081146200017b57604051635943317f60e01b81526004810182905260240160405180910390fd5b60006200018f848051602090810291012090565b600181905590506000620001aa848051602090810291012090565b9050806002819055507f33bc54b3c50e54df666d4399528026a4b04671bb2a879281b5279f7352fb3e6c82868387604051620001ea9493929190620003f7565b60405180910390a15050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200023a576200023a620001f9565b604052919050565b60006001600160401b038211156200025e576200025e620001f9565b5060051b60200190565b600082601f8301126200027a57600080fd5b81516020620002936200028d8362000242565b6200020f565b82815260059290921b84018101918181019086841115620002b357600080fd5b8286015b84811015620002d05780518352918301918301620002b7565b509695505050505050565b60008060408385031215620002ef57600080fd5b82516001600160401b03808211156200030757600080fd5b818501915085601f8301126200031c57600080fd5b815160206200032f6200028d8362000242565b82815260059290921b840181019181810190898411156200034f57600080fd5b948201945b83861015620003865785516001600160a01b0381168114620003765760008081fd5b8252948201949082019062000354565b91880151919650909350505080821115620003a057600080fd5b50620003af8582860162000268565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b80820180821115620003f157634e487b7160e01b600052601160045260246000fd5b92915050565b600060808201868352602060808185015281875180845260a086019150828901935060005b81811015620004435784516001600160a01b0316835293830193918301916001016200041c565b5050604085018790528481036060860152855180825290820192508186019060005b81811015620004835782518552938301939183019160010162000465565b50929998505050505050505050565b610b4080620004a26000396000f3fe60806040526004361061008a5760003560e01c806391aee56e1161005957806391aee56e1461011e578063a6980ce21461013e578063bd8bd40e1461016c578063dc55beee14610182578063f2fde38b1461019957600080fd5b8063143ba4f314610096578063715018a6146100b857806375fbe986146100cd5780638da5cb5b146100f657600080fd5b3661009157005b600080fd5b3480156100a257600080fd5b506100b66100b13660046108e1565b6101b9565b005b3480156100c457600080fd5b506100b66104f1565b3480156100d957600080fd5b506100e360025481565b6040519081526020015b60405180910390f35b34801561010257600080fd5b506000546040516001600160a01b0390911681526020016100ed565b34801561012a57600080fd5b506100b6610139366004610945565b610505565b34801561014a57600080fd5b50610153604081565b60405167ffffffffffffffff90911681526020016100ed565b34801561017857600080fd5b506100e360015481565b34801561018e57600080fd5b506100e3620186a081565b3480156101a557600080fd5b506100b66101b43660046109f2565b610527565b81516000036101db57604051632a67cf2360e01b815260040160405180910390fd5b80518251146101fd5760405163aaad13f760e01b815260040160405180910390fd5b6000610210838051602090810291012090565b9050600154811461024757600154604051632cf5faaf60e01b81526004810191909152602481018290526044015b60405180910390fd5b600061025a838051602090810291012090565b9050600254811461028c5760025460405163505c311b60e01b815260048101919091526024810182905260440161023e565b47600061029b61271083610a14565b9050806000036102be576040516318f5992f60e21b815260040160405180910390fd5b60005b86518110156104e85760008682815181106102de576102de610a36565b60200260200101518302905060008883815181106102fe576102fe610a36565b60200260200101516001600160a01b031682620186a090604051600060405180830381858888f193505050503d8060008114610356576040519150601f19603f3d011682016040523d82523d6000602084013e61035b565b606091505b5050905080156103c65788838151811061037757610377610a36565b60200260200101516001600160a01b03167f8b2a2b28e169eb0e4f62578e9d12f747d7bd0fe1ebc935af28387c18034d7cc0836040516103b991815260200190565b60405180910390a26104de565b600080546040516001600160a01b039091169190829085908381818185875af1925050503d8060008114610416576040519150601f19603f3d011682016040523d82523d6000602084013e61041b565b606091505b505090508061047557818b868151811061043757610437610a36565b6020908102919091010151604051630599c73f60e51b81526001600160a01b039283166004820152911660248201526044810185905260640161023e565b8a858151811061048757610487610a36565b60200260200101516001600160a01b0316826001600160a01b03167ff3b03d863408466d72337e3dd8e40d5b9a37c5ef4c274f40dd3542d87697ab7e866040516104d391815260200190565b60405180910390a350505b50506001016102c1565b50505050505050565b6104f96105a0565b61050360006105fa565b565b61050d6105a0565b61051784846101b9565b610521828261064a565b50505050565b61052f6105a0565b6001600160a01b0381166105945760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161023e565b61059d816105fa565b50565b6000546001600160a01b031633146105035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161023e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b815160000361066c57604051632a67cf2360e01b815260040160405180910390fd5b805182511461068e5760405163aaad13f760e01b815260040160405180910390fd5b8151604010156106b157604051635531b49560e01b815260040160405180910390fd5b6000805b82518110156106ed578281815181106106d0576106d0610a36565b6020026020010151826106e39190610a4c565b91506001016106b5565b50612710811461071357604051635943317f60e01b81526004810182905260240161023e565b6000610726848051602090810291012090565b600181905590506000610740848051602090810291012090565b9050806002819055507f33bc54b3c50e54df666d4399528026a4b04671bb2a879281b5279f7352fb3e6c8286838760405161077e9493929190610a73565b60405180910390a15050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156107cc576107cc61078d565b604052919050565b600067ffffffffffffffff8211156107ee576107ee61078d565b5060051b60200190565b80356001600160a01b038116811461080f57600080fd5b919050565b600082601f83011261082557600080fd5b8135602061083a610835836107d4565b6107a3565b82815260059290921b8401810191818101908684111561085957600080fd5b8286015b8481101561087b5761086e816107f8565b835291830191830161085d565b509695505050505050565b600082601f83011261089757600080fd5b813560206108a7610835836107d4565b82815260059290921b840181019181810190868411156108c657600080fd5b8286015b8481101561087b57803583529183019183016108ca565b600080604083850312156108f457600080fd5b823567ffffffffffffffff8082111561090c57600080fd5b61091886838701610814565b9350602085013591508082111561092e57600080fd5b5061093b85828601610886565b9150509250929050565b6000806000806080858703121561095b57600080fd5b843567ffffffffffffffff8082111561097357600080fd5b61097f88838901610814565b9550602087013591508082111561099557600080fd5b6109a188838901610886565b945060408701359150808211156109b757600080fd5b6109c388838901610814565b935060608701359150808211156109d957600080fd5b506109e687828801610886565b91505092959194509250565b600060208284031215610a0457600080fd5b610a0d826107f8565b9392505050565b600082610a3157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80820180821115610a6d57634e487b7160e01b600052601160045260246000fd5b92915050565b600060808201868352602060808185015281875180845260a086019150828901935060005b81811015610abd5784516001600160a01b031683529383019391830191600101610a98565b5050604085018790528481036060860152855180825290820192508186019060005b81811015610afb57825185529383019391830191600101610adf565b5092999850505050505050505056fea264697066735822122098d4866df0044184e0a944c81bb2ed2ebc5043ad3e5188599e086e5fdd38f27c64736f6c63430008100033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bfc1feca8b09a5c5d3effe7429ebe24b9c09ef5800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000002710

Deployed Bytecode

0x60806040526004361061008a5760003560e01c806391aee56e1161005957806391aee56e1461011e578063a6980ce21461013e578063bd8bd40e1461016c578063dc55beee14610182578063f2fde38b1461019957600080fd5b8063143ba4f314610096578063715018a6146100b857806375fbe986146100cd5780638da5cb5b146100f657600080fd5b3661009157005b600080fd5b3480156100a257600080fd5b506100b66100b13660046108e1565b6101b9565b005b3480156100c457600080fd5b506100b66104f1565b3480156100d957600080fd5b506100e360025481565b6040519081526020015b60405180910390f35b34801561010257600080fd5b506000546040516001600160a01b0390911681526020016100ed565b34801561012a57600080fd5b506100b6610139366004610945565b610505565b34801561014a57600080fd5b50610153604081565b60405167ffffffffffffffff90911681526020016100ed565b34801561017857600080fd5b506100e360015481565b34801561018e57600080fd5b506100e3620186a081565b3480156101a557600080fd5b506100b66101b43660046109f2565b610527565b81516000036101db57604051632a67cf2360e01b815260040160405180910390fd5b80518251146101fd5760405163aaad13f760e01b815260040160405180910390fd5b6000610210838051602090810291012090565b9050600154811461024757600154604051632cf5faaf60e01b81526004810191909152602481018290526044015b60405180910390fd5b600061025a838051602090810291012090565b9050600254811461028c5760025460405163505c311b60e01b815260048101919091526024810182905260440161023e565b47600061029b61271083610a14565b9050806000036102be576040516318f5992f60e21b815260040160405180910390fd5b60005b86518110156104e85760008682815181106102de576102de610a36565b60200260200101518302905060008883815181106102fe576102fe610a36565b60200260200101516001600160a01b031682620186a090604051600060405180830381858888f193505050503d8060008114610356576040519150601f19603f3d011682016040523d82523d6000602084013e61035b565b606091505b5050905080156103c65788838151811061037757610377610a36565b60200260200101516001600160a01b03167f8b2a2b28e169eb0e4f62578e9d12f747d7bd0fe1ebc935af28387c18034d7cc0836040516103b991815260200190565b60405180910390a26104de565b600080546040516001600160a01b039091169190829085908381818185875af1925050503d8060008114610416576040519150601f19603f3d011682016040523d82523d6000602084013e61041b565b606091505b505090508061047557818b868151811061043757610437610a36565b6020908102919091010151604051630599c73f60e51b81526001600160a01b039283166004820152911660248201526044810185905260640161023e565b8a858151811061048757610487610a36565b60200260200101516001600160a01b0316826001600160a01b03167ff3b03d863408466d72337e3dd8e40d5b9a37c5ef4c274f40dd3542d87697ab7e866040516104d391815260200190565b60405180910390a350505b50506001016102c1565b50505050505050565b6104f96105a0565b61050360006105fa565b565b61050d6105a0565b61051784846101b9565b610521828261064a565b50505050565b61052f6105a0565b6001600160a01b0381166105945760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161023e565b61059d816105fa565b50565b6000546001600160a01b031633146105035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161023e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b815160000361066c57604051632a67cf2360e01b815260040160405180910390fd5b805182511461068e5760405163aaad13f760e01b815260040160405180910390fd5b8151604010156106b157604051635531b49560e01b815260040160405180910390fd5b6000805b82518110156106ed578281815181106106d0576106d0610a36565b6020026020010151826106e39190610a4c565b91506001016106b5565b50612710811461071357604051635943317f60e01b81526004810182905260240161023e565b6000610726848051602090810291012090565b600181905590506000610740848051602090810291012090565b9050806002819055507f33bc54b3c50e54df666d4399528026a4b04671bb2a879281b5279f7352fb3e6c8286838760405161077e9493929190610a73565b60405180910390a15050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156107cc576107cc61078d565b604052919050565b600067ffffffffffffffff8211156107ee576107ee61078d565b5060051b60200190565b80356001600160a01b038116811461080f57600080fd5b919050565b600082601f83011261082557600080fd5b8135602061083a610835836107d4565b6107a3565b82815260059290921b8401810191818101908684111561085957600080fd5b8286015b8481101561087b5761086e816107f8565b835291830191830161085d565b509695505050505050565b600082601f83011261089757600080fd5b813560206108a7610835836107d4565b82815260059290921b840181019181810190868411156108c657600080fd5b8286015b8481101561087b57803583529183019183016108ca565b600080604083850312156108f457600080fd5b823567ffffffffffffffff8082111561090c57600080fd5b61091886838701610814565b9350602085013591508082111561092e57600080fd5b5061093b85828601610886565b9150509250929050565b6000806000806080858703121561095b57600080fd5b843567ffffffffffffffff8082111561097357600080fd5b61097f88838901610814565b9550602087013591508082111561099557600080fd5b6109a188838901610886565b945060408701359150808211156109b757600080fd5b6109c388838901610814565b935060608701359150808211156109d957600080fd5b506109e687828801610886565b91505092959194509250565b600060208284031215610a0457600080fd5b610a0d826107f8565b9392505050565b600082610a3157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b80820180821115610a6d57634e487b7160e01b600052601160045260246000fd5b92915050565b600060808201868352602060808185015281875180845260a086019150828901935060005b81811015610abd5784516001600160a01b031683529383019391830191600101610a98565b5050604085018790528481036060860152855180825290820192508186019060005b81811015610afb57825185529383019391830191600101610adf565b5092999850505050505050505056fea264697066735822122098d4866df0044184e0a944c81bb2ed2ebc5043ad3e5188599e086e5fdd38f27c64736f6c63430008100033

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

000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bfc1feca8b09a5c5d3effe7429ebe24b9c09ef5800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000002710

-----Decoded View---------------
Arg [0] : recipients (address[]): 0xbFc1FECa8B09A5c5D3EFfE7429eBE24b9c09EF58
Arg [1] : weights (uint256[]): 10000

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [3] : 000000000000000000000000bfc1feca8b09a5c5d3effe7429ebe24b9c09ef58
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 0000000000000000000000000000000000000000000000000000000000002710


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.