ETH Price: $3,446.58 (-0.98%)
Gas: 12 Gwei

Contract

0xe1DAFF363584D936BB567763aF70AF253372ffCE
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Submit And Spons...132660082021-09-21 0:56:291031 days ago1632185789IN
0xe1DAFF36...53372ffCE
0 ETH0.0398983293.31043103
Transfer122809672021-04-21 2:55:581184 days ago1618973758IN
0xe1DAFF36...53372ffCE
60 ETH0.05144102182
Transfer122643912021-04-18 13:39:461186 days ago1618753186IN
0xe1DAFF36...53372ffCE
120 ETH0.04804931170
Transfer122486302021-04-16 3:01:471189 days ago1618542107IN
0xe1DAFF36...53372ffCE
60 ETH0.0322213114
Transfer122485802021-04-16 2:49:031189 days ago1618541343IN
0xe1DAFF36...53372ffCE
60 ETH0.08281439293
Become Member122462872021-04-15 18:25:051189 days ago1618511105IN
0xe1DAFF36...53372ffCE
0 ETH0.0154185865
Transfer121875952021-04-06 17:43:101198 days ago1617730990IN
0xe1DAFF36...53372ffCE
60 ETH0.06042367195
Transfer121875122021-04-06 17:24:361198 days ago1617729876IN
0xe1DAFF36...53372ffCE
120 ETH0.061973200
Transfer121873862021-04-06 16:57:471198 days ago1617728267IN
0xe1DAFF36...53372ffCE
60 ETH0.123946400
Transfer121872802021-04-06 16:30:471198 days ago1617726647IN
0xe1DAFF36...53372ffCE
60 ETH0.06011381194
Transfer121872102021-04-06 16:14:381198 days ago1617725678IN
0xe1DAFF36...53372ffCE
60 ETH0.06073354196
Transfer121871962021-04-06 16:12:381198 days ago1617725558IN
0xe1DAFF36...53372ffCE
60 ETH0.05391651174
Transfer121871872021-04-06 16:09:491198 days ago1617725389IN
0xe1DAFF36...53372ffCE
60 ETH0.05453624176
Transfer121871622021-04-06 16:05:111198 days ago1617725111IN
0xe1DAFF36...53372ffCE
60 ETH0.06042367195
Transfer121871612021-04-06 16:05:051198 days ago1617725105IN
0xe1DAFF36...53372ffCE
240 ETH0.06259273202
Transfer121871582021-04-06 16:04:291198 days ago1617725069IN
0xe1DAFF36...53372ffCE
120 ETH0.0557757180
Transfer121871562021-04-06 16:04:061198 days ago1617725046IN
0xe1DAFF36...53372ffCE
60 ETH0.0557757180
Transfer121871562021-04-06 16:04:061198 days ago1617725046IN
0xe1DAFF36...53372ffCE
60 ETH0.05639543182
Transfer121871562021-04-06 16:04:061198 days ago1617725046IN
0xe1DAFF36...53372ffCE
60 ETH0.05856448189
Transfer121871562021-04-06 16:04:061198 days ago1617725046IN
0xe1DAFF36...53372ffCE
180 ETH0.05856448189
Transfer121871562021-04-06 16:04:061198 days ago1617725046IN
0xe1DAFF36...53372ffCE
60 ETH0.05856448189
Transfer121871562021-04-06 16:04:061198 days ago1617725046IN
0xe1DAFF36...53372ffCE
240 ETH0.06042367195
Transfer121871522021-04-06 16:02:361198 days ago1617724956IN
0xe1DAFF36...53372ffCE
60 ETH0.0681703220
Transfer121871522021-04-06 16:02:361198 days ago1617724956IN
0xe1DAFF36...53372ffCE
60 ETH0.07746625250
Transfer121871512021-04-06 16:02:141198 days ago1617724934IN
0xe1DAFF36...53372ffCE
60 ETH0.061973200
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
122809672021-04-21 2:55:581184 days ago1618973758
0xe1DAFF36...53372ffCE
60 ETH
122643912021-04-18 13:39:461186 days ago1618753186
0xe1DAFF36...53372ffCE
120 ETH
122486302021-04-16 3:01:471189 days ago1618542107
0xe1DAFF36...53372ffCE
60 ETH
122485802021-04-16 2:49:031189 days ago1618541343
0xe1DAFF36...53372ffCE
60 ETH
121875952021-04-06 17:43:101198 days ago1617730990
0xe1DAFF36...53372ffCE
60 ETH
121875122021-04-06 17:24:361198 days ago1617729876
0xe1DAFF36...53372ffCE
120 ETH
121873862021-04-06 16:57:471198 days ago1617728267
0xe1DAFF36...53372ffCE
60 ETH
121872802021-04-06 16:30:471198 days ago1617726647
0xe1DAFF36...53372ffCE
60 ETH
121872102021-04-06 16:14:381198 days ago1617725678
0xe1DAFF36...53372ffCE
60 ETH
121871962021-04-06 16:12:381198 days ago1617725558
0xe1DAFF36...53372ffCE
60 ETH
121871872021-04-06 16:09:491198 days ago1617725389
0xe1DAFF36...53372ffCE
60 ETH
121871712021-04-06 16:06:291198 days ago1617725189
0xe1DAFF36...53372ffCE
60 ETH
121871712021-04-06 16:06:291198 days ago1617725189
0xe1DAFF36...53372ffCE
60 ETH
121871622021-04-06 16:05:111198 days ago1617725111
0xe1DAFF36...53372ffCE
60 ETH
121871612021-04-06 16:05:051198 days ago1617725105
0xe1DAFF36...53372ffCE
240 ETH
121871582021-04-06 16:04:291198 days ago1617725069
0xe1DAFF36...53372ffCE
120 ETH
121871562021-04-06 16:04:061198 days ago1617725046
0xe1DAFF36...53372ffCE
60 ETH
121871562021-04-06 16:04:061198 days ago1617725046
0xe1DAFF36...53372ffCE
60 ETH
121871562021-04-06 16:04:061198 days ago1617725046
0xe1DAFF36...53372ffCE
60 ETH
121871562021-04-06 16:04:061198 days ago1617725046
0xe1DAFF36...53372ffCE
180 ETH
121871562021-04-06 16:04:061198 days ago1617725046
0xe1DAFF36...53372ffCE
60 ETH
121871562021-04-06 16:04:061198 days ago1617725046
0xe1DAFF36...53372ffCE
240 ETH
121871522021-04-06 16:02:361198 days ago1617724956
0xe1DAFF36...53372ffCE
60 ETH
121871522021-04-06 16:02:361198 days ago1617724956
0xe1DAFF36...53372ffCE
60 ETH
121871512021-04-06 16:02:141198 days ago1617724934
0xe1DAFF36...53372ffCE
60 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EasyApply

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-03-15
*/

pragma solidity ^0.7.0;
/*
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
    INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
    DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
    ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    © 2021 Neptune DAO, LLC

     Submitted for verification at Etherscan.io on 2021-03-15
    Contract Address =  0xA3CF824160E5eC3dCcCcB44c2552eEe45A44AaEb (block 12042360) 
*/

// SPDX-License-Identifier: MIT

library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {

        require(b > 0);
        uint256 c = a / b;

        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;

        return c;
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }
}

interface IERC20 {
    function transfer(address to, uint256 value) external returns (bool);

    function approve(address spender, uint256 value) external returns (bool);

    function transferFrom(address from, address to, uint256 value) external returns (bool);

    function totalSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);
    
    function deposit() external payable;
    function withdraw(uint wad) external;

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);
}

/**
 * @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].
 *
 * _Since v2.5.0:_ this module is now much more gas efficient, given net gas
 * metering changes introduced in the Istanbul hardfork.
 */
 /*
 * @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 GSN 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 returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _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 onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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 onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

abstract contract ReentrancyGuard {
    bool private _notEntered;

    constructor () {
        // Storing an initial 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 percetange 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.
        _notEntered = true;
    }

    /**
     * @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 make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_notEntered, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _notEntered = false;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _notEntered = true;
    }
}

contract LAO is ReentrancyGuard, Ownable {
    using SafeMath for uint256;

    /***************
    GLOBAL CONSTANTS
    ***************/
    uint256 public periodDuration; // default = 17280 = 4.8 hours in seconds (5 periods per day)
    uint256 public votingPeriodLength; // default = 35 periods (7 days)
    uint256 public gracePeriodLength; // default = 35 periods (7 days)
    uint256 public proposalDeposit; // default = 10 ETH (~$1,000 worth of ETH at contract deployment)
    uint256 public dilutionBound; // default = 3 - maximum multiplier a YES voter will be obligated to pay in case of mass ragequit
    uint256 public processingReward; // default = 0.1 - amount of ETH to give to whoever processes a proposal
    uint256 public summoningTime; // needed to determine the current period

    address public depositToken; // deposit token contract reference; default = wETH
    /******
     AdminFee - LAO exclusive, add on to original Moloch
     *********/
    uint256 constant paymentPeriod = 90 days; //90 days; - 1 day is for test only!
    uint256 public lastPaymentTime; //this will set as 'now' in construtor = summoningTime;
    address public laoFundAddress; //This field MUST be set in constructor or set to default to summoner here.
    uint256 public adminFeeDenominator = 200; //initial denominator
   
    // HARD-CODED LIMITS
    // These numbers are quite arbitrary; they are small enough to avoid overflows when doing calculations
    // with periods or shares, yet big enough to not limit reasonable use cases.
    uint256 constant MAX_VOTING_PERIOD_LENGTH = 10**18; // maximum length of voting period
    uint256 constant MAX_GRACE_PERIOD_LENGTH = 10**18; // maximum length of grace period
    uint256 constant MAX_DILUTION_BOUND = 10**18; // maximum dilution bound
    uint256 constant MAX_NUMBER_OF_SHARES_AND_LOOT = 10**18; // maximum number of shares that can be minted
    uint256 constant MAX_TOKEN_WHITELIST_COUNT = 200; // maximum number of whitelisted tokens, default is 400
    uint256 constant MAX_TOKEN_GUILDBANK_COUNT = 100; // maximum number of tokens with non-zero balance in guildbank, default is 200

    // ***************
    // EVENTS
    // ***************
    event SummonComplete(address indexed summoner, address[] tokens, uint256 summoningTime, uint256 periodDuration, uint256 votingPeriodLength, uint256 gracePeriodLength, uint256 proposalDeposit, uint256 dilutionBound, uint256 processingReward);
    event SubmitProposal(address indexed applicant, uint256 sharesRequested, uint256 lootRequested, uint256 tributeOffered, address tributeToken, uint256 paymentRequested, address paymentToken, string details, bool[6] flags, uint256 proposalId, address indexed delegateKey, address indexed memberAddress);
    event SponsorProposal(address indexed delegateKey, address indexed memberAddress, uint256 proposalId, uint256 proposalIndex, uint256 startingPeriod);
    event SubmitVote(uint256 proposalId, uint256 indexed proposalIndex, address indexed delegateKey, address indexed memberAddress, uint8 uintVote);
    event ProcessProposal(uint256 indexed proposalIndex, uint256 indexed proposalId, bool didPass);
    event ProcessWhitelistProposal(uint256 indexed proposalIndex, uint256 indexed proposalId, bool didPass);
    event ProcessGuildKickProposal(uint256 indexed proposalIndex, uint256 indexed proposalId, bool didPass);
    event Ragequit(address indexed memberAddress, uint256 sharesToBurn, uint256 lootToBurn);
    event TokensCollected(address indexed token, uint256 amountToCollect);
    event CancelProposal(uint256 indexed proposalId, address applicantAddress);
    event UpdateDelegateKey(address indexed memberAddress, address newDelegateKey);
    event Withdraw(address indexed memberAddress, address token, uint256 amount);

    // *******************
    // INTERNAL ACCOUNTING
    // *******************
    uint256 public proposalCount = 0; // total proposals submitted
    uint256 public totalShares = 0; // total shares across all members
    uint256 public totalLoot = 0; // total loot across all members

    uint256 public totalGuildBankTokens = 0; // total tokens with non-zero balance in guild bank

    address public constant GUILD = address(0xdead);
    address public constant ESCROW = address(0xbeef);
    address public constant TOTAL = address(0xbabe);
    mapping (address => mapping(address => uint256)) public userTokenBalances; // userTokenBalances[userAddress][tokenAddress]

    enum Vote {
        Null, // default value, counted as abstention
        Yes,
        No
    }

    struct Member {
        address delegateKey; // the key responsible for submitting proposals and voting - defaults to member address unless updated
        uint256 shares; // the # of voting shares assigned to this member
        uint256 loot; // the loot amount available to this member (combined with shares on ragequit)
        bool exists; // always true once a member has been created
        uint256 highestIndexYesVote; // highest proposal index # on which the member voted YES
        uint256 jailed; // set to proposalIndex of a passing guild kick proposal for this member, prevents voting on and sponsoring proposals
    }

    struct Proposal {
        address applicant; // the applicant who wishes to become a member - this key will be used for withdrawals (doubles as guild kick target for gkick proposals)
        address proposer; // the account that submitted the proposal (can be non-member)
        address sponsor; // the member that sponsored the proposal (moving it into the queue)
        uint256 sharesRequested; // the # of shares the applicant is requesting
        uint256 lootRequested; // the amount of loot the applicant is requesting
        uint256 tributeOffered; // amount of tokens offered as tribute
        address tributeToken; // tribute token contract reference
        uint256 paymentRequested; // amount of tokens requested as payment
        address paymentToken; // payment token contract reference
        uint256 startingPeriod; // the period in which voting can start for this proposal
        uint256 yesVotes; // the total number of YES votes for this proposal
        uint256 noVotes; // the total number of NO votes for this proposal
        bool[6] flags; // [sponsored, processed, didPass, cancelled, whitelist, guildkick]
        string details; // proposal details - could be IPFS hash, plaintext, or JSON
        uint256 maxTotalSharesAndLootAtYesVote; // the maximum # of total shares encountered at a yes vote on this proposal
        mapping(address => Vote) votesByMember; // the votes on this proposal by each member
    }

    mapping(address => bool) public tokenWhitelist;
    address[] public approvedTokens;

    mapping(address => bool) public proposedToWhitelist;
    mapping(address => bool) public proposedToKick;

    mapping(address => Member) public members;
    mapping(address => address) public memberAddressByDelegateKey;

    mapping(uint256 => Proposal) public proposals;

    uint256[] public proposalQueue;

    modifier onlyMember {
        require(members[msg.sender].shares > 0 || members[msg.sender].loot > 0, "not a member");
        _;
    }

    modifier onlyShareholder {
        require(members[msg.sender].shares > 0, "not a shareholder");
        _;
    }

    modifier onlyDelegate {
        require(members[memberAddressByDelegateKey[msg.sender]].shares > 0, "not a delegate");
        _;
    }

    constructor(
        address _summoner,
        address[] memory _approvedTokens,
        uint256 _periodDuration,
        uint256 _votingPeriodLength,
        uint256 _gracePeriodLength,
        uint256 _proposalDeposit,
        uint256 _dilutionBound,
        uint256 _processingReward,
        address _laoFundAddress
    ) {
        require(_summoner != address(0), "summoner cannot be 0");
        require(_periodDuration > 0, "_periodDuration cannot be 0");
        require(_votingPeriodLength > 0, "_votingPeriodLength cannot be 0");
        require(_votingPeriodLength <= MAX_VOTING_PERIOD_LENGTH, "_votingPeriodLength exceeds limit");
        require(_gracePeriodLength <= MAX_GRACE_PERIOD_LENGTH, "_gracePeriodLength exceeds limit");
        require(_dilutionBound > 0, "_dilutionBound cannot be 0");
        require(_dilutionBound <= MAX_DILUTION_BOUND, "_dilutionBound exceeds limit");
        require(_approvedTokens.length > 0, "need at least one approved token");
        require(_approvedTokens.length <= MAX_TOKEN_WHITELIST_COUNT, "too many tokens");
        require(_proposalDeposit >= _processingReward, "_proposalDeposit cannot be smaller than _processingReward");
        require(_laoFundAddress != address(0), "laoFundAddress cannot be 0");
        depositToken = _approvedTokens[0];
        // NOTE: move event up here, avoid stack too deep if too many approved tokens
        emit SummonComplete(_summoner, _approvedTokens, block.timestamp, _periodDuration, _votingPeriodLength, _gracePeriodLength, _proposalDeposit, _dilutionBound, _processingReward);


        for (uint256 i = 0; i < _approvedTokens.length; i++) {
            require(_approvedTokens[i] != address(0), "_approvedToken cannot be 0");
            require(!tokenWhitelist[_approvedTokens[i]], "duplicate approved token");
            tokenWhitelist[_approvedTokens[i]] = true;
            approvedTokens.push(_approvedTokens[i]);
        }

        periodDuration = _periodDuration;
        votingPeriodLength = _votingPeriodLength;
        gracePeriodLength = _gracePeriodLength;
        proposalDeposit = _proposalDeposit;
        dilutionBound = _dilutionBound;
        processingReward = _processingReward;

        summoningTime = block.timestamp;
        laoFundAddress = _laoFundAddress; //LAO add on for adminFee
        lastPaymentTime = block.timestamp;  //LAO add on adminFee
        members[_summoner] = Member(_summoner, 1, 0, true, 0, 0);
        memberAddressByDelegateKey[_summoner] = _summoner;
        totalShares = 1;
       
    }
    
    /*******

    ADMIN FEE FUNCTION 
    -- LAO add on functions to MOLCOH
    setAdminFee can only be changed by Owner
    withdrawAdminFee can by be called by any ETH address

    ******/
    
    // @dev Owner can change amount of adminFee and direction of funds 
    // @param adminFeeDenoimnator must be >= 200. Greater than 200, will equal 0.5% or less of assets.  
    //@param laoFundAddress - where the Owner wants the funds to go. 

    function setAdminFee (uint256 _adminFeeDenominator, address _laoFundAddress) public nonReentrant onlyOwner{
        require(_adminFeeDenominator >= 200); 
        adminFeeDenominator = _adminFeeDenominator; 
        laoFundAddress = _laoFundAddress;
    } //end of setAdminFee
    
    //can be called by an ETH Address
    function withdrawAdminFee () public nonReentrant {
        require (block.timestamp >= lastPaymentTime.add(paymentPeriod), "90 days have not passed since last withdrawal");
        lastPaymentTime = lastPaymentTime.add(paymentPeriod); //set it to the next payment period. 
        //local variables to save gas by reading from storage only 1x
        uint256 denominator = adminFeeDenominator; 
        address recipient = laoFundAddress;
        
        for (uint256 i = 0; i < approvedTokens.length; i++) {
            address token = approvedTokens[i];
            uint256 amount = userTokenBalances[GUILD][token] / denominator;
            if (amount > 0) { // otherwise skip for efficiency, only tokens with a balance
               userTokenBalances[GUILD][token] -= amount;
               userTokenBalances[recipient][token] += amount;
            }
        } 
        // Remove Event emit WithdrawAdminFee(laoFundAddress,token, amount);
    } //end of withdrawAdminFee
    
    /*****************
    PROPOSAL FUNCTIONS
    *****************/
    function submitProposal(
        address applicant,
        uint256 sharesRequested,
        uint256 lootRequested,
        uint256 tributeOffered,
        address tributeToken,
        uint256 paymentRequested,
        address paymentToken,
        string memory details
    ) public nonReentrant returns (uint256 proposalId) {
        require(sharesRequested.add(lootRequested) <= MAX_NUMBER_OF_SHARES_AND_LOOT, "too many shares requested");
        require(tokenWhitelist[tributeToken], "tributeToken is not whitelisted");
        require(tokenWhitelist[paymentToken], "payment is not whitelisted");
        require(applicant != address(0), "applicant cannot be 0");
        require(applicant != GUILD && applicant != ESCROW && applicant != TOTAL, "applicant address cannot be reserved");
        require(members[applicant].jailed == 0, "proposal applicant must not be jailed");

        if (tributeOffered > 0 && userTokenBalances[GUILD][tributeToken] == 0) {
            require(totalGuildBankTokens < MAX_TOKEN_GUILDBANK_COUNT, 'cannot submit more tribute proposals for new tokens - guildbank is full');
        }

        // collect tribute from proposer and store it in the Moloch until the proposal is processed
        require(IERC20(tributeToken).transferFrom(msg.sender, address(this), tributeOffered), "tribute token transfer failed");
        unsafeAddToBalance(ESCROW, tributeToken, tributeOffered);

        bool[6] memory flags; // [sponsored, processed, didPass, cancelled, whitelist, guildkick]

        _submitProposal(applicant, sharesRequested, lootRequested, tributeOffered, tributeToken, paymentRequested, paymentToken, details, flags);
        return proposalCount - 1; // return proposalId - contracts calling submit might want it
    }

    function submitWhitelistProposal(address tokenToWhitelist, string memory details) public nonReentrant returns (uint256 proposalId) {
        require(tokenToWhitelist != address(0), "must provide token address");
        require(!tokenWhitelist[tokenToWhitelist], "cannot already have whitelisted the token");
        require(approvedTokens.length < MAX_TOKEN_WHITELIST_COUNT, "cannot submit more whitelist proposals");

        bool[6] memory flags; // [sponsored, processed, didPass, cancelled, whitelist, guildkick]
        flags[4] = true; // whitelist

        _submitProposal(address(0), 0, 0, 0, tokenToWhitelist, 0, address(0), details, flags);
        return proposalCount - 1;
    }

    function submitGuildKickProposal(address memberToKick, string memory details) public nonReentrant returns (uint256 proposalId) {
        Member memory member = members[memberToKick];

        require(member.shares > 0 || member.loot > 0, "member must have at least one share or one loot");
        require(members[memberToKick].jailed == 0, "member must not already be jailed");

        bool[6] memory flags; // [sponsored, processed, didPass, cancelled, whitelist, guildkick]
        flags[5] = true; // guild kick

        _submitProposal(memberToKick, 0, 0, 0, address(0), 0, address(0), details, flags);
        return proposalCount - 1;
    }

    function _submitProposal(
        address applicant,
        uint256 sharesRequested,
        uint256 lootRequested,
        uint256 tributeOffered,
        address tributeToken,
        uint256 paymentRequested,
        address paymentToken,
        string memory details,
        bool[6] memory flags
    ) internal {
        Proposal storage proposal = proposals[proposalCount];
        proposal.applicant = applicant; 
        proposal.proposer = msg.sender;
        proposal.sponsor = address(0);
        proposal.sharesRequested = sharesRequested;
        proposal.lootRequested = lootRequested;
        proposal.tributeOffered = tributeOffered;
        proposal.tributeToken = tributeToken;
        proposal.paymentRequested = paymentRequested;
        proposal.paymentToken = paymentToken;
        proposal.startingPeriod = 0;
        proposal.yesVotes = 0;
        proposal.noVotes = 0;
        proposal.flags = flags;
        proposal.details = details;
        proposal.maxTotalSharesAndLootAtYesVote = 0;

        address memberAddress = memberAddressByDelegateKey[msg.sender];
        // NOTE: argument order matters, avoid stack too deep
        emit SubmitProposal(applicant, sharesRequested, lootRequested, tributeOffered, tributeToken, paymentRequested, paymentToken, details, flags, proposalCount, msg.sender, memberAddress);
        proposalCount += 1;
    }

    function sponsorProposal(uint256 proposalId) public nonReentrant onlyDelegate {
        // collect proposal deposit from sponsor and store it in the Moloch until the proposal is processed
        require(IERC20(depositToken).transferFrom(msg.sender, address(this), proposalDeposit), "proposal deposit token transfer failed");
        unsafeAddToBalance(ESCROW, depositToken, proposalDeposit);

        Proposal storage proposal = proposals[proposalId];

        require(proposal.proposer != address(0), 'proposal must have been proposed');
        require(!proposal.flags[0], "proposal has already been sponsored");
        require(!proposal.flags[3], "proposal has been cancelled");
        require(members[proposal.applicant].jailed == 0, "proposal applicant must not be jailed");

        if (proposal.tributeOffered > 0 && userTokenBalances[GUILD][proposal.tributeToken] == 0) {
            require(totalGuildBankTokens < MAX_TOKEN_GUILDBANK_COUNT, 'cannot sponsor more tribute proposals for new tokens - guildbank is full');
        }

        // whitelist proposal
        if (proposal.flags[4]) {
            require(!tokenWhitelist[address(proposal.tributeToken)], "cannot already have whitelisted the token");
            require(!proposedToWhitelist[address(proposal.tributeToken)], 'already proposed to whitelist');
            require(approvedTokens.length < MAX_TOKEN_WHITELIST_COUNT, "cannot sponsor more whitelist proposals");
            proposedToWhitelist[address(proposal.tributeToken)] = true;

        // guild kick proposal
        } else if (proposal.flags[5]) {
            require(!proposedToKick[proposal.applicant], 'already proposed to kick');
            proposedToKick[proposal.applicant] = true;
        }

        // compute startingPeriod for proposal
        uint256 startingPeriod = max(
            getCurrentPeriod(),
            proposalQueue.length == 0 ? 0 : proposals[proposalQueue[proposalQueue.length.sub(1)]].startingPeriod
        ).add(1);

        proposal.startingPeriod = startingPeriod;

        address memberAddress = memberAddressByDelegateKey[msg.sender];
        proposal.sponsor = memberAddress;

        proposal.flags[0] = true; // sponsored

        // append proposal to the queue
        proposalQueue.push(proposalId);
        
        emit SponsorProposal(msg.sender, memberAddress, proposalId, proposalQueue.length.sub(1), startingPeriod);
    }

    // NOTE: In MolochV2 proposalIndex !== proposalId
    function submitVote(uint256 proposalIndex, uint8 uintVote) public nonReentrant onlyDelegate {
        address memberAddress = memberAddressByDelegateKey[msg.sender];
        Member storage member = members[memberAddress];

        require(proposalIndex < proposalQueue.length, "proposal does not exist");
        Proposal storage proposal = proposals[proposalQueue[proposalIndex]];

        require(uintVote < 3, "must be less than 3");
        Vote vote = Vote(uintVote);

        require(getCurrentPeriod() >= proposal.startingPeriod, "voting period has not started");
        require(!hasVotingPeriodExpired(proposal.startingPeriod), "proposal voting period has expired");
        require(proposal.votesByMember[memberAddress] == Vote.Null, "member has already voted");
        require(vote == Vote.Yes || vote == Vote.No, "vote must be either Yes or No");

        proposal.votesByMember[memberAddress] = vote;

        if (vote == Vote.Yes) {
            proposal.yesVotes = proposal.yesVotes.add(member.shares);

            // set highest index (latest) yes vote - must be processed for member to ragequit
            if (proposalIndex > member.highestIndexYesVote) {
                member.highestIndexYesVote = proposalIndex;
            }

            // set maximum of total shares encountered at a yes vote - used to bound dilution for yes voters
            if (totalShares.add(totalLoot) > proposal.maxTotalSharesAndLootAtYesVote) {
                proposal.maxTotalSharesAndLootAtYesVote = totalShares.add(totalLoot);
            }

        } else if (vote == Vote.No) {
            proposal.noVotes = proposal.noVotes.add(member.shares);
        }
     
        // NOTE: subgraph indexes by proposalId not proposalIndex since proposalIndex isn't set untill it's been sponsored but proposal is created on submission
        emit SubmitVote(proposalQueue[proposalIndex], proposalIndex, msg.sender, memberAddress, uintVote);
    }

    function processProposal(uint256 proposalIndex) public nonReentrant {
        _validateProposalForProcessing(proposalIndex);

        uint256 proposalId = proposalQueue[proposalIndex];
        Proposal storage proposal = proposals[proposalId];

        require(!proposal.flags[4] && !proposal.flags[5], "must be a standard proposal");

        proposal.flags[1] = true; // processed

        bool didPass = _didPass(proposalIndex);

        // Make the proposal fail if the new total number of shares and loot exceeds the limit
        if (totalShares.add(totalLoot).add(proposal.sharesRequested).add(proposal.lootRequested) > MAX_NUMBER_OF_SHARES_AND_LOOT) {
            didPass = false;
        }

        // Make the proposal fail if it is requesting more tokens as payment than the available guild bank balance
        if (proposal.paymentRequested > userTokenBalances[GUILD][proposal.paymentToken]) {
            didPass = false;
        }

        // Make the proposal fail if it would result in too many tokens with non-zero balance in guild bank
        if (proposal.tributeOffered > 0 && userTokenBalances[GUILD][proposal.tributeToken] == 0 && totalGuildBankTokens >= MAX_TOKEN_GUILDBANK_COUNT) {
           didPass = false;
        }

        // PROPOSAL PASSED
        if (didPass) {
            proposal.flags[2] = true; // didPass

            // if the applicant is already a member, add to their existing shares & loot
            if (members[proposal.applicant].exists) {
                members[proposal.applicant].shares = members[proposal.applicant].shares.add(proposal.sharesRequested);
                members[proposal.applicant].loot = members[proposal.applicant].loot.add(proposal.lootRequested);

            // the applicant is a new member, create a new record for them
            } else {
                // if the applicant address is already taken by a member's delegateKey, reset it to their member address
                if (members[memberAddressByDelegateKey[proposal.applicant]].exists) {
                    address memberToOverride = memberAddressByDelegateKey[proposal.applicant];
                    memberAddressByDelegateKey[memberToOverride] = memberToOverride;
                    members[memberToOverride].delegateKey = memberToOverride;
                }

                // use applicant address as delegateKey by default
                members[proposal.applicant] = Member(proposal.applicant, proposal.sharesRequested, proposal.lootRequested, true, 0, 0);
                memberAddressByDelegateKey[proposal.applicant] = proposal.applicant;
            }

            // mint new shares & loot
            totalShares = totalShares.add(proposal.sharesRequested);
            totalLoot = totalLoot.add(proposal.lootRequested);

            // if the proposal tribute is the first tokens of its kind to make it into the guild bank, increment total guild bank tokens
            if (userTokenBalances[GUILD][proposal.tributeToken] == 0 && proposal.tributeOffered > 0) {
                totalGuildBankTokens += 1;
            }

            unsafeInternalTransfer(ESCROW, GUILD, proposal.tributeToken, proposal.tributeOffered);
            unsafeInternalTransfer(GUILD, proposal.applicant, proposal.paymentToken, proposal.paymentRequested);

            // if the proposal spends 100% of guild bank balance for a token, decrement total guild bank tokens
            if (userTokenBalances[GUILD][proposal.paymentToken] == 0 && proposal.paymentRequested > 0) {
                totalGuildBankTokens -= 1;
            }

        // PROPOSAL FAILED
        } else {
            // return all tokens to the proposer (not the applicant, because funds come from proposer)
            unsafeInternalTransfer(ESCROW, proposal.proposer, proposal.tributeToken, proposal.tributeOffered);
        }

        _returnDeposit(proposal.sponsor);

        emit ProcessProposal(proposalIndex, proposalId, didPass);
    }

    function processWhitelistProposal(uint256 proposalIndex) public nonReentrant {
        _validateProposalForProcessing(proposalIndex);

        uint256 proposalId = proposalQueue[proposalIndex];
        Proposal storage proposal = proposals[proposalId];

        require(proposal.flags[4], "must be a whitelist proposal");

        proposal.flags[1] = true; // processed

        bool didPass = _didPass(proposalIndex);

        if (approvedTokens.length >= MAX_TOKEN_WHITELIST_COUNT) {
            didPass = false;
        }

        if (didPass) {
            proposal.flags[2] = true; // didPass

            tokenWhitelist[address(proposal.tributeToken)] = true;
            approvedTokens.push(proposal.tributeToken);
        }

        proposedToWhitelist[address(proposal.tributeToken)] = false;

        _returnDeposit(proposal.sponsor);

        emit ProcessWhitelistProposal(proposalIndex, proposalId, didPass);
    }

    function processGuildKickProposal(uint256 proposalIndex) public nonReentrant {
        _validateProposalForProcessing(proposalIndex);

        uint256 proposalId = proposalQueue[proposalIndex];
        Proposal storage proposal = proposals[proposalId];

        require(proposal.flags[5], "must be a guild kick proposal");

        proposal.flags[1] = true; // processed

        bool didPass = _didPass(proposalIndex);

        if (didPass) {
            proposal.flags[2] = true; // didPass
            Member storage member = members[proposal.applicant];
            member.jailed = proposalIndex;

            // transfer shares to loot
            member.loot = member.loot.add(member.shares);
            totalShares = totalShares.sub(member.shares);
            totalLoot = totalLoot.add(member.shares);
            member.shares = 0; // revoke all shares
        }

        proposedToKick[proposal.applicant] = false;

        _returnDeposit(proposal.sponsor);

        emit ProcessGuildKickProposal(proposalIndex, proposalId, didPass);
    }

    function _didPass(uint256 proposalIndex) internal view returns  (bool didPass) {
        Proposal storage proposal = proposals[proposalQueue[proposalIndex]];

        didPass = proposal.yesVotes > proposal.noVotes;

        // Make the proposal fail if the dilutionBound is exceeded
        if ((totalShares.add(totalLoot)).mul(dilutionBound) < proposal.maxTotalSharesAndLootAtYesVote) {
            didPass = false;
        }

        // Make the proposal fail if the applicant is jailed
        // - for standard proposals, we don't want the applicant to get any shares/loot/payment
        // - for guild kick proposals, we should never be able to propose to kick a jailed member (or have two kick proposals active), so it doesn't matter
        if (members[proposal.applicant].jailed != 0) {
            didPass = false;
        }

        return didPass;
    }

    function _validateProposalForProcessing(uint256 proposalIndex) internal view {
        require(proposalIndex < proposalQueue.length, "proposal does not exist");
        Proposal storage proposal = proposals[proposalQueue[proposalIndex]];

        require(getCurrentPeriod() >= proposal.startingPeriod.add(votingPeriodLength).add(gracePeriodLength), "proposal is not ready to be processed");
        require(proposal.flags[1] == false, "proposal has already been processed");
        require(proposalIndex == 0 || proposals[proposalQueue[proposalIndex.sub(1)]].flags[1], "previous proposal must be processed");
    }

    function _returnDeposit(address sponsor) internal {
        unsafeInternalTransfer(ESCROW, msg.sender, depositToken, processingReward);
        unsafeInternalTransfer(ESCROW, sponsor, depositToken, proposalDeposit.sub(processingReward));
    }

    function ragequit(uint256 sharesToBurn, uint256 lootToBurn) public nonReentrant onlyMember {
        _ragequit(msg.sender, sharesToBurn, lootToBurn);
    }

    function _ragequit(address memberAddress, uint256 sharesToBurn, uint256 lootToBurn) internal {
        uint256 initialTotalSharesAndLoot = totalShares.add(totalLoot);

        Member storage member = members[memberAddress];

        require(member.shares >= sharesToBurn, "insufficient shares");
        require(member.loot >= lootToBurn, "insufficient loot");

        require(canRagequit(member.highestIndexYesVote), "cannot ragequit until highest index proposal member voted YES on is processed");

        uint256 sharesAndLootToBurn = sharesToBurn.add(lootToBurn);

        // burn shares and loot
        member.shares = member.shares.sub(sharesToBurn);
        member.loot = member.loot.sub(lootToBurn);
        totalShares = totalShares.sub(sharesToBurn);
        totalLoot = totalLoot.sub(lootToBurn);

        for (uint256 i = 0; i < approvedTokens.length; i++) {
            uint256 amountToRagequit = fairShare(userTokenBalances[GUILD][approvedTokens[i]], sharesAndLootToBurn, initialTotalSharesAndLoot);
            if (amountToRagequit > 0) { // gas optimization to allow a higher maximum token limit
                // deliberately not using safemath here to keep overflows from preventing the function execution (which would break ragekicks)
                // if a token overflows, it is because the supply was artificially inflated to oblivion, so we probably don't care about it anyways
                userTokenBalances[GUILD][approvedTokens[i]] -= amountToRagequit;
                userTokenBalances[memberAddress][approvedTokens[i]] += amountToRagequit;
            }
        }

        emit Ragequit(msg.sender, sharesToBurn, lootToBurn);
    }

    function ragekick(address memberToKick) public nonReentrant {
        Member storage member = members[memberToKick];

        require(member.jailed != 0, "member must be in jail");
        require(member.loot > 0, "member must have some loot"); // note - should be impossible for jailed member to have shares
        require(canRagequit(member.highestIndexYesVote), "cannot ragequit until highest index proposal member voted YES on is processed");

        _ragequit(memberToKick, 0, member.loot);
    }

    function withdrawBalance(address token, uint256 amount) public nonReentrant {
        _withdrawBalance(token, amount);
    }

    function withdrawBalances(address[] memory tokens, uint256[] memory amounts, bool _max) public nonReentrant {
        require(tokens.length == amounts.length, "tokens and amounts arrays must be matching lengths");

        for (uint256 i = 0; i < tokens.length; i++) {
            uint256 withdrawAmount = amounts[i];
            if (_max) { // withdraw the maximum balance
                withdrawAmount = userTokenBalances[msg.sender][tokens[i]];
            }

            _withdrawBalance(tokens[i], withdrawAmount);
        }
    }
    
    function _withdrawBalance(address token, uint256 amount) internal {
        require(userTokenBalances[msg.sender][token] >= amount, "insufficient balance");
        unsafeSubtractFromBalance(msg.sender, token, amount);
        require(IERC20(token).transfer(msg.sender, amount), "transfer failed");
        emit Withdraw(msg.sender, token, amount);
    }

    function collectTokens(address token) public onlyDelegate nonReentrant {
        uint256 amountToCollect = IERC20(token).balanceOf(address(this)).sub(userTokenBalances[TOTAL][token]);
        // only collect if 1) there are tokens to collect 2) token is whitelisted 3) token has non-zero balance
        require(amountToCollect > 0, 'no tokens to collect');
        require(tokenWhitelist[token], 'token to collect must be whitelisted');
        require(userTokenBalances[GUILD][token] > 0, 'token to collect must have non-zero guild bank balance');
        
        unsafeAddToBalance(GUILD, token, amountToCollect);
        emit TokensCollected(token, amountToCollect);
    }

    // NOTE: requires that delegate key which sent the original proposal cancels, msg.sender == proposal.proposer
    function cancelProposal(uint256 proposalId) public nonReentrant {
        Proposal storage proposal = proposals[proposalId];
        require(!proposal.flags[0], "proposal has already been sponsored");
        require(!proposal.flags[3], "proposal has already been cancelled");
        require(msg.sender == proposal.proposer, "solely the proposer can cancel");

        proposal.flags[3] = true; // cancelled
        
        unsafeInternalTransfer(ESCROW, proposal.proposer, proposal.tributeToken, proposal.tributeOffered);
        emit CancelProposal(proposalId, msg.sender);
    }

    function updateDelegateKey(address newDelegateKey) public nonReentrant onlyShareholder {
        require(newDelegateKey != address(0), "newDelegateKey cannot be 0");

        // skip checks if member is setting the delegate key to their member address
        if (newDelegateKey != msg.sender) {
            require(!members[newDelegateKey].exists, "cannot overwrite existing members");
            require(!members[memberAddressByDelegateKey[newDelegateKey]].exists, "cannot overwrite existing delegate keys");
        }

        Member storage member = members[msg.sender];
        memberAddressByDelegateKey[member.delegateKey] = address(0);
        memberAddressByDelegateKey[newDelegateKey] = msg.sender;
        member.delegateKey = newDelegateKey;

        emit UpdateDelegateKey(msg.sender, newDelegateKey);
    }

    // can only ragequit if the latest proposal you voted YES on has been processed
    function canRagequit(uint256 highestIndexYesVote) public view returns (bool) {
        require(highestIndexYesVote < proposalQueue.length, "proposal does not exist");
        return proposals[proposalQueue[highestIndexYesVote]].flags[1];
    }

    function hasVotingPeriodExpired(uint256 startingPeriod) public view returns (bool) {
        return getCurrentPeriod() >= startingPeriod.add(votingPeriodLength);
    }

    /***************
    GETTER FUNCTIONS
    ***************/

    function max(uint256 x, uint256 y) internal pure returns (uint256) {
        return x >= y ? x : y;
    }

    function getCurrentPeriod() public view returns (uint256) {
        return block.timestamp.sub(summoningTime).div(periodDuration);
    }

    function getProposalQueueLength() public view returns (uint256) {
        return proposalQueue.length;
    }

    function getProposalFlags(uint256 proposalId) public view returns (bool[6] memory) {
        return proposals[proposalId].flags;
    }

    function getUserTokenBalance(address user, address token) public view returns (uint256) {
        return userTokenBalances[user][token];
    }

    function getMemberProposalVote(address memberAddress, uint256 proposalIndex) public view returns (Vote) {
        require(members[memberAddress].exists, "member does not exist");
        require(proposalIndex < proposalQueue.length, "proposal does not exist");
        return proposals[proposalQueue[proposalIndex]].votesByMember[memberAddress];
    }

    function getTokenCount() public view returns (uint256) {
        return approvedTokens.length;
    }

    /***************
    HELPER FUNCTIONS
    ***************/
    function unsafeAddToBalance(address user, address token, uint256 amount) internal {
        userTokenBalances[user][token] += amount;
        userTokenBalances[TOTAL][token] += amount;
    }

    function unsafeSubtractFromBalance(address user, address token, uint256 amount) internal {
        userTokenBalances[user][token] -= amount;
        userTokenBalances[TOTAL][token] -= amount;
    }

    function unsafeInternalTransfer(address from, address to, address token, uint256 amount) internal {
        unsafeSubtractFromBalance(from, token, amount);
        unsafeAddToBalance(to, token, amount);
    }

    function fairShare(uint256 balance, uint256 shares, uint256 _totalShares) internal pure returns (uint256) {
        require(_totalShares != 0);

        if (balance == 0) { return 0; }

        uint256 prod = balance * shares;

        if (prod / balance == shares) { // no overflow in multiplication above?
            return prod / _totalShares;
        }

        return (balance / _totalShares) * shares;
    }
}

contract WETH {
    string public name     = "Wrapped Ether";
    string public symbol   = "WETH";
    uint8  public decimals = 18;

    event  Approval(address indexed src, address indexed guy, uint wad);
    event  Transfer(address indexed src, address indexed dst, uint wad);
    event  Deposit(address indexed dst, uint wad);
    event  Withdrawal(address indexed src, uint wad);

    mapping (address => uint)                       public  balanceOf;
    mapping (address => mapping (address => uint))  public  allowance;

    receive() external payable {
        deposit();
    }
    function deposit() public payable {
        balanceOf[msg.sender] += msg.value;
        emit Deposit(msg.sender, msg.value);
    }
    function withdraw(uint wad) public {
        require(balanceOf[msg.sender] >= wad, "not enough WETH to withdraw");
        require(address(this).balance >= wad, "not enough ETH in the contract");
        balanceOf[msg.sender] -= wad;
        msg.sender.transfer(wad);
        emit Withdrawal(msg.sender, wad);
    }

    function totalSupply() public view returns (uint) {
        return address(this).balance;
    }

    function approve(address guy, uint wad) public returns (bool) {
        allowance[msg.sender][guy] = wad;
        emit Approval(msg.sender, guy, wad);
        return true;
    }

    function transfer(address dst, uint wad) public returns (bool) {
        return transferFrom(msg.sender, dst, wad);
    }

    function transferFrom(address src, address dst, uint wad)
        public
        returns (bool)
    {
        require(balanceOf[src] >= wad, "insufficient fund");

        if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {
            require(allowance[src][msg.sender] >= wad, "not allowed to transfer from");
            allowance[src][msg.sender] -= wad;
        }

        balanceOf[src] -= wad;
        balanceOf[dst] += wad;

        emit Transfer(src, dst, wad);

        return true;
    }
}

contract EasyApply is Ownable {
   using SafeMath for uint256;
    LAO public lao;
    WETH public weth;
    uint256 public CHUNK_SIZE;
    uint256 public SHARES_PER_CHUNK;
    mapping(uint256 => bool) public processed;

    modifier onlyMember {
        address laoMember = msg.sender;
        (, uint256 shares, , bool exists, , uint256 jailed) = lao.members(laoMember);
        if(!exists) {
            laoMember = lao.memberAddressByDelegateKey(msg.sender);
            (, uint256 shares2, , bool exists2, , uint256 jailed2) = lao.members(laoMember);
             
            require(exists2 && shares2 > 0 && jailed2 == 0, "sender is not allowed to sponsor a proposal");
        } else {
            require(shares > 0 && jailed == 0, "sender is not allowed to sponsor a proposal");
        }
        
        _;
    }

    constructor (address _lao, address payable _weth, uint256 _CHUNK_SIZE, uint256 _SHARES_PER_CHUNK) {
        lao = LAO(_lao);
        weth = WETH(_weth);
        CHUNK_SIZE = _CHUNK_SIZE;
        SHARES_PER_CHUNK = _SHARES_PER_CHUNK;
    }

    function setContributionParams(uint _chunkSize, uint256 _sharesPerChunk) external onlyOwner {
        CHUNK_SIZE = _chunkSize;
        SHARES_PER_CHUNK = _sharesPerChunk;
    }
    
    function adminExecute (bytes calldata data, uint256 value) external onlyOwner returns (bool, bytes memory) {
        return address(this).call{value:value}(data);
    }
    
    receive() external payable {
        //if we get ETH from WETH, just take it (since it is not an investment)
        if(msg.sender != address(weth)) {
            uint256 numberOfChunks = msg.value.div(CHUNK_SIZE);
            require(numberOfChunks > 0, "amount of ETH sent was not sufficient");
            uint256 amount = numberOfChunks.mul(CHUNK_SIZE);
            uint256 sharesRequested = numberOfChunks.mul(SHARES_PER_CHUNK);
            weth.deposit{value: amount}();
            require(weth.approve(address(lao), amount), "approval failed");

            _submitMembershipProposalLAO(msg.sender, sharesRequested, amount);

            if(msg.value > amount) {
                msg.sender.transfer(msg.value - amount);
            }
        }
    }

    function becomeMember() onlyOwner external {
        _submitMembershipProposalLAO(address(this), 1, 0); //create a membership proposal in the LAO for 1 share in exchange to 0 WETH
    }

    function submitAndSponsorProjectProposal(uint256 payment, address applicant, string memory uuid) onlyMember external {
        uint256 proposalId = lao.submitProposal(
             applicant,
             0,
             0, //hardcode loot request
             0,
             address(weth), //hardcode to WETH address
             payment, //hardcode paymentRequested
             address(weth),
             uuid
        );

        lao.sponsorProposal(proposalId);
    }

    function  _submitMembershipProposalLAO (
        address applicant,
        uint256 sharesRequested,
        uint256 tributeOffered) internal {
        try lao.submitProposal(
             applicant,
             sharesRequested,
             0, //hardcode loot request
             tributeOffered,
             address(weth), //hardcode to WETH address
             0, //hardcode paymentRequested
             address(weth),
             "Membership"
        ) returns (uint) {

        } catch Error(string memory reason) {
            revert(reason);
        } catch (bytes memory /*lowLevelData*/) {
            revert("system error while submitting proposal");
        }
    }

    function cancelLaoProposal (uint256 _proposalId) external {
        (address applicant, , , , ,uint256 tributeOffered , , , , , , , , ) = lao.proposals(_proposalId);
        require(msg.sender == applicant, "only the applicant can cancel a proposal");
        lao.cancelProposal(_proposalId);
        lao.withdrawBalance(address(weth), tributeOffered);
        weth.withdraw(tributeOffered);
        msg.sender.transfer(tributeOffered);
    }

    function withdrawFromFailedProposal(uint256 _proposalId) external {
        require(processed[_proposalId] == false, "proposal was already processed");
        (address applicant, , , , ,uint256 tributeOffered , , , , , , , , ) = lao.proposals(_proposalId);
        require(msg.sender == applicant, "only the applicant can withdraw from his failed proposal");
        lao.withdrawBalance(address(weth), tributeOffered);
        weth.withdraw(tributeOffered);
        msg.sender.transfer(tributeOffered);
        processed[_proposalId] = true;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_lao","type":"address"},{"internalType":"address payable","name":"_weth","type":"address"},{"internalType":"uint256","name":"_CHUNK_SIZE","type":"uint256"},{"internalType":"uint256","name":"_SHARES_PER_CHUNK","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"CHUNK_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SHARES_PER_CHUNK","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"adminExecute","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"becomeMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"cancelLaoProposal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lao","outputs":[{"internalType":"contract LAO","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"processed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chunkSize","type":"uint256"},{"internalType":"uint256","name":"_sharesPerChunk","type":"uint256"}],"name":"setContributionParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"payment","type":"uint256"},{"internalType":"address","name":"applicant","type":"address"},{"internalType":"string","name":"uuid","type":"string"}],"name":"submitAndSponsorProjectProposal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract WETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"withdrawFromFailedProposal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506040516119f93803806119f98339818101604052608081101561003357600080fd5b508051602082015160408301516060909301519192909160006100546100dc565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039586166001600160a01b03199182161790915560028054949095169316929092179092556003919091556004556100e0565b3390565b61190a806100ef6000396000f3fe6080604052600436106100ec5760003560e01c8063b0a1d7e01161008a578063e91e13a911610059578063e91e13a914610560578063e9eecf2d14610575578063f2fde38b1461063b578063f7f38f761461066e57610306565b8063b0a1d7e0146103e3578063c231a2fa1461040a578063d5892b5514610506578063e54e3c991461053057610306565b80638da5cb5b116100c65780638da5cb5b1461038f5780638f32d59b146103a457806390316619146103b95780639d083222146103ce57610306565b806305a79e061461030b5780633fc8cef314610349578063715018a61461037a57610306565b36610306576002546001600160a01b0316331461030457600061011a6003543461069890919063ffffffff16565b90506000811161015b5760405162461bcd60e51b81526004018080602001828103825260258152602001806117b96025913960400191505060405180910390fd5b6000610172600354836106bc90919063ffffffff16565b9050600061018b600454846106bc90919063ffffffff16565b9050600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156101dd57600080fd5b505af11580156101f1573d6000803e3d6000fd5b50506002546001546040805163095ea7b360e01b81526001600160a01b03928316600482015260248101899052905191909216945063095ea7b39350604480830193506020928290030181600087803b15801561024d57600080fd5b505af1158015610261573d6000803e3d6000fd5b505050506040513d602081101561027757600080fd5b50516102bc576040805162461bcd60e51b815260206004820152600f60248201526e185c1c1c9bdd985b0819985a5b1959608a1b604482015290519081900360640190fd5b6102c73382846106ea565b813411156103005760405133903484900380156108fc02916000818181858888f193505050501580156102fe573d6000803e3d6000fd5b505b5050505b005b600080fd5b34801561031757600080fd5b506103356004803603602081101561032e57600080fd5b50356108bf565b604080519115158252519081900360200190f35b34801561035557600080fd5b5061035e6108d4565b604080516001600160a01b039092168252519081900360200190f35b34801561038657600080fd5b506103046108e3565b34801561039b57600080fd5b5061035e610974565b3480156103b057600080fd5b50610335610984565b3480156103c557600080fd5b5061035e6109a8565b3480156103da57600080fd5b506103046109b7565b3480156103ef57600080fd5b506103f8610a0d565b60408051918252519081900360200190f35b34801561041657600080fd5b506104856004803603604081101561042d57600080fd5b810190602081018135600160201b81111561044757600080fd5b82018360208201111561045957600080fd5b803590602001918460018302840111600160201b8311171561047a57600080fd5b919350915035610a13565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b838110156104ca5781810151838201526020016104b2565b50505050905090810190601f1680156104f75780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561051257600080fd5b506103046004803603602081101561052957600080fd5b5035610ace565b34801561053c57600080fd5b506103046004803603604081101561055357600080fd5b5080359060200135610e40565b34801561056c57600080fd5b506103f8610e92565b34801561058157600080fd5b506103046004803603606081101561059857600080fd5b8135916001600160a01b0360208201351691810190606081016040820135600160201b8111156105c757600080fd5b8201836020820111156105d957600080fd5b803590602001918460018302840111600160201b831117156105fa57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610e98945050505050565b34801561064757600080fd5b506103046004803603602081101561065e57600080fd5b50356001600160a01b03166112c1565b34801561067a57600080fd5b506103046004803603602081101561069157600080fd5b5035611314565b60008082116106a657600080fd5b60008284816106b157fe5b049150505b92915050565b6000826106cb575060006106b6565b828202828482816106d857fe5b04146106e357600080fd5b9392505050565b6001546002546040805163590f940b60e01b81526001600160a01b03878116600483015260248201879052600060448301819052606483018790529381166084830181905260a4830185905260c483015261010060e4830152600a6101048301526904d656d626572736869760b41b6101248301529151919093169263590f940b926101448083019360209390929083900390910190829087803b15801561079157600080fd5b505af19250505080156107b657506040513d60208110156107b157600080fd5b505160015b6108b9576107c2611713565b806107cd5750610852565b8060405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108175781810151838201526020016107ff565b50505050905090810190601f1680156108445780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3d80801561087c576040519150601f19603f3d011682016040523d82523d6000602084013e610881565b606091505b5060405162461bcd60e51b81526004018080602001828103825260268152602001806118046026913960400191505060405180910390fd5b50505050565b60056020526000908152604090205460ff1681565b6002546001600160a01b031681565b6108eb610984565b61092a576040805162461bcd60e51b8152602060048201819052602482015260008051602061187d833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03165b90565b600080546001600160a01b0316610999611669565b6001600160a01b031614905090565b6001546001600160a01b031681565b6109bf610984565b6109fe576040805162461bcd60e51b8152602060048201819052602482015260008051602061187d833981519152604482015290519081900360640190fd5b610a0b30600160006106ea565b565b60045481565b60006060610a1f610984565b610a5e576040805162461bcd60e51b8152602060048201819052602482015260008051602061187d833981519152604482015290519081900360640190fd5b306001600160a01b0316838686604051808383808284376040519201945060009350909150508083038185875af1925050503d8060008114610abc576040519150601f19603f3d011682016040523d82523d6000602084013e610ac1565b606091505b5091509150935093915050565b60008181526005602052604090205460ff1615610b32576040805162461bcd60e51b815260206004820152601e60248201527f70726f706f73616c2077617320616c72656164792070726f6365737365640000604482015290519081900360640190fd5b6001546040805163013cf08b60e01b815260048101849052905160009283926001600160a01b039091169163013cf08b916024808201928692909190829003018186803b158015610b8257600080fd5b505afa158015610b96573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526101c0811015610bc057600080fd5b815160208301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e01516101808f0180519b519d9f9c9e9a9d999c989b979a96999598949793969295919491939282019284600160201b821115610c3757600080fd5b908301906020820185811115610c4c57600080fd5b8251600160201b811182820188101715610c6557600080fd5b82525081516020918201929091019080838360005b83811015610c92578181015183820152602001610c7a565b50505050905090810190601f168015610cbf5780820380516001836020036101000a031916815260200191505b50604052509d9f50979d5050336001600160a01b038f16149b50610d209a50505050505050505050505760405162461bcd60e51b815260040180806020018281038252603881526020018061189d6038913960400191505060405180910390fd5b60015460025460408051630cf20cc960e01b81526001600160a01b0392831660048201526024810185905290519190921691630cf20cc991604480830192600092919082900301818387803b158015610d7857600080fd5b505af1158015610d8c573d6000803e3d6000fd5b505060025460408051632e1a7d4d60e01b81526004810186905290516001600160a01b039092169350632e1a7d4d925060248082019260009290919082900301818387803b158015610ddd57600080fd5b505af1158015610df1573d6000803e3d6000fd5b505060405133925083156108fc02915083906000818181858888f19350505050158015610e22573d6000803e3d6000fd5b5050506000908152600560205260409020805460ff19166001179055565b610e48610984565b610e87576040805162461bcd60e51b8152602060048201819052602482015260008051602061187d833981519152604482015290519081900360640190fd5b600391909155600455565b60035481565b6001546040805163022b92c360e21b8152336004820181905291519192600092839283926001600160a01b0316916308ae4b0c9160248082019260c092909190829003018186803b158015610eec57600080fd5b505afa158015610f00573d6000803e3d6000fd5b505050506040513d60c0811015610f1657600080fd5b506020810151606082015160a09092015190945090925090508161109c576001546040805163100b05e560e21b815233600482015290516001600160a01b039092169163402c179491602480820192602092909190829003018186803b158015610f7f57600080fd5b505afa158015610f93573d6000803e3d6000fd5b505050506040513d6020811015610fa957600080fd5b50516001546040805163022b92c360e21b81526001600160a01b03808516600483015291519397506000938493849316916308ae4b0c9160248083019260c0929190829003018186803b158015610fff57600080fd5b505afa158015611013573d6000803e3d6000fd5b505050506040513d60c081101561102957600080fd5b506020810151606082015160a090920151909450909250905081801561104f5750600083115b8015611059575080155b6110945760405162461bcd60e51b815260040180806020018281038252602b815260200180611852602b913960400191505060405180910390fd5b5050506110e5565b6000831180156110aa575080155b6110e55760405162461bcd60e51b815260040180806020018281038252602b815260200180611852602b913960400191505060405180910390fd5b6000600160009054906101000a90046001600160a01b03166001600160a01b031663590f940b886000806000600260009054906101000a90046001600160a01b03168e600260009054906101000a90046001600160a01b03168e6040518963ffffffff1660e01b815260040180896001600160a01b03168152602001888152602001878152602001868152602001856001600160a01b03168152602001848152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156111d05781810151838201526020016111b8565b50505050905090810190601f1680156111fd5780820380516001836020036101000a031916815260200191505b509950505050505050505050602060405180830381600087803b15801561122357600080fd5b505af1158015611237573d6000803e3d6000fd5b505050506040513d602081101561124d57600080fd5b50516001546040805163025d1b6560e61b81526004810184905290519293506001600160a01b0390911691639746d9409160248082019260009290919082900301818387803b15801561129f57600080fd5b505af11580156112b3573d6000803e3d6000fd5b505050505050505050505050565b6112c9610984565b611308576040805162461bcd60e51b8152602060048201819052602482015260008051602061187d833981519152604482015290519081900360640190fd5b6113118161166d565b50565b6001546040805163013cf08b60e01b815260048101849052905160009283926001600160a01b039091169163013cf08b916024808201928692909190829003018186803b15801561136457600080fd5b505afa158015611378573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526101c08110156113a257600080fd5b815160208301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e01516101808f0180519b519d9f9c9e9a9d999c989b979a96999598949793969295919491939282019284600160201b82111561141957600080fd5b90830190602082018581111561142e57600080fd5b8251600160201b81118282018810171561144757600080fd5b82525081516020918201929091019080838360005b8381101561147457818101518382015260200161145c565b50505050905090810190601f1680156114a15780820380516001836020036101000a031916815260200191505b50604052509d9f50979d5050336001600160a01b038f16149b506115029a50505050505050505050505760405162461bcd60e51b815260040180806020018281038252602881526020018061182a6028913960400191505060405180910390fd5b6001546040805163e0a8f6f560e01b81526004810186905290516001600160a01b039092169163e0a8f6f59160248082019260009290919082900301818387803b15801561154f57600080fd5b505af1158015611563573d6000803e3d6000fd5b505060015460025460408051630cf20cc960e01b81526001600160a01b039283166004820152602481018790529051919092169350630cf20cc99250604480830192600092919082900301818387803b1580156115bf57600080fd5b505af11580156115d3573d6000803e3d6000fd5b505060025460408051632e1a7d4d60e01b81526004810186905290516001600160a01b039092169350632e1a7d4d925060248082019260009290919082900301818387803b15801561162457600080fd5b505af1158015611638573d6000803e3d6000fd5b505060405133925083156108fc02915083906000818181858888f193505050501580156108b9573d6000803e3d6000fd5b3390565b6001600160a01b0381166116b25760405162461bcd60e51b81526004018080602001828103825260268152602001806117de6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60e01c90565b600060443d101561172357610981565b600481823e6308c379a0611737825161170d565b1461174157610981565b6040513d600319016004823e80513d67ffffffffffffffff81602484011181841117156117715750505050610981565b8284019250825191508082111561178b5750505050610981565b503d830160208284010111156117a357505050610981565b601f01601f191681016020016040529150509056fe616d6f756e74206f66204554482073656e7420776173206e6f742073756666696369656e744f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737373797374656d206572726f72207768696c65207375626d697474696e672070726f706f73616c6f6e6c7920746865206170706c6963616e742063616e2063616e63656c20612070726f706f73616c73656e646572206973206e6f7420616c6c6f77656420746f2073706f6e736f7220612070726f706f73616c4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726f6e6c7920746865206170706c6963616e742063616e2077697468647261772066726f6d20686973206661696c65642070726f706f73616ca26469706673582212200a3f53f99452a799ae9e181bb9daee3ed9be82113387bbb6e0760be5fd87880364736f6c63430007040033000000000000000000000000a3cf824160e5ec3dccccb44c2552eee45a44aaeb000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000340aad21b3b70000000000000000000000000000000000000000000000000000000000000000186a0

Deployed Bytecode

0x6080604052600436106100ec5760003560e01c8063b0a1d7e01161008a578063e91e13a911610059578063e91e13a914610560578063e9eecf2d14610575578063f2fde38b1461063b578063f7f38f761461066e57610306565b8063b0a1d7e0146103e3578063c231a2fa1461040a578063d5892b5514610506578063e54e3c991461053057610306565b80638da5cb5b116100c65780638da5cb5b1461038f5780638f32d59b146103a457806390316619146103b95780639d083222146103ce57610306565b806305a79e061461030b5780633fc8cef314610349578063715018a61461037a57610306565b36610306576002546001600160a01b0316331461030457600061011a6003543461069890919063ffffffff16565b90506000811161015b5760405162461bcd60e51b81526004018080602001828103825260258152602001806117b96025913960400191505060405180910390fd5b6000610172600354836106bc90919063ffffffff16565b9050600061018b600454846106bc90919063ffffffff16565b9050600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156101dd57600080fd5b505af11580156101f1573d6000803e3d6000fd5b50506002546001546040805163095ea7b360e01b81526001600160a01b03928316600482015260248101899052905191909216945063095ea7b39350604480830193506020928290030181600087803b15801561024d57600080fd5b505af1158015610261573d6000803e3d6000fd5b505050506040513d602081101561027757600080fd5b50516102bc576040805162461bcd60e51b815260206004820152600f60248201526e185c1c1c9bdd985b0819985a5b1959608a1b604482015290519081900360640190fd5b6102c73382846106ea565b813411156103005760405133903484900380156108fc02916000818181858888f193505050501580156102fe573d6000803e3d6000fd5b505b5050505b005b600080fd5b34801561031757600080fd5b506103356004803603602081101561032e57600080fd5b50356108bf565b604080519115158252519081900360200190f35b34801561035557600080fd5b5061035e6108d4565b604080516001600160a01b039092168252519081900360200190f35b34801561038657600080fd5b506103046108e3565b34801561039b57600080fd5b5061035e610974565b3480156103b057600080fd5b50610335610984565b3480156103c557600080fd5b5061035e6109a8565b3480156103da57600080fd5b506103046109b7565b3480156103ef57600080fd5b506103f8610a0d565b60408051918252519081900360200190f35b34801561041657600080fd5b506104856004803603604081101561042d57600080fd5b810190602081018135600160201b81111561044757600080fd5b82018360208201111561045957600080fd5b803590602001918460018302840111600160201b8311171561047a57600080fd5b919350915035610a13565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b838110156104ca5781810151838201526020016104b2565b50505050905090810190601f1680156104f75780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561051257600080fd5b506103046004803603602081101561052957600080fd5b5035610ace565b34801561053c57600080fd5b506103046004803603604081101561055357600080fd5b5080359060200135610e40565b34801561056c57600080fd5b506103f8610e92565b34801561058157600080fd5b506103046004803603606081101561059857600080fd5b8135916001600160a01b0360208201351691810190606081016040820135600160201b8111156105c757600080fd5b8201836020820111156105d957600080fd5b803590602001918460018302840111600160201b831117156105fa57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610e98945050505050565b34801561064757600080fd5b506103046004803603602081101561065e57600080fd5b50356001600160a01b03166112c1565b34801561067a57600080fd5b506103046004803603602081101561069157600080fd5b5035611314565b60008082116106a657600080fd5b60008284816106b157fe5b049150505b92915050565b6000826106cb575060006106b6565b828202828482816106d857fe5b04146106e357600080fd5b9392505050565b6001546002546040805163590f940b60e01b81526001600160a01b03878116600483015260248201879052600060448301819052606483018790529381166084830181905260a4830185905260c483015261010060e4830152600a6101048301526904d656d626572736869760b41b6101248301529151919093169263590f940b926101448083019360209390929083900390910190829087803b15801561079157600080fd5b505af19250505080156107b657506040513d60208110156107b157600080fd5b505160015b6108b9576107c2611713565b806107cd5750610852565b8060405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108175781810151838201526020016107ff565b50505050905090810190601f1680156108445780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3d80801561087c576040519150601f19603f3d011682016040523d82523d6000602084013e610881565b606091505b5060405162461bcd60e51b81526004018080602001828103825260268152602001806118046026913960400191505060405180910390fd5b50505050565b60056020526000908152604090205460ff1681565b6002546001600160a01b031681565b6108eb610984565b61092a576040805162461bcd60e51b8152602060048201819052602482015260008051602061187d833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03165b90565b600080546001600160a01b0316610999611669565b6001600160a01b031614905090565b6001546001600160a01b031681565b6109bf610984565b6109fe576040805162461bcd60e51b8152602060048201819052602482015260008051602061187d833981519152604482015290519081900360640190fd5b610a0b30600160006106ea565b565b60045481565b60006060610a1f610984565b610a5e576040805162461bcd60e51b8152602060048201819052602482015260008051602061187d833981519152604482015290519081900360640190fd5b306001600160a01b0316838686604051808383808284376040519201945060009350909150508083038185875af1925050503d8060008114610abc576040519150601f19603f3d011682016040523d82523d6000602084013e610ac1565b606091505b5091509150935093915050565b60008181526005602052604090205460ff1615610b32576040805162461bcd60e51b815260206004820152601e60248201527f70726f706f73616c2077617320616c72656164792070726f6365737365640000604482015290519081900360640190fd5b6001546040805163013cf08b60e01b815260048101849052905160009283926001600160a01b039091169163013cf08b916024808201928692909190829003018186803b158015610b8257600080fd5b505afa158015610b96573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526101c0811015610bc057600080fd5b815160208301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e01516101808f0180519b519d9f9c9e9a9d999c989b979a96999598949793969295919491939282019284600160201b821115610c3757600080fd5b908301906020820185811115610c4c57600080fd5b8251600160201b811182820188101715610c6557600080fd5b82525081516020918201929091019080838360005b83811015610c92578181015183820152602001610c7a565b50505050905090810190601f168015610cbf5780820380516001836020036101000a031916815260200191505b50604052509d9f50979d5050336001600160a01b038f16149b50610d209a50505050505050505050505760405162461bcd60e51b815260040180806020018281038252603881526020018061189d6038913960400191505060405180910390fd5b60015460025460408051630cf20cc960e01b81526001600160a01b0392831660048201526024810185905290519190921691630cf20cc991604480830192600092919082900301818387803b158015610d7857600080fd5b505af1158015610d8c573d6000803e3d6000fd5b505060025460408051632e1a7d4d60e01b81526004810186905290516001600160a01b039092169350632e1a7d4d925060248082019260009290919082900301818387803b158015610ddd57600080fd5b505af1158015610df1573d6000803e3d6000fd5b505060405133925083156108fc02915083906000818181858888f19350505050158015610e22573d6000803e3d6000fd5b5050506000908152600560205260409020805460ff19166001179055565b610e48610984565b610e87576040805162461bcd60e51b8152602060048201819052602482015260008051602061187d833981519152604482015290519081900360640190fd5b600391909155600455565b60035481565b6001546040805163022b92c360e21b8152336004820181905291519192600092839283926001600160a01b0316916308ae4b0c9160248082019260c092909190829003018186803b158015610eec57600080fd5b505afa158015610f00573d6000803e3d6000fd5b505050506040513d60c0811015610f1657600080fd5b506020810151606082015160a09092015190945090925090508161109c576001546040805163100b05e560e21b815233600482015290516001600160a01b039092169163402c179491602480820192602092909190829003018186803b158015610f7f57600080fd5b505afa158015610f93573d6000803e3d6000fd5b505050506040513d6020811015610fa957600080fd5b50516001546040805163022b92c360e21b81526001600160a01b03808516600483015291519397506000938493849316916308ae4b0c9160248083019260c0929190829003018186803b158015610fff57600080fd5b505afa158015611013573d6000803e3d6000fd5b505050506040513d60c081101561102957600080fd5b506020810151606082015160a090920151909450909250905081801561104f5750600083115b8015611059575080155b6110945760405162461bcd60e51b815260040180806020018281038252602b815260200180611852602b913960400191505060405180910390fd5b5050506110e5565b6000831180156110aa575080155b6110e55760405162461bcd60e51b815260040180806020018281038252602b815260200180611852602b913960400191505060405180910390fd5b6000600160009054906101000a90046001600160a01b03166001600160a01b031663590f940b886000806000600260009054906101000a90046001600160a01b03168e600260009054906101000a90046001600160a01b03168e6040518963ffffffff1660e01b815260040180896001600160a01b03168152602001888152602001878152602001868152602001856001600160a01b03168152602001848152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156111d05781810151838201526020016111b8565b50505050905090810190601f1680156111fd5780820380516001836020036101000a031916815260200191505b509950505050505050505050602060405180830381600087803b15801561122357600080fd5b505af1158015611237573d6000803e3d6000fd5b505050506040513d602081101561124d57600080fd5b50516001546040805163025d1b6560e61b81526004810184905290519293506001600160a01b0390911691639746d9409160248082019260009290919082900301818387803b15801561129f57600080fd5b505af11580156112b3573d6000803e3d6000fd5b505050505050505050505050565b6112c9610984565b611308576040805162461bcd60e51b8152602060048201819052602482015260008051602061187d833981519152604482015290519081900360640190fd5b6113118161166d565b50565b6001546040805163013cf08b60e01b815260048101849052905160009283926001600160a01b039091169163013cf08b916024808201928692909190829003018186803b15801561136457600080fd5b505afa158015611378573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526101c08110156113a257600080fd5b815160208301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e01516101808f0180519b519d9f9c9e9a9d999c989b979a96999598949793969295919491939282019284600160201b82111561141957600080fd5b90830190602082018581111561142e57600080fd5b8251600160201b81118282018810171561144757600080fd5b82525081516020918201929091019080838360005b8381101561147457818101518382015260200161145c565b50505050905090810190601f1680156114a15780820380516001836020036101000a031916815260200191505b50604052509d9f50979d5050336001600160a01b038f16149b506115029a50505050505050505050505760405162461bcd60e51b815260040180806020018281038252602881526020018061182a6028913960400191505060405180910390fd5b6001546040805163e0a8f6f560e01b81526004810186905290516001600160a01b039092169163e0a8f6f59160248082019260009290919082900301818387803b15801561154f57600080fd5b505af1158015611563573d6000803e3d6000fd5b505060015460025460408051630cf20cc960e01b81526001600160a01b039283166004820152602481018790529051919092169350630cf20cc99250604480830192600092919082900301818387803b1580156115bf57600080fd5b505af11580156115d3573d6000803e3d6000fd5b505060025460408051632e1a7d4d60e01b81526004810186905290516001600160a01b039092169350632e1a7d4d925060248082019260009290919082900301818387803b15801561162457600080fd5b505af1158015611638573d6000803e3d6000fd5b505060405133925083156108fc02915083906000818181858888f193505050501580156108b9573d6000803e3d6000fd5b3390565b6001600160a01b0381166116b25760405162461bcd60e51b81526004018080602001828103825260268152602001806117de6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60e01c90565b600060443d101561172357610981565b600481823e6308c379a0611737825161170d565b1461174157610981565b6040513d600319016004823e80513d67ffffffffffffffff81602484011181841117156117715750505050610981565b8284019250825191508082111561178b5750505050610981565b503d830160208284010111156117a357505050610981565b601f01601f191681016020016040529150509056fe616d6f756e74206f66204554482073656e7420776173206e6f742073756666696369656e744f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737373797374656d206572726f72207768696c65207375626d697474696e672070726f706f73616c6f6e6c7920746865206170706c6963616e742063616e2063616e63656c20612070726f706f73616c73656e646572206973206e6f7420616c6c6f77656420746f2073706f6e736f7220612070726f706f73616c4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726f6e6c7920746865206170706c6963616e742063616e2077697468647261772066726f6d20686973206661696c65642070726f706f73616ca26469706673582212200a3f53f99452a799ae9e181bb9daee3ed9be82113387bbb6e0760be5fd87880364736f6c63430007040033

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

000000000000000000000000a3cf824160e5ec3dccccb44c2552eee45a44aaeb000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000340aad21b3b70000000000000000000000000000000000000000000000000000000000000000186a0

-----Decoded View---------------
Arg [0] : _lao (address): 0xA3CF824160E5eC3dCcCcB44c2552eEe45A44AaEb
Arg [1] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [2] : _CHUNK_SIZE (uint256): 60000000000000000000
Arg [3] : _SHARES_PER_CHUNK (uint256): 100000

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000a3cf824160e5ec3dccccb44c2552eee45a44aaeb
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [2] : 00000000000000000000000000000000000000000000000340aad21b3b700000
Arg [3] : 00000000000000000000000000000000000000000000000000000000000186a0


Deployed Bytecode Sourcemap

47066:4673:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;48688:4;;-1:-1:-1;;;;;48688:4:0;48666:10;:27;48663:647;;48710:22;48735:25;48749:10;;48735:9;:13;;:25;;;;:::i;:::-;48710:50;;48800:1;48783:14;:18;48775:68;;;;-1:-1:-1;;;48775:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;48858:14;48875:30;48894:10;;48875:14;:18;;:30;;;;:::i;:::-;48858:47;;48920:23;48946:36;48965:16;;48946:14;:18;;:36;;;;:::i;:::-;48920:62;;48997:4;;;;;;;;;-1:-1:-1;;;;;48997:4:0;-1:-1:-1;;;;;48997:12:0;;49017:6;48997:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;49049:4:0;;;49070:3;49049:34;;;-1:-1:-1;;;49049:34:0;;-1:-1:-1;;;;;49070:3:0;;;49049:34;;;;;;;;;;;;:4;;;;;-1:-1:-1;49049:12:0;;-1:-1:-1;49049:34:0;;;;;-1:-1:-1;49049:34:0;;;;;;;:4;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;49049:34:0;49041:62;;;;;-1:-1:-1;;;49041:62:0;;;;;;;;;;;;-1:-1:-1;;;49041:62:0;;;;;;;;;;;;;;;49120:65;49149:10;49161:15;49178:6;49120:28;:65::i;:::-;49217:6;49205:9;:18;49202:97;;;49244:39;;:10;;49264:9;:18;;;49244:39;;;;;;;;;49264:18;49244:10;:39;;;;;;;;;;;;;;;;;;;;;49202:97;48663:647;;;;47066:4673;;;;;47249:41;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;47249:41:0;;:::i;:::-;;;;;;;;;;;;;;;;;;47156:16;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;47156:16:0;;;;;;;;;;;;;;5333:140;;;;;;;;;;;;;:::i;4522:79::-;;;;;;;;;;;;;:::i;4888:94::-;;;;;;;;;;;;;:::i;47135:14::-;;;;;;;;;;;;;:::i;49325:187::-;;;;;;;;;;;;;:::i;47211:31::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;48362:170;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;48362:170:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;48362:170:0;;;;;;;;;;;;-1:-1:-1;48362:170:0;-1:-1:-1;48362:170:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;51180:556;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;51180:556:0;;:::i;48171:179::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;48171:179:0;;;;;;;:::i;47179:25::-;;;;;;;;;;;;;:::i;49520:486::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;49520:486:0;;;;;;;;;;;;;;;;-1:-1:-1;;;49520:486:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;49520:486:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;49520:486:0;;-1:-1:-1;49520:486:0;;-1:-1:-1;;;;;49520:486:0:i;5628:109::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5628:109:0;-1:-1:-1;;;;;5628:109:0;;:::i;50723:449::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;50723:449:0;;:::i;993:151::-;1051:7;1085:1;1081;:5;1073:14;;;;;;1098:9;1114:1;1110;:5;;;;;;;-1:-1:-1;;993:151:0;;;;;:::o;772:213::-;830:7;854:6;850:47;;-1:-1:-1;884:1:0;877:8;;850:47;921:5;;;925:1;921;:5;:1;945:5;;;;;:10;937:19;;;;;;976:1;772:213;-1:-1:-1;;;772:213:0:o;50014:701::-;50174:3;;50343:4;;50174:314;;;-1:-1:-1;;;50174:314:0;;-1:-1:-1;;;;;50174:314:0;;;;;;;;;;;;;:3;:314;;;;;;;;;;;;50343:4;;;50174:314;;;;;;;;;;;;;;;;:3;:314;;;;;;;;;-1:-1:-1;;;50174:314:0;;;;;;:3;;;;;:18;;:314;;;;;;;;;;;;;;;;;;;:3;:314;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;50174:314:0;;;50170:538;;;;:::i;:::-;;;;;;;;50575:6;50568:14;;-1:-1:-1;;;50568:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50170:538;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50648:48;;-1:-1:-1;;;50648:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50170:538;50489:29;50014:701;;;:::o;47249:41::-;;;;;;;;;;;;;;;:::o;47156:16::-;;;-1:-1:-1;;;;;47156:16:0;;:::o;5333:140::-;4734:9;:7;:9::i;:::-;4726:54;;;;;-1:-1:-1;;;4726:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;4726:54:0;;;;;;;;;;;;;;;5432:1:::1;5416:6:::0;;5395:40:::1;::::0;-1:-1:-1;;;;;5416:6:0;;::::1;::::0;5395:40:::1;::::0;5432:1;;5395:40:::1;5463:1;5446:19:::0;;-1:-1:-1;;;;;;5446:19:0::1;::::0;;5333:140::o;4522:79::-;4560:7;4587:6;-1:-1:-1;;;;;4587:6:0;4522:79;;:::o;4888:94::-;4928:4;4968:6;;-1:-1:-1;;;;;4968:6:0;4952:12;:10;:12::i;:::-;-1:-1:-1;;;;;4952:22:0;;4945:29;;4888:94;:::o;47135:14::-;;;-1:-1:-1;;;;;47135:14:0;;:::o;49325:187::-;4734:9;:7;:9::i;:::-;4726:54;;;;;-1:-1:-1;;;4726:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;4726:54:0;;;;;;;;;;;;;;;49379:49:::1;49416:4;49423:1;49426;49379:28;:49::i;:::-;49325:187::o:0;47211:31::-;;;;:::o;48362:170::-;48449:4;48455:12;4734:9;:7;:9::i;:::-;4726:54;;;;;-1:-1:-1;;;4726:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;4726:54:0;;;;;;;;;;;;;;;48495:4:::1;-1:-1:-1::0;;;;;48487:18:0::1;48512:5;48519:4;;48487:37;;;;;;;;;;::::0;;::::1;::::0;-1:-1:-1;48487:37:0::1;::::0;-1:-1:-1;48487:37:0;;-1:-1:-1;;48487:37:0;;::::1;::::0;;;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;48480:44;;;;48362:170:::0;;;;;;:::o;51180:556::-;51265:22;;;;:9;:22;;;;;;;;:31;51257:74;;;;;-1:-1:-1;;;51257:74:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;51412:3;;:26;;;-1:-1:-1;;;51412:26:0;;;;;;;;;;51343:17;;;;-1:-1:-1;;;;;51412:3:0;;;;:13;;:26;;;;;51343:17;;51412:26;;;;;;;;:3;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;51412:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;51412:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;51412:26:0;;;;;;-1:-1:-1;51412:26:0;;;;;;;;;;-1:-1:-1;51412:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;51412:26:0;;-1:-1:-1;51342:96:0;;-1:-1:-1;51342:96:0;;-1:-1:-1;;51457:10:0;-1:-1:-1;;;;;51457:23:0;;;;-1:-1:-1;51449:92:0;;-1:-1:-1;;;;;;;;;;;51449:92:0;;;-1:-1:-1;;;51449:92:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;51552:3;;51580:4;;51552:50;;;-1:-1:-1;;;51552:50:0;;-1:-1:-1;;;;;51580:4:0;;;51552:50;;;;;;;;;;;;:3;;;;;:19;;:50;;;;;:3;;:50;;;;;;;:3;;:50;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;51613:4:0;;:29;;;-1:-1:-1;;;51613:29:0;;;;;;;;;;-1:-1:-1;;;;;51613:4:0;;;;-1:-1:-1;51613:13:0;;-1:-1:-1;51613:29:0;;;;;:4;;:29;;;;;;;;:4;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;51653:35:0;;:10;;-1:-1:-1;51653:35:0;;;;;-1:-1:-1;51673:14:0;;51653:35;;;;51673:14;51653:10;:35;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;51699:22:0;;;;:9;:22;;;;;:29;;-1:-1:-1;;51699:29:0;51724:4;51699:29;;;51180:556::o;48171:179::-;4734:9;:7;:9::i;:::-;4726:54;;;;;-1:-1:-1;;;4726:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;4726:54:0;;;;;;;;;;;;;;;48274:10:::1;:23:::0;;;;48308:16:::1;:34:::0;48171:179::o;47179:25::-;;;;:::o;49520:486::-;47425:3;;:22;;;-1:-1:-1;;;47425:22:0;;47350:10;47425:22;;;;;;;;47350:10;;47330:17;;;;;;-1:-1:-1;;;;;47425:3:0;;:11;;:22;;;;;;;;;;;;;;;:3;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;47425:22:0;;;;;;;;;;;;;;;-1:-1:-1;47425:22:0;;-1:-1:-1;47425:22:0;-1:-1:-1;47425:22:0;47458:425;;47497:3;;:42;;;-1:-1:-1;;;47497:42:0;;47528:10;47497:42;;;;;;-1:-1:-1;;;;;47497:3:0;;;;:30;;:42;;;;;;;;;;;;;;;:3;:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;47497:42:0;47611:3;;:22;;;-1:-1:-1;;;47611:22:0;;-1:-1:-1;;;;;47611:22:0;;;;;;;;;47497:42;;-1:-1:-1;47557:15:0;;;;;;47611:3;;:11;;:22;;;;;;;;;;;;;;:3;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;47611:22:0;;;;;;;;;;;;;;;-1:-1:-1;47611:22:0;;-1:-1:-1;47611:22:0;-1:-1:-1;47611:22:0;47671;;;;;47692:1;47682:7;:11;47671:22;:38;;;;-1:-1:-1;47697:12:0;;47671:38;47663:94;;;;-1:-1:-1;;;47663:94:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47458:425;;;;;;47807:1;47798:6;:10;:25;;;;-1:-1:-1;47812:11:0;;47798:25;47790:81;;;;-1:-1:-1;;;47790:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49648:18:::1;49669:3;;;;;;;;;-1:-1:-1::0;;;;;49669:3:0::1;-1:-1:-1::0;;;;;49669:18:0::1;;49703:9;49728:1;49745::::0;49786::::1;49811:4;;;;;;;;;-1:-1:-1::0;;;;;49811:4:0::1;49859:7;49918:4;;;;;;;;;-1:-1:-1::0;;;;;49918:4:0::1;49939;49669:285;;;;;;;;;;;;;-1:-1:-1::0;;;;;49669:285:0::1;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;49669:285:0::1;;;;;;;;;;;-1:-1:-1::0;;;;;49669:285:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;49669:285:0;49967:3:::1;::::0;:31:::1;::::0;;-1:-1:-1;;;49967:31:0;;::::1;::::0;::::1;::::0;;;;;49669:285;;-1:-1:-1;;;;;;49967:3:0;;::::1;::::0;:19:::1;::::0;:31;;;;;:3:::1;::::0;:31;;;;;;;;:3;;:31;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;47903:1;49520:486:::0;;;;;;;:::o;5628:109::-;4734:9;:7;:9::i;:::-;4726:54;;;;;-1:-1:-1;;;4726:54:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;4726:54:0;;;;;;;;;;;;;;;5701:28:::1;5720:8;5701:18;:28::i;:::-;5628:109:::0;:::o;50723:449::-;50862:3;;:26;;;-1:-1:-1;;;50862:26:0;;;;;;;;;;50793:17;;;;-1:-1:-1;;;;;50862:3:0;;;;:13;;:26;;;;;50793:17;;50862:26;;;;;;;;:3;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;50862:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;50862:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;50862:26:0;;;;;;-1:-1:-1;50862:26:0;;;;;;;;;;-1:-1:-1;50862:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;50862:26:0;;-1:-1:-1;50792:96:0;;-1:-1:-1;50792:96:0;;-1:-1:-1;;50907:10:0;-1:-1:-1;;;;;50907:23:0;;;;-1:-1:-1;50899:76:0;;-1:-1:-1;;;;;;;;;;;50899:76:0;;;-1:-1:-1;;;50899:76:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50986:3;;:31;;;-1:-1:-1;;;50986:31:0;;;;;;;;;;-1:-1:-1;;;;;50986:3:0;;;;:18;;:31;;;;;:3;;:31;;;;;;;;:3;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;51028:3:0;;51056:4;;51028:50;;;-1:-1:-1;;;51028:50:0;;-1:-1:-1;;;;;51056:4:0;;;51028:50;;;;;;;;;;;;:3;;;;;-1:-1:-1;51028:19:0;;-1:-1:-1;51028:50:0;;;;;:3;;:50;;;;;;;:3;;:50;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;51089:4:0;;:29;;;-1:-1:-1;;;51089:29:0;;;;;;;;;;-1:-1:-1;;;;;51089:4:0;;;;-1:-1:-1;51089:13:0;;-1:-1:-1;51089:29:0;;;;;:4;;:29;;;;;;;;:4;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;51129:35:0;;:10;;-1:-1:-1;51129:35:0;;;;;-1:-1:-1;51149:14:0;;51129:35;;;;51149:14;51129:10;:35;;;;;;;;;;;;;;;;;;;3683:98;3763:10;3683:98;:::o;5843:229::-;-1:-1:-1;;;;;5917:22:0;;5909:73;;;;-1:-1:-1;;;5909:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6019:6;;;5998:38;;-1:-1:-1;;;;;5998:38:0;;;;6019:6;;;5998:38;;;6047:6;:17;;-1:-1:-1;;;;;;6047:17:0;-1:-1:-1;;;;;6047:17:0;;;;;;;;;;5843:229::o;14:88:1:-;89:3;85:15;;71:31::o;107:764::-;;188:4;170:16;167:26;164:2;;;196:5;;164:2;237:1;232:3;227;212:27;299:10;261:36;292:3;286:10;261:36;:::i;:::-;258:52;248:2;;314:5;;248:2;348;342:9;388:16;-1:-1:-1;;384:29:1;381:1;342:9;360:54;443:4;437:11;467:16;502:18;573:2;566:4;558:6;554:17;551:25;546:2;538:6;535:14;532:45;529:2;;;580:5;;;;;;529:2;617:6;611:4;607:17;596:28;;653:3;647:10;633:24;;680:2;672:6;669:14;666:2;;;686:5;;;;;;666:2;;747:16;741:4;737:27;730:4;721:6;716:3;712:16;708:27;705:60;702:2;;;768:5;;;;;702:2;833;812:15;-1:-1:-1;;808:29:1;799:39;;840:4;795:50;791:2;784:62;803:3;-1:-1:-1;;154:717:1;:::o

Swarm Source

ipfs://0a3f53f99452a799ae9e181bb9daee3ed9be82113387bbb6e0760be5fd878803

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.