ETH Price: $2,390.17 (+2.78%)

Contract

0xf9f92751F272f0872e2EDb6a280b0990F3e2b8A3
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040116210612021-01-09 14:19:581348 days ago1610201998IN
 Create: OfferFactory
0 ETH0.0933493470

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OfferFactory

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 1 of 3: OfferFactory.sol
/**
* SPDX-License-Identifier: LicenseRef-Aktionariat
*
* MIT License with Automated License Fee Payments
*
* Copyright (c) 2020 Aktionariat AG (aktionariat.com)
*
* Permission is hereby granted to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* - The above copyright notice and this permission notice shall be included in
*   all copies or substantial portions of the Software.
* - All automated license fee payments integrated into this and related Software
*   are preserved.
*
* 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.
*/
pragma solidity >=0.8;

import "./Offer.sol";

/**
 * @title CompanyName Shareholder Agreement
 * @author Luzius Meisser, [email protected]
 * @dev These tokens are based on the ERC20 standard and the open-zeppelin library.
 *
 * This is an ERC-20 token representing shares of CompanyName AG that are bound to
 * a shareholder agreement that can be found at the URL defined in the constant 'terms'
 * of the 'DraggableCompanyNameShares' contract. The agreement is partially enforced
 * through the Swiss legal system, and partially enforced through this smart contract.
 * In particular, this smart contract implements a drag-along clause which allows the
 * majority of token holders to force the minority sell their shares along with them in
 * case of an acquisition. That's why the tokens are called "Draggable CompanyName AG Shares."
 */

contract OfferFactory {

    function predict(bytes32 salt, address buyer, address token, uint256 pricePerShare, address currency, uint256 quorum, uint256 votePeriod) public view returns (address) {
        bytes32 initCodeHash = keccak256(abi.encodePacked(type(Offer).creationCode, abi.encode(buyer, token, pricePerShare, currency, quorum, votePeriod)));
        bytes32 hashResult = keccak256(abi.encodePacked(bytes1(0xff), address(this), salt, initCodeHash));
        return address(uint160(uint256(hashResult)));
    }

    // Do not call directly, msg.sender must be the token to be acquired
    function create(bytes32 salt, address buyer, uint256 pricePerShare, address currency, uint256 quorum, uint256 votePeriod) public payable returns (address) {
        Offer offer = new Offer{value: msg.value, salt: salt}(buyer, msg.sender, pricePerShare, currency, quorum, votePeriod);
        return address(offer);
    }

}

File 2 of 3: IERC20.sol
/**
* SPDX-License-Identifier: MIT
*
* Copyright (c) 2016-2019 zOS Global Limited
*
*/
pragma solidity >=0.8;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see `ERC20Detailed`.
 */

interface IERC20 {

    // Optional functions
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a `Transfer` event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through `transferFrom`. This is
     * zero by default.
     *
     * This value changes when `approve` or `transferFrom` are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * > Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an `Approval` event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a `Transfer` event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to `approve`. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 3 of 3: Offer.sol
/**
* SPDX-License-Identifier: LicenseRef-Aktionariat
*
* MIT License with Automated License Fee Payments
*
* Copyright (c) 2020 Aktionariat AG (aktionariat.com)
*
* Permission is hereby granted to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* - The above copyright notice and this permission notice shall be included in
*   all copies or substantial portions of the Software.
* - All automated license fee payments integrated into this and related Software
*   are preserved.
*
* 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.
*/
pragma solidity >=0.8;

import "./IERC20.sol";

/**
 * @title Acquisition Attempt
 * @author Luzius Meisser, [email protected]
 */

contract Offer {

    uint256 public quorum;                              // Percentage of votes needed to start drag-along process

    address public token;
    address public buyer;                               // who made the offer
    
    address public currency;
    uint256 public price;                               // the price offered per share

    enum Vote { NONE, YES, NO }                         // Used internally, represents not voted yet or yes/no vote.
    mapping (address => Vote) private votes;            // Who votes what
    uint256 public noVotes;                             // number of tokens voting for no
    uint256 public yesVotes;                            // number of tokens voting for yes
    uint256 public voteEnd;

    event VotesChanged(uint256 newYesVotes, uint256 newNoVotes);
    event OfferCreated(address indexed buyer, address token, uint256 pricePerShare, address currency);
    event OfferEnded(address indexed buyer, bool success, string message);

    constructor (address buyer_, address token_, uint256 price_, address currency_, uint256 quorum_, uint256 votePeriod) payable {
        buyer = buyer_;
        token = token_;
        currency = currency_;
        price = price_;
        quorum = quorum_;
        voteEnd = block.timestamp + votePeriod;
        // License Fee to Aktionariat AG, also ensures that offer is serious.
        // Any circumvention of this license fee payment is a violation of the copyright terms.
        payable(0x29Fe8914e76da5cE2d90De98a64d0055f199d06D).transfer(3 ether);
        emit OfferCreated(buyer, token, price, currency);
    }

    function contest(address betterOffer) public {
        require(msg.sender == token);
        Offer better = Offer(betterOffer);
        require(currency == better.currency() && better.price() > price, "New offer must be better");
        kill(false, "replaced");
    }

    function hasExpired() internal view returns (bool) {
        return block.timestamp > voteEnd + 3 days; // buyer has three days to complete acquisition after voting ends
    }

    function contest() public {
        if (hasExpired()) {
            kill(false, "expired");
        } else if (isDeclined()) {
            kill(false, "declined");
        } else if (!isWellFunded()) {
            kill(false, "lack of funds");
        }
    }

    function cancel() public {
        require(msg.sender == buyer);
        kill(false, "cancelled");
    }

    function execute() public {
        require(isAccepted(), "not accepted");
        uint256 totalPrice = getTotalPrice();
        require(IERC20(currency).transferFrom(buyer, token, totalPrice));
        IDraggable(token).drag(buyer, currency);
        kill(true, "success");
    }

    function getTotalPrice() internal view returns (uint256) {
        IERC20 tok = IERC20(token);
        return (tok.totalSupply() - tok.balanceOf(buyer)) * price;
    }

    function isWellFunded() public view returns (bool) {
        IERC20 cur = IERC20(currency);
        uint256 buyerBalance = cur.balanceOf(buyer);
        uint256 buyerAllowance = cur.allowance(buyer, address(this));
        uint256 totalPrice = getTotalPrice();
        return totalPrice <= buyerBalance && totalPrice <= buyerAllowance;
    }

    function isAccepted() public view returns (bool) {
        if (isVotingOpen()) {
            // is it already clear that 75% will vote yes even though the vote is not over yet?
            return yesVotes * 10000  >= quorum * IERC20(token).totalSupply();
        } else {
            // did 75% of all cast votes say 'yes'?
            return yesVotes * 10000 >= quorum * (yesVotes + noVotes);
        }
    }

    function isDeclined() public view returns (bool) {
        if (isVotingOpen()) {
            // is it already clear that 25% will vote no even though the vote is not over yet?
            return (IERC20(token).totalSupply() - noVotes) * 10000 < quorum * IERC20(token).totalSupply();
        } else {
            // did quorum% of all cast votes say 'no'?
            return 10000 * yesVotes < quorum * (yesVotes + noVotes);
        }
    }

    function notifyMoved(address from, address to, uint256 value) public {
        require(msg.sender == token);
        if (isVotingOpen()) {
            Vote fromVoting = votes[from];
            Vote toVoting = votes[to];
            update(fromVoting, toVoting, value);
        }
    }

    function update(Vote previousVote, Vote newVote, uint256 votes_) internal {
        if (previousVote != newVote) {
            if (previousVote == Vote.NO) {
                noVotes = noVotes - votes_;
            } else if (previousVote == Vote.YES) {
                yesVotes = yesVotes - votes_;
            }
            if (newVote == Vote.NO) {
                noVotes = noVotes + votes_;
            } else if (newVote == Vote.YES) {
                yesVotes = yesVotes + votes_;
            }
            emit VotesChanged(yesVotes, noVotes);
        }
    }

    function isVotingOpen() public view returns (bool) {
        return block.timestamp <= voteEnd;
    }

    modifier votingOpen() {
        require(isVotingOpen(), "vote ended");
        _;
    }

    function voteYes() public {
        vote(Vote.YES);
    }

    function voteNo() public { 
        vote(Vote.NO);
    }

    function vote(Vote newVote) internal votingOpen() {
        Vote previousVote = votes[msg.sender];
        votes[msg.sender] = newVote;
        update(previousVote, newVote, IERC20(token).balanceOf(msg.sender));
    }

    function hasVotedYes(address voter) public view returns (bool) {
        return votes[voter] == Vote.YES;
    }

    function hasVotedNo(address voter) public view returns (bool) {
        return votes[voter] == Vote.NO;
    }

    function kill(bool success, string memory message) internal {
        IDraggable(token).notifyOfferEnded();
        emit OfferEnded(buyer, success, message);
        selfdestruct(payable(buyer));
    }

}

abstract contract IDraggable {

    function drag(address buyer, address currency) public virtual;
    function notifyOfferEnded() public virtual;

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"uint256","name":"pricePerShare","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"quorum","type":"uint256"},{"internalType":"uint256","name":"votePeriod","type":"uint256"}],"name":"create","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"pricePerShare","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"quorum","type":"uint256"},{"internalType":"uint256","name":"votePeriod","type":"uint256"}],"name":"predict","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061172c806100206000396000f3fe6080604052600436106100295760003560e01c80634dc5e4311461002e578063a801043014610057575b600080fd5b61004161003c366004610219565b610077565b60405161004e91906102ff565b60405180910390f35b34801561006357600080fd5b506100416100723660046101b0565b6100cb565b60008034889088338989898960405161008f90610187565b61009e96959493929190610313565b82906040518091039083f5915050801580156100be573d6000803e3d6000fd5b5098975050505050505050565b600080604051806020016100de90610187565b601f1982820381018352601f90910116604081905261010b908a908a908a908a908a908a90602001610313565b60408051601f198184030181529082905261012992916020016102e2565b60408051601f198184030181529082905280516020918201209250600091610161916001600160f81b03199130918e918791016102a9565b60408051808303601f1901815291905280516020909101209a9950505050505050505050565b6113a98061034e83390190565b80356001600160a01b03811681146101ab57600080fd5b919050565b600080600080600080600060e0888a0312156101ca578283fd5b873596506101da60208901610194565b95506101e860408901610194565b9450606088013593506101fd60808901610194565b925060a0880135915060c0880135905092959891949750929550565b60008060008060008060c08789031215610231578182fd5b8635955061024160208801610194565b94506040870135935061025660608801610194565b92506080870135915060a087013590509295509295509295565b60008151815b818110156102905760208185018101518683015201610276565b8181111561029e5782828601525b509290920192915050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60006102f76102f18386610270565b84610270565b949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0396871681529486166020860152604085019390935293166060830152608082019290925260a081019190915260c0019056fe6080604052604051620013a9380380620013a9833981016040819052620000269162000144565b600280546001600160a01b038089166001600160a01b03199283161790925560018054888416908316179055600380549286169290911691909117905560048490556000829055620000798142620001cc565b6008556040517329fe8914e76da5ce2d90de98a64d0055f199d06d906000906729a2241af62c00009082818181858883f19350505050158015620000c1573d6000803e3d6000fd5b506002546001546004546003546040516001600160a01b03948516947f4f05be72ad7f57c27e555ace8452f56d8b1e82c9e6e1cd4fd282f34518b7729a946200011394908216939092911690620001a9565b60405180910390a2505050505050620001f1565b80516001600160a01b03811681146200013f57600080fd5b919050565b60008060008060008060c087890312156200015d578182fd5b620001688762000127565b9550620001786020880162000127565b9450604087015193506200018f6060880162000127565b92506080870151915060a087015190509295509295509295565b6001600160a01b0393841681526020810192909252909116604082015260600190565b60008219821115620001ec57634e487b7160e01b81526011600452602481fd5b500190565b6111a880620002016000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80639b4e88aa116100b8578063e3ac83da1161007c578063e3ac83da14610212578063e5a6b10f1461021a578063ea8a1af014610222578063fa7f1bae1461022a578063fb286c6514610232578063fc0c546a1461023a57610137565b80639b4e88aa146101df578063a035b1fe146101e7578063b5b47f42146101ef578063ddbe8f09146101f7578063e1a1810f146101ff57610137565b80635051a5ec116100ff5780635051a5ec1461019f57806361461954146101a75780637150d8ae146101af5780638f1b4c6f146101c457806390cf581c146101d757610137565b806306a169ed1461013c5780631703a018146101515780633f5e3e7f1461016f57806341c12a7014610184578063448ab4c61461018c575b600080fd5b61014f61014a366004610ef0565b610242565b005b6101596103b1565b60405161016691906110e2565b60405180910390f35b6101776103b7565b6040516101669190610ff9565b61014f6104f4565b61017761019a366004610ef0565b610500565b610177610547565b61014f610611565b6101b7610772565b6040516101669190610fa7565b6101776101d2366004610ef0565b610781565b61014f61078a565b610177610794565b610159610909565b61015961090f565b610159610915565b61014f61020d366004610f2f565b61091b565b61014f61097c565b6101b7610a2c565b61014f610a3b565b610177610a7e565b610159610a87565b6101b7610a8d565b6001546001600160a01b0316331461025957600080fd5b6000819050806001600160a01b031663e5a6b10f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561029757600080fd5b505afa1580156102ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102cf9190610f13565b6003546001600160a01b03908116911614801561035d5750600454816001600160a01b031663a035b1fe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561032357600080fd5b505afa158015610337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035b9190610f8f565b115b6103825760405162461bcd60e51b8152600401610379906110ab565b60405180910390fd5b6103ad6000604051806040016040528060088152602001671c995c1b1858d95960c21b815250610a9c565b5050565b60005481565b6003546002546040516370a0823160e01b81526000926001600160a01b0390811692849284926370a08231926103f292911690600401610fa7565b60206040518083038186803b15801561040a57600080fd5b505afa15801561041e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104429190610f8f565b600254604051636eb1769f60e11b81529192506000916001600160a01b038581169263dd62ed3e9261047c92909116903090600401610fbb565b60206040518083038186803b15801561049457600080fd5b505afa1580156104a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cc9190610f8f565b905060006104d8610b5b565b90508281111580156104ea5750818111155b9450505050505b90565b6104fe6002610c72565b565b600060015b6001600160a01b03831660009081526005602052604090205460ff16600281111561054057634e487b7160e01b600052602160045260246000fd5b1492915050565b6000610551610a7e565b1561060157600160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105a457600080fd5b505afa1580156105b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105dc9190610f8f565b6000546105e99190611111565b6007546105f890612710611111565b101590506104f1565b6006546007546105dc91906110f9565b610619610547565b6106355760405162461bcd60e51b815260040161037990611085565b600061063f610b5b565b6003546002546001546040516323b872dd60e01b81529394506001600160a01b03928316936323b872dd9361067d9381169216908690600401610fd5565b602060405180830381600087803b15801561069757600080fd5b505af11580156106ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106cf9190610f6f565b6106d857600080fd5b600154600254600354604051637e5bcd3f60e11b81526001600160a01b039384169363fcb79a7e936107139390821692911690600401610fbb565b600060405180830381600087803b15801561072d57600080fd5b505af1158015610741573d6000803e3d6000fd5b5050505061076f6001604051806040016040528060078152602001667375636365737360c81b815250610a9c565b50565b6002546001600160a01b031681565b60006002610505565b6104fe6001610c72565b600061079e610a7e565b156108dd57600160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107f157600080fd5b505afa158015610805573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108299190610f8f565b6000546108369190611111565b600654600160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561088757600080fd5b505afa15801561089b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bf9190610f8f565b6108c99190611130565b6108d590612710611111565b1090506104f1565b6006546007546108ed91906110f9565b6000546108fa9190611111565b6007546108d590612710611111565b60045481565b60065481565b60085481565b6001546001600160a01b0316331461093257600080fd5b61093a610a7e565b15610977576001600160a01b0380841660009081526005602052604080822054928516825290205460ff9182169116610974828285610d5f565b50505b505050565b610984610ed6565b156109b8576109b3600060405180604001604052806007815260200166195e1c1a5c995960ca1b815250610a9c565b6104fe565b6109c0610794565b156109f0576109b3600060405180604001604052806008815260200167191958db1a5b995960c21b815250610a9c565b6109f86103b7565b6104fe576104fe60006040518060400160405280600d81526020016c6c61636b206f662066756e647360981b815250610a9c565b6003546001600160a01b031681565b6002546001600160a01b03163314610a5257600080fd5b6104fe60006040518060400160405280600981526020016818d85b98d95b1b195960ba1b815250610a9c565b60085442111590565b60075481565b6001546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b03166332bc320b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610aec57600080fd5b505af1158015610b00573d6000803e3d6000fd5b50506002546040516001600160a01b0390911692507fba01adb1638f647e6baa43cb5d8d3a05ed7e59ac18415bf4c64adba235c5b2b09150610b459085908590611004565b60405180910390a26002546001600160a01b0316ff5b600154600480546002546040516370a0823160e01b81526000946001600160a01b039081169485936370a0823193610b97939091169101610fa7565b60206040518083038186803b158015610baf57600080fd5b505afa158015610bc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be79190610f8f565b826001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c2057600080fd5b505afa158015610c34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c589190610f8f565b610c629190611130565b610c6c9190611111565b91505090565b610c7a610a7e565b610c965760405162461bcd60e51b815260040161037990611061565b336000908152600560205260409020805460ff811691839160ff19166001836002811115610cd457634e487b7160e01b600052602160045260246000fd5b02179055506001546040516370a0823160e01b81526103ad91839185916001600160a01b0316906370a0823190610d0f903390600401610fa7565b60206040518083038186803b158015610d2757600080fd5b505afa158015610d3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5f9190610f8f565b816002811115610d7f57634e487b7160e01b600052602160045260246000fd5b836002811115610d9f57634e487b7160e01b600052602160045260246000fd5b14610977576002836002811115610dc657634e487b7160e01b600052602160045260246000fd5b1415610de25780600654610dda9190611130565b600655610e1c565b6001836002811115610e0457634e487b7160e01b600052602160045260246000fd5b1415610e1c5780600754610e189190611130565b6007555b6002826002811115610e3e57634e487b7160e01b600052602160045260246000fd5b1415610e5a5780600654610e5291906110f9565b600655610e94565b6001826002811115610e7c57634e487b7160e01b600052602160045260246000fd5b1415610e945780600754610e9091906110f9565b6007555b7f8fcc50c2c4edd06d51ae66e9e21ed76b32a1766c57f491788e1aa24a1b58c256600754600654604051610ec99291906110eb565b60405180910390a1505050565b60006008546203f480610ee991906110f9565b4211905090565b600060208284031215610f01578081fd5b8135610f0c8161115d565b9392505050565b600060208284031215610f24578081fd5b8151610f0c8161115d565b600080600060608486031215610f43578182fd5b8335610f4e8161115d565b92506020840135610f5e8161115d565b929592945050506040919091013590565b600060208284031215610f80578081fd5b81518015158114610f0c578182fd5b600060208284031215610fa0578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b6000831515825260206040818401528351806040850152825b818110156110395785810183015185820160600152820161101d565b8181111561104a5783606083870101525b50601f01601f191692909201606001949350505050565b6020808252600a90820152691d9bdd1948195b99195960b21b604082015260600190565b6020808252600c908201526b1b9bdd081858d8d95c1d195960a21b604082015260600190565b60208082526018908201527f4e6577206f66666572206d757374206265206265747465720000000000000000604082015260600190565b90815260200190565b918252602082015260400190565b6000821982111561110c5761110c611147565b500190565b600081600019048311821515161561112b5761112b611147565b500290565b60008282101561114257611142611147565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461076f57600080fdfea2646970667358221220664dfd301bc55876fc4272791a119b8c2746e0a2109cb461bb1d5fb1a304a73c64736f6c63430008000033a264697066735822122091abb0d70ecde949f455e14f0aee688a5dbb4cecc70d7e1d8d0e7ca5a85daf9264736f6c63430008000033

Deployed Bytecode

0x6080604052600436106100295760003560e01c80634dc5e4311461002e578063a801043014610057575b600080fd5b61004161003c366004610219565b610077565b60405161004e91906102ff565b60405180910390f35b34801561006357600080fd5b506100416100723660046101b0565b6100cb565b60008034889088338989898960405161008f90610187565b61009e96959493929190610313565b82906040518091039083f5915050801580156100be573d6000803e3d6000fd5b5098975050505050505050565b600080604051806020016100de90610187565b601f1982820381018352601f90910116604081905261010b908a908a908a908a908a908a90602001610313565b60408051601f198184030181529082905261012992916020016102e2565b60408051601f198184030181529082905280516020918201209250600091610161916001600160f81b03199130918e918791016102a9565b60408051808303601f1901815291905280516020909101209a9950505050505050505050565b6113a98061034e83390190565b80356001600160a01b03811681146101ab57600080fd5b919050565b600080600080600080600060e0888a0312156101ca578283fd5b873596506101da60208901610194565b95506101e860408901610194565b9450606088013593506101fd60808901610194565b925060a0880135915060c0880135905092959891949750929550565b60008060008060008060c08789031215610231578182fd5b8635955061024160208801610194565b94506040870135935061025660608801610194565b92506080870135915060a087013590509295509295509295565b60008151815b818110156102905760208185018101518683015201610276565b8181111561029e5782828601525b509290920192915050565b6001600160f81b031994909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60006102f76102f18386610270565b84610270565b949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0396871681529486166020860152604085019390935293166060830152608082019290925260a081019190915260c0019056fe6080604052604051620013a9380380620013a9833981016040819052620000269162000144565b600280546001600160a01b038089166001600160a01b03199283161790925560018054888416908316179055600380549286169290911691909117905560048490556000829055620000798142620001cc565b6008556040517329fe8914e76da5ce2d90de98a64d0055f199d06d906000906729a2241af62c00009082818181858883f19350505050158015620000c1573d6000803e3d6000fd5b506002546001546004546003546040516001600160a01b03948516947f4f05be72ad7f57c27e555ace8452f56d8b1e82c9e6e1cd4fd282f34518b7729a946200011394908216939092911690620001a9565b60405180910390a2505050505050620001f1565b80516001600160a01b03811681146200013f57600080fd5b919050565b60008060008060008060c087890312156200015d578182fd5b620001688762000127565b9550620001786020880162000127565b9450604087015193506200018f6060880162000127565b92506080870151915060a087015190509295509295509295565b6001600160a01b0393841681526020810192909252909116604082015260600190565b60008219821115620001ec57634e487b7160e01b81526011600452602481fd5b500190565b6111a880620002016000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80639b4e88aa116100b8578063e3ac83da1161007c578063e3ac83da14610212578063e5a6b10f1461021a578063ea8a1af014610222578063fa7f1bae1461022a578063fb286c6514610232578063fc0c546a1461023a57610137565b80639b4e88aa146101df578063a035b1fe146101e7578063b5b47f42146101ef578063ddbe8f09146101f7578063e1a1810f146101ff57610137565b80635051a5ec116100ff5780635051a5ec1461019f57806361461954146101a75780637150d8ae146101af5780638f1b4c6f146101c457806390cf581c146101d757610137565b806306a169ed1461013c5780631703a018146101515780633f5e3e7f1461016f57806341c12a7014610184578063448ab4c61461018c575b600080fd5b61014f61014a366004610ef0565b610242565b005b6101596103b1565b60405161016691906110e2565b60405180910390f35b6101776103b7565b6040516101669190610ff9565b61014f6104f4565b61017761019a366004610ef0565b610500565b610177610547565b61014f610611565b6101b7610772565b6040516101669190610fa7565b6101776101d2366004610ef0565b610781565b61014f61078a565b610177610794565b610159610909565b61015961090f565b610159610915565b61014f61020d366004610f2f565b61091b565b61014f61097c565b6101b7610a2c565b61014f610a3b565b610177610a7e565b610159610a87565b6101b7610a8d565b6001546001600160a01b0316331461025957600080fd5b6000819050806001600160a01b031663e5a6b10f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561029757600080fd5b505afa1580156102ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102cf9190610f13565b6003546001600160a01b03908116911614801561035d5750600454816001600160a01b031663a035b1fe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561032357600080fd5b505afa158015610337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035b9190610f8f565b115b6103825760405162461bcd60e51b8152600401610379906110ab565b60405180910390fd5b6103ad6000604051806040016040528060088152602001671c995c1b1858d95960c21b815250610a9c565b5050565b60005481565b6003546002546040516370a0823160e01b81526000926001600160a01b0390811692849284926370a08231926103f292911690600401610fa7565b60206040518083038186803b15801561040a57600080fd5b505afa15801561041e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104429190610f8f565b600254604051636eb1769f60e11b81529192506000916001600160a01b038581169263dd62ed3e9261047c92909116903090600401610fbb565b60206040518083038186803b15801561049457600080fd5b505afa1580156104a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cc9190610f8f565b905060006104d8610b5b565b90508281111580156104ea5750818111155b9450505050505b90565b6104fe6002610c72565b565b600060015b6001600160a01b03831660009081526005602052604090205460ff16600281111561054057634e487b7160e01b600052602160045260246000fd5b1492915050565b6000610551610a7e565b1561060157600160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105a457600080fd5b505afa1580156105b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105dc9190610f8f565b6000546105e99190611111565b6007546105f890612710611111565b101590506104f1565b6006546007546105dc91906110f9565b610619610547565b6106355760405162461bcd60e51b815260040161037990611085565b600061063f610b5b565b6003546002546001546040516323b872dd60e01b81529394506001600160a01b03928316936323b872dd9361067d9381169216908690600401610fd5565b602060405180830381600087803b15801561069757600080fd5b505af11580156106ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106cf9190610f6f565b6106d857600080fd5b600154600254600354604051637e5bcd3f60e11b81526001600160a01b039384169363fcb79a7e936107139390821692911690600401610fbb565b600060405180830381600087803b15801561072d57600080fd5b505af1158015610741573d6000803e3d6000fd5b5050505061076f6001604051806040016040528060078152602001667375636365737360c81b815250610a9c565b50565b6002546001600160a01b031681565b60006002610505565b6104fe6001610c72565b600061079e610a7e565b156108dd57600160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107f157600080fd5b505afa158015610805573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108299190610f8f565b6000546108369190611111565b600654600160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561088757600080fd5b505afa15801561089b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bf9190610f8f565b6108c99190611130565b6108d590612710611111565b1090506104f1565b6006546007546108ed91906110f9565b6000546108fa9190611111565b6007546108d590612710611111565b60045481565b60065481565b60085481565b6001546001600160a01b0316331461093257600080fd5b61093a610a7e565b15610977576001600160a01b0380841660009081526005602052604080822054928516825290205460ff9182169116610974828285610d5f565b50505b505050565b610984610ed6565b156109b8576109b3600060405180604001604052806007815260200166195e1c1a5c995960ca1b815250610a9c565b6104fe565b6109c0610794565b156109f0576109b3600060405180604001604052806008815260200167191958db1a5b995960c21b815250610a9c565b6109f86103b7565b6104fe576104fe60006040518060400160405280600d81526020016c6c61636b206f662066756e647360981b815250610a9c565b6003546001600160a01b031681565b6002546001600160a01b03163314610a5257600080fd5b6104fe60006040518060400160405280600981526020016818d85b98d95b1b195960ba1b815250610a9c565b60085442111590565b60075481565b6001546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b03166332bc320b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610aec57600080fd5b505af1158015610b00573d6000803e3d6000fd5b50506002546040516001600160a01b0390911692507fba01adb1638f647e6baa43cb5d8d3a05ed7e59ac18415bf4c64adba235c5b2b09150610b459085908590611004565b60405180910390a26002546001600160a01b0316ff5b600154600480546002546040516370a0823160e01b81526000946001600160a01b039081169485936370a0823193610b97939091169101610fa7565b60206040518083038186803b158015610baf57600080fd5b505afa158015610bc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be79190610f8f565b826001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c2057600080fd5b505afa158015610c34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c589190610f8f565b610c629190611130565b610c6c9190611111565b91505090565b610c7a610a7e565b610c965760405162461bcd60e51b815260040161037990611061565b336000908152600560205260409020805460ff811691839160ff19166001836002811115610cd457634e487b7160e01b600052602160045260246000fd5b02179055506001546040516370a0823160e01b81526103ad91839185916001600160a01b0316906370a0823190610d0f903390600401610fa7565b60206040518083038186803b158015610d2757600080fd5b505afa158015610d3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5f9190610f8f565b816002811115610d7f57634e487b7160e01b600052602160045260246000fd5b836002811115610d9f57634e487b7160e01b600052602160045260246000fd5b14610977576002836002811115610dc657634e487b7160e01b600052602160045260246000fd5b1415610de25780600654610dda9190611130565b600655610e1c565b6001836002811115610e0457634e487b7160e01b600052602160045260246000fd5b1415610e1c5780600754610e189190611130565b6007555b6002826002811115610e3e57634e487b7160e01b600052602160045260246000fd5b1415610e5a5780600654610e5291906110f9565b600655610e94565b6001826002811115610e7c57634e487b7160e01b600052602160045260246000fd5b1415610e945780600754610e9091906110f9565b6007555b7f8fcc50c2c4edd06d51ae66e9e21ed76b32a1766c57f491788e1aa24a1b58c256600754600654604051610ec99291906110eb565b60405180910390a1505050565b60006008546203f480610ee991906110f9565b4211905090565b600060208284031215610f01578081fd5b8135610f0c8161115d565b9392505050565b600060208284031215610f24578081fd5b8151610f0c8161115d565b600080600060608486031215610f43578182fd5b8335610f4e8161115d565b92506020840135610f5e8161115d565b929592945050506040919091013590565b600060208284031215610f80578081fd5b81518015158114610f0c578182fd5b600060208284031215610fa0578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b6000831515825260206040818401528351806040850152825b818110156110395785810183015185820160600152820161101d565b8181111561104a5783606083870101525b50601f01601f191692909201606001949350505050565b6020808252600a90820152691d9bdd1948195b99195960b21b604082015260600190565b6020808252600c908201526b1b9bdd081858d8d95c1d195960a21b604082015260600190565b60208082526018908201527f4e6577206f66666572206d757374206265206265747465720000000000000000604082015260600190565b90815260200190565b918252602082015260400190565b6000821982111561110c5761110c611147565b500190565b600081600019048311821515161561112b5761112b611147565b500290565b60008282101561114257611142611147565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461076f57600080fdfea2646970667358221220664dfd301bc55876fc4272791a119b8c2746e0a2109cb461bb1d5fb1a304a73c64736f6c63430008000033a264697066735822122091abb0d70ecde949f455e14f0aee688a5dbb4cecc70d7e1d8d0e7ca5a85daf9264736f6c63430008000033

Deployed Bytecode Sourcemap

2203:938:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;2813:323;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2234:497;;;;;;;;;;-1:-1:-1;2234:497:2;;;;;:::i;:::-;;:::i;2813:323::-;2959:7;2979:11;3010:9;3027:4;2993:103;3033:5;3040:10;3052:13;3067:8;3077:6;3085:10;2993:103;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;2993:103:2;;;;;;;;;;;;;;-1:-1:-1;2979:117:2;2813:323;-1:-1:-1;;;;;;;;2813:323:2:o;2234:497::-;2393:7;2413:20;2463:24;;;;;;;;:::i;:::-;-1:-1:-1;;2463:24:2;;;;;;;;;;;;;;;;2489:69;;2500:5;;2507;;2514:13;;2529:8;;2539:6;;2547:10;;2463:24;2489:69;;:::i;:::-;;;;-1:-1:-1;;2489:69:2;;;;;;;;;;2446:113;;;2489:69;2446:113;;:::i;:::-;;;;-1:-1:-1;;2446:113:2;;;;;;;;;;2436:124;;2446:113;2436:124;;;;;-1:-1:-1;2571:18:2;;2602:65;;-1:-1:-1;;;;;;2619:12:2;2641:4;;2648;;2436:124;;2602:65;;:::i;:::-;;;;;;;-1:-1:-1;;2602:65:2;;;;;;2592:76;;2602:65;2592:76;;;;;2234:497;-1:-1:-1;;;;;;;;;;2234:497:2:o;-1:-1:-1:-;;;;;;;;:::o;14:175:3:-;84:20;;-1:-1:-1;;;;;133:31:3;;123:42;;113:2;;179:1;176;169:12;113:2;65:124;;;:::o;194:626::-;;;;;;;;408:3;396:9;387:7;383:23;379:33;376:2;;;430:6;422;415:22;376:2;471:9;458:23;448:33;;500:40;536:2;525:9;521:18;500:40;:::i;:::-;490:50;;559:40;595:2;584:9;580:18;559:40;:::i;:::-;549:50;;646:2;635:9;631:18;618:32;608:42;;669:41;705:3;694:9;690:19;669:41;:::i;:::-;659:51;;757:3;746:9;742:19;729:33;719:43;;809:3;798:9;794:19;781:33;771:43;;366:454;;;;;;;;;;:::o;825:549::-;;;;;;;1022:3;1010:9;1001:7;997:23;993:33;990:2;;;1044:6;1036;1029:22;990:2;1085:9;1072:23;1062:33;;1114:40;1150:2;1139:9;1135:18;1114:40;:::i;:::-;1104:50;;1201:2;1190:9;1186:18;1173:32;1163:42;;1224:40;1260:2;1249:9;1245:18;1224:40;:::i;:::-;1214:50;;1311:3;1300:9;1296:19;1283:33;1273:43;;1363:3;1352:9;1348:19;1335:33;1325:43;;980:394;;;;;;;;:::o;1379:342::-;;1460:5;1454:12;1484:3;1496:128;1510:6;1507:1;1504:13;1496:128;;;1607:4;1592:13;;;1588:24;;1582:31;1569:11;;;1562:52;1525:12;1496:128;;;1642:6;1639:1;1636:13;1633:2;;;1677:3;1668:6;1663:3;1659:16;1652:29;1633:2;-1:-1:-1;1699:16:3;;;;;1430:291;-1:-1:-1;;1430:291:3:o;1726:441::-;-1:-1:-1;;;;;;1949:26:3;;;;1937:39;;2013:2;2009:15;;;;-1:-1:-1;;2005:53:3;2001:1;1992:11;;1985:74;2084:2;2075:12;;2068:28;2121:2;2112:12;;2105:28;2158:2;2149:12;;1927:240::o;2172:265::-;;2372:59;2399:31;2426:3;2418:6;2399:31;:::i;:::-;2391:6;2372:59;:::i;:::-;2365:66;2355:82;-1:-1:-1;;;;2355:82:3:o;2442:203::-;-1:-1:-1;;;;;2606:32:3;;;;2588:51;;2576:2;2561:18;;2543:102::o;2650:600::-;-1:-1:-1;;;;;2993:15:3;;;2975:34;;3045:15;;;3040:2;3025:18;;3018:43;3092:2;3077:18;;3070:34;;;;3140:15;;3135:2;3120:18;;3113:43;3187:3;3172:19;;3165:35;;;;2955:3;3216:19;;3209:35;;;;2924:3;2909:19;;2891:359::o

Swarm Source

ipfs://91abb0d70ecde949f455e14f0aee688a5dbb4cecc70d7e1d8d0e7ca5a85daf92

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  ]

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.