ETH Price: $1,975.65 (-5.20%)

Contract

0x395A982A73A1D7a7020AAaFcd60cA38E1703ded8
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw176294092023-07-05 18:17:11975 days ago1688581031IN
0x395A982A...E1703ded8
0 ETH0.0016327853.13680946
Pause174330752023-06-08 3:58:231002 days ago1686196703IN
0x395A982A...E1703ded8
0 ETH0.000530619.13069049
Claim Payout174329322023-06-08 3:29:351002 days ago1686194975IN
0x395A982A...E1703ded8
0 ETH0.0014161519.12686608
Delegate Payout174325422023-06-08 2:10:111003 days ago1686190211IN
0x395A982A...E1703ded8
0 ETH0.0026215220.11224056
Claim Payout174266322023-06-07 6:09:471003 days ago1686118187IN
0x395A982A...E1703ded8
0 ETH0.0014240119.4417421
Claim Payout174264642023-06-07 5:34:591003 days ago1686116099IN
0x395A982A...E1703ded8
0 ETH0.0014028618.93873171
Claim Payout174247982023-06-06 23:56:471004 days ago1686095807IN
0x395A982A...E1703ded8
0 ETH0.0014465319.52767535
Claim Payout174244792023-06-06 22:52:111004 days ago1686091931IN
0x395A982A...E1703ded8
0 ETH0.0014169919.12639154
Claim Payout174227612023-06-06 17:03:111004 days ago1686070991IN
0x395A982A...E1703ded8
0 ETH0.0030352740.99621341
Claim Payout174120202023-06-05 4:40:471005 days ago1685940047IN
0x395A982A...E1703ded8
0 ETH0.0014256319.24819267
Delegate Payout174119982023-06-05 4:36:231005 days ago1685939783IN
0x395A982A...E1703ded8
0 ETH0.0023935619.68293216
Delegate Payout174105172023-06-04 23:34:111006 days ago1685921651IN
0x395A982A...E1703ded8
0 ETH0.0024193918.56777481
Claim Payout174103442023-06-04 22:58:591006 days ago1685919539IN
0x395A982A...E1703ded8
0 ETH0.0014808119.99423259
Claim Payout174012792023-06-03 16:16:111007 days ago1685808971IN
0x395A982A...E1703ded8
0 ETH0.002689636.29404651
Claim Payout173968862023-06-03 1:27:351008 days ago1685755655IN
0x395A982A...E1703ded8
0 ETH0.0017502423.88788076
Claim Payout173958482023-06-02 21:57:111008 days ago1685743031IN
0x395A982A...E1703ded8
0 ETH0.0022150829.90042716
Claim Payout173952312023-06-02 19:51:591008 days ago1685735519IN
0x395A982A...E1703ded8
0 ETH0.0017019623.24682739
Claim Payout173946932023-06-02 18:02:471008 days ago1685728967IN
0x395A982A...E1703ded8
0 ETH0.0020832828.13496453
Claim Payout173936552023-06-02 14:31:471008 days ago1685716307IN
0x395A982A...E1703ded8
0 ETH0.0040539154.72794325
Claim Payout173891742023-06-01 23:21:351009 days ago1685661695IN
0x395A982A...E1703ded8
0 ETH0.002026427.34834516
Claim Payout173872372023-06-01 16:46:471009 days ago1685638007IN
0x395A982A...E1703ded8
0 ETH0.0023890432.23903523
Claim Payout173863152023-06-01 13:40:231009 days ago1685626823IN
0x395A982A...E1703ded8
0 ETH0.0027072836.55732384
Claim Payout173857802023-06-01 11:52:111009 days ago1685620331IN
0x395A982A...E1703ded8
0 ETH0.002616635.32898246
Claim Payout173813072023-05-31 20:45:591010 days ago1685565959IN
0x395A982A...E1703ded8
0 ETH0.0022213255.07319685
Claim Payout173811142023-05-31 20:06:591010 days ago1685563619IN
0x395A982A...E1703ded8
0 ETH0.0038143951.50274253
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer176294092023-07-05 18:17:11975 days ago1688581031
0x395A982A...E1703ded8
80.99 ETH
Transfer174329322023-06-08 3:29:351002 days ago1686194975
0x395A982A...E1703ded8
0.273 ETH
Transfer174325422023-06-08 2:10:111003 days ago1686190211
0x395A982A...E1703ded8
0.078 ETH
Buy In174325422023-06-08 2:10:111003 days ago1686190211
0x395A982A...E1703ded8
0.026 ETH
Transfer174266322023-06-07 6:09:471003 days ago1686118187
0x395A982A...E1703ded8
0.026 ETH
Transfer174264642023-06-07 5:34:591003 days ago1686116099
0x395A982A...E1703ded8
0.013 ETH
Transfer174247982023-06-06 23:56:471004 days ago1686095807
0x395A982A...E1703ded8
0.039 ETH
Transfer174244792023-06-06 22:52:111004 days ago1686091931
0x395A982A...E1703ded8
0.117 ETH
Transfer174227612023-06-06 17:03:111004 days ago1686070991
0x395A982A...E1703ded8
0.156 ETH
Transfer174120202023-06-05 4:40:471005 days ago1685940047
0x395A982A...E1703ded8
0.026 ETH
Buy In174119982023-06-05 4:36:231005 days ago1685939783
0x395A982A...E1703ded8
0.273 ETH
Transfer174105172023-06-04 23:34:111006 days ago1685921651
0x395A982A...E1703ded8
0.013 ETH
Buy In174105172023-06-04 23:34:111006 days ago1685921651
0x395A982A...E1703ded8
0.026 ETH
Transfer174103442023-06-04 22:58:591006 days ago1685919539
0x395A982A...E1703ded8
0.13 ETH
Transfer174012792023-06-03 16:16:111007 days ago1685808971
0x395A982A...E1703ded8
0.234 ETH
Transfer173968862023-06-03 1:27:351008 days ago1685755655
0x395A982A...E1703ded8
0.013 ETH
Transfer173958482023-06-02 21:57:111008 days ago1685743031
0x395A982A...E1703ded8
0.052 ETH
Transfer173952312023-06-02 19:51:591008 days ago1685735519
0x395A982A...E1703ded8
0.039 ETH
Transfer173946932023-06-02 18:02:471008 days ago1685728967
0x395A982A...E1703ded8
0.026 ETH
Transfer173936552023-06-02 14:31:471008 days ago1685716307
0x395A982A...E1703ded8
0.117 ETH
Transfer173891742023-06-01 23:21:351009 days ago1685661695
0x395A982A...E1703ded8
0.507 ETH
Transfer173872372023-06-01 16:46:471009 days ago1685638007
0x395A982A...E1703ded8
0.104 ETH
Transfer173863152023-06-01 13:40:231009 days ago1685626823
0x395A982A...E1703ded8
0.143 ETH
Transfer173857802023-06-01 11:52:111009 days ago1685620331
0x395A982A...E1703ded8
0.013 ETH
Transfer173811142023-05-31 20:06:591010 days ago1685563619
0x395A982A...E1703ded8
0.143 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LeadersFundAccountant

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { Pausable } from "@openzeppelin/contracts/security/Pausable.sol";
import { Address } from "@openzeppelin/contracts/utils/Address.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { MerkleProof } from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import { IAlphaFund } from "./IAlphaFund.sol";
import { IDelegationRegistry } from "./IDelegationRegistry.sol";

/*
I see you nerd! ⌐⊙_⊙
*/

contract LeadersFundAccountant is Ownable, Pausable, ReentrancyGuard {
    address constant public RL_CONTRACT = 0x163a7af239b409E79a32fC6b437Fda51dd8fa5F0;
    address constant public DELEGATE_CASH_CONTRACT = 0x00000000000076A84feF008CDAbe6409d2FE638B;

    IAlphaFund public alphaFund;

    mapping (uint256 => bytes32) public merkleRoots;
    mapping (uint256 => uint256) public payoutsPerShare;
    mapping(uint256 => mapping(address => bool)) public claimed;

    // errors
    error InvalidProof();
    error AlreadyClaimed();
    error NotEnoughShares();
    error InvalidPayoutId(uint256 payId);
    error InvalidDelegate(address requester, address vault);

    event PayoutReleased(address to, address vault, uint256 numShares, uint256 payoutId, uint256 amount);
    event PayoutDelegated(address to, address vault, uint256 numSharesDelegated, uint256 numSharesBought, uint256 payoutId, uint256 buyInAmount);

    constructor(address alphaFundAddress) {
        alphaFund = IAlphaFund(alphaFundAddress);
        _pause();
    }

    function setAlphaFundAddress(address alphaFundAddress) external onlyOwner {
        alphaFund = IAlphaFund(alphaFundAddress);
    }

    function setPayout(bytes32 merkleRoot, uint256 newPayoutId, uint256 payoutPerShare) external payable onlyOwner {
        merkleRoots[newPayoutId] = merkleRoot;
        payoutsPerShare[newPayoutId] = payoutPerShare;
    }

    function withdraw(uint256 amount) external onlyOwner {
        Address.sendValue(payable(msg.sender), amount);
    }

    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        _unpause();
    }

    function hashLeaf(address holder, uint256 numShares) public pure returns (bytes32) {
        return keccak256(
            bytes.concat(
                keccak256(
                    abi.encode(holder, numShares)
                )
            )
        );
    }

    function claimPayout(uint256 payId, uint256 numShares, address vault, bytes32[] calldata merkleProof) external nonReentrant whenNotPaused {
        address requester = _verifyClaim(payId, numShares, vault, merkleProof);

        uint256 amount = payoutsPerShare[payId] * numShares;

        // Interactions
        Address.sendValue(payable(msg.sender), amount);
        emit PayoutReleased(msg.sender, requester, numShares, payId, amount);
    }

    function delegatePayout(uint256 payId, uint256 numShares, uint256 numSharesDelegated, uint256 numSharesToBuy, address vault, bytes32[] calldata merkleProof) external payable nonReentrant whenNotPaused {
        if (numSharesDelegated > numShares) {
            revert NotEnoughShares();
        }

        address requester = _verifyClaim(payId, numShares, vault, merkleProof);

        // Interaction #1: Buy Alpha tokens
        uint256 buyInAmount = payoutsPerShare[payId] * numSharesDelegated + msg.value;
        alphaFund.buyIn{value: buyInAmount}(numSharesToBuy, msg.sender);
        emit PayoutDelegated(msg.sender, requester, numSharesDelegated, numSharesToBuy, payId, buyInAmount);

        // Interaction #2: Claim the rest
        if (numShares > numSharesDelegated) {
            uint256 numSharesToClaim = numShares - numSharesDelegated;
            uint256 claimAmount = payoutsPerShare[payId] * numSharesToClaim;

            Address.sendValue(payable(msg.sender), claimAmount);
            emit PayoutReleased(msg.sender, requester, numSharesToClaim, payId, claimAmount);
        }
    }

    function _verifyClaim(uint256 payId, uint256 numShares, address vault, bytes32[] calldata merkleProof) internal returns (address) {
        address requester = msg.sender;

        // Check for valid payout Id
        if (merkleRoots[payId] == 0) {
            revert InvalidPayoutId(payId);
        }

        // Delegate cash check if the claim is delegated
        if (vault != address(0)) { 
            bool isDelegateValid = IDelegationRegistry(DELEGATE_CASH_CONTRACT).checkDelegateForContract(msg.sender, vault, RL_CONTRACT);
            if (!isDelegateValid) {
                revert InvalidDelegate(msg.sender, vault);
            }
            requester = vault;
        }

        // Check to confirm not already claimed
        if(claimed[payId][requester]) {
            revert AlreadyClaimed();
        }

        // Check merkle proof for valid holder and shares
        if (!MerkleProof.verify(merkleProof, merkleRoots[payId], hashLeaf(requester, numShares))) {
            revert InvalidProof();
        }

        // Effects before interactions
        claimed[payId][requester] = true;

        return requester;
    }

    receive () external payable virtual {
        //
    }
}

// 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.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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);
        }
    }
}

// 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 (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;

interface IAlphaFund {
    function buyIn(uint256 numberOfTokens, address vault) external payable;
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;

interface IDelegationRegistry {
    /**
    * @notice Returns true if the address is delegated to act on your behalf for a token contract or an entire vault
    * @param delegate The hotwallet to act on your behalf
    * @param contract_ The address for the contract you're delegating
    * @param vault The cold wallet who issued the delegation
    */
    function checkDelegateForContract(address delegate, address vault, address contract_) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"alphaFundAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[{"internalType":"address","name":"requester","type":"address"},{"internalType":"address","name":"vault","type":"address"}],"name":"InvalidDelegate","type":"error"},{"inputs":[{"internalType":"uint256","name":"payId","type":"uint256"}],"name":"InvalidPayoutId","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"NotEnoughShares","type":"error"},{"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"numSharesDelegated","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numSharesBought","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"payoutId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"buyInAmount","type":"uint256"}],"name":"PayoutDelegated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"numShares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"payoutId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PayoutReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DELEGATE_CASH_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RL_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"alphaFund","outputs":[{"internalType":"contract IAlphaFund","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"payId","type":"uint256"},{"internalType":"uint256","name":"numShares","type":"uint256"},{"internalType":"address","name":"vault","type":"address"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claimPayout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"payId","type":"uint256"},{"internalType":"uint256","name":"numShares","type":"uint256"},{"internalType":"uint256","name":"numSharesDelegated","type":"uint256"},{"internalType":"uint256","name":"numSharesToBuy","type":"uint256"},{"internalType":"address","name":"vault","type":"address"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"delegatePayout","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"uint256","name":"numShares","type":"uint256"}],"name":"hashLeaf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"merkleRoots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"payoutsPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"alphaFundAddress","type":"address"}],"name":"setAlphaFundAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"newPayoutId","type":"uint256"},{"internalType":"uint256","name":"payoutPerShare","type":"uint256"}],"name":"setPayout","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620013413803806200134183398101604081905262000034916200018a565b6200003f336200007c565b6000805460ff60a01b1916905560018055600280546001600160a01b0319166001600160a01b03831617905562000075620000cc565b50620001bc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620000d66200012f565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620001123390565b6040516001600160a01b03909116815260200160405180910390a1565b62000143600054600160a01b900460ff1690565b15620001885760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b565b6000602082840312156200019d57600080fd5b81516001600160a01b0381168114620001b557600080fd5b9392505050565b61117580620001cc6000396000f3fe60806040526004361061012d5760003560e01c80637a5132dc116100a5578063b3904c5911610074578063c48a373511610059578063c48a373514610362578063e454fa7d14610375578063f2fde38b1461039757600080fd5b8063b3904c591461031a578063bb26acb51461034257600080fd5b80637a5132dc146102a75780638456cb59146102c75780638da5cb5b146102dc578063a9431fe3146102fa57600080fd5b80633764358c116100fc5780635c975abb116100e15780635c975abb14610246578063715018a61461026557806371c5ecb11461027a57600080fd5b80633764358c146101f65780633f4ba83a1461023157600080fd5b8063120aa877146101395780632c7c615c146101895780632e1a7d4d146101c15780633725ee80146101e357600080fd5b3661013457005b600080fd5b34801561014557600080fd5b50610174610154366004610eb6565b600560209081526000928352604080842090915290825290205460ff1681565b60405190151581526020015b60405180910390f35b34801561019557600080fd5b506002546101a9906001600160a01b031681565b6040516001600160a01b039091168152602001610180565b3480156101cd57600080fd5b506101e16101dc366004610ee2565b6103b7565b005b6101e16101f1366004610f47565b6103cc565b34801561020257600080fd5b50610223610211366004610ee2565b60046020526000908152604090205481565b604051908152602001610180565b34801561023d57600080fd5b506101e16105e0565b34801561025257600080fd5b50600054600160a01b900460ff16610174565b34801561027157600080fd5b506101e16105f2565b34801561028657600080fd5b50610223610295366004610ee2565b60036020526000908152604090205481565b3480156102b357600080fd5b506101e16102c2366004610fc2565b610604565b3480156102d357600080fd5b506101e161063b565b3480156102e857600080fd5b506000546001600160a01b03166101a9565b34801561030657600080fd5b506101e1610315366004610fdd565b61064b565b34801561032657600080fd5b506101a973163a7af239b409e79a32fc6b437fda51dd8fa5f081565b34801561034e57600080fd5b5061022361035d366004611045565b6106fd565b6101e161037036600461106f565b610758565b34801561038157600080fd5b506101a96d76a84fef008cdabe6409d2fe638b81565b3480156103a357600080fd5b506101e16103b2366004610fc2565b61077f565b6103bf610811565b6103c9338261086b565b50565b6103d4610989565b6103dc6109e2565b85851115610416576040517ff15ed21400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006104258888868686610a3c565b6000898152600460205260408120549192509034906104459089906110b1565b61044f91906110c8565b6002546040517f09077f46000000000000000000000000000000000000000000000000000000008152600481018990523360248201529192506001600160a01b0316906309077f469083906044016000604051808303818588803b1580156104b657600080fd5b505af11580156104ca573d6000803e3d6000fd5b5050604080513381526001600160a01b03871660208201529081018b9052606081018a9052608081018d905260a081018590527ffea3a7eea08a7b2f6aac998b2d1922198aa3b7c86b16e597d739596fb6683d3e935060c001915061052c9050565b60405180910390a1868811156105cc576000610548888a6110db565b60008b815260046020526040812054919250906105669083906110b1565b9050610572338261086b565b604080513381526001600160a01b0386166020820152908101839052606081018c9052608081018290527fa5007f5b0d87c06f3c8feb5b31046a5efedd67f0e5075e50f6b4ac915426da4f9060a00160405180910390a150505b50506105d760018055565b50505050505050565b6105e8610811565b6105f0610cb7565b565b6105fa610811565b6105f06000610d0c565b61060c610811565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610643610811565b6105f0610d69565b610653610989565b61065b6109e2565b600061066a8686868686610a3c565b600087815260046020526040812054919250906106889087906110b1565b9050610694338261086b565b604080513381526001600160a01b038416602082015290810187905260608101889052608081018290527fa5007f5b0d87c06f3c8feb5b31046a5efedd67f0e5075e50f6b4ac915426da4f9060a00160405180910390a150506106f660018055565b5050505050565b604080516001600160a01b038416602082015290810182905260009060600160408051601f19818403018152828252805160209182012090830152016040516020818303038152906040528051906020012090505b92915050565b610760610811565b6000918252600360209081526040808420949094556004905291902055565b610787610811565b6001600160a01b0381166108085760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6103c981610d0c565b6000546001600160a01b031633146105f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107ff565b804710156108bb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016107ff565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610908576040519150601f19603f3d011682016040523d82523d6000602084013e61090d565b606091505b50509050806109845760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016107ff565b505050565b6002600154036109db5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107ff565b6002600155565b600054600160a01b900460ff16156105f05760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016107ff565b60008581526003602052604081205433908203610a88576040517fdda4966b000000000000000000000000000000000000000000000000000000008152600481018890526024016107ff565b6001600160a01b03851615610b98576040517f90c9a2d00000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b038616602482015273163a7af239b409e79a32fc6b437fda51dd8fa5f060448201526000906d76a84fef008cdabe6409d2fe638b906390c9a2d090606401602060405180830381865afa158015610b25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4991906110ee565b905080610b93576040517fe28437680000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03871660248201526044016107ff565b859150505b60008781526005602090815260408083206001600160a01b038516845290915290205460ff1615610bf5576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c4984848080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508c8152600360205260409020549250610c4491508590508a6106fd565b610dac565b610c7f576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008781526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055905095945050505050565b610cbf610dc2565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610d716109e2565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610cef3390565b600082610db98584610e1b565b14949350505050565b600054600160a01b900460ff166105f05760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016107ff565b600081815b8451811015610e6057610e4c82868381518110610e3f57610e3f611110565b6020026020010151610e68565b915080610e5881611126565b915050610e20565b509392505050565b6000818310610e84576000828152602084905260409020610e93565b60008381526020839052604090205b9392505050565b80356001600160a01b0381168114610eb157600080fd5b919050565b60008060408385031215610ec957600080fd5b82359150610ed960208401610e9a565b90509250929050565b600060208284031215610ef457600080fd5b5035919050565b60008083601f840112610f0d57600080fd5b50813567ffffffffffffffff811115610f2557600080fd5b6020830191508360208260051b8501011115610f4057600080fd5b9250929050565b600080600080600080600060c0888a031215610f6257600080fd5b87359650602088013595506040880135945060608801359350610f8760808901610e9a565b925060a088013567ffffffffffffffff811115610fa357600080fd5b610faf8a828b01610efb565b989b979a50959850939692959293505050565b600060208284031215610fd457600080fd5b610e9382610e9a565b600080600080600060808688031215610ff557600080fd5b853594506020860135935061100c60408701610e9a565b9250606086013567ffffffffffffffff81111561102857600080fd5b61103488828901610efb565b969995985093965092949392505050565b6000806040838503121561105857600080fd5b61106183610e9a565b946020939093013593505050565b60008060006060848603121561108457600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107525761075261109b565b808201808211156107525761075261109b565b818103818111156107525761075261109b565b60006020828403121561110057600080fd5b81518015158114610e9357600080fd5b634e487b7160e01b600052603260045260246000fd5b6000600182016111385761113861109b565b506001019056fea2646970667358221220bb8b3fa1fc12bb6fd028e1606ceba03227d5b0493df759fbd6c19afcf309baf264736f6c634300081300330000000000000000000000002d5c308d62338d977f6223162a8951672e60562f

Deployed Bytecode

0x60806040526004361061012d5760003560e01c80637a5132dc116100a5578063b3904c5911610074578063c48a373511610059578063c48a373514610362578063e454fa7d14610375578063f2fde38b1461039757600080fd5b8063b3904c591461031a578063bb26acb51461034257600080fd5b80637a5132dc146102a75780638456cb59146102c75780638da5cb5b146102dc578063a9431fe3146102fa57600080fd5b80633764358c116100fc5780635c975abb116100e15780635c975abb14610246578063715018a61461026557806371c5ecb11461027a57600080fd5b80633764358c146101f65780633f4ba83a1461023157600080fd5b8063120aa877146101395780632c7c615c146101895780632e1a7d4d146101c15780633725ee80146101e357600080fd5b3661013457005b600080fd5b34801561014557600080fd5b50610174610154366004610eb6565b600560209081526000928352604080842090915290825290205460ff1681565b60405190151581526020015b60405180910390f35b34801561019557600080fd5b506002546101a9906001600160a01b031681565b6040516001600160a01b039091168152602001610180565b3480156101cd57600080fd5b506101e16101dc366004610ee2565b6103b7565b005b6101e16101f1366004610f47565b6103cc565b34801561020257600080fd5b50610223610211366004610ee2565b60046020526000908152604090205481565b604051908152602001610180565b34801561023d57600080fd5b506101e16105e0565b34801561025257600080fd5b50600054600160a01b900460ff16610174565b34801561027157600080fd5b506101e16105f2565b34801561028657600080fd5b50610223610295366004610ee2565b60036020526000908152604090205481565b3480156102b357600080fd5b506101e16102c2366004610fc2565b610604565b3480156102d357600080fd5b506101e161063b565b3480156102e857600080fd5b506000546001600160a01b03166101a9565b34801561030657600080fd5b506101e1610315366004610fdd565b61064b565b34801561032657600080fd5b506101a973163a7af239b409e79a32fc6b437fda51dd8fa5f081565b34801561034e57600080fd5b5061022361035d366004611045565b6106fd565b6101e161037036600461106f565b610758565b34801561038157600080fd5b506101a96d76a84fef008cdabe6409d2fe638b81565b3480156103a357600080fd5b506101e16103b2366004610fc2565b61077f565b6103bf610811565b6103c9338261086b565b50565b6103d4610989565b6103dc6109e2565b85851115610416576040517ff15ed21400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006104258888868686610a3c565b6000898152600460205260408120549192509034906104459089906110b1565b61044f91906110c8565b6002546040517f09077f46000000000000000000000000000000000000000000000000000000008152600481018990523360248201529192506001600160a01b0316906309077f469083906044016000604051808303818588803b1580156104b657600080fd5b505af11580156104ca573d6000803e3d6000fd5b5050604080513381526001600160a01b03871660208201529081018b9052606081018a9052608081018d905260a081018590527ffea3a7eea08a7b2f6aac998b2d1922198aa3b7c86b16e597d739596fb6683d3e935060c001915061052c9050565b60405180910390a1868811156105cc576000610548888a6110db565b60008b815260046020526040812054919250906105669083906110b1565b9050610572338261086b565b604080513381526001600160a01b0386166020820152908101839052606081018c9052608081018290527fa5007f5b0d87c06f3c8feb5b31046a5efedd67f0e5075e50f6b4ac915426da4f9060a00160405180910390a150505b50506105d760018055565b50505050505050565b6105e8610811565b6105f0610cb7565b565b6105fa610811565b6105f06000610d0c565b61060c610811565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610643610811565b6105f0610d69565b610653610989565b61065b6109e2565b600061066a8686868686610a3c565b600087815260046020526040812054919250906106889087906110b1565b9050610694338261086b565b604080513381526001600160a01b038416602082015290810187905260608101889052608081018290527fa5007f5b0d87c06f3c8feb5b31046a5efedd67f0e5075e50f6b4ac915426da4f9060a00160405180910390a150506106f660018055565b5050505050565b604080516001600160a01b038416602082015290810182905260009060600160408051601f19818403018152828252805160209182012090830152016040516020818303038152906040528051906020012090505b92915050565b610760610811565b6000918252600360209081526040808420949094556004905291902055565b610787610811565b6001600160a01b0381166108085760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6103c981610d0c565b6000546001600160a01b031633146105f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107ff565b804710156108bb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016107ff565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610908576040519150601f19603f3d011682016040523d82523d6000602084013e61090d565b606091505b50509050806109845760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016107ff565b505050565b6002600154036109db5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107ff565b6002600155565b600054600160a01b900460ff16156105f05760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016107ff565b60008581526003602052604081205433908203610a88576040517fdda4966b000000000000000000000000000000000000000000000000000000008152600481018890526024016107ff565b6001600160a01b03851615610b98576040517f90c9a2d00000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b038616602482015273163a7af239b409e79a32fc6b437fda51dd8fa5f060448201526000906d76a84fef008cdabe6409d2fe638b906390c9a2d090606401602060405180830381865afa158015610b25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4991906110ee565b905080610b93576040517fe28437680000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03871660248201526044016107ff565b859150505b60008781526005602090815260408083206001600160a01b038516845290915290205460ff1615610bf5576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c4984848080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508c8152600360205260409020549250610c4491508590508a6106fd565b610dac565b610c7f576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008781526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055905095945050505050565b610cbf610dc2565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610d716109e2565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610cef3390565b600082610db98584610e1b565b14949350505050565b600054600160a01b900460ff166105f05760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016107ff565b600081815b8451811015610e6057610e4c82868381518110610e3f57610e3f611110565b6020026020010151610e68565b915080610e5881611126565b915050610e20565b509392505050565b6000818310610e84576000828152602084905260409020610e93565b60008381526020839052604090205b9392505050565b80356001600160a01b0381168114610eb157600080fd5b919050565b60008060408385031215610ec957600080fd5b82359150610ed960208401610e9a565b90509250929050565b600060208284031215610ef457600080fd5b5035919050565b60008083601f840112610f0d57600080fd5b50813567ffffffffffffffff811115610f2557600080fd5b6020830191508360208260051b8501011115610f4057600080fd5b9250929050565b600080600080600080600060c0888a031215610f6257600080fd5b87359650602088013595506040880135945060608801359350610f8760808901610e9a565b925060a088013567ffffffffffffffff811115610fa357600080fd5b610faf8a828b01610efb565b989b979a50959850939692959293505050565b600060208284031215610fd457600080fd5b610e9382610e9a565b600080600080600060808688031215610ff557600080fd5b853594506020860135935061100c60408701610e9a565b9250606086013567ffffffffffffffff81111561102857600080fd5b61103488828901610efb565b969995985093965092949392505050565b6000806040838503121561105857600080fd5b61106183610e9a565b946020939093013593505050565b60008060006060848603121561108457600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107525761075261109b565b808201808211156107525761075261109b565b818103818111156107525761075261109b565b60006020828403121561110057600080fd5b81518015158114610e9357600080fd5b634e487b7160e01b600052603260045260246000fd5b6000600182016111385761113861109b565b506001019056fea2646970667358221220bb8b3fa1fc12bb6fd028e1606ceba03227d5b0493df759fbd6c19afcf309baf264736f6c63430008130033

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

0000000000000000000000002d5c308d62338d977f6223162a8951672e60562f

-----Decoded View---------------
Arg [0] : alphaFundAddress (address): 0x2D5c308D62338D977f6223162a8951672e60562f

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002d5c308d62338d977f6223162a8951672e60562f


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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.