ETH Price: $3,133.18 (+3.52%)

Contract

0x54266219D00969e8Ab79d96e313e1E6d48898455
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer142783712022-02-25 23:57:38994 days ago1645833458IN
0x54266219...d48898455
10 ETH0.0171657865
Transfer142783572022-02-25 23:54:26994 days ago1645833266IN
0x54266219...d48898455
1 ETH0.0156317859.19136198
Transfer142782402022-02-25 23:27:05994 days ago1645831625IN
0x54266219...d48898455
1 ETH0.0213610380.88573993
Transfer142782352022-02-25 23:25:39994 days ago1645831539IN
0x54266219...d48898455
1 ETH0.0190756272.23181779
Transfer142780752022-02-25 22:49:44994 days ago1645829384IN
0x54266219...d48898455
10 ETH0.0139758688.03691929
Transfer142780372022-02-25 22:41:08994 days ago1645828868IN
0x54266219...d48898455
6 ETH0.0124060146.97663443
Transfer142778422022-02-25 21:57:25994 days ago1645826245IN
0x54266219...d48898455
1 ETH0.0130088749.25945236
Transfer142778132022-02-25 21:52:02994 days ago1645825922IN
0x54266219...d48898455
15 ETH0.04225424160
Transfer142778022022-02-25 21:48:37994 days ago1645825717IN
0x54266219...d48898455
1 ETH0.0167862463.56282119
Transfer142778022022-02-25 21:48:37994 days ago1645825717IN
0x54266219...d48898455
20 ETH0.0230824880
Transfer142776762022-02-25 21:20:21994 days ago1645824021IN
0x54266219...d48898455
1 ETH0.0192665172.95462132
Transfer142775522022-02-25 20:53:36994 days ago1645822416IN
0x54266219...d48898455
10 ETH0.0259706798.3406338
Transfer142774952022-02-25 20:41:54994 days ago1645821714IN
0x54266219...d48898455
1 ETH0.03238418122.62602759
Transfer142774892022-02-25 20:40:38994 days ago1645821638IN
0x54266219...d48898455
1 ETH0.03260151123.44896692
Transfer142774512022-02-25 20:31:04994 days ago1645821064IN
0x54266219...d48898455
20 ETH0.02695756102.07757446
Transfer142770062022-02-25 18:57:48994 days ago1645815468IN
0x54266219...d48898455
2 ETH0.0133326869.09916962
Transfer142768862022-02-25 18:30:06994 days ago1645813806IN
0x54266219...d48898455
10 ETH0.0118503644.87262675
Transfer142767622022-02-25 18:04:29994 days ago1645812269IN
0x54266219...d48898455
1 ETH0.0159109460.24841319
Transfer142762842022-02-25 16:13:42994 days ago1645805622IN
0x54266219...d48898455
19 ETH0.0184433269.83752632
Transfer142737182022-02-25 6:38:37994 days ago1645771117IN
0x54266219...d48898455
1 ETH0.0120702345.70516132
Transfer142736482022-02-25 6:21:19994 days ago1645770079IN
0x54266219...d48898455
1 ETH0.0091774334.75130267
Transfer142733542022-02-25 5:13:50994 days ago1645766030IN
0x54266219...d48898455
5 ETH0.010900141.2743709
Transfer142729332022-02-25 3:41:25995 days ago1645760485IN
0x54266219...d48898455
2 ETH0.0116612744.15659706
Transfer142723712022-02-25 1:40:23995 days ago1645753223IN
0x54266219...d48898455
1 ETH0.0105635640
Transfer142723182022-02-25 1:28:09995 days ago1645752489IN
0x54266219...d48898455
7 ETH0.0163735162
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
142783712022-02-25 23:57:38994 days ago1645833458
0x54266219...d48898455
10 ETH
142783572022-02-25 23:54:26994 days ago1645833266
0x54266219...d48898455
1 ETH
142782402022-02-25 23:27:05994 days ago1645831625
0x54266219...d48898455
1 ETH
142782352022-02-25 23:25:39994 days ago1645831539
0x54266219...d48898455
1 ETH
142781282022-02-25 23:03:36994 days ago1645830216
0x54266219...d48898455
36 ETH
142781282022-02-25 23:03:36994 days ago1645830216
0x54266219...d48898455
36 ETH
142780752022-02-25 22:49:44994 days ago1645829384
0x54266219...d48898455
10 ETH
142780372022-02-25 22:41:08994 days ago1645828868
0x54266219...d48898455
6 ETH
142778422022-02-25 21:57:25994 days ago1645826245
0x54266219...d48898455
1 ETH
142778132022-02-25 21:52:02994 days ago1645825922
0x54266219...d48898455
15 ETH
142778022022-02-25 21:48:37994 days ago1645825717
0x54266219...d48898455
1 ETH
142778022022-02-25 21:48:37994 days ago1645825717
0x54266219...d48898455
20 ETH
142776762022-02-25 21:20:21994 days ago1645824021
0x54266219...d48898455
1 ETH
142775522022-02-25 20:53:36994 days ago1645822416
0x54266219...d48898455
10 ETH
142774952022-02-25 20:41:54994 days ago1645821714
0x54266219...d48898455
1 ETH
142774892022-02-25 20:40:38994 days ago1645821638
0x54266219...d48898455
1 ETH
142774512022-02-25 20:31:04994 days ago1645821064
0x54266219...d48898455
20 ETH
142770062022-02-25 18:57:48994 days ago1645815468
0x54266219...d48898455
2 ETH
142768862022-02-25 18:30:06994 days ago1645813806
0x54266219...d48898455
10 ETH
142767622022-02-25 18:04:29994 days ago1645812269
0x54266219...d48898455
1 ETH
142762842022-02-25 16:13:42994 days ago1645805622
0x54266219...d48898455
19 ETH
142737182022-02-25 6:38:37994 days ago1645771117
0x54266219...d48898455
1 ETH
142736482022-02-25 6:21:19994 days ago1645770079
0x54266219...d48898455
1 ETH
142733542022-02-25 5:13:50994 days ago1645766030
0x54266219...d48898455
5 ETH
142729332022-02-25 3:41:25995 days ago1645760485
0x54266219...d48898455
2 ETH
View All Internal Transactions
Loading...
Loading

Minimal Proxy Contract for 0xc3bd3b0d98c614d1eb3cdf0f6b593cc6a0df2dfe

Contract Name:
Yeeter

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2022-02-11
*/

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

// import "hardhat/console.sol";
interface IMOLOCH {
    // brief interface for moloch dao v2

    function depositToken() external view returns (address);

    function tokenWhitelist(address token) external view returns (bool);

    function shamans(address token) external view returns (bool);

    function totalShares() external view returns (uint256);

    function getProposalFlags(uint256 proposalId)
        external
        view
        returns (bool[6] memory);

    function getUserTokenBalance(address user, address token)
        external
        view
        returns (uint256);

    function members(address user)
        external
        view
        returns (
            address,
            uint256,
            uint256,
            bool,
            uint256,
            uint256
        );

    function memberAddressByDelegateKey(address user)
        external
        view
        returns (address);

    function userTokenBalances(address user, address token)
        external
        view
        returns (uint256);

    function cancelProposal(uint256 proposalId) external;

    function submitProposal(
        address applicant,
        uint256 sharesRequested,
        uint256 lootRequested,
        uint256 tributeOffered,
        address tributeToken,
        uint256 paymentRequested,
        address paymentToken,
        string calldata details
    ) external returns (uint256);

    function withdrawBalance(address token, uint256 amount) external;

    function collectTokens(address) external;

    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
    }

    function proposals(uint256 proposalId)
        external
        view
        returns (
            address,
            address,
            address,
            uint256,
            uint256,
            uint256,
            address,
            uint256,
            address,
            uint256,
            uint256,
            uint256
        );

    function setSharesLoot(
        address[] calldata,
        uint256[] calldata,
        uint256[] calldata,
        bool mint
    ) external;

    function setSingleSharesLoot(
        address,
        uint256,
        uint256,
        bool
    ) external;

    function setShaman(address, bool) external;
}

interface IWRAPPER {
    function transfer(address recipient, uint256 amount)
        external
        returns (bool);
}

abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        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() {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

contract Yeeter is ReentrancyGuard {
    event YeetReceived(
        address indexed contributorAddress,
        uint256 amount,
        address moloch,
        uint256 lootToGive,
        uint256 lootToPlatform
    );
    mapping(address => uint256) public deposits;
    uint256 public maxTarget;
    uint256 public raiseEndTime;
    uint256 public raiseStartTime;
    uint256 public maxUnitsPerAddr;
    uint256 public pricePerUnit;
    uint256 public lootPerUnit;
    bool public initialized;

    uint256 public platformFee;

    uint256 public balance;
    IMOLOCH public moloch;
    IWRAPPER public wrapper;

    YeetSummoner factory;

    function init(
        address _moloch,
        address payable _wrapper,
        uint256 _maxTarget, // max raise target
        uint256 _raiseEndTime,
        uint256 _raiseStartTime,
        uint256 _maxUnits, // per individual
        uint256 _pricePerUnit
    ) public {
        require(!initialized, "already initialized");
        initialized = true;
        moloch = IMOLOCH(_moloch);
        wrapper = IWRAPPER(_wrapper);
        maxTarget = _maxTarget;
        raiseEndTime = _raiseEndTime;
        raiseStartTime = _raiseStartTime;
        maxUnitsPerAddr = _maxUnits;
        pricePerUnit = _pricePerUnit;

        factory = YeetSummoner(msg.sender);
    }

    function initTemplate() public {
        initialized = true;
    }

    function yeetyeet() public payable nonReentrant {
        require(address(moloch) != address(0), "!init");
        require(msg.value >= pricePerUnit, "< minimum");
        require(balance < maxTarget, "Max Target reached"); // balance plus newvalue
        require(block.timestamp < raiseEndTime, "Time is up");
        require(block.timestamp > raiseStartTime, "Not Started");
        require(moloch.shamans(address(this)), "Shaman not whitelisted");
        require(
            moloch.tokenWhitelist(address(wrapper)),
            "Wrapper not whitelisted"
        );
        uint256 numUnits = msg.value / pricePerUnit; // floor units
        uint256 newValue = numUnits * pricePerUnit;

        // if some one yeets over max should we give them the max and return leftover.
        require(
            deposits[msg.sender] + newValue <= maxUnitsPerAddr * pricePerUnit,
            "Can not deposit more than max"
        );

        // wrap
        (bool success, ) = address(wrapper).call{value: newValue}("");
        require(success, "Wrap failed");
        // send to dao
        require(wrapper.transfer(address(moloch), newValue), "Transfer failed");

        if (msg.value > newValue) {
            // Return the extra money to the minter.
            (bool success2, ) = msg.sender.call{value: msg.value - newValue}(
                ""
            );
            require(success2, "Transfer failed");
        }
        // TODO: check
        deposits[msg.sender] = deposits[msg.sender] + newValue;

        balance = balance + newValue;

        uint256 lootToGive = (numUnits * factory.lootPerUnit());
        uint256 lootToPlatform = (numUnits * factory.platformFee());

        moloch.setSingleSharesLoot(msg.sender, 0, lootToGive, true);
        if (lootToPlatform > 0) {
            moloch.setSingleSharesLoot(
                factory.owner(),
                0,
                lootToPlatform,
                true
            );
        }

        moloch.collectTokens(address(wrapper));

        // amount of loot? fees?
        emit YeetReceived(
            msg.sender,
            newValue,
            address(moloch),
            lootToGive,
            lootToPlatform
        );
    }

    receive() external payable {
        yeetyeet();
    }

    function goalReached() public view returns (bool) {
        return balance >= maxTarget;
    }
}

contract CloneFactory {
    // implementation of eip-1167 - see https://eips.ethereum.org/EIPS/eip-1167
    function createClone(address target) internal returns (address result) {
        bytes20 targetBytes = bytes20(target);
        assembly {
            let clone := mload(0x40)
            mstore(
                clone,
                0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000
            )
            mstore(add(clone, 0x14), targetBytes)
            mstore(
                add(clone, 0x28),
                0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000
            )
            result := create(0, clone, 0x37)
        }
    }
}

contract YeetSummoner is CloneFactory, Ownable {
    address payable public template;
    mapping(uint256 => address) public yeeters;
    uint256 public yeetIdx = 0;

    uint256 public platformFee = 3; // fee of 3.09%
    uint256 public lootPerUnit = 100;

    event PlatformFeeUpdate(uint256 platformFee, uint256 lootPerUnit);

    event SummonYeetComplete(
        address indexed moloch,
        address yeeter,
        address wrapper,
        uint256 maxTarget,
        uint256 raiseEndTime,
        uint256 raiseStartTime,
        uint256 maxUnits,
        uint256 pricePerUnit,
        string details
    );

    constructor(address payable _template) {
        template = _template;
        Yeeter _yeeter = Yeeter(_template);
        _yeeter.initTemplate();
    }

    function summonYeet(
        address _moloch,
        address payable _wrapper,
        uint256 _maxTarget,
        uint256 _raiseEndTime,
        uint256 _raiseStartTime,
        uint256 _maxUnits,
        uint256 _pricePerUnit,
        string calldata _details
    ) public returns (address) {
        Yeeter yeeter = Yeeter(payable(createClone(template)));

        yeeter.init(
            _moloch,
            _wrapper,
            _maxTarget,
            _raiseEndTime,
            _raiseStartTime,
            _maxUnits,
            _pricePerUnit
        );
        yeetIdx = yeetIdx + 1;
        yeeters[yeetIdx] = address(yeeter);

        emit SummonYeetComplete(
            _moloch,
            address(yeeter),
            _wrapper,
            _maxTarget,
            _raiseEndTime,
            _raiseStartTime,
            _maxUnits,
            _pricePerUnit,
            _details
        );

        return address(yeeter);
    }

    // owner only functions
    function setConfig(uint256 _platformFee, uint256 _lootPerUnit)
        public
        onlyOwner
    {
        require(_lootPerUnit > 0, "Can not be 0");
        platformFee = _platformFee;
        lootPerUnit = _lootPerUnit;
        emit PlatformFeeUpdate(platformFee, lootPerUnit);
    }
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contributorAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"moloch","type":"address"},{"indexed":false,"internalType":"uint256","name":"lootToGive","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lootToPlatform","type":"uint256"}],"name":"YeetReceived","type":"event"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"deposits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"goalReached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_moloch","type":"address"},{"internalType":"address payable","name":"_wrapper","type":"address"},{"internalType":"uint256","name":"_maxTarget","type":"uint256"},{"internalType":"uint256","name":"_raiseEndTime","type":"uint256"},{"internalType":"uint256","name":"_raiseStartTime","type":"uint256"},{"internalType":"uint256","name":"_maxUnits","type":"uint256"},{"internalType":"uint256","name":"_pricePerUnit","type":"uint256"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initTemplate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lootPerUnit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTarget","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxUnitsPerAddr","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"moloch","outputs":[{"internalType":"contract IMOLOCH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePerUnit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raiseEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raiseStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wrapper","outputs":[{"internalType":"contract IWRAPPER","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yeetyeet","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

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.