Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x402eb84d9cb2d6cF66Bde9B46D7277d3f4a16B54
Balance 0.001090 ETH
Nonce 1
Code Size 1421 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

1421 bytes
0x6080604052600436106100d65760003560e01c806370a082311161007f57806395d89b411161005957806395d89b41146102aa578063d7dfa0dd146102bf578063dd62ed3e146102ec578063e3b2594f14610324576100dd565b806370a082311461023a5780637b4044a0146102675780637ecebe001461027d576100dd565b8063200d2ed2116100b0578063200d2ed2146101bf578063313ce567146101e6578063570ca7351461020d576100dd565b806306fdde031461011e57806318160ddd146101495780631bb534ba1461016d576100dd565b366100dd57005b600c5460405173ffffffffffffffffffffffffffffffffffffffff9091169036600082376000803683855af43d806000843e81801561011a578184f35b8184fd5b34801561012a57600080fd5b5061013361033a565b6040516101409190610492565b60405180910390f35b34801561015557600080fd5b5061015f60085481565b604051908152602001610140565b34801561017957600080fd5b5060015461019a9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610140565b3480156101cb57600080fd5b506006546101d99060ff1681565b6040516101409190610451565b3480156101f257600080fd5b506101fb601281565b60405160ff9091168152602001610140565b34801561021957600080fd5b5060005461019a9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561024657600080fd5b5061015f6102553660046103fe565b60096020526000908152604090205481565b34801561027357600080fd5b5061015f60035481565b34801561028957600080fd5b5061015f6102983660046103fe565b600b6020526000908152604090205481565b3480156102b657600080fd5b506101336103c8565b3480156102cb57600080fd5b50600c5461019a9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156102f857600080fd5b5061015f61030736600461041f565b600a60209081526000928352604080842090915290825290205481565b34801561033057600080fd5b5061015f60025481565b6005805461034790610503565b80601f016020809104026020016040519081016040528092919081815260200182805461037390610503565b80156103c05780601f10610395576101008083540402835291602001916103c0565b820191906000526020600020905b8154815290600101906020018083116103a357829003601f168201915b505050505081565b6004805461034790610503565b803573ffffffffffffffffffffffffffffffffffffffff811681146103f957600080fd5b919050565b60006020828403121561040f578081fd5b610418826103d5565b9392505050565b60008060408385031215610431578081fd5b61043a836103d5565b9150610448602084016103d5565b90509250929050565b602081016002831061048c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000602080835283518082850152825b818110156104be578581018301518582016040015282016104a2565b818111156104cf5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b600181811c9082168061051757607f821691505b60208210811415610551577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b5091905056fea2646970667358221220d03f61a760b9c9e4e47cae11f7719edf7a4b3cb57db62866d2f23c905d44b02064736f6c63430008040033

Verified Source Code Partial Match

Compiler: v0.8.4+commit.c7e474f2 EVM: istanbul Optimization: Yes (2000 runs)
CrowdfundProxy.sol 115 lines
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.4;

// File contracts/CrowdfundStorage.sol

/**
 * @title CrowdfundProxy
 * @author MirrorXYZ
 */
contract CrowdfundStorage {
    // The two states that this contract can exist in. "FUNDING" allows
    // contributors to add funds.
    enum Status {FUNDING, TRADING}

    // ============ Constants ============

    // The factor by which ETH contributions will multiply into crowdfund tokens.
    uint16 internal constant TOKEN_SCALE = 1000;
    uint256 internal constant REENTRANCY_NOT_ENTERED = 1;
    uint256 internal constant REENTRANCY_ENTERED = 2;
    uint8 public constant decimals = 18;

    // ============ Immutable Storage ============

    // The operator has a special role to change contract status.
    address payable public operator;
    address payable public fundingRecipient;
    // We add a hard cap to prevent raising more funds than deemed reasonable.
    uint256 public fundingCap;
    // The operator takes some equity in the tokens, represented by this percent.
    uint256 public operatorPercent;
    string public symbol;
    string public name;

    // ============ Mutable Storage ============

    // Represents the current state of the campaign.
    Status public status;
    uint256 internal reentrancy_status;

    // ============ Mutable ERC20 Attributes ============

    uint256 public totalSupply;
    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;
    mapping(address => uint256) public nonces;

    // ============ Delegation logic ============
    address public logic;
}


// File contracts/CrowdfundProxy.sol



interface ICrowdfundFactory {
    function mediaAddress() external returns (address);

    function logic() external returns (address);

    // ERC20 data.
    function parameters()
        external
        returns (
            address payable operator,
            address payable fundingRecipient,
            uint256 fundingCap,
            uint256 operatorPercent,
            string memory name,
            string memory symbol
        );
}

/**
 * @title CrowdfundProxy
 * @author MirrorXYZ
 */
contract CrowdfundProxy is CrowdfundStorage {
    constructor() {
        logic = ICrowdfundFactory(msg.sender).logic();
        // Crowdfund-specific data.
        (
            operator,
            fundingRecipient,
            fundingCap,
            operatorPercent,
            name,
            symbol
        ) = ICrowdfundFactory(msg.sender).parameters();
        // Initialize mutable storage.
        status = Status.FUNDING;
    }

    fallback() external payable {
        address _impl = logic;
        assembly {
            let ptr := mload(0x40)
            calldatacopy(ptr, 0, calldatasize())
            let result := delegatecall(gas(), _impl, ptr, calldatasize(), 0, 0)
            let size := returndatasize()
            returndatacopy(ptr, 0, size)

            switch result
                case 0 {
                    revert(ptr, size)
                }
                default {
                    return(ptr, size)
                }
        }
    }

    receive() external payable {}
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
fundingCap 0xe3b2594f → uint256
fundingRecipient 0x1bb534ba → address
logic 0xd7dfa0dd → address
name 0x06fdde03 → string
nonces 0x7ecebe00 → uint256
operator 0x570ca735 → address
operatorPercent 0x7b4044a0 → uint256
status 0x200d2ed2 → uint8
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Recent Transactions

No transactions found for this address