Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
RewardDistributor
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 20000 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import {BASIS_POINTS, hashAddresses, hashWeights, uncheckedInc} from "./Util.sol"; import "openzeppelin-contracts/contracts/access/Ownable.sol"; import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; error CannotReceiveNative(); 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 or an ERC20 token /// @notice You can use this contract to distribute ether/token 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. /// A RewardDistributor can only handle a single, specific asset defined at deployment. /// This contract assumes that the token does not have a blacklist or other non standard behavior. contract RewardDistributor is Ownable { using SafeERC20 for IERC20; /// @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; IERC20 public immutable token; /// @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 _token Address of the ERC20 token to distribute. Use address(0) for ether. /// @param recipients Addresses to receive rewards. /// @param weights Weights of each recipient in basis points. constructor(address _token, address[] memory recipients, uint256[] memory weights) Ownable() { setRecipients(recipients, weights); token = IERC20(_token); } /// @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 as long as token == address(0) receive() external payable { if (address(token) != address(0)) { revert CannotReceiveNative(); } } /** * @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(token) == address(0) ? address(this).balance : token.balanceOf(address(this)); // 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; if (address(token) == address(0)) { (success,) = recipients[r].call{value: individualRewards, gas: PER_RECIPIENT_GAS}(""); } else { // we assume that this will never revert, because we know we have enough token and the token is "normal" token.safeTransfer(recipients[r], individualRewards); success = true; } // 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 { // this case will never be hit if we are using an ERC20 token // 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); } }
// SPDX-License-Identifier: MIT 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; } }
// 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "nitro-contracts/=lib/nitro-contracts/", "@arbitrum/=lib/arbitrum-sdk/node_modules/@arbitrum/nitro-contracts/src/", "@offchainlabs/=lib/arbitrum-sdk/node_modules/@offchainlabs/upgrade-executor/src/", "@openzeppelin/=lib/arbitrum-sdk/node_modules/@openzeppelin/", "hardhat/=lib/arbitrum-sdk/node_modules/hardhat/" ], "optimizer": { "enabled": true, "runs": 20000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"weights","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CannotReceiveNative","type":"error"},{"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":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a06040523480156200001157600080fd5b50604051620019b7380380620019b7833981016040819052620000349162000304565b6200003f336200005f565b6200004b8282620000af565b50506001600160a01b0316608052620004c1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8151600003620000d257604051632a67cf2360e01b815260040160405180910390fd5b8051825114620000f55760405163aaad13f760e01b815260040160405180910390fd5b8151604010156200011957604051635531b49560e01b815260040160405180910390fd5b6000805b82518110156200015c578281815181106200013c576200013c620003e8565b602002602001015182620001519190620003fe565b91506001016200011d565b5061271081146200018757604051635943317f60e01b81526004810182905260240160405180910390fd5b60006200019b848051602090810291012090565b600181905590506000620001b6848051602090810291012090565b9050806002819055507f33bc54b3c50e54df666d4399528026a4b04671bb2a879281b5279f7352fb3e6c82868387604051620001f6949392919062000426565b60405180910390a15050505050565b80516001600160a01b03811681146200021d57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000263576200026362000222565b604052919050565b60006001600160401b0382111562000287576200028762000222565b5060051b60200190565b600082601f830112620002a357600080fd5b81516020620002bc620002b6836200026b565b62000238565b82815260059290921b84018101918181019086841115620002dc57600080fd5b8286015b84811015620002f95780518352918301918301620002e0565b509695505050505050565b6000806000606084860312156200031a57600080fd5b620003258462000205565b602085810151919450906001600160401b03808211156200034557600080fd5b818701915087601f8301126200035a57600080fd5b81516200036b620002b6826200026b565b81815260059190911b8301840190848101908a8311156200038b57600080fd5b938501935b82851015620003b457620003a48562000205565b8252938501939085019062000390565b60408a01519097509450505080831115620003ce57600080fd5b5050620003de8682870162000291565b9150509250925092565b634e487b7160e01b600052603260045260246000fd5b808201808211156200042057634e487b7160e01b600052601160045260246000fd5b92915050565b600060808201868352602060808185015281875180845260a086019150828901935060005b81811015620004725784516001600160a01b0316835293830193918301916001016200044b565b5050604085018790528481036060860152855180825290820192508186019060005b81811015620004b25782518552938301939183019160010162000494565b50929998505050505050505050565b6080516114b8620004ff6000396000818160bc01528181610286015281816103e30152818161044b01528181610565015261064601526114b86000f3fe6080604052600436106100b55760003560e01c8063a6980ce211610069578063dc55beee1161004e578063dc55beee1461023d578063f2fde38b14610254578063fc0c546a1461027457600080fd5b8063a6980ce2146101f9578063bd8bd40e1461022757600080fd5b806375fbe9861161009a57806375fbe986146101645780638da5cb5b1461018d57806391aee56e146101d957600080fd5b8063143ba4f31461012f578063715018a61461014f57600080fd5b3661012a577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1615610128576040517f75a9482500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b34801561013b57600080fd5b5061012861014a36600461113c565b6102a8565b34801561015b57600080fd5b5061012861087a565b34801561017057600080fd5b5061017a60025481565b6040519081526020015b60405180910390f35b34801561019957600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610184565b3480156101e557600080fd5b506101286101f43660046111a0565b61088e565b34801561020557600080fd5b5061020e604081565b60405167ffffffffffffffff9091168152602001610184565b34801561023357600080fd5b5061017a60015481565b34801561024957600080fd5b5061017a620186a081565b34801561026057600080fd5b5061012861026f36600461124d565b6108b0565b34801561028057600080fd5b506101b47f000000000000000000000000000000000000000000000000000000000000000081565b81516000036102e3576040517f2a67cf2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805182511461031e576040517faaad13f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610331838051602090810291012090565b90506001548114610381576001546040517f2cf5faaf0000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044015b60405180910390fd5b6000610394838051602090810291012090565b905060025481146103df576002546040517f505c311b000000000000000000000000000000000000000000000000000000008152600481019190915260248101829052604401610378565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16156104d0576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156104a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cb9190611268565b6104d2565b475b905060006104e261271083611281565b90508060000361051e576040517f63d664bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b865181101561087157600086828151811061053e5761053e6112bc565b60200260200101518302905060008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1603610626578883815181106105b1576105b16112bc565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1682620186a090604051600060405180830381858888f193505050503d8060008114610616576040519150601f19603f3d011682016040523d82523d6000602084013e61061b565b606091505b50508091505061068e565b61068a89848151811061063b5761063b6112bc565b6020026020010151837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166109679092919063ffffffff16565b5060015b8015610702578883815181106106a6576106a66112bc565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167f8b2a2b28e169eb0e4f62578e9d12f747d7bd0fe1ebc935af28387c18034d7cc0836040516106f591815260200190565b60405180910390a2610867565b6000805460405173ffffffffffffffffffffffffffffffffffffffff9091169190829085908381818185875af1925050503d806000811461075f576040519150601f19603f3d011682016040523d82523d6000602084013e610764565b606091505b50509050806107e457818b8681518110610780576107806112bc565b60209081029190910101516040517fb338e7e000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260448101859052606401610378565b8a85815181106107f6576107f66112bc565b602002602001015173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167ff3b03d863408466d72337e3dd8e40d5b9a37c5ef4c274f40dd3542d87697ab7e8660405161085c91815260200190565b60405180910390a350505b5050600101610521565b50505050505050565b6108826109f9565b61088c6000610a7a565b565b6108966109f9565b6108a084846102a8565b6108aa8282610aef565b50505050565b6108b86109f9565b73ffffffffffffffffffffffffffffffffffffffff811661095b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610378565b61096481610a7a565b50565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526109f4908490610c96565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461088c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610378565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8151600003610b2a576040517f2a67cf2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610b65576040517faaad13f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160401015610ba1576040517f5531b49500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8251811015610bdd57828181518110610bc057610bc06112bc565b602002602001015182610bd391906112eb565b9150600101610ba5565b506127108114610c1c576040517f5943317f00000000000000000000000000000000000000000000000000000000815260048101829052602401610378565b6000610c2f848051602090810291012090565b600181905590506000610c49848051602090810291012090565b9050806002819055507f33bc54b3c50e54df666d4399528026a4b04671bb2a879281b5279f7352fb3e6c82868387604051610c87949392919061132b565b60405180910390a15050505050565b6000610cf8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610da29092919063ffffffff16565b8051909150156109f45780806020019051810190610d1691906113cf565b6109f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610378565b6060610db18484600085610dbb565b90505b9392505050565b606082471015610e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610378565b73ffffffffffffffffffffffffffffffffffffffff85163b610ecb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610378565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610ef49190611415565b60006040518083038185875af1925050503d8060008114610f31576040519150601f19603f3d011682016040523d82523d6000602084013e610f36565b606091505b5091509150610f46828286610f51565b979650505050505050565b60608315610f60575081610db4565b825115610f705782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103789190611431565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561101a5761101a610fa4565b604052919050565b600067ffffffffffffffff82111561103c5761103c610fa4565b5060051b60200190565b803573ffffffffffffffffffffffffffffffffffffffff8116811461106a57600080fd5b919050565b600082601f83011261108057600080fd5b8135602061109561109083611022565b610fd3565b82815260059290921b840181019181810190868411156110b457600080fd5b8286015b848110156110d6576110c981611046565b83529183019183016110b8565b509695505050505050565b600082601f8301126110f257600080fd5b8135602061110261109083611022565b82815260059290921b8401810191818101908684111561112157600080fd5b8286015b848110156110d65780358352918301918301611125565b6000806040838503121561114f57600080fd5b823567ffffffffffffffff8082111561116757600080fd5b6111738683870161106f565b9350602085013591508082111561118957600080fd5b50611196858286016110e1565b9150509250929050565b600080600080608085870312156111b657600080fd5b843567ffffffffffffffff808211156111ce57600080fd5b6111da8883890161106f565b955060208701359150808211156111f057600080fd5b6111fc888389016110e1565b9450604087013591508082111561121257600080fd5b61121e8883890161106f565b9350606087013591508082111561123457600080fd5b50611241878288016110e1565b91505092959194509250565b60006020828403121561125f57600080fd5b610db482611046565b60006020828403121561127a57600080fd5b5051919050565b6000826112b7577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80820180821115611325577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b600060808201868352602060808185015281875180845260a086019150828901935060005b8181101561138257845173ffffffffffffffffffffffffffffffffffffffff1683529383019391830191600101611350565b5050604085018790528481036060860152855180825290820192508186019060005b818110156113c0578251855293830193918301916001016113a4565b50929998505050505050505050565b6000602082840312156113e157600080fd5b81518015158114610db457600080fd5b60005b8381101561140c5781810151838201526020016113f4565b50506000910152565b600082516114278184602087016113f1565b9190910192915050565b60208152600082518060208401526114508160408501602087016113f1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212200aeab1bda33b8820e18a8032d46b8580183b4d6a0c2807da336bc682194df7e664736f6c63430008100033000000000000000000000000722e8bdd2ce80a4422e880164f2079488e115365000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000020000000000000000000000007c058ad1d0ee415f7e7f30e62db1bcf568470a100000000000000000000000006a075e9a02eef6978dd66cb63de430a8c0c419e9000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000025e4000000000000000000000000000000000000000000000000000000000000012c
Deployed Bytecode
0x6080604052600436106100b55760003560e01c8063a6980ce211610069578063dc55beee1161004e578063dc55beee1461023d578063f2fde38b14610254578063fc0c546a1461027457600080fd5b8063a6980ce2146101f9578063bd8bd40e1461022757600080fd5b806375fbe9861161009a57806375fbe986146101645780638da5cb5b1461018d57806391aee56e146101d957600080fd5b8063143ba4f31461012f578063715018a61461014f57600080fd5b3661012a577f000000000000000000000000722e8bdd2ce80a4422e880164f2079488e11536573ffffffffffffffffffffffffffffffffffffffff1615610128576040517f75a9482500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b005b600080fd5b34801561013b57600080fd5b5061012861014a36600461113c565b6102a8565b34801561015b57600080fd5b5061012861087a565b34801561017057600080fd5b5061017a60025481565b6040519081526020015b60405180910390f35b34801561019957600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610184565b3480156101e557600080fd5b506101286101f43660046111a0565b61088e565b34801561020557600080fd5b5061020e604081565b60405167ffffffffffffffff9091168152602001610184565b34801561023357600080fd5b5061017a60015481565b34801561024957600080fd5b5061017a620186a081565b34801561026057600080fd5b5061012861026f36600461124d565b6108b0565b34801561028057600080fd5b506101b47f000000000000000000000000722e8bdd2ce80a4422e880164f2079488e11536581565b81516000036102e3576040517f2a67cf2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805182511461031e576040517faaad13f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610331838051602090810291012090565b90506001548114610381576001546040517f2cf5faaf0000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044015b60405180910390fd5b6000610394838051602090810291012090565b905060025481146103df576002546040517f505c311b000000000000000000000000000000000000000000000000000000008152600481019190915260248101829052604401610378565b60007f000000000000000000000000722e8bdd2ce80a4422e880164f2079488e11536573ffffffffffffffffffffffffffffffffffffffff16156104d0576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000722e8bdd2ce80a4422e880164f2079488e11536573ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156104a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cb9190611268565b6104d2565b475b905060006104e261271083611281565b90508060000361051e576040517f63d664bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b865181101561087157600086828151811061053e5761053e6112bc565b60200260200101518302905060008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000722e8bdd2ce80a4422e880164f2079488e11536573ffffffffffffffffffffffffffffffffffffffff1603610626578883815181106105b1576105b16112bc565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1682620186a090604051600060405180830381858888f193505050503d8060008114610616576040519150601f19603f3d011682016040523d82523d6000602084013e61061b565b606091505b50508091505061068e565b61068a89848151811061063b5761063b6112bc565b6020026020010151837f000000000000000000000000722e8bdd2ce80a4422e880164f2079488e11536573ffffffffffffffffffffffffffffffffffffffff166109679092919063ffffffff16565b5060015b8015610702578883815181106106a6576106a66112bc565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167f8b2a2b28e169eb0e4f62578e9d12f747d7bd0fe1ebc935af28387c18034d7cc0836040516106f591815260200190565b60405180910390a2610867565b6000805460405173ffffffffffffffffffffffffffffffffffffffff9091169190829085908381818185875af1925050503d806000811461075f576040519150601f19603f3d011682016040523d82523d6000602084013e610764565b606091505b50509050806107e457818b8681518110610780576107806112bc565b60209081029190910101516040517fb338e7e000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015260448101859052606401610378565b8a85815181106107f6576107f66112bc565b602002602001015173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167ff3b03d863408466d72337e3dd8e40d5b9a37c5ef4c274f40dd3542d87697ab7e8660405161085c91815260200190565b60405180910390a350505b5050600101610521565b50505050505050565b6108826109f9565b61088c6000610a7a565b565b6108966109f9565b6108a084846102a8565b6108aa8282610aef565b50505050565b6108b86109f9565b73ffffffffffffffffffffffffffffffffffffffff811661095b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610378565b61096481610a7a565b50565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526109f4908490610c96565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461088c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610378565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8151600003610b2a576040517f2a67cf2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610b65576040517faaad13f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160401015610ba1576040517f5531b49500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8251811015610bdd57828181518110610bc057610bc06112bc565b602002602001015182610bd391906112eb565b9150600101610ba5565b506127108114610c1c576040517f5943317f00000000000000000000000000000000000000000000000000000000815260048101829052602401610378565b6000610c2f848051602090810291012090565b600181905590506000610c49848051602090810291012090565b9050806002819055507f33bc54b3c50e54df666d4399528026a4b04671bb2a879281b5279f7352fb3e6c82868387604051610c87949392919061132b565b60405180910390a15050505050565b6000610cf8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610da29092919063ffffffff16565b8051909150156109f45780806020019051810190610d1691906113cf565b6109f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610378565b6060610db18484600085610dbb565b90505b9392505050565b606082471015610e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610378565b73ffffffffffffffffffffffffffffffffffffffff85163b610ecb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610378565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610ef49190611415565b60006040518083038185875af1925050503d8060008114610f31576040519150601f19603f3d011682016040523d82523d6000602084013e610f36565b606091505b5091509150610f46828286610f51565b979650505050505050565b60608315610f60575081610db4565b825115610f705782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103789190611431565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561101a5761101a610fa4565b604052919050565b600067ffffffffffffffff82111561103c5761103c610fa4565b5060051b60200190565b803573ffffffffffffffffffffffffffffffffffffffff8116811461106a57600080fd5b919050565b600082601f83011261108057600080fd5b8135602061109561109083611022565b610fd3565b82815260059290921b840181019181810190868411156110b457600080fd5b8286015b848110156110d6576110c981611046565b83529183019183016110b8565b509695505050505050565b600082601f8301126110f257600080fd5b8135602061110261109083611022565b82815260059290921b8401810191818101908684111561112157600080fd5b8286015b848110156110d65780358352918301918301611125565b6000806040838503121561114f57600080fd5b823567ffffffffffffffff8082111561116757600080fd5b6111738683870161106f565b9350602085013591508082111561118957600080fd5b50611196858286016110e1565b9150509250929050565b600080600080608085870312156111b657600080fd5b843567ffffffffffffffff808211156111ce57600080fd5b6111da8883890161106f565b955060208701359150808211156111f057600080fd5b6111fc888389016110e1565b9450604087013591508082111561121257600080fd5b61121e8883890161106f565b9350606087013591508082111561123457600080fd5b50611241878288016110e1565b91505092959194509250565b60006020828403121561125f57600080fd5b610db482611046565b60006020828403121561127a57600080fd5b5051919050565b6000826112b7577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80820180821115611325577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b600060808201868352602060808185015281875180845260a086019150828901935060005b8181101561138257845173ffffffffffffffffffffffffffffffffffffffff1683529383019391830191600101611350565b5050604085018790528481036060860152855180825290820192508186019060005b818110156113c0578251855293830193918301916001016113a4565b50929998505050505050505050565b6000602082840312156113e157600080fd5b81518015158114610db457600080fd5b60005b8381101561140c5781810151838201526020016113f4565b50506000910152565b600082516114278184602087016113f1565b9190910192915050565b60208152600082518060208401526114508160408501602087016113f1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212200aeab1bda33b8820e18a8032d46b8580183b4d6a0c2807da336bc682194df7e664736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000722e8bdd2ce80a4422e880164f2079488e115365000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000020000000000000000000000007c058ad1d0ee415f7e7f30e62db1bcf568470a100000000000000000000000006a075e9a02eef6978dd66cb63de430a8c0c419e9000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000025e4000000000000000000000000000000000000000000000000000000000000012c
-----Decoded View---------------
Arg [0] : _token (address): 0x722E8BdD2ce80A4422E880164f2079488e115365
Arg [1] : recipients (address[]): 0x7C058ad1D0Ee415f7e7f30e62DB1BCf568470a10,0x6A075E9a02eef6978DD66cB63DE430a8c0C419E9
Arg [2] : weights (uint256[]): 9700,300
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 000000000000000000000000722e8bdd2ce80a4422e880164f2079488e115365
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [4] : 0000000000000000000000007c058ad1d0ee415f7e7f30e62db1bcf568470a10
Arg [5] : 0000000000000000000000006a075e9a02eef6978dd66cb63de430a8c0c419e9
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [7] : 00000000000000000000000000000000000000000000000000000000000025e4
Arg [8] : 000000000000000000000000000000000000000000000000000000000000012c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.